1. Packages
  2. Powerstore Provider
  3. API Docs
  4. Snapshotrule
powerstore 1.2.0 published on Monday, Apr 14, 2025 by dell

powerstore.Snapshotrule

Explore with Pulumi AI

Import

#Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved.

#Licensed under the Mozilla Public License Version 2.0 (the “License”);

#you may not use this file except in compliance with the License.

#You may obtain a copy of the License at

http://mozilla.org/MPL/2.0/

#Unless required by applicable law or agreed to in writing, software

#distributed under the License is distributed on an “AS IS” BASIS,

#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

#See the License for the specific language governing permissions and

#limitations under the License.

Below are the steps to import snapshot rule :

Step 1 - To import a snapshot rule , we need the id of that snapshot rule

Step 2 - To check the id of the snapshot rule we can make Get request to snapshot rule endpoint. eg. https://10.0.0.1/api/rest/snapshot_rule which will return list of all snapshot rule ids.

Step 3 - Add empty resource block in tf file.

eg.

resource “powerstore_snapshotrule” “resource_block_name” {

(resource arguments)

}

$ pulumi import powerstore:index/snapshotrule:Snapshotrule Step 4 - Execute the command: "powerstore_snapshotrule.resource_block_name" "id_of_the_snapshot_rule" (resource_block_name must be taken from step 3 and id must be taken from step 2)
Copy

Step 5 - After successful execution of the command , check the state file

Create Snapshotrule Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Snapshotrule(name: string, args: SnapshotruleArgs, opts?: CustomResourceOptions);
@overload
def Snapshotrule(resource_name: str,
                 args: SnapshotruleArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def Snapshotrule(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 desired_retention: Optional[float] = None,
                 days_of_weeks: Optional[Sequence[str]] = None,
                 delete_snaps: Optional[bool] = None,
                 interval: Optional[str] = None,
                 is_read_only: Optional[bool] = None,
                 name: Optional[str] = None,
                 nas_access_type: Optional[str] = None,
                 time_of_day: Optional[str] = None,
                 timezone: Optional[str] = None)
func NewSnapshotrule(ctx *Context, name string, args SnapshotruleArgs, opts ...ResourceOption) (*Snapshotrule, error)
public Snapshotrule(string name, SnapshotruleArgs args, CustomResourceOptions? opts = null)
public Snapshotrule(String name, SnapshotruleArgs args)
public Snapshotrule(String name, SnapshotruleArgs args, CustomResourceOptions options)
type: powerstore:Snapshotrule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SnapshotruleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SnapshotruleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SnapshotruleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SnapshotruleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SnapshotruleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var snapshotruleResource = new Powerstore.Snapshotrule("snapshotruleResource", new()
{
    DesiredRetention = 0,
    DaysOfWeeks = new[]
    {
        "string",
    },
    DeleteSnaps = false,
    Interval = "string",
    IsReadOnly = false,
    Name = "string",
    NasAccessType = "string",
    TimeOfDay = "string",
    Timezone = "string",
});
Copy
example, err := powerstore.NewSnapshotrule(ctx, "snapshotruleResource", &powerstore.SnapshotruleArgs{
	DesiredRetention: pulumi.Float64(0),
	DaysOfWeeks: pulumi.StringArray{
		pulumi.String("string"),
	},
	DeleteSnaps:   pulumi.Bool(false),
	Interval:      pulumi.String("string"),
	IsReadOnly:    pulumi.Bool(false),
	Name:          pulumi.String("string"),
	NasAccessType: pulumi.String("string"),
	TimeOfDay:     pulumi.String("string"),
	Timezone:      pulumi.String("string"),
})
Copy
var snapshotruleResource = new Snapshotrule("snapshotruleResource", SnapshotruleArgs.builder()
    .desiredRetention(0)
    .daysOfWeeks("string")
    .deleteSnaps(false)
    .interval("string")
    .isReadOnly(false)
    .name("string")
    .nasAccessType("string")
    .timeOfDay("string")
    .timezone("string")
    .build());
Copy
snapshotrule_resource = powerstore.Snapshotrule("snapshotruleResource",
    desired_retention=0,
    days_of_weeks=["string"],
    delete_snaps=False,
    interval="string",
    is_read_only=False,
    name="string",
    nas_access_type="string",
    time_of_day="string",
    timezone="string")
Copy
const snapshotruleResource = new powerstore.Snapshotrule("snapshotruleResource", {
    desiredRetention: 0,
    daysOfWeeks: ["string"],
    deleteSnaps: false,
    interval: "string",
    isReadOnly: false,
    name: "string",
    nasAccessType: "string",
    timeOfDay: "string",
    timezone: "string",
});
Copy
type: powerstore:Snapshotrule
properties:
    daysOfWeeks:
        - string
    deleteSnaps: false
    desiredRetention: 0
    interval: string
    isReadOnly: false
    name: string
    nasAccessType: string
    timeOfDay: string
    timezone: string
Copy

Snapshotrule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Snapshotrule resource accepts the following input properties:

DesiredRetention This property is required. double
The Desired snapshot retention period in hours to retain snapshots for this time period.
DaysOfWeeks List<string>
The days of the week when the snapshot rule should be applied.
DeleteSnaps bool
Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed.
Interval string
The interval between snapshots taken by a snapshot rule.
IsReadOnly bool
Indicates whether this snapshot rule can be modified.
Name string
The name of the snapshot rule.
NasAccessType string
The NAS filesystem snapshot access method for snapshot rule.
TimeOfDay string
The time of the day to take a daily snapshot, with format hh:mm.
Timezone string
The time zone identifier for applying the time zone to the timeofday for a snapshot rule.
DesiredRetention This property is required. float64
The Desired snapshot retention period in hours to retain snapshots for this time period.
DaysOfWeeks []string
The days of the week when the snapshot rule should be applied.
DeleteSnaps bool
Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed.
Interval string
The interval between snapshots taken by a snapshot rule.
IsReadOnly bool
Indicates whether this snapshot rule can be modified.
Name string
The name of the snapshot rule.
NasAccessType string
The NAS filesystem snapshot access method for snapshot rule.
TimeOfDay string
The time of the day to take a daily snapshot, with format hh:mm.
Timezone string
The time zone identifier for applying the time zone to the timeofday for a snapshot rule.
desiredRetention This property is required. Double
The Desired snapshot retention period in hours to retain snapshots for this time period.
daysOfWeeks List<String>
The days of the week when the snapshot rule should be applied.
deleteSnaps Boolean
Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed.
interval String
The interval between snapshots taken by a snapshot rule.
isReadOnly Boolean
Indicates whether this snapshot rule can be modified.
name String
The name of the snapshot rule.
nasAccessType String
The NAS filesystem snapshot access method for snapshot rule.
timeOfDay String
The time of the day to take a daily snapshot, with format hh:mm.
timezone String
The time zone identifier for applying the time zone to the timeofday for a snapshot rule.
desiredRetention This property is required. number
The Desired snapshot retention period in hours to retain snapshots for this time period.
daysOfWeeks string[]
The days of the week when the snapshot rule should be applied.
deleteSnaps boolean
Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed.
interval string
The interval between snapshots taken by a snapshot rule.
isReadOnly boolean
Indicates whether this snapshot rule can be modified.
name string
The name of the snapshot rule.
nasAccessType string
The NAS filesystem snapshot access method for snapshot rule.
timeOfDay string
The time of the day to take a daily snapshot, with format hh:mm.
timezone string
The time zone identifier for applying the time zone to the timeofday for a snapshot rule.
desired_retention This property is required. float
The Desired snapshot retention period in hours to retain snapshots for this time period.
days_of_weeks Sequence[str]
The days of the week when the snapshot rule should be applied.
delete_snaps bool
Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed.
interval str
The interval between snapshots taken by a snapshot rule.
is_read_only bool
Indicates whether this snapshot rule can be modified.
name str
The name of the snapshot rule.
nas_access_type str
The NAS filesystem snapshot access method for snapshot rule.
time_of_day str
The time of the day to take a daily snapshot, with format hh:mm.
timezone str
The time zone identifier for applying the time zone to the timeofday for a snapshot rule.
desiredRetention This property is required. Number
The Desired snapshot retention period in hours to retain snapshots for this time period.
daysOfWeeks List<String>
The days of the week when the snapshot rule should be applied.
deleteSnaps Boolean
Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed.
interval String
The interval between snapshots taken by a snapshot rule.
isReadOnly Boolean
Indicates whether this snapshot rule can be modified.
name String
The name of the snapshot rule.
nasAccessType String
The NAS filesystem snapshot access method for snapshot rule.
timeOfDay String
The time of the day to take a daily snapshot, with format hh:mm.
timezone String
The time zone identifier for applying the time zone to the timeofday for a snapshot rule.

Outputs

All input properties are implicitly available as output properties. Additionally, the Snapshotrule resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
IsReplica bool
Indicates whether this is a replica of a snapshot rule on a remote system.
ManagedBy string
The entity that owns and manages the instance.
ManagedById string
The unique id of the managing entity.
Id string
The provider-assigned unique ID for this managed resource.
IsReplica bool
Indicates whether this is a replica of a snapshot rule on a remote system.
ManagedBy string
The entity that owns and manages the instance.
ManagedById string
The unique id of the managing entity.
id String
The provider-assigned unique ID for this managed resource.
isReplica Boolean
Indicates whether this is a replica of a snapshot rule on a remote system.
managedBy String
The entity that owns and manages the instance.
managedById String
The unique id of the managing entity.
id string
The provider-assigned unique ID for this managed resource.
isReplica boolean
Indicates whether this is a replica of a snapshot rule on a remote system.
managedBy string
The entity that owns and manages the instance.
managedById string
The unique id of the managing entity.
id str
The provider-assigned unique ID for this managed resource.
is_replica bool
Indicates whether this is a replica of a snapshot rule on a remote system.
managed_by str
The entity that owns and manages the instance.
managed_by_id str
The unique id of the managing entity.
id String
The provider-assigned unique ID for this managed resource.
isReplica Boolean
Indicates whether this is a replica of a snapshot rule on a remote system.
managedBy String
The entity that owns and manages the instance.
managedById String
The unique id of the managing entity.

Look up Existing Snapshotrule Resource

Get an existing Snapshotrule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: SnapshotruleState, opts?: CustomResourceOptions): Snapshotrule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        days_of_weeks: Optional[Sequence[str]] = None,
        delete_snaps: Optional[bool] = None,
        desired_retention: Optional[float] = None,
        interval: Optional[str] = None,
        is_read_only: Optional[bool] = None,
        is_replica: Optional[bool] = None,
        managed_by: Optional[str] = None,
        managed_by_id: Optional[str] = None,
        name: Optional[str] = None,
        nas_access_type: Optional[str] = None,
        time_of_day: Optional[str] = None,
        timezone: Optional[str] = None) -> Snapshotrule
func GetSnapshotrule(ctx *Context, name string, id IDInput, state *SnapshotruleState, opts ...ResourceOption) (*Snapshotrule, error)
public static Snapshotrule Get(string name, Input<string> id, SnapshotruleState? state, CustomResourceOptions? opts = null)
public static Snapshotrule get(String name, Output<String> id, SnapshotruleState state, CustomResourceOptions options)
resources:  _:    type: powerstore:Snapshotrule    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
DaysOfWeeks List<string>
The days of the week when the snapshot rule should be applied.
DeleteSnaps bool
Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed.
DesiredRetention double
The Desired snapshot retention period in hours to retain snapshots for this time period.
Interval string
The interval between snapshots taken by a snapshot rule.
IsReadOnly bool
Indicates whether this snapshot rule can be modified.
IsReplica bool
Indicates whether this is a replica of a snapshot rule on a remote system.
ManagedBy string
The entity that owns and manages the instance.
ManagedById string
The unique id of the managing entity.
Name string
The name of the snapshot rule.
NasAccessType string
The NAS filesystem snapshot access method for snapshot rule.
TimeOfDay string
The time of the day to take a daily snapshot, with format hh:mm.
Timezone string
The time zone identifier for applying the time zone to the timeofday for a snapshot rule.
DaysOfWeeks []string
The days of the week when the snapshot rule should be applied.
DeleteSnaps bool
Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed.
DesiredRetention float64
The Desired snapshot retention period in hours to retain snapshots for this time period.
Interval string
The interval between snapshots taken by a snapshot rule.
IsReadOnly bool
Indicates whether this snapshot rule can be modified.
IsReplica bool
Indicates whether this is a replica of a snapshot rule on a remote system.
ManagedBy string
The entity that owns and manages the instance.
ManagedById string
The unique id of the managing entity.
Name string
The name of the snapshot rule.
NasAccessType string
The NAS filesystem snapshot access method for snapshot rule.
TimeOfDay string
The time of the day to take a daily snapshot, with format hh:mm.
Timezone string
The time zone identifier for applying the time zone to the timeofday for a snapshot rule.
daysOfWeeks List<String>
The days of the week when the snapshot rule should be applied.
deleteSnaps Boolean
Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed.
desiredRetention Double
The Desired snapshot retention period in hours to retain snapshots for this time period.
interval String
The interval between snapshots taken by a snapshot rule.
isReadOnly Boolean
Indicates whether this snapshot rule can be modified.
isReplica Boolean
Indicates whether this is a replica of a snapshot rule on a remote system.
managedBy String
The entity that owns and manages the instance.
managedById String
The unique id of the managing entity.
name String
The name of the snapshot rule.
nasAccessType String
The NAS filesystem snapshot access method for snapshot rule.
timeOfDay String
The time of the day to take a daily snapshot, with format hh:mm.
timezone String
The time zone identifier for applying the time zone to the timeofday for a snapshot rule.
daysOfWeeks string[]
The days of the week when the snapshot rule should be applied.
deleteSnaps boolean
Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed.
desiredRetention number
The Desired snapshot retention period in hours to retain snapshots for this time period.
interval string
The interval between snapshots taken by a snapshot rule.
isReadOnly boolean
Indicates whether this snapshot rule can be modified.
isReplica boolean
Indicates whether this is a replica of a snapshot rule on a remote system.
managedBy string
The entity that owns and manages the instance.
managedById string
The unique id of the managing entity.
name string
The name of the snapshot rule.
nasAccessType string
The NAS filesystem snapshot access method for snapshot rule.
timeOfDay string
The time of the day to take a daily snapshot, with format hh:mm.
timezone string
The time zone identifier for applying the time zone to the timeofday for a snapshot rule.
days_of_weeks Sequence[str]
The days of the week when the snapshot rule should be applied.
delete_snaps bool
Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed.
desired_retention float
The Desired snapshot retention period in hours to retain snapshots for this time period.
interval str
The interval between snapshots taken by a snapshot rule.
is_read_only bool
Indicates whether this snapshot rule can be modified.
is_replica bool
Indicates whether this is a replica of a snapshot rule on a remote system.
managed_by str
The entity that owns and manages the instance.
managed_by_id str
The unique id of the managing entity.
name str
The name of the snapshot rule.
nas_access_type str
The NAS filesystem snapshot access method for snapshot rule.
time_of_day str
The time of the day to take a daily snapshot, with format hh:mm.
timezone str
The time zone identifier for applying the time zone to the timeofday for a snapshot rule.
daysOfWeeks List<String>
The days of the week when the snapshot rule should be applied.
deleteSnaps Boolean
Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed.
desiredRetention Number
The Desired snapshot retention period in hours to retain snapshots for this time period.
interval String
The interval between snapshots taken by a snapshot rule.
isReadOnly Boolean
Indicates whether this snapshot rule can be modified.
isReplica Boolean
Indicates whether this is a replica of a snapshot rule on a remote system.
managedBy String
The entity that owns and manages the instance.
managedById String
The unique id of the managing entity.
name String
The name of the snapshot rule.
nasAccessType String
The NAS filesystem snapshot access method for snapshot rule.
timeOfDay String
The time of the day to take a daily snapshot, with format hh:mm.
timezone String
The time zone identifier for applying the time zone to the timeofday for a snapshot rule.

Package Details

Repository
powerstore dell/terraform-provider-powerstore
License
Notes
This Pulumi package is based on the powerstore Terraform Provider.