1. Packages
  2. Powerflex Provider
  3. API Docs
  4. SnapshotPolicy
powerflex 1.8.0 published on Monday, Apr 14, 2025 by dell

powerflex.SnapshotPolicy

Explore with Pulumi AI

powerflex logo
powerflex 1.8.0 published on Monday, Apr 14, 2025 by dell

    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>"
    
    1. This will import the snapshot_policy instance with specified ID into your Terraform state.

    2. After successful import, you can run terraform state list to ensure the resource has been imported successfully.

    3. Now, you can fill in the resource block with the appropriate arguments and settings that match the imported resource’s real-world configuration.

    4. Execute pulumi preview to see if your configuration and the imported resource are in sync. Make adjustments if needed.

    5. Finally, execute pulumi up to bring the resource fully under Terraform’s management.

    6. 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:

    AutoSnapshotCreationCadenceInMin double
    The interval in minutes between two snapshots in the policy.
    NumOfRetainedSnapshotsPerLevels List<double>
    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.
    RemoveMode 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.
    SecureSnapshots 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.
    SnapshotAccessMode string
    The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is ReadOnly Cannot be updated.
    VolumeIds List<string>
    List which represents the volume ids which is to be assigned to the snapshot policy.
    AutoSnapshotCreationCadenceInMin float64
    The interval in minutes between two snapshots in the policy.
    NumOfRetainedSnapshotsPerLevels []float64
    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.
    RemoveMode 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.
    SecureSnapshots 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.
    SnapshotAccessMode string
    The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is ReadOnly Cannot be updated.
    VolumeIds []string
    List which represents the volume ids which is to be assigned to the snapshot policy.
    autoSnapshotCreationCadenceInMin Double
    The interval in minutes between two snapshots in the policy.
    numOfRetainedSnapshotsPerLevels List<Double>
    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.
    removeMode 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.
    secureSnapshots 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.
    snapshotAccessMode String
    The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is ReadOnly Cannot be updated.
    volumeIds List<String>
    List which represents the volume ids which is to be assigned to the snapshot policy.
    autoSnapshotCreationCadenceInMin number
    The interval in minutes between two snapshots in the policy.
    numOfRetainedSnapshotsPerLevels number[]
    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.
    removeMode 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.
    secureSnapshots 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.
    snapshotAccessMode string
    The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is ReadOnly Cannot be updated.
    volumeIds string[]
    List which represents the volume ids which is to be assigned to the snapshot policy.
    auto_snapshot_creation_cadence_in_min float
    The interval in minutes between two snapshots in the policy.
    num_of_retained_snapshots_per_levels Sequence[float]
    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_mode str
    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.
    autoSnapshotCreationCadenceInMin Number
    The interval in minutes between two snapshots in the policy.
    numOfRetainedSnapshotsPerLevels List<Number>
    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.
    removeMode 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.
    secureSnapshots 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.
    snapshotAccessMode String
    The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is ReadOnly Cannot be updated.
    volumeIds 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.
    The following state arguments are supported:
    AutoSnapshotCreationCadenceInMin double
    The interval in minutes between two snapshots in the policy.
    Name string
    Name of the Snapshot Policy
    NumOfRetainedSnapshotsPerLevels List<double>
    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.
    RemoveMode 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.
    SecureSnapshots 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.
    SnapshotAccessMode string
    The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is ReadOnly Cannot be updated.
    VolumeIds List<string>
    List which represents the volume ids which is to be assigned to the snapshot policy.
    AutoSnapshotCreationCadenceInMin float64
    The interval in minutes between two snapshots in the policy.
    Name string
    Name of the Snapshot Policy
    NumOfRetainedSnapshotsPerLevels []float64
    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.
    RemoveMode 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.
    SecureSnapshots 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.
    SnapshotAccessMode string
    The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is ReadOnly Cannot be updated.
    VolumeIds []string
    List which represents the volume ids which is to be assigned to the snapshot policy.
    autoSnapshotCreationCadenceInMin Double
    The interval in minutes between two snapshots in the policy.
    name String
    Name of the Snapshot Policy
    numOfRetainedSnapshotsPerLevels List<Double>
    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.
    removeMode 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.
    secureSnapshots 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.
    snapshotAccessMode String
    The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is ReadOnly Cannot be updated.
    volumeIds List<String>
    List which represents the volume ids which is to be assigned to the snapshot policy.
    autoSnapshotCreationCadenceInMin number
    The interval in minutes between two snapshots in the policy.
    name string
    Name of the Snapshot Policy
    numOfRetainedSnapshotsPerLevels number[]
    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.
    removeMode 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.
    secureSnapshots 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.
    snapshotAccessMode string
    The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is ReadOnly Cannot be updated.
    volumeIds string[]
    List which represents the volume ids which is to be assigned to the snapshot policy.
    auto_snapshot_creation_cadence_in_min float
    The interval in minutes between two snapshots in the policy.
    name str
    Name of the Snapshot Policy
    num_of_retained_snapshots_per_levels Sequence[float]
    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_mode str
    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.
    autoSnapshotCreationCadenceInMin Number
    The interval in minutes between two snapshots in the policy.
    name String
    Name of the Snapshot Policy
    numOfRetainedSnapshotsPerLevels List<Number>
    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.
    removeMode 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.
    secureSnapshots 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.
    snapshotAccessMode String
    The Access mode of auto snapshot. Valid values are 'ReadOnly' and 'ReadWrite'. Default value is ReadOnly Cannot be updated.
    volumeIds 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.
    powerflex logo
    powerflex 1.8.0 published on Monday, Apr 14, 2025 by dell