powerflex.SnapshotPolicy
Explore with Pulumi AI
Import
/*
Copyright (c) 2023-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.
*/
import snapshot policy by it’s id
$ pulumi import powerflex:index/snapshotPolicy:SnapshotPolicy snapshot_policy_import_by_id "<id>"
This will import the snapshot_policy instance with specified ID into your Terraform state.
After successful import, you can run terraform state list to ensure the resource has been imported successfully.
Now, you can fill in the resource block with the appropriate arguments and settings that match the imported resource’s real-world configuration.
Execute pulumi preview to see if your configuration and the imported resource are in sync. Make adjustments if needed.
Finally, execute pulumi up to bring the resource fully under Terraform’s management.
Now, the resource which was not part of terraform became part of Terraform managed infrastructure.
Create SnapshotPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SnapshotPolicy(name: string, args: SnapshotPolicyArgs, opts?: CustomResourceOptions);
@overload
def SnapshotPolicy(resource_name: str,
args: SnapshotPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SnapshotPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
auto_snapshot_creation_cadence_in_min: Optional[float] = None,
num_of_retained_snapshots_per_levels: Optional[Sequence[float]] = None,
name: Optional[str] = None,
paused: Optional[bool] = None,
remove_mode: Optional[str] = None,
secure_snapshots: Optional[bool] = None,
snapshot_access_mode: Optional[str] = None,
volume_ids: Optional[Sequence[str]] = None)
func NewSnapshotPolicy(ctx *Context, name string, args SnapshotPolicyArgs, opts ...ResourceOption) (*SnapshotPolicy, error)
public SnapshotPolicy(string name, SnapshotPolicyArgs args, CustomResourceOptions? opts = null)
public SnapshotPolicy(String name, SnapshotPolicyArgs args)
public SnapshotPolicy(String name, SnapshotPolicyArgs args, CustomResourceOptions options)
type: powerflex:SnapshotPolicy
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 SnapshotPolicyArgs
- 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 SnapshotPolicyArgs
- 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 SnapshotPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SnapshotPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SnapshotPolicyArgs
- 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 snapshotPolicyResource = new Powerflex.SnapshotPolicy("snapshotPolicyResource", new()
{
AutoSnapshotCreationCadenceInMin = 0,
NumOfRetainedSnapshotsPerLevels = new[]
{
0,
},
Name = "string",
Paused = false,
RemoveMode = "string",
SecureSnapshots = false,
SnapshotAccessMode = "string",
VolumeIds = new[]
{
"string",
},
});
example, err := powerflex.NewSnapshotPolicy(ctx, "snapshotPolicyResource", &powerflex.SnapshotPolicyArgs{
AutoSnapshotCreationCadenceInMin: pulumi.Float64(0),
NumOfRetainedSnapshotsPerLevels: pulumi.Float64Array{
pulumi.Float64(0),
},
Name: pulumi.String("string"),
Paused: pulumi.Bool(false),
RemoveMode: pulumi.String("string"),
SecureSnapshots: pulumi.Bool(false),
SnapshotAccessMode: pulumi.String("string"),
VolumeIds: pulumi.StringArray{
pulumi.String("string"),
},
})
var snapshotPolicyResource = new SnapshotPolicy("snapshotPolicyResource", SnapshotPolicyArgs.builder()
.autoSnapshotCreationCadenceInMin(0)
.numOfRetainedSnapshotsPerLevels(0)
.name("string")
.paused(false)
.removeMode("string")
.secureSnapshots(false)
.snapshotAccessMode("string")
.volumeIds("string")
.build());
snapshot_policy_resource = powerflex.SnapshotPolicy("snapshotPolicyResource",
auto_snapshot_creation_cadence_in_min=0,
num_of_retained_snapshots_per_levels=[0],
name="string",
paused=False,
remove_mode="string",
secure_snapshots=False,
snapshot_access_mode="string",
volume_ids=["string"])
const snapshotPolicyResource = new powerflex.SnapshotPolicy("snapshotPolicyResource", {
autoSnapshotCreationCadenceInMin: 0,
numOfRetainedSnapshotsPerLevels: [0],
name: "string",
paused: false,
removeMode: "string",
secureSnapshots: false,
snapshotAccessMode: "string",
volumeIds: ["string"],
});
type: powerflex:SnapshotPolicy
properties:
autoSnapshotCreationCadenceInMin: 0
name: string
numOfRetainedSnapshotsPerLevels:
- 0
paused: false
removeMode: string
secureSnapshots: false
snapshotAccessMode: string
volumeIds:
- string
SnapshotPolicy 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 SnapshotPolicy resource accepts the following input properties:
- Auto
Snapshot doubleCreation Cadence In Min - The interval in minutes between two snapshots in the policy.
- Num
Of List<double>Retained Snapshots Per Levels - List which represents the number of snapshots per retention level.
- Name string
- Name of the Snapshot Policy
- Paused bool
- Indicates that the snapshot policy should paused or not. Default value is
false
. - Remove
Mode string - When removing the source volume from the policy, user should choose how to handle the snapshots created by the policy. Valid values are 'Remove' and 'Detach'. Default value is
Detach
. - Secure
Snapshots bool - The auto snapshots will be created as secure. They cannot be edited or removed prior to their policy expiration time. Default value is
false
. Cannot be updated. - Snapshot
Access stringMode - The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is
ReadOnly
Cannot be updated. - Volume
Ids List<string> - List which represents the volume ids which is to be assigned to the snapshot policy.
- Auto
Snapshot float64Creation Cadence In Min - The interval in minutes between two snapshots in the policy.
- Num
Of []float64Retained Snapshots Per Levels - List which represents the number of snapshots per retention level.
- Name string
- Name of the Snapshot Policy
- Paused bool
- Indicates that the snapshot policy should paused or not. Default value is
false
. - Remove
Mode string - When removing the source volume from the policy, user should choose how to handle the snapshots created by the policy. Valid values are 'Remove' and 'Detach'. Default value is
Detach
. - Secure
Snapshots bool - The auto snapshots will be created as secure. They cannot be edited or removed prior to their policy expiration time. Default value is
false
. Cannot be updated. - Snapshot
Access stringMode - The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is
ReadOnly
Cannot be updated. - Volume
Ids []string - List which represents the volume ids which is to be assigned to the snapshot policy.
- auto
Snapshot DoubleCreation Cadence In Min - The interval in minutes between two snapshots in the policy.
- num
Of List<Double>Retained Snapshots Per Levels - List which represents the number of snapshots per retention level.
- name String
- Name of the Snapshot Policy
- paused Boolean
- Indicates that the snapshot policy should paused or not. Default value is
false
. - remove
Mode String - When removing the source volume from the policy, user should choose how to handle the snapshots created by the policy. Valid values are 'Remove' and 'Detach'. Default value is
Detach
. - secure
Snapshots Boolean - The auto snapshots will be created as secure. They cannot be edited or removed prior to their policy expiration time. Default value is
false
. Cannot be updated. - snapshot
Access StringMode - The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is
ReadOnly
Cannot be updated. - volume
Ids List<String> - List which represents the volume ids which is to be assigned to the snapshot policy.
- auto
Snapshot numberCreation Cadence In Min - The interval in minutes between two snapshots in the policy.
- num
Of number[]Retained Snapshots Per Levels - List which represents the number of snapshots per retention level.
- name string
- Name of the Snapshot Policy
- paused boolean
- Indicates that the snapshot policy should paused or not. Default value is
false
. - remove
Mode string - When removing the source volume from the policy, user should choose how to handle the snapshots created by the policy. Valid values are 'Remove' and 'Detach'. Default value is
Detach
. - secure
Snapshots boolean - The auto snapshots will be created as secure. They cannot be edited or removed prior to their policy expiration time. Default value is
false
. Cannot be updated. - snapshot
Access stringMode - The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is
ReadOnly
Cannot be updated. - volume
Ids string[] - List which represents the volume ids which is to be assigned to the snapshot policy.
- auto_
snapshot_ floatcreation_ cadence_ in_ min - The interval in minutes between two snapshots in the policy.
- num_
of_ Sequence[float]retained_ snapshots_ per_ levels - List which represents the number of snapshots per retention level.
- name str
- Name of the Snapshot Policy
- paused bool
- Indicates that the snapshot policy should paused or not. Default value is
false
. - remove_
mode str - When removing the source volume from the policy, user should choose how to handle the snapshots created by the policy. Valid values are 'Remove' and 'Detach'. Default value is
Detach
. - secure_
snapshots bool - The auto snapshots will be created as secure. They cannot be edited or removed prior to their policy expiration time. Default value is
false
. Cannot be updated. - snapshot_
access_ strmode - The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is
ReadOnly
Cannot be updated. - volume_
ids Sequence[str] - List which represents the volume ids which is to be assigned to the snapshot policy.
- auto
Snapshot NumberCreation Cadence In Min - The interval in minutes between two snapshots in the policy.
- num
Of List<Number>Retained Snapshots Per Levels - List which represents the number of snapshots per retention level.
- name String
- Name of the Snapshot Policy
- paused Boolean
- Indicates that the snapshot policy should paused or not. Default value is
false
. - remove
Mode String - When removing the source volume from the policy, user should choose how to handle the snapshots created by the policy. Valid values are 'Remove' and 'Detach'. Default value is
Detach
. - secure
Snapshots Boolean - The auto snapshots will be created as secure. They cannot be edited or removed prior to their policy expiration time. Default value is
false
. Cannot be updated. - snapshot
Access StringMode - The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is
ReadOnly
Cannot be updated. - volume
Ids List<String> - List which represents the volume ids which is to be assigned to the snapshot policy.
Outputs
All input properties are implicitly available as output properties. Additionally, the SnapshotPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SnapshotPolicy Resource
Get an existing SnapshotPolicy 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?: SnapshotPolicyState, opts?: CustomResourceOptions): SnapshotPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_snapshot_creation_cadence_in_min: Optional[float] = None,
name: Optional[str] = None,
num_of_retained_snapshots_per_levels: Optional[Sequence[float]] = None,
paused: Optional[bool] = None,
remove_mode: Optional[str] = None,
secure_snapshots: Optional[bool] = None,
snapshot_access_mode: Optional[str] = None,
volume_ids: Optional[Sequence[str]] = None) -> SnapshotPolicy
func GetSnapshotPolicy(ctx *Context, name string, id IDInput, state *SnapshotPolicyState, opts ...ResourceOption) (*SnapshotPolicy, error)
public static SnapshotPolicy Get(string name, Input<string> id, SnapshotPolicyState? state, CustomResourceOptions? opts = null)
public static SnapshotPolicy get(String name, Output<String> id, SnapshotPolicyState state, CustomResourceOptions options)
resources: _: type: powerflex:SnapshotPolicy 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.
- Auto
Snapshot doubleCreation Cadence In Min - The interval in minutes between two snapshots in the policy.
- Name string
- Name of the Snapshot Policy
- Num
Of List<double>Retained Snapshots Per Levels - List which represents the number of snapshots per retention level.
- Paused bool
- Indicates that the snapshot policy should paused or not. Default value is
false
. - Remove
Mode string - When removing the source volume from the policy, user should choose how to handle the snapshots created by the policy. Valid values are 'Remove' and 'Detach'. Default value is
Detach
. - Secure
Snapshots bool - The auto snapshots will be created as secure. They cannot be edited or removed prior to their policy expiration time. Default value is
false
. Cannot be updated. - Snapshot
Access stringMode - The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is
ReadOnly
Cannot be updated. - Volume
Ids List<string> - List which represents the volume ids which is to be assigned to the snapshot policy.
- Auto
Snapshot float64Creation Cadence In Min - The interval in minutes between two snapshots in the policy.
- Name string
- Name of the Snapshot Policy
- Num
Of []float64Retained Snapshots Per Levels - List which represents the number of snapshots per retention level.
- Paused bool
- Indicates that the snapshot policy should paused or not. Default value is
false
. - Remove
Mode string - When removing the source volume from the policy, user should choose how to handle the snapshots created by the policy. Valid values are 'Remove' and 'Detach'. Default value is
Detach
. - Secure
Snapshots bool - The auto snapshots will be created as secure. They cannot be edited or removed prior to their policy expiration time. Default value is
false
. Cannot be updated. - Snapshot
Access stringMode - The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is
ReadOnly
Cannot be updated. - Volume
Ids []string - List which represents the volume ids which is to be assigned to the snapshot policy.
- auto
Snapshot DoubleCreation Cadence In Min - The interval in minutes between two snapshots in the policy.
- name String
- Name of the Snapshot Policy
- num
Of List<Double>Retained Snapshots Per Levels - List which represents the number of snapshots per retention level.
- paused Boolean
- Indicates that the snapshot policy should paused or not. Default value is
false
. - remove
Mode String - When removing the source volume from the policy, user should choose how to handle the snapshots created by the policy. Valid values are 'Remove' and 'Detach'. Default value is
Detach
. - secure
Snapshots Boolean - The auto snapshots will be created as secure. They cannot be edited or removed prior to their policy expiration time. Default value is
false
. Cannot be updated. - snapshot
Access StringMode - The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is
ReadOnly
Cannot be updated. - volume
Ids List<String> - List which represents the volume ids which is to be assigned to the snapshot policy.
- auto
Snapshot numberCreation Cadence In Min - The interval in minutes between two snapshots in the policy.
- name string
- Name of the Snapshot Policy
- num
Of number[]Retained Snapshots Per Levels - List which represents the number of snapshots per retention level.
- paused boolean
- Indicates that the snapshot policy should paused or not. Default value is
false
. - remove
Mode string - When removing the source volume from the policy, user should choose how to handle the snapshots created by the policy. Valid values are 'Remove' and 'Detach'. Default value is
Detach
. - secure
Snapshots boolean - The auto snapshots will be created as secure. They cannot be edited or removed prior to their policy expiration time. Default value is
false
. Cannot be updated. - snapshot
Access stringMode - The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is
ReadOnly
Cannot be updated. - volume
Ids string[] - List which represents the volume ids which is to be assigned to the snapshot policy.
- auto_
snapshot_ floatcreation_ cadence_ in_ min - The interval in minutes between two snapshots in the policy.
- name str
- Name of the Snapshot Policy
- num_
of_ Sequence[float]retained_ snapshots_ per_ levels - List which represents the number of snapshots per retention level.
- paused bool
- Indicates that the snapshot policy should paused or not. Default value is
false
. - remove_
mode str - When removing the source volume from the policy, user should choose how to handle the snapshots created by the policy. Valid values are 'Remove' and 'Detach'. Default value is
Detach
. - secure_
snapshots bool - The auto snapshots will be created as secure. They cannot be edited or removed prior to their policy expiration time. Default value is
false
. Cannot be updated. - snapshot_
access_ strmode - The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is
ReadOnly
Cannot be updated. - volume_
ids Sequence[str] - List which represents the volume ids which is to be assigned to the snapshot policy.
- auto
Snapshot NumberCreation Cadence In Min - The interval in minutes between two snapshots in the policy.
- name String
- Name of the Snapshot Policy
- num
Of List<Number>Retained Snapshots Per Levels - List which represents the number of snapshots per retention level.
- paused Boolean
- Indicates that the snapshot policy should paused or not. Default value is
false
. - remove
Mode String - When removing the source volume from the policy, user should choose how to handle the snapshots created by the policy. Valid values are 'Remove' and 'Detach'. Default value is
Detach
. - secure
Snapshots Boolean - The auto snapshots will be created as secure. They cannot be edited or removed prior to their policy expiration time. Default value is
false
. Cannot be updated. - snapshot
Access StringMode - The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is
ReadOnly
Cannot be updated. - volume
Ids List<String> - List which represents the volume ids which is to be assigned to the snapshot policy.
Package Details
- Repository
- powerflex dell/terraform-provider-powerflex
- License
- Notes
- This Pulumi package is based on the
powerflex
Terraform Provider.