Snapshot
Provides an ECS snapshot resource.
For information about snapshot and how to use it, see Snapshot.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var snapshot = new AliCloud.Ecs.Snapshot("snapshot", new AliCloud.Ecs.SnapshotArgs
{
Description = "this snapshot is created for testing",
DiskId = alicloud_disk_attachment.Instance_attachment.Disk_id,
Tags =
{
{ "version", "1.2" },
},
});
}
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
snapshot = alicloud.ecs.Snapshot("snapshot",
description="this snapshot is created for testing",
disk_id=alicloud_disk_attachment["instance-attachment"]["disk_id"],
tags={
"version": "1.2",
})import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const snapshot = new alicloud.ecs.Snapshot("snapshot", {
description: "this snapshot is created for testing",
diskId: alicloud_disk_attachment_instance_attachment.diskId,
tags: {
version: "1.2",
},
});Create a Snapshot Resource
new Snapshot(name: string, args: SnapshotArgs, opts?: CustomResourceOptions);def Snapshot(resource_name, opts=None, description=None, disk_id=None, name=None, tags=None, __props__=None);func NewSnapshot(ctx *Context, name string, args SnapshotArgs, opts ...ResourceOption) (*Snapshot, error)public Snapshot(string name, SnapshotArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
Snapshot Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Snapshot resource accepts the following input properties:
- Disk
Id string The source disk ID.
- Description string
Description of the snapshot. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- Name string
Name of the snapshot. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-”, “.”, “_“, and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Disk
Id string The source disk ID.
- Description string
Description of the snapshot. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- Name string
Name of the snapshot. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-”, “.”, “_“, and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- map[string]interface{}
A mapping of tags to assign to the resource.
- disk
Id string The source disk ID.
- description string
Description of the snapshot. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- name string
Name of the snapshot. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-”, “.”, “_“, and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- disk_
id str The source disk ID.
- description str
Description of the snapshot. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- name str
Name of the snapshot. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-”, “.”, “_“, and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- Dict[str, Any]
A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Snapshot resource produces the following output properties:
Look up an 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): Snapshotstatic get(resource_name, id, opts=None, description=None, disk_id=None, name=None, tags=None, __props__=None);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)- 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.
The following state arguments are supported:
- Description string
Description of the snapshot. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- Disk
Id string The source disk ID.
- Name string
Name of the snapshot. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-”, “.”, “_“, and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Description string
Description of the snapshot. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- Disk
Id string The source disk ID.
- Name string
Name of the snapshot. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-”, “.”, “_“, and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- map[string]interface{}
A mapping of tags to assign to the resource.
- description string
Description of the snapshot. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- disk
Id string The source disk ID.
- name string
Name of the snapshot. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-”, “.”, “_“, and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- description str
Description of the snapshot. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
- disk_
id str The source disk ID.
- name str
Name of the snapshot. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-”, “.”, “_“, and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
- Dict[str, Any]
A mapping of tags to assign to the resource.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.