ALIYUN::ECS::Disk is used to create a disk for an ECS instance.

Syntax

{
  "Type": "ALIYUN::ECS::Disk",
  "Properties": {
    "DiskName": String,
    "Description": String,
    "Tags": List,
    "DiskCategory": String,
    "ResourceGroupId": String,
    "SnapshotId": String,
    "ZoneId": String,
    "Size": Integer
  }
}

Properties

Name Type Required Editable Description Validity
ResourceGroupId String No No The ID of the resource group to which the ECS instance belongs. None
ZoneId String Yes No The ID of the zone where the ECS instance resides. None
DiskName String No No The name of the disk.
  • If not specified, this parameter is null. Default value: null.
  • The name must be 2 to 128 characters in length.
  • It can contain letters, digits, periods (.), underscores (_), and hyphens(-).
  • It must start with a letter but cannot start with http:// or https://.
  • The disk name will be displayed in the ECS console.
Description String No No The description of the disk.
  • If not specified, this parameter is null. Default value: null.
  • The description must be 2 to 256 characters in length.
  • It cannot start with http:// or https://.
  • The disk description will be displayed in the ECS console.
Tags List No No The custom tags of the ECS instance. A maximum of four tags can be specified in the [{"Key":"tagKey","Value":"tagValue"}, {"Key":"tagKey2","Value":"tagValue2"}] format.
DiskCategory String No No The category of the data disk.

Valid values: cloud, cloud_efficiency, cloud_ssd, cloud_essd, san_ssd, and san_efficiency.

Default value: cloud.

SnapshotId String No No The ID of the snapshot used to create the data disk.
  • If both this parameter and the Size parameter are set, the Size parameter is ignored.
  • The actual size of the created disk is the size of the specified snapshot.
  • Snapshots created on or earlier than July 15, 2013 cannot be used to create disks.
Size Integer No No The size of the disk. Unit: GB.
  • Valid values when the DiskCategory parameter is set to cloud: 5 to 2000.
  • Valid values when the DiskCategory parameter is set to cloud_efficiency: 20 to 2000.
  • Valid values when the DiskCategory parameter is set to cloud_ssd: 20 to 2000.
  • The value of this parameter must be greater than or equal to the value of the SnapshotId parameter.

Tags syntax

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

Tags properties

Name Type Required Editable
Key String Yes No
Value String No No

Response parameters

Fn::GetAtt

  • DiskId: the ID of the disk.
  • Status: the status of the disk.

Examples

{
  "ROSTemplateFormatVersion" : "2015-09-01",
  "Resources" : {
    "DataDisk": {
      "Type": "ALIYUN::ECS::Disk",
      "Properties": {
        "Size": 10,
        "ZoneId": "cn-beijing-a",
        "DiskName": "\u4e2d\u6587",
        "Description": "Description"
      }
    }
  },
  "Outputs": {
    "DiskId": {
         "Value" : {"Fn::GetAtt": ["DataDisk","DiskId"]}
    },
    "Status": {
         "Value" : {"Fn::GetAtt": ["DataDisk","Status"]}
    }
  }
}