All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ECS::SnapshotGroup

最終更新日:Sep 10, 2024

ALIYUN::ECS::SnapshotGroup is used to create a snapshot-consistent group for cloud disks that are attached to an Elastic Compute Service (ECS) instance. A snapshot-consistent group contains snapshots of one or more cloud disks.

Syntax

{
  "Type": "ALIYUN::ECS::SnapshotGroup",
  "Properties": {
    "DiskIds": List,
    "Description": String,
    "ExcludeDiskIds": List,
    "InstanceId": String,
    "Name": String,
    "ResourceGroupId": String,
    "Tags": List
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

DiskIds

List

No

No

The IDs of the cloud disks for which you want to create a snapshot-consistent group.

You can specify the IDs of cloud disks that are attached to multiple instances within the same zone. A snapshot-consistent group can contain up to 16 cloud disks whose total size is less than or equal to 32 TiB.

Note
  • You cannot specify both this property and ExcludeDiskIds.

  • If you specify InstanceId, you can specify the IDs of cloud disks that are attached only to the specified instance. You cannot specify the IDs of cloud disks that are attached to multiple instances.

Description

String

No

Yes

The description.

The description must be 2 to 256 characters in length, and cannot start with http:// or https://.

ExcludeDiskIds

List

No

No

The IDs of the cloud disks for which you do not want to create snapshots.

After you specify the IDs of cloud disks, the snapshot-consistent group that you create does not contain the snapshots of the specified cloud disks. You can specify up to 16 cloud disk IDs.

This property is empty by default, which indicates that snapshots are created for all cloud disks of the instance.

Note

You cannot specify both this property and DiskIds.

InstanceId

String

No

No

The instance ID.

None.

Name

String

No

Yes

The name of the snapshot-consistent group.

The name must be 2 to 128 characters in length. It can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter and cannot start with http:// or https://.

ResourceGroupId

String

No

No

The ID of the resource group to which the snapshot-consistent group belongs.

None.

Tags

List

No

Yes

The tags.

You can add up to 20 tags.

For more information, see the "Tags properties" section of this topic.

Tags syntax

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]

Tags properties

Property

Type

Required

Editable

Description

Constraint

Key

String

Yes

No

The tag key.

None.

Value

String

No

No

The tag value.

None.

Return values

Fn::GetAtt

SnapshotGroupId: the ID of the snapshot-consistent group.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      DiskIds:
        AssociationPropertyMetadata:
          Parameter:
            Type: String
            Description:
              en: The ID of cloud disk for which you want to create snapshots.
            Required: false
        AssociationProperty: List[Parameter]
        Type: Json
        Description:
          en: |-
            The IDs of cloud disk for which you want to create snapshots. You can specify multiple cloud disk IDs across instances within the same zone. The length of the list ranges from 1 to 16. A single snapshot-consistent group can contain snapshots of up to 16 cloud disks whose total disk size does not exceed 32 TiB.
            Take note of the following items:
            You cannot specify both DiskIds and ExcludeDiskIdin the same request.
            If InstanceId is set, you can use DiskIds to specify only cloud disks attached to the instance specified by InstanceId, and you cannot use DiskIds to specify cloud disks attached to multiple instances.
        Required: false
      InstanceId:
        Type: String
        AssociationProperty: ALIYUN::ECS::Instance::InstanceId
        Description:
          en: The instance ID.
        Required: false
      Name:
        Type: String
        Description:
          en: The name of the snapshot-consistent group. The name must be 2 to 128 characters in length. The name can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter and cannot start with http:// or https://.
        Required: false
    Resources:
      SnapshotGroup:
        Type: ALIYUN::ECS::SnapshotGroup
        Properties:
          DiskIds:
            Ref: DiskIds
          InstanceId:
            Ref: InstanceId
          Name:
            Ref: Name
    Outputs:
      SnapshotGroupId:
        Description: The ID of the snapshot-consistent group.
        Value:
          Fn::GetAtt:
            - SnapshotGroup
            - SnapshotGroupId
    
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "DiskIds": {
          "AssociationPropertyMetadata": {
            "Parameter": {
              "Type": "String",
              "Description": {
                "en": "The ID of cloud disk for which you want to create snapshots."
              },
              "Required": false
            }
          },
          "AssociationProperty": "List[Parameter]",
          "Type": "Json",
          "Description": {
            "en": "The IDs of cloud disk for which you want to create snapshots. You can specify multiple cloud disk IDs across instances within the same zone. The length of the list ranges from 1 to 16. A single snapshot-consistent group can contain snapshots of up to 16 cloud disks whose total disk size does not exceed 32 TiB.\nTake note of the following items:\nYou cannot specify both DiskIds and ExcludeDiskIdin the same request.\nIf InstanceId is set, you can use DiskIds to specify only cloud disks attached to the instance specified by InstanceId, and you cannot use DiskIds to specify cloud disks attached to multiple instances."
          },
          "Required": false
        },
        "InstanceId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::Instance::InstanceId",
          "Description": {
            "en": "The instance ID."
          },
          "Required": false
        },
        "Name": {
          "Type": "String",
          "Description": {
            "en": "The name of the snapshot-consistent group. The name must be 2 to 128 characters in length. The name can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter and cannot start with http:// or https://."
          },
          "Required": false
        }
      },
      "Resources": {
        "SnapshotGroup": {
          "Type": "ALIYUN::ECS::SnapshotGroup",
          "Properties": {
            "DiskIds": {
              "Ref": "DiskIds"
            },
            "InstanceId": {
              "Ref": "InstanceId"
            },
            "Name": {
              "Ref": "Name"
            }
          }
        }
      },
      "Outputs": {
        "SnapshotGroupId": {
          "Description": "The ID of the snapshot-consistent group.",
          "Value": {
            "Fn::GetAtt": [
              "SnapshotGroup",
              "SnapshotGroupId"
            ]
          }
        }
      }
    }