ALIYUN::ECS::Disk is used to create a cloud disk in Elastic Compute Service (ECS).
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,
"InstanceId": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
ResourceGroupId | String | No | Yes | The ID of the resource group to which the cloud disk belongs. | None. |
ZoneId | String | No | No | The zone ID. | None. |
DiskName | String | No | No | The name of the cloud disk. | The name must be 2 to 128 characters in length. It must start with a letter and cannot start with |
Description | String | No | No | The description of the cloud disk. | The description must be 2 to 256 characters in length. It cannot start with |
InstanceId | String | No | No | The ID of the ECS instance to which the cloud disk is automatically attached. |
Default value: null. A value of null specifies that a pay-as-you-go cloud disk is created in the region and zone that are separately represented by RegionId and ZoneId. |
Tags | List | No | No | The tags. | You can add up to 20 tags. For more information, see Tags properties. |
DiskCategory | String | No | No | The category of the cloud disk. | Valid values:
|
SnapshotId | String | No | No | The snapshot ID. | If you specify both SnapshotId and Size, the value of SnapshotId 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. |
PerformanceLevel | String | No | No | The performance level (PL) of the ESSD. | Valid values:
For more information about how to select ESSD PLs, see ESSDs. |
Size | Integer | No | No | The size of the cloud disk. |
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 the burst mode. | Valid values:
|
ProvisionedIops | Integer | No | No | The preconfigured IOPS. | None. |
AutoSnapshotPolicyId | String | No | No | The ID of the automatic snapshot policy. | None. |
Encrypted | Boolean | No | No | Specifies whether to encrypt the cloud disk. | Valid values:
|
DeleteAutoSnapshot | Boolean | No | No | Specifies whether to delete the automatic snapshots of a cloud disk when the cloud disk is released. | Valid values:
|
StorageSetId | String | No | No | The ID of the storage set. | None. |
KMSKeyId | String | No | No | The ID of the Key Management Service (KMS) key that you want to use for the cloud disk. | None. |
StorageSetPartitionNumber | Integer | No | No | The number of partitions in the storage set. | None. |
MultiAttach | String | No | No | Specifies whether to enable the multi-attach feature. | Valid values:
Note Cloud disks with the multi-attach feature enabled support only the pay-as-you-go billing method. |
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 |
Value | String | No | No | The tag value. | The tag value can be up to 128 characters in length, and cannot contain |
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"
]
}
}
}
}