powerstore.FilesystemSnapshot
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 filesystem snapshot , we need the id of that filesystem snapshot
Step 2 - To check the id of the filesystem snapshot we can make Get request to filesystem snapshot endpoint. eg. https://10.0.0.1/api/rest/file_system and ‘filesystem_type: Snapshot’ which will return list of all filesystem snapshots ids.
Step 3 - Add empty resource block in tf file.
eg.
resource “powerstore_filesystem_snapshot” “resource_block_name” {
(resource arguments)
}
$ pulumi import powerstore:index/filesystemSnapshot:FilesystemSnapshot Step 4 - Execute the command: "powerstore_filesystem_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 FilesystemSnapshot Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FilesystemSnapshot(name: string, args: FilesystemSnapshotArgs, opts?: CustomResourceOptions);
@overload
def FilesystemSnapshot(resource_name: str,
args: FilesystemSnapshotArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FilesystemSnapshot(resource_name: str,
opts: Optional[ResourceOptions] = None,
filesystem_id: Optional[str] = None,
access_type: Optional[str] = None,
description: Optional[str] = None,
expiration_timestamp: Optional[str] = None,
name: Optional[str] = None)
func NewFilesystemSnapshot(ctx *Context, name string, args FilesystemSnapshotArgs, opts ...ResourceOption) (*FilesystemSnapshot, error)
public FilesystemSnapshot(string name, FilesystemSnapshotArgs args, CustomResourceOptions? opts = null)
public FilesystemSnapshot(String name, FilesystemSnapshotArgs args)
public FilesystemSnapshot(String name, FilesystemSnapshotArgs args, CustomResourceOptions options)
type: powerstore:FilesystemSnapshot
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 FilesystemSnapshotArgs
- 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 FilesystemSnapshotArgs
- 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 FilesystemSnapshotArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FilesystemSnapshotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FilesystemSnapshotArgs
- 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 filesystemSnapshotResource = new Powerstore.FilesystemSnapshot("filesystemSnapshotResource", new()
{
FilesystemId = "string",
AccessType = "string",
Description = "string",
ExpirationTimestamp = "string",
Name = "string",
});
example, err := powerstore.NewFilesystemSnapshot(ctx, "filesystemSnapshotResource", &powerstore.FilesystemSnapshotArgs{
FilesystemId: pulumi.String("string"),
AccessType: pulumi.String("string"),
Description: pulumi.String("string"),
ExpirationTimestamp: pulumi.String("string"),
Name: pulumi.String("string"),
})
var filesystemSnapshotResource = new FilesystemSnapshot("filesystemSnapshotResource", FilesystemSnapshotArgs.builder()
.filesystemId("string")
.accessType("string")
.description("string")
.expirationTimestamp("string")
.name("string")
.build());
filesystem_snapshot_resource = powerstore.FilesystemSnapshot("filesystemSnapshotResource",
filesystem_id="string",
access_type="string",
description="string",
expiration_timestamp="string",
name="string")
const filesystemSnapshotResource = new powerstore.FilesystemSnapshot("filesystemSnapshotResource", {
filesystemId: "string",
accessType: "string",
description: "string",
expirationTimestamp: "string",
name: "string",
});
type: powerstore:FilesystemSnapshot
properties:
accessType: string
description: string
expirationTimestamp: string
filesystemId: string
name: string
FilesystemSnapshot 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 FilesystemSnapshot resource accepts the following input properties:
- Filesystem
Id string - ID of the filesystem to take snapshot. Cannot be updated.
- Access
Type string - Access type of the filesystem snapshot. Access type can be 'Snapshot' or 'Protocol'. Cannot be updated.
- Description string
- Description of the filesystem snapshot.
- Expiration
Timestamp string - Expiration Timestamp of the filesystem snapshot, if not provided there will no expiration for the snapshot. To remove the expiration timestamp, specify it as an empty string. Only UTC (+Z) format is allowed eg: 2023-05-06T09:01:47Z
- Name string
- Name of the filesystem snapshot.The default name of the filesystem snapshot is the date and time when the snapshot is taken.
- Filesystem
Id string - ID of the filesystem to take snapshot. Cannot be updated.
- Access
Type string - Access type of the filesystem snapshot. Access type can be 'Snapshot' or 'Protocol'. Cannot be updated.
- Description string
- Description of the filesystem snapshot.
- Expiration
Timestamp string - Expiration Timestamp of the filesystem snapshot, if not provided there will no expiration for the snapshot. To remove the expiration timestamp, specify it as an empty string. Only UTC (+Z) format is allowed eg: 2023-05-06T09:01:47Z
- Name string
- Name of the filesystem snapshot.The default name of the filesystem snapshot is the date and time when the snapshot is taken.
- filesystem
Id String - ID of the filesystem to take snapshot. Cannot be updated.
- access
Type String - Access type of the filesystem snapshot. Access type can be 'Snapshot' or 'Protocol'. Cannot be updated.
- description String
- Description of the filesystem snapshot.
- expiration
Timestamp String - Expiration Timestamp of the filesystem snapshot, if not provided there will no expiration for the snapshot. To remove the expiration timestamp, specify it as an empty string. Only UTC (+Z) format is allowed eg: 2023-05-06T09:01:47Z
- name String
- Name of the filesystem snapshot.The default name of the filesystem snapshot is the date and time when the snapshot is taken.
- filesystem
Id string - ID of the filesystem to take snapshot. Cannot be updated.
- access
Type string - Access type of the filesystem snapshot. Access type can be 'Snapshot' or 'Protocol'. Cannot be updated.
- description string
- Description of the filesystem snapshot.
- expiration
Timestamp string - Expiration Timestamp of the filesystem snapshot, if not provided there will no expiration for the snapshot. To remove the expiration timestamp, specify it as an empty string. Only UTC (+Z) format is allowed eg: 2023-05-06T09:01:47Z
- name string
- Name of the filesystem snapshot.The default name of the filesystem snapshot is the date and time when the snapshot is taken.
- filesystem_
id str - ID of the filesystem to take snapshot. Cannot be updated.
- access_
type str - Access type of the filesystem snapshot. Access type can be 'Snapshot' or 'Protocol'. Cannot be updated.
- description str
- Description of the filesystem snapshot.
- expiration_
timestamp str - Expiration Timestamp of the filesystem snapshot, if not provided there will no expiration for the snapshot. To remove the expiration timestamp, specify it as an empty string. Only UTC (+Z) format is allowed eg: 2023-05-06T09:01:47Z
- name str
- Name of the filesystem snapshot.The default name of the filesystem snapshot is the date and time when the snapshot is taken.
- filesystem
Id String - ID of the filesystem to take snapshot. Cannot be updated.
- access
Type String - Access type of the filesystem snapshot. Access type can be 'Snapshot' or 'Protocol'. Cannot be updated.
- description String
- Description of the filesystem snapshot.
- expiration
Timestamp String - Expiration Timestamp of the filesystem snapshot, if not provided there will no expiration for the snapshot. To remove the expiration timestamp, specify it as an empty string. Only UTC (+Z) format is allowed eg: 2023-05-06T09:01:47Z
- name String
- Name of the filesystem snapshot.The default name of the filesystem snapshot is the date and time when the snapshot is taken.
Outputs
All input properties are implicitly available as output properties. Additionally, the FilesystemSnapshot 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 FilesystemSnapshot Resource
Get an existing FilesystemSnapshot 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?: FilesystemSnapshotState, opts?: CustomResourceOptions): FilesystemSnapshot
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_type: Optional[str] = None,
description: Optional[str] = None,
expiration_timestamp: Optional[str] = None,
filesystem_id: Optional[str] = None,
name: Optional[str] = None) -> FilesystemSnapshot
func GetFilesystemSnapshot(ctx *Context, name string, id IDInput, state *FilesystemSnapshotState, opts ...ResourceOption) (*FilesystemSnapshot, error)
public static FilesystemSnapshot Get(string name, Input<string> id, FilesystemSnapshotState? state, CustomResourceOptions? opts = null)
public static FilesystemSnapshot get(String name, Output<String> id, FilesystemSnapshotState state, CustomResourceOptions options)
resources: _: type: powerstore:FilesystemSnapshot 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
Type string - Access type of the filesystem snapshot. Access type can be 'Snapshot' or 'Protocol'. Cannot be updated.
- Description string
- Description of the filesystem snapshot.
- Expiration
Timestamp string - Expiration Timestamp of the filesystem snapshot, if not provided there will no expiration for the snapshot. To remove the expiration timestamp, specify it as an empty string. Only UTC (+Z) format is allowed eg: 2023-05-06T09:01:47Z
- Filesystem
Id string - ID of the filesystem to take snapshot. Cannot be updated.
- Name string
- Name of the filesystem snapshot.The default name of the filesystem snapshot is the date and time when the snapshot is taken.
- Access
Type string - Access type of the filesystem snapshot. Access type can be 'Snapshot' or 'Protocol'. Cannot be updated.
- Description string
- Description of the filesystem snapshot.
- Expiration
Timestamp string - Expiration Timestamp of the filesystem snapshot, if not provided there will no expiration for the snapshot. To remove the expiration timestamp, specify it as an empty string. Only UTC (+Z) format is allowed eg: 2023-05-06T09:01:47Z
- Filesystem
Id string - ID of the filesystem to take snapshot. Cannot be updated.
- Name string
- Name of the filesystem snapshot.The default name of the filesystem snapshot is the date and time when the snapshot is taken.
- access
Type String - Access type of the filesystem snapshot. Access type can be 'Snapshot' or 'Protocol'. Cannot be updated.
- description String
- Description of the filesystem snapshot.
- expiration
Timestamp String - Expiration Timestamp of the filesystem snapshot, if not provided there will no expiration for the snapshot. To remove the expiration timestamp, specify it as an empty string. Only UTC (+Z) format is allowed eg: 2023-05-06T09:01:47Z
- filesystem
Id String - ID of the filesystem to take snapshot. Cannot be updated.
- name String
- Name of the filesystem snapshot.The default name of the filesystem snapshot is the date and time when the snapshot is taken.
- access
Type string - Access type of the filesystem snapshot. Access type can be 'Snapshot' or 'Protocol'. Cannot be updated.
- description string
- Description of the filesystem snapshot.
- expiration
Timestamp string - Expiration Timestamp of the filesystem snapshot, if not provided there will no expiration for the snapshot. To remove the expiration timestamp, specify it as an empty string. Only UTC (+Z) format is allowed eg: 2023-05-06T09:01:47Z
- filesystem
Id string - ID of the filesystem to take snapshot. Cannot be updated.
- name string
- Name of the filesystem snapshot.The default name of the filesystem snapshot is the date and time when the snapshot is taken.
- access_
type str - Access type of the filesystem snapshot. Access type can be 'Snapshot' or 'Protocol'. Cannot be updated.
- description str
- Description of the filesystem snapshot.
- expiration_
timestamp str - Expiration Timestamp of the filesystem snapshot, if not provided there will no expiration for the snapshot. To remove the expiration timestamp, specify it as an empty string. Only UTC (+Z) format is allowed eg: 2023-05-06T09:01:47Z
- filesystem_
id str - ID of the filesystem to take snapshot. Cannot be updated.
- name str
- Name of the filesystem snapshot.The default name of the filesystem snapshot is the date and time when the snapshot is taken.
- access
Type String - Access type of the filesystem snapshot. Access type can be 'Snapshot' or 'Protocol'. Cannot be updated.
- description String
- Description of the filesystem snapshot.
- expiration
Timestamp String - Expiration Timestamp of the filesystem snapshot, if not provided there will no expiration for the snapshot. To remove the expiration timestamp, specify it as an empty string. Only UTC (+Z) format is allowed eg: 2023-05-06T09:01:47Z
- filesystem
Id String - ID of the filesystem to take snapshot. Cannot be updated.
- name String
- Name of the filesystem snapshot.The default name of the filesystem snapshot is the date and time when the snapshot is taken.
Package Details
- Repository
- powerstore dell/terraform-provider-powerstore
- License
- Notes
- This Pulumi package is based on the
powerstore
Terraform Provider.