All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ECS::Snapshot

Last Updated:Jun 10, 2026

ALIYUN::ECS::Snapshot creates a disk snapshot.

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 disk ID.

None.

SnapshotName

String

No

No

The snapshot name.

2 to 128 characters. Must start with a letter. Cannot start with http:// or https://. Allows letters, digits, colons (:), underscores (_), and hyphens (-).

Cannot start with auto (reserved for automatic snapshots).

Timeout

Integer

No

No

The snapshot creation timeout.

Extends the stack creation timeout. If the snapshot is not created within this period, stack creation fails. Set based on disk size and data volume.

Valid values: 200 to 1440.

Default value: 200.

Unit: minutes.

Description

String

No

No

The snapshot description.

2 to 256 characters. Cannot start with http:// or https://.

Empty by default.

ResourceGroupId

String

No

Yes

The resource group ID.

None.

Tags

List

No

Yes

The tags.

You can add up to 20 tags.

For more information, see Tags properties.

InstantAccess

Boolean

No

No

Whether to enable instant access.

Valid values:

  • true: enables instant access. Supported only for ESSDs.

  • false (default): creates a standard snapshot.

InstantAccessRetentionDays

Integer

No

No

The instant access retention period. The snapshot is released when this period expires.

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. The snapshot is released when this period expires.

Valid values: 1 to 65536.

Empty by default, meaning 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.

1 to 128 characters. Cannot contain http:// or https://. Cannot start with aliyun or acs:.

Value

String

No

No

The tag value.

Up to 128 characters. Cannot contain http:// or https://. Cannot start with aliyun or acs:.

Return values

Fn::GetAtt

  • SnapshotId: the snapshot ID.

  • Arn: the Alibaba Cloud Resource Name (ARN).

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DiskId:
    Type: String
    AssociationProperty: ALIYUN::ECS::Disk::DiskId
Resources:
  Snapshot:
    Type: ALIYUN::ECS::Snapshot
    Properties:
      Timeout: 300
      DiskId:
        Ref: DiskId
Outputs:
  SnapshotId:
    Description: The snapshot ID.
    Value:
      Fn::GetAtt:
        - Snapshot
        - SnapshotId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DiskId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::Disk::DiskId"
    }
  },
  "Resources": {
    "Snapshot": {
      "Type": "ALIYUN::ECS::Snapshot",
      "Properties": {
        "Timeout": 300,
        "DiskId": {
          "Ref": "DiskId"
        }
      }
    }
  },
  "Outputs": {
    "SnapshotId": {
      "Description": "The snapshot ID.",
      "Value": {
        "Fn::GetAtt": [
          "Snapshot",
          "SnapshotId"
        ]
      }
    }
  }
}

Additional examples using ALIYUN::ECS::DiskAttachment and ALIYUN::ECS::Snapshot: auto-snapshot-policy.yml.