ALIYUN::ECS::Disk is used to create a disk for an Elastic Compute Service (ECS) instance.

Syntax

{
  "Type": "ALIYUN::ECS::Disk",
  "Properties": {
    "StorageSetId": String,
    "Description": String,
    "Tags": List,
    "AutoSnapshotPolicyId": String,
    "Encrypted": Boolean,
    "DiskName": String,
    "DiskCategory": String,
    "ResourceGroupId": String,
    "KMSKeyId": String,
    "DeleteAutoSnapshot": Boolean,
    "SnapshotId": String,
    "StorageSetPartitionNumber": Integer,
    "PerformanceLevel": String,
    "ZoneId": String,
    "Size": Integer,
    "BurstingEnabled": Boolean,
    "ProvisionedIops": Integer
  }
}

Properties

Property Type Required Editable Description Constraint
ResourceGroupId String No Yes The ID of the resource group to which the disk belongs. None
ZoneId String Yes No The ID of the zone. None
DiskName String No No The name of the disk. The name must be 2 to 128 characters in length, and can contain letters, digits, colons(:), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.
Description String No No The description of the disk. The description must be 2 to 256 characters in length. The description cannot start with http:// or https://.
Tags List No No The tags of the disk. You can specify up to 20 tags.

For more information, see Tags properties.

DiskCategory String No No The category of the disk. Default value: cloud. Valid values:
  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: enhanced SSD (ESSD)
SnapshotId String No No The ID of the snapshot. If you set the SnapshotId property and the Size property at the same time, the SnapshotId property takes precedence.

The actual size of the created disk is the size of the specified snapshot.

Note Snapshots that were created on or before July 15, 2013 cannot be used to create disks.
PerformanceLevel String No No The performance level of the ESSD. Default value: PL1. Valid values:
  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS.
For more information about performance levels of ESSDs, see ESSDs.
Size Integer No No The size of the disk.
  • Valid values if you set the DiskCategory property to cloud: 5 to 2000.
  • Valid values if you set the DiskCategory property to cloud_efficiency: 20 to 32768.
  • Valid values if you set the DiskCategory property to cloud_ssd: 20 to 32768.
  • Valid values if you set the DiskCategory property to cloud_essd: 20 to 32768.

Unit: GiB.

The value of this property must be greater than or equal to the size of the specified snapshot.

BurstingEnabled Boolean No No Specifies whether to enable bursting. Default value: false. Valid values:
  • true: enables bursting.
  • false: disables bursting.
ProvisionedIops Integer No No The provisioned IOPS volume. None
AutoSnapshotPolicyId String No No The ID of the automatic snapshot policy. None
Encrypted Boolean No No Specifies whether to encrypt the disk. Default value: false. Valid values:
  • true: encrypts the disk.
  • false: does not encrypt the disk.
DeleteAutoSnapshot Boolean No No Specifies whether to delete automatic snapshots of a disk when the disk is released. Default value: true. Valid values:
  • true : deletes automatic snapshots of a disk when the disk is released.
  • false: does not delete automatic snapshots of a disk when the disk is released.
StorageSetId String No No The ID of the storage set. None
KMSKeyId String No No The ID of the Key Management Service (KMS) key used by the disk. None
StorageSetPartitionNumber Integer No No The number of partitions in the storage set. None

Tags syntax

"Tags" : [
  {
    "Value" : String,
    "Key" : 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 http:// or https://. The tag key cannot start with acs: or aliyun.
Value String No No The tag value. The tag value must be 0 to 128 characters in length and cannot contain http:// or https://. The tag value cannot start with acs: or aliyun.

Return values

Fn::GetAtt

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

Examples

JSON format

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

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  DataDisk:
    Type: 'ALIYUN::ECS::Disk'
    Properties:
      Size: 10
      ZoneId: cn-beijing-a
      DiskName: DataDisk
      Description: ECSDataDisk
Outputs:
  DiskId:
    Value:
      'Fn::GetAtt':
        - DataDisk
        - DiskId
  Status:
    Value:
      'Fn::GetAtt':
        - DataDisk
        - Status

To view more examples, visit Disk.json and Disk.yml.