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)
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 string
- The unique name of the resource.
- args SnapshotruleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args SnapshotruleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SnapshotruleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
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")
const snapshotruleResource = new powerstore.Snapshotrule("snapshotruleResource", {
desiredRetention: 0,
daysOfWeeks: ["string"],
deleteSnaps: false,
interval: "string",
isReadOnly: false,
name: "string",
nasAccessType: "string",
timeOfDay: "string",
timezone: "string",
});
type: powerstore:Snapshotrule
properties:
daysOfWeeks:
- string
deleteSnaps: false
desiredRetention: 0
interval: string
isReadOnly: false
name: string
nasAccessType: string
timeOfDay: string
timezone: string
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:
- Desired
Retention double - The Desired snapshot retention period in hours to retain snapshots for this time period.
- Days
Of List<string>Weeks - 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 string
- The interval between snapshots taken by a snapshot rule.
- Is
Read boolOnly - Indicates whether this snapshot rule can be modified.
- Name string
- The name of the snapshot rule.
- Nas
Access stringType - The NAS filesystem snapshot access method for snapshot rule.
- Time
Of stringDay - 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 float64 - The Desired snapshot retention period in hours to retain snapshots for this time period.
- Days
Of []stringWeeks - 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 string
- The interval between snapshots taken by a snapshot rule.
- Is
Read boolOnly - Indicates whether this snapshot rule can be modified.
- Name string
- The name of the snapshot rule.
- Nas
Access stringType - The NAS filesystem snapshot access method for snapshot rule.
- Time
Of stringDay - 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 Double - The Desired snapshot retention period in hours to retain snapshots for this time period.
- days
Of List<String>Weeks - The days of the week when the snapshot rule should be applied.
- delete
Snaps 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.
- is
Read BooleanOnly - Indicates whether this snapshot rule can be modified.
- name String
- The name of the snapshot rule.
- nas
Access StringType - The NAS filesystem snapshot access method for snapshot rule.
- time
Of StringDay - 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 number - The Desired snapshot retention period in hours to retain snapshots for this time period.
- days
Of string[]Weeks - The days of the week when the snapshot rule should be applied.
- delete
Snaps 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.
- is
Read booleanOnly - Indicates whether this snapshot rule can be modified.
- name string
- The name of the snapshot rule.
- nas
Access stringType - The NAS filesystem snapshot access method for snapshot rule.
- time
Of stringDay - 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 float - The Desired snapshot retention period in hours to retain snapshots for this time period.
- days_
of_ Sequence[str]weeks - 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_ boolonly - Indicates whether this snapshot rule can be modified.
- name str
- The name of the snapshot rule.
- nas_
access_ strtype - The NAS filesystem snapshot access method for snapshot rule.
- time_
of_ strday - 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.
- desired
Retention Number - The Desired snapshot retention period in hours to retain snapshots for this time period.
- days
Of List<String>Weeks - The days of the week when the snapshot rule should be applied.
- delete
Snaps 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.
- is
Read BooleanOnly - Indicates whether this snapshot rule can be modified.
- name String
- The name of the snapshot rule.
- nas
Access StringType - The NAS filesystem snapshot access method for snapshot rule.
- time
Of StringDay - 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.
- Is
Replica bool - Indicates whether this is a replica of a snapshot rule on a remote system.
- Managed
By string - The entity that owns and manages the instance.
- Managed
By stringId - The unique id of the managing entity.
- Id string
- 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 string - The entity that owns and manages the instance.
- Managed
By stringId - The unique id of the managing entity.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Replica Boolean - Indicates whether this is a replica of a snapshot rule on a remote system.
- managed
By String - The entity that owns and manages the instance.
- managed
By StringId - The unique id of the managing entity.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Replica boolean - Indicates whether this is a replica of a snapshot rule on a remote system.
- managed
By string - The entity that owns and manages the instance.
- managed
By stringId - 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_ strid - The unique id of the managing entity.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Replica Boolean - Indicates whether this is a replica of a snapshot rule on a remote system.
- managed
By String - The entity that owns and manages the instance.
- managed
By StringId - 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Days
Of List<string>Weeks - 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 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.
- Is
Read boolOnly - 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 string - The entity that owns and manages the instance.
- Managed
By stringId - The unique id of the managing entity.
- Name string
- The name of the snapshot rule.
- Nas
Access stringType - The NAS filesystem snapshot access method for snapshot rule.
- Time
Of stringDay - 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 []stringWeeks - 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 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.
- Is
Read boolOnly - 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 string - The entity that owns and manages the instance.
- Managed
By stringId - The unique id of the managing entity.
- Name string
- The name of the snapshot rule.
- Nas
Access stringType - The NAS filesystem snapshot access method for snapshot rule.
- Time
Of stringDay - 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 List<String>Weeks - The days of the week when the snapshot rule should be applied.
- delete
Snaps Boolean - Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed.
- desired
Retention 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.
- is
Read BooleanOnly - Indicates whether this snapshot rule can be modified.
- is
Replica Boolean - Indicates whether this is a replica of a snapshot rule on a remote system.
- managed
By String - The entity that owns and manages the instance.
- managed
By StringId - The unique id of the managing entity.
- name String
- The name of the snapshot rule.
- nas
Access StringType - The NAS filesystem snapshot access method for snapshot rule.
- time
Of StringDay - 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 string[]Weeks - The days of the week when the snapshot rule should be applied.
- delete
Snaps boolean - Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed.
- desired
Retention 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.
- is
Read booleanOnly - Indicates whether this snapshot rule can be modified.
- is
Replica boolean - Indicates whether this is a replica of a snapshot rule on a remote system.
- managed
By string - The entity that owns and manages the instance.
- managed
By stringId - The unique id of the managing entity.
- name string
- The name of the snapshot rule.
- nas
Access stringType - The NAS filesystem snapshot access method for snapshot rule.
- time
Of stringDay - 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_ Sequence[str]weeks - 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_ boolonly - 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_ strid - The unique id of the managing entity.
- name str
- The name of the snapshot rule.
- nas_
access_ strtype - The NAS filesystem snapshot access method for snapshot rule.
- time_
of_ strday - 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.
- days
Of List<String>Weeks - The days of the week when the snapshot rule should be applied.
- delete
Snaps Boolean - Specify whether all snapshots previously created by this snapshot rule should also be deleted when this rule is removed.
- desired
Retention 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.
- is
Read BooleanOnly - Indicates whether this snapshot rule can be modified.
- is
Replica Boolean - Indicates whether this is a replica of a snapshot rule on a remote system.
- managed
By String - The entity that owns and manages the instance.
- managed
By StringId - The unique id of the managing entity.
- name String
- The name of the snapshot rule.
- nas
Access StringType - The NAS filesystem snapshot access method for snapshot rule.
- time
Of StringDay - 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.