ALIYUN::ECS::Disk is used to create a cloud 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,
    "MultiAttach": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
ResourceGroupIdStringNoYesThe ID of the resource group to which the cloud disk belongs. None.
ZoneId String Yes No The ID of the zone. None.
DiskName String No No The name of the cloud disk. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), 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 cloud disk. The description must be 2 to 256 characters in length. The description cannot start with http:// or https://.
TagsListNoNoThe tags that you want to add to the cloud disk. You can add up to 20 tags.

For more information, see Tags properties.

DiskCategory String No No The category of the cloud 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 specify the SnapshotId property and the Size property at the same time, the value of the SnapshotId property takes precedence.

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

Note Snapshots that were created on or before July 15, 2013 cannot be used to create cloud disks.
PerformanceLevelStringNo No The performance level (PL) of the ESSD. Default value: PL1. Valid values:
  • PL0: An ESSD delivers up to 10,000 random read/write IOPS.
  • PL1: An ESSD delivers up to 50,000 random read/write IOPS.
  • PL2: An ESSD delivers up to 100,000 random read/write IOPS.
  • PL3: An ESSD delivers up to 1,000,000 random read/write IOPS.
For more information about the PLs of ESSDs, see ESSDs.
Size Integer No No The size of the cloud disk. Valid values:
  • 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.

BurstingEnabledBooleanNoNoSpecifies whether to enable the burst mode for the cloud disk. Default value: false. Valid values:
  • true
  • false
ProvisionedIopsIntegerNoNoThe IOPS that is preset in the cloud disk. None.
AutoSnapshotPolicyIdStringNoNoThe ID of the automatic snapshot policy. None.
EncryptedBooleanNoNoSpecifies whether to encrypt the cloud disk. Default value: false. Valid values:
  • true
  • false
DeleteAutoSnapshotBooleanNoNoSpecifies whether to delete the automatic snapshots of the cloud disk when the cloud disk is released. Default value: true. Valid values:
  • true
  • false
StorageSetIdStringNoNoThe ID of the storage set. None.
KMSKeyIdStringNoNoThe ID of the Key Management Service (KMS) key that is used by the cloud disk. None.
StorageSetPartitionNumberIntegerNoNoThe number of partitions in the storage set. None.
MultiAttachStringNoNoSpecifies whether to enable the multi-attach feature for the cloud disk. Default value: Disabled. Valid values:
  • Disabled
  • Enabled This value is valid only for ESSDs.
Note Cloud disks for which the multi-attach feature is enabled support only the pay-as-you-go billing method.

Tags syntax

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

Tags properties

PropertyTypeRequiredEditableDescriptionConstraint
KeyStringYesNoThe key of the tag. 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.
ValueStringNoNoThe value of the tag. The tag value can be up 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 cloud disk.
  • Status: the state of the cloud disk.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ZoneId:
        AssociationProperty: ALIYUN::ECS::Instance:ZoneId
        Type: String
        Label:
           
          en: VSwitch Availability Zone
    Resources:
      DataDisk:
        Type: ALIYUN::ECS::Disk
        Properties:
          Size: 10
          ZoneId:
            Ref: ZoneId
          DiskName: DataDisk
    Outputs:
      DiskId:
        Value:
          Fn::GetAtt:
            - DataDisk
            - DiskId
      Status:
        Value:
          Fn::GetAtt:
            - DataDisk
            - Status
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ZoneId": {
          "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId",
          "Type": "String",
          "Label": {
             
            "en": "VSwitch Availability Zone"
          }
        }
      },
      "Resources": {
        "DataDisk": {
          "Type": "ALIYUN::ECS::Disk",
          "Properties": {
            "Size": 10,
            "ZoneId": {
              "Ref": "ZoneId"
            },
            "DiskName": "DataDisk"
          }
        }
      },
      "Outputs": {
        "DiskId": {
          "Value": {
            "Fn::GetAtt": [
              "DataDisk",
              "DiskId"
            ]
          }
        },
        "Status": {
          "Value": {
            "Fn::GetAtt": [
              "DataDisk",
              "Status"
            ]
          }
        }
      }
    }

For more examples, visit Disk.json and Disk.yml.