ALIYUN::ECS::Snapshot is used to create a snapshot for a disk.
Syntax
{
"Type": "ALIYUN::ECS::Snapshot",
"Properties": {
"SnapshotName": String,
"Timeout": Integer,
"Description": String,
"DiskId": String,
"Tags": List,
"InstantAccess": Boolean,
"InstantAccessRetentionDays": Integer,
"ResourceGroupId": String,
"RetentionDays": Integer
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
DiskId | String | Yes | No | The ID of the disk for which you want to create the snapshot. | None. |
SnapshotName | String | No | No | The snapshot name. | The name must be 2 to 128 characters in length. It must start with a letter and cannot start with The name cannot start with auto because snapshots whose names start with auto are recognized as automatic snapshots. |
Timeout | Integer | No | No | The timeout period for creating the snapshot. | If you specify this property, the timeout period for creating a stack is extended. If the snapshot is not created within the specified timeout period, the stack fails to be created. You can specify this property based on the disk size and the data size. Valid values: 200 to 1440. Default value: 200. Unit: minutes. |
Description | String | No | No | The description of the snapshot. | The description must be 2 to 256 characters in length, and cannot start with This property is empty by default. |
ResourceGroupId | String | No | Yes | The ID of the resource group to which the snapshot belongs. | None. |
Tags | List | No | Yes | The tags. | You can add up to 20 tags. For more information, see Tags properties. |
InstantAccess | Boolean | No | No | Specifies whether to enable the instant access feature for the snapshot. | Valid values:
|
InstantAccessRetentionDays | Integer | No | No | The retention period of the instant access feature. After the retention period ends, the snapshot is automatically released. | This property takes effect only when InstantAccess is set to true. Valid values: 1 to 65535. Unit: day. |
RetentionDays | Integer | No | No | The retention period of the snapshot. | Unit: day. After the retention period ends, the snapshot is automatically released. Valid values: 1 to 65536. This property is empty by default, which indicates that the snapshot is not automatically released. |
Tags syntax
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
Key | String | Yes | No | The tag key. | The tag key must be 1 to 128 characters in length, and cannot contain |
Value | String | No | No | The tag value. | The tag value can be up to 128 characters in length, and cannot contain |
Return values
Fn::GetAtt
SnapshotId: the snapshot ID.
Examples
For more examples, visit auto-snapshot-policy.yml. In the examples, the ALIYUN::ECS::DiskAttachment and ALIYUN::ECS::Snapshot resource types are used.