powerflex.Snapshot
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 by it’s id
$ pulumi import powerflex:index/snapshot:Snapshot ss_data "<id>"
This will import the snapshot 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 Snapshot Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Snapshot(name: string, args?: SnapshotArgs, opts?: CustomResourceOptions);
@overload
def Snapshot(resource_name: str,
args: Optional[SnapshotArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Snapshot(resource_name: str,
opts: Optional[ResourceOptions] = None,
access_mode: Optional[str] = None,
capacity_unit: Optional[str] = None,
desired_retention: Optional[float] = None,
lock_auto_snapshot: Optional[bool] = None,
name: Optional[str] = None,
remove_mode: Optional[str] = None,
retention_unit: Optional[str] = None,
size: Optional[float] = None,
volume_id: Optional[str] = None,
volume_name: Optional[str] = None)
func NewSnapshot(ctx *Context, name string, args *SnapshotArgs, opts ...ResourceOption) (*Snapshot, error)
public Snapshot(string name, SnapshotArgs? args = null, CustomResourceOptions? opts = null)
public Snapshot(String name, SnapshotArgs args)
public Snapshot(String name, SnapshotArgs args, CustomResourceOptions options)
type: powerflex:Snapshot
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 SnapshotArgs
- 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 SnapshotArgs
- 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 SnapshotArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SnapshotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SnapshotArgs
- 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 snapshotResource = new Powerflex.Snapshot("snapshotResource", new()
{
AccessMode = "string",
CapacityUnit = "string",
DesiredRetention = 0,
LockAutoSnapshot = false,
Name = "string",
RemoveMode = "string",
RetentionUnit = "string",
Size = 0,
VolumeId = "string",
VolumeName = "string",
});
example, err := powerflex.NewSnapshot(ctx, "snapshotResource", &powerflex.SnapshotArgs{
AccessMode: pulumi.String("string"),
CapacityUnit: pulumi.String("string"),
DesiredRetention: pulumi.Float64(0),
LockAutoSnapshot: pulumi.Bool(false),
Name: pulumi.String("string"),
RemoveMode: pulumi.String("string"),
RetentionUnit: pulumi.String("string"),
Size: pulumi.Float64(0),
VolumeId: pulumi.String("string"),
VolumeName: pulumi.String("string"),
})
var snapshotResource = new Snapshot("snapshotResource", SnapshotArgs.builder()
.accessMode("string")
.capacityUnit("string")
.desiredRetention(0)
.lockAutoSnapshot(false)
.name("string")
.removeMode("string")
.retentionUnit("string")
.size(0)
.volumeId("string")
.volumeName("string")
.build());
snapshot_resource = powerflex.Snapshot("snapshotResource",
access_mode="string",
capacity_unit="string",
desired_retention=0,
lock_auto_snapshot=False,
name="string",
remove_mode="string",
retention_unit="string",
size=0,
volume_id="string",
volume_name="string")
const snapshotResource = new powerflex.Snapshot("snapshotResource", {
accessMode: "string",
capacityUnit: "string",
desiredRetention: 0,
lockAutoSnapshot: false,
name: "string",
removeMode: "string",
retentionUnit: "string",
size: 0,
volumeId: "string",
volumeName: "string",
});
type: powerflex:Snapshot
properties:
accessMode: string
capacityUnit: string
desiredRetention: 0
lockAutoSnapshot: false
name: string
removeMode: string
retentionUnit: string
size: 0
volumeId: string
volumeName: string
Snapshot 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 Snapshot resource accepts the following input properties:
- Access
Mode string - The Access mode of snapshot. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - Capacity
Unit string - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - Desired
Retention double - The minimum amount of time that the snapshot should be retained on the array starting at the time of apply. The unit is defined by
retention_unit
. Cannot be decreased. - Lock
Auto boolSnapshot - lock auto snapshot
- Name string
- The name of the snapshot.
- Remove
Mode string - Remove mode of the snapshot. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - Retention
Unit string - Retention unit of the snapshot. Valid values are
hours
anddays
. Default value ishours
. - Size double
- Size of the snapshot. The unit of size is defined by
capacity_unit
. The storage capacity of a snapshot must be a multiple of 8GB and cannot be decreased. - Volume
Id string - The ID of the volume from which snapshot is to be created. Conflicts with
volume_name
. Cannot be updated. - Volume
Name string - The volume name for which snapshot is created. Conflicts with
volume_id
. Cannot be updated.
- Access
Mode string - The Access mode of snapshot. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - Capacity
Unit string - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - Desired
Retention float64 - The minimum amount of time that the snapshot should be retained on the array starting at the time of apply. The unit is defined by
retention_unit
. Cannot be decreased. - Lock
Auto boolSnapshot - lock auto snapshot
- Name string
- The name of the snapshot.
- Remove
Mode string - Remove mode of the snapshot. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - Retention
Unit string - Retention unit of the snapshot. Valid values are
hours
anddays
. Default value ishours
. - Size float64
- Size of the snapshot. The unit of size is defined by
capacity_unit
. The storage capacity of a snapshot must be a multiple of 8GB and cannot be decreased. - Volume
Id string - The ID of the volume from which snapshot is to be created. Conflicts with
volume_name
. Cannot be updated. - Volume
Name string - The volume name for which snapshot is created. Conflicts with
volume_id
. Cannot be updated.
- access
Mode String - The Access mode of snapshot. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity
Unit String - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - desired
Retention Double - The minimum amount of time that the snapshot should be retained on the array starting at the time of apply. The unit is defined by
retention_unit
. Cannot be decreased. - lock
Auto BooleanSnapshot - lock auto snapshot
- name String
- The name of the snapshot.
- remove
Mode String - Remove mode of the snapshot. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - retention
Unit String - Retention unit of the snapshot. Valid values are
hours
anddays
. Default value ishours
. - size Double
- Size of the snapshot. The unit of size is defined by
capacity_unit
. The storage capacity of a snapshot must be a multiple of 8GB and cannot be decreased. - volume
Id String - The ID of the volume from which snapshot is to be created. Conflicts with
volume_name
. Cannot be updated. - volume
Name String - The volume name for which snapshot is created. Conflicts with
volume_id
. Cannot be updated.
- access
Mode string - The Access mode of snapshot. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity
Unit string - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - desired
Retention number - The minimum amount of time that the snapshot should be retained on the array starting at the time of apply. The unit is defined by
retention_unit
. Cannot be decreased. - lock
Auto booleanSnapshot - lock auto snapshot
- name string
- The name of the snapshot.
- remove
Mode string - Remove mode of the snapshot. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - retention
Unit string - Retention unit of the snapshot. Valid values are
hours
anddays
. Default value ishours
. - size number
- Size of the snapshot. The unit of size is defined by
capacity_unit
. The storage capacity of a snapshot must be a multiple of 8GB and cannot be decreased. - volume
Id string - The ID of the volume from which snapshot is to be created. Conflicts with
volume_name
. Cannot be updated. - volume
Name string - The volume name for which snapshot is created. Conflicts with
volume_id
. Cannot be updated.
- access_
mode str - The Access mode of snapshot. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity_
unit str - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - desired_
retention float - The minimum amount of time that the snapshot should be retained on the array starting at the time of apply. The unit is defined by
retention_unit
. Cannot be decreased. - lock_
auto_ boolsnapshot - lock auto snapshot
- name str
- The name of the snapshot.
- remove_
mode str - Remove mode of the snapshot. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - retention_
unit str - Retention unit of the snapshot. Valid values are
hours
anddays
. Default value ishours
. - size float
- Size of the snapshot. The unit of size is defined by
capacity_unit
. The storage capacity of a snapshot must be a multiple of 8GB and cannot be decreased. - volume_
id str - The ID of the volume from which snapshot is to be created. Conflicts with
volume_name
. Cannot be updated. - volume_
name str - The volume name for which snapshot is created. Conflicts with
volume_id
. Cannot be updated.
- access
Mode String - The Access mode of snapshot. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity
Unit String - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - desired
Retention Number - The minimum amount of time that the snapshot should be retained on the array starting at the time of apply. The unit is defined by
retention_unit
. Cannot be decreased. - lock
Auto BooleanSnapshot - lock auto snapshot
- name String
- The name of the snapshot.
- remove
Mode String - Remove mode of the snapshot. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - retention
Unit String - Retention unit of the snapshot. Valid values are
hours
anddays
. Default value ishours
. - size Number
- Size of the snapshot. The unit of size is defined by
capacity_unit
. The storage capacity of a snapshot must be a multiple of 8GB and cannot be decreased. - volume
Id String - The ID of the volume from which snapshot is to be created. Conflicts with
volume_name
. Cannot be updated. - volume
Name String - The volume name for which snapshot is created. Conflicts with
volume_id
. Cannot be updated.
Outputs
All input properties are implicitly available as output properties. Additionally, the Snapshot resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Retention
In stringMin - retention of snapshot in min
- Size
In doubleKb - Size in KB
- Id string
- The provider-assigned unique ID for this managed resource.
- Retention
In stringMin - retention of snapshot in min
- Size
In float64Kb - Size in KB
- id String
- The provider-assigned unique ID for this managed resource.
- retention
In StringMin - retention of snapshot in min
- size
In DoubleKb - Size in KB
- id string
- The provider-assigned unique ID for this managed resource.
- retention
In stringMin - retention of snapshot in min
- size
In numberKb - Size in KB
- id str
- The provider-assigned unique ID for this managed resource.
- retention_
in_ strmin - retention of snapshot in min
- size_
in_ floatkb - Size in KB
- id String
- The provider-assigned unique ID for this managed resource.
- retention
In StringMin - retention of snapshot in min
- size
In NumberKb - Size in KB
Look up Existing Snapshot Resource
Get an existing Snapshot 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?: SnapshotState, opts?: CustomResourceOptions): Snapshot
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_mode: Optional[str] = None,
capacity_unit: Optional[str] = None,
desired_retention: Optional[float] = None,
lock_auto_snapshot: Optional[bool] = None,
name: Optional[str] = None,
remove_mode: Optional[str] = None,
retention_in_min: Optional[str] = None,
retention_unit: Optional[str] = None,
size: Optional[float] = None,
size_in_kb: Optional[float] = None,
volume_id: Optional[str] = None,
volume_name: Optional[str] = None) -> Snapshot
func GetSnapshot(ctx *Context, name string, id IDInput, state *SnapshotState, opts ...ResourceOption) (*Snapshot, error)
public static Snapshot Get(string name, Input<string> id, SnapshotState? state, CustomResourceOptions? opts = null)
public static Snapshot get(String name, Output<String> id, SnapshotState state, CustomResourceOptions options)
resources: _: type: powerflex:Snapshot 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.
- Access
Mode string - The Access mode of snapshot. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - Capacity
Unit string - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - Desired
Retention double - The minimum amount of time that the snapshot should be retained on the array starting at the time of apply. The unit is defined by
retention_unit
. Cannot be decreased. - Lock
Auto boolSnapshot - lock auto snapshot
- Name string
- The name of the snapshot.
- Remove
Mode string - Remove mode of the snapshot. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - Retention
In stringMin - retention of snapshot in min
- Retention
Unit string - Retention unit of the snapshot. Valid values are
hours
anddays
. Default value ishours
. - Size double
- Size of the snapshot. The unit of size is defined by
capacity_unit
. The storage capacity of a snapshot must be a multiple of 8GB and cannot be decreased. - Size
In doubleKb - Size in KB
- Volume
Id string - The ID of the volume from which snapshot is to be created. Conflicts with
volume_name
. Cannot be updated. - Volume
Name string - The volume name for which snapshot is created. Conflicts with
volume_id
. Cannot be updated.
- Access
Mode string - The Access mode of snapshot. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - Capacity
Unit string - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - Desired
Retention float64 - The minimum amount of time that the snapshot should be retained on the array starting at the time of apply. The unit is defined by
retention_unit
. Cannot be decreased. - Lock
Auto boolSnapshot - lock auto snapshot
- Name string
- The name of the snapshot.
- Remove
Mode string - Remove mode of the snapshot. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - Retention
In stringMin - retention of snapshot in min
- Retention
Unit string - Retention unit of the snapshot. Valid values are
hours
anddays
. Default value ishours
. - Size float64
- Size of the snapshot. The unit of size is defined by
capacity_unit
. The storage capacity of a snapshot must be a multiple of 8GB and cannot be decreased. - Size
In float64Kb - Size in KB
- Volume
Id string - The ID of the volume from which snapshot is to be created. Conflicts with
volume_name
. Cannot be updated. - Volume
Name string - The volume name for which snapshot is created. Conflicts with
volume_id
. Cannot be updated.
- access
Mode String - The Access mode of snapshot. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity
Unit String - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - desired
Retention Double - The minimum amount of time that the snapshot should be retained on the array starting at the time of apply. The unit is defined by
retention_unit
. Cannot be decreased. - lock
Auto BooleanSnapshot - lock auto snapshot
- name String
- The name of the snapshot.
- remove
Mode String - Remove mode of the snapshot. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - retention
In StringMin - retention of snapshot in min
- retention
Unit String - Retention unit of the snapshot. Valid values are
hours
anddays
. Default value ishours
. - size Double
- Size of the snapshot. The unit of size is defined by
capacity_unit
. The storage capacity of a snapshot must be a multiple of 8GB and cannot be decreased. - size
In DoubleKb - Size in KB
- volume
Id String - The ID of the volume from which snapshot is to be created. Conflicts with
volume_name
. Cannot be updated. - volume
Name String - The volume name for which snapshot is created. Conflicts with
volume_id
. Cannot be updated.
- access
Mode string - The Access mode of snapshot. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity
Unit string - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - desired
Retention number - The minimum amount of time that the snapshot should be retained on the array starting at the time of apply. The unit is defined by
retention_unit
. Cannot be decreased. - lock
Auto booleanSnapshot - lock auto snapshot
- name string
- The name of the snapshot.
- remove
Mode string - Remove mode of the snapshot. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - retention
In stringMin - retention of snapshot in min
- retention
Unit string - Retention unit of the snapshot. Valid values are
hours
anddays
. Default value ishours
. - size number
- Size of the snapshot. The unit of size is defined by
capacity_unit
. The storage capacity of a snapshot must be a multiple of 8GB and cannot be decreased. - size
In numberKb - Size in KB
- volume
Id string - The ID of the volume from which snapshot is to be created. Conflicts with
volume_name
. Cannot be updated. - volume
Name string - The volume name for which snapshot is created. Conflicts with
volume_id
. Cannot be updated.
- access_
mode str - The Access mode of snapshot. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity_
unit str - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - desired_
retention float - The minimum amount of time that the snapshot should be retained on the array starting at the time of apply. The unit is defined by
retention_unit
. Cannot be decreased. - lock_
auto_ boolsnapshot - lock auto snapshot
- name str
- The name of the snapshot.
- remove_
mode str - Remove mode of the snapshot. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - retention_
in_ strmin - retention of snapshot in min
- retention_
unit str - Retention unit of the snapshot. Valid values are
hours
anddays
. Default value ishours
. - size float
- Size of the snapshot. The unit of size is defined by
capacity_unit
. The storage capacity of a snapshot must be a multiple of 8GB and cannot be decreased. - size_
in_ floatkb - Size in KB
- volume_
id str - The ID of the volume from which snapshot is to be created. Conflicts with
volume_name
. Cannot be updated. - volume_
name str - The volume name for which snapshot is created. Conflicts with
volume_id
. Cannot be updated.
- access
Mode String - The Access mode of snapshot. Valid values are
ReadOnly
andReadWrite
. Default value isReadOnly
. - capacity
Unit String - Unit of capacity of the volume. Must be one of
GB
andTB
. Default value isGB
. - desired
Retention Number - The minimum amount of time that the snapshot should be retained on the array starting at the time of apply. The unit is defined by
retention_unit
. Cannot be decreased. - lock
Auto BooleanSnapshot - lock auto snapshot
- name String
- The name of the snapshot.
- remove
Mode String - Remove mode of the snapshot. Valid values are
ONLY_ME
andINCLUDING_DESCENDANTS
. Default value isONLY_ME
. - retention
In StringMin - retention of snapshot in min
- retention
Unit String - Retention unit of the snapshot. Valid values are
hours
anddays
. Default value ishours
. - size Number
- Size of the snapshot. The unit of size is defined by
capacity_unit
. The storage capacity of a snapshot must be a multiple of 8GB and cannot be decreased. - size
In NumberKb - Size in KB
- volume
Id String - The ID of the volume from which snapshot is to be created. Conflicts with
volume_name
. Cannot be updated. - volume
Name String - The volume name for which snapshot is created. Conflicts with
volume_id
. Cannot be updated.
Package Details
- Repository
- powerflex dell/terraform-provider-powerflex
- License
- Notes
- This Pulumi package is based on the
powerflex
Terraform Provider.