powerstore.VolumeSnapshot
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 :
Step 1 - To import a volume snapshot , we need the id of that volume snapshot
Step 2 - To check the id of the volume snapshot we can make Get request to volume snapshot endpoint. eg. https://10.0.0.1/api/rest/volume –header ’type: Snapshot’ which will return list of all volume snapshots ids.
Step 3 - Add empty resource block in tf file.
eg.
resource “powerstore_volume_snapshot” “resource_block_name” {
(resource arguments)
}
$ pulumi import powerstore:index/volumeSnapshot:VolumeSnapshot Step 4 - Execute the command: "powerstore_volume_snapshot.resource_block_name" "id_of_the_snapshot" (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 VolumeSnapshot Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VolumeSnapshot(name: string, args?: VolumeSnapshotArgs, opts?: CustomResourceOptions);
@overload
def VolumeSnapshot(resource_name: str,
args: Optional[VolumeSnapshotArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def VolumeSnapshot(resource_name: str,
opts: Optional[ResourceOptions] = None,
creator_type: Optional[str] = None,
description: Optional[str] = None,
expiration_timestamp: Optional[str] = None,
name: Optional[str] = None,
performance_policy_id: Optional[str] = None,
volume_id: Optional[str] = None,
volume_name: Optional[str] = None)
func NewVolumeSnapshot(ctx *Context, name string, args *VolumeSnapshotArgs, opts ...ResourceOption) (*VolumeSnapshot, error)
public VolumeSnapshot(string name, VolumeSnapshotArgs? args = null, CustomResourceOptions? opts = null)
public VolumeSnapshot(String name, VolumeSnapshotArgs args)
public VolumeSnapshot(String name, VolumeSnapshotArgs args, CustomResourceOptions options)
type: powerstore:VolumeSnapshot
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 VolumeSnapshotArgs
- 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 VolumeSnapshotArgs
- 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 VolumeSnapshotArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VolumeSnapshotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VolumeSnapshotArgs
- 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 volumeSnapshotResource = new Powerstore.VolumeSnapshot("volumeSnapshotResource", new()
{
CreatorType = "string",
Description = "string",
ExpirationTimestamp = "string",
Name = "string",
PerformancePolicyId = "string",
VolumeId = "string",
VolumeName = "string",
});
example, err := powerstore.NewVolumeSnapshot(ctx, "volumeSnapshotResource", &powerstore.VolumeSnapshotArgs{
CreatorType: pulumi.String("string"),
Description: pulumi.String("string"),
ExpirationTimestamp: pulumi.String("string"),
Name: pulumi.String("string"),
PerformancePolicyId: pulumi.String("string"),
VolumeId: pulumi.String("string"),
VolumeName: pulumi.String("string"),
})
var volumeSnapshotResource = new VolumeSnapshot("volumeSnapshotResource", VolumeSnapshotArgs.builder()
.creatorType("string")
.description("string")
.expirationTimestamp("string")
.name("string")
.performancePolicyId("string")
.volumeId("string")
.volumeName("string")
.build());
volume_snapshot_resource = powerstore.VolumeSnapshot("volumeSnapshotResource",
creator_type="string",
description="string",
expiration_timestamp="string",
name="string",
performance_policy_id="string",
volume_id="string",
volume_name="string")
const volumeSnapshotResource = new powerstore.VolumeSnapshot("volumeSnapshotResource", {
creatorType: "string",
description: "string",
expirationTimestamp: "string",
name: "string",
performancePolicyId: "string",
volumeId: "string",
volumeName: "string",
});
type: powerstore:VolumeSnapshot
properties:
creatorType: string
description: string
expirationTimestamp: string
name: string
performancePolicyId: string
volumeId: string
volumeName: string
VolumeSnapshot 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 VolumeSnapshot resource accepts the following input properties:
- Creator
Type string - Creator Type of the volume snapshot.
- Description string
- Description of the volume snapshot.
- Expiration
Timestamp string - Expiration Timestamp of the volume snapshot.Only UTC (+Z) format is allowed.
- Name string
- Name of the volume snapshot.The default name of the volume snapshot is the date and time when the snapshot is taken.
- Performance
Policy stringId - Performance Policy id of the volume snapshot. Valid values are defaultmedium, defaultlow, default_high.
- Volume
Id string - ID of the volume to take snapshot. Conflicts with
volume_name
. Cannot be updated. - Volume
Name string - Name of the volume to take snapshot. Conflicts with
volume_id
. Cannot be updated.
- Creator
Type string - Creator Type of the volume snapshot.
- Description string
- Description of the volume snapshot.
- Expiration
Timestamp string - Expiration Timestamp of the volume snapshot.Only UTC (+Z) format is allowed.
- Name string
- Name of the volume snapshot.The default name of the volume snapshot is the date and time when the snapshot is taken.
- Performance
Policy stringId - Performance Policy id of the volume snapshot. Valid values are defaultmedium, defaultlow, default_high.
- Volume
Id string - ID of the volume to take snapshot. Conflicts with
volume_name
. Cannot be updated. - Volume
Name string - Name of the volume to take snapshot. Conflicts with
volume_id
. Cannot be updated.
- creator
Type String - Creator Type of the volume snapshot.
- description String
- Description of the volume snapshot.
- expiration
Timestamp String - Expiration Timestamp of the volume snapshot.Only UTC (+Z) format is allowed.
- name String
- Name of the volume snapshot.The default name of the volume snapshot is the date and time when the snapshot is taken.
- performance
Policy StringId - Performance Policy id of the volume snapshot. Valid values are defaultmedium, defaultlow, default_high.
- volume
Id String - ID of the volume to take snapshot. Conflicts with
volume_name
. Cannot be updated. - volume
Name String - Name of the volume to take snapshot. Conflicts with
volume_id
. Cannot be updated.
- creator
Type string - Creator Type of the volume snapshot.
- description string
- Description of the volume snapshot.
- expiration
Timestamp string - Expiration Timestamp of the volume snapshot.Only UTC (+Z) format is allowed.
- name string
- Name of the volume snapshot.The default name of the volume snapshot is the date and time when the snapshot is taken.
- performance
Policy stringId - Performance Policy id of the volume snapshot. Valid values are defaultmedium, defaultlow, default_high.
- volume
Id string - ID of the volume to take snapshot. Conflicts with
volume_name
. Cannot be updated. - volume
Name string - Name of the volume to take snapshot. Conflicts with
volume_id
. Cannot be updated.
- creator_
type str - Creator Type of the volume snapshot.
- description str
- Description of the volume snapshot.
- expiration_
timestamp str - Expiration Timestamp of the volume snapshot.Only UTC (+Z) format is allowed.
- name str
- Name of the volume snapshot.The default name of the volume snapshot is the date and time when the snapshot is taken.
- performance_
policy_ strid - Performance Policy id of the volume snapshot. Valid values are defaultmedium, defaultlow, default_high.
- volume_
id str - ID of the volume to take snapshot. Conflicts with
volume_name
. Cannot be updated. - volume_
name str - Name of the volume to take snapshot. Conflicts with
volume_id
. Cannot be updated.
- creator
Type String - Creator Type of the volume snapshot.
- description String
- Description of the volume snapshot.
- expiration
Timestamp String - Expiration Timestamp of the volume snapshot.Only UTC (+Z) format is allowed.
- name String
- Name of the volume snapshot.The default name of the volume snapshot is the date and time when the snapshot is taken.
- performance
Policy StringId - Performance Policy id of the volume snapshot. Valid values are defaultmedium, defaultlow, default_high.
- volume
Id String - ID of the volume to take snapshot. Conflicts with
volume_name
. Cannot be updated. - volume
Name String - Name of the volume to take snapshot. Conflicts with
volume_id
. Cannot be updated.
Outputs
All input properties are implicitly available as output properties. Additionally, the VolumeSnapshot 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 VolumeSnapshot Resource
Get an existing VolumeSnapshot 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?: VolumeSnapshotState, opts?: CustomResourceOptions): VolumeSnapshot
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
creator_type: Optional[str] = None,
description: Optional[str] = None,
expiration_timestamp: Optional[str] = None,
name: Optional[str] = None,
performance_policy_id: Optional[str] = None,
volume_id: Optional[str] = None,
volume_name: Optional[str] = None) -> VolumeSnapshot
func GetVolumeSnapshot(ctx *Context, name string, id IDInput, state *VolumeSnapshotState, opts ...ResourceOption) (*VolumeSnapshot, error)
public static VolumeSnapshot Get(string name, Input<string> id, VolumeSnapshotState? state, CustomResourceOptions? opts = null)
public static VolumeSnapshot get(String name, Output<String> id, VolumeSnapshotState state, CustomResourceOptions options)
resources: _: type: powerstore:VolumeSnapshot 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.
- Creator
Type string - Creator Type of the volume snapshot.
- Description string
- Description of the volume snapshot.
- Expiration
Timestamp string - Expiration Timestamp of the volume snapshot.Only UTC (+Z) format is allowed.
- Name string
- Name of the volume snapshot.The default name of the volume snapshot is the date and time when the snapshot is taken.
- Performance
Policy stringId - Performance Policy id of the volume snapshot. Valid values are defaultmedium, defaultlow, default_high.
- Volume
Id string - ID of the volume to take snapshot. Conflicts with
volume_name
. Cannot be updated. - Volume
Name string - Name of the volume to take snapshot. Conflicts with
volume_id
. Cannot be updated.
- Creator
Type string - Creator Type of the volume snapshot.
- Description string
- Description of the volume snapshot.
- Expiration
Timestamp string - Expiration Timestamp of the volume snapshot.Only UTC (+Z) format is allowed.
- Name string
- Name of the volume snapshot.The default name of the volume snapshot is the date and time when the snapshot is taken.
- Performance
Policy stringId - Performance Policy id of the volume snapshot. Valid values are defaultmedium, defaultlow, default_high.
- Volume
Id string - ID of the volume to take snapshot. Conflicts with
volume_name
. Cannot be updated. - Volume
Name string - Name of the volume to take snapshot. Conflicts with
volume_id
. Cannot be updated.
- creator
Type String - Creator Type of the volume snapshot.
- description String
- Description of the volume snapshot.
- expiration
Timestamp String - Expiration Timestamp of the volume snapshot.Only UTC (+Z) format is allowed.
- name String
- Name of the volume snapshot.The default name of the volume snapshot is the date and time when the snapshot is taken.
- performance
Policy StringId - Performance Policy id of the volume snapshot. Valid values are defaultmedium, defaultlow, default_high.
- volume
Id String - ID of the volume to take snapshot. Conflicts with
volume_name
. Cannot be updated. - volume
Name String - Name of the volume to take snapshot. Conflicts with
volume_id
. Cannot be updated.
- creator
Type string - Creator Type of the volume snapshot.
- description string
- Description of the volume snapshot.
- expiration
Timestamp string - Expiration Timestamp of the volume snapshot.Only UTC (+Z) format is allowed.
- name string
- Name of the volume snapshot.The default name of the volume snapshot is the date and time when the snapshot is taken.
- performance
Policy stringId - Performance Policy id of the volume snapshot. Valid values are defaultmedium, defaultlow, default_high.
- volume
Id string - ID of the volume to take snapshot. Conflicts with
volume_name
. Cannot be updated. - volume
Name string - Name of the volume to take snapshot. Conflicts with
volume_id
. Cannot be updated.
- creator_
type str - Creator Type of the volume snapshot.
- description str
- Description of the volume snapshot.
- expiration_
timestamp str - Expiration Timestamp of the volume snapshot.Only UTC (+Z) format is allowed.
- name str
- Name of the volume snapshot.The default name of the volume snapshot is the date and time when the snapshot is taken.
- performance_
policy_ strid - Performance Policy id of the volume snapshot. Valid values are defaultmedium, defaultlow, default_high.
- volume_
id str - ID of the volume to take snapshot. Conflicts with
volume_name
. Cannot be updated. - volume_
name str - Name of the volume to take snapshot. Conflicts with
volume_id
. Cannot be updated.
- creator
Type String - Creator Type of the volume snapshot.
- description String
- Description of the volume snapshot.
- expiration
Timestamp String - Expiration Timestamp of the volume snapshot.Only UTC (+Z) format is allowed.
- name String
- Name of the volume snapshot.The default name of the volume snapshot is the date and time when the snapshot is taken.
- performance
Policy StringId - Performance Policy id of the volume snapshot. Valid values are defaultmedium, defaultlow, default_high.
- volume
Id String - ID of the volume to take snapshot. Conflicts with
volume_name
. Cannot be updated. - volume
Name String - Name of the volume to take snapshot. Conflicts with
volume_id
. Cannot be updated.
Package Details
- Repository
- powerstore dell/terraform-provider-powerstore
- License
- Notes
- This Pulumi package is based on the
powerstore
Terraform Provider.