edit-icon download-icon

ALIYUN::ECS::Disk

Last Updated: Jun 13, 2018

Description

Creates a cloud disk.

Syntax

  1. {
  2. "Type" : "ALIYUN::ECS::Disk",
  3. "Properties" : {
  4. "DiskName" : String,
  5. "Description" : String,
  6. "Tags" : List,
  7. "DiskCategory" : String,
  8. "SnapshotId" : String,
  9. "ZoneId" : String,
  10. "Size" : Integer
  11. }
  12. }

Properties

Name Type Required Description Constraints
ZoneId String Yes The ID of the zone in which the disk is created. None.
DiskName String No Disk name. - Default value: null.
- It can contain 2 to 128 characters.
- It must start with an uppercase or a lowercase English letter, and can contain English letters, numbers, periods(.), underscores(_), and hyphens(-). It cannot start with http:// or https://.
Description String No Disk description. - Default value: null.
- It can contain 2 to 256 characters. It cannot start with http:// or https://.
- The disk description is displayed in the console.
TagsListNoDisk tag.It can contain up to four tags.
- Pattern: [{“Key”:”tagKey”,”Value”:”tagValue”},{“Key”:”tagKey2”,”Value”:”tagValue2”}].
DiskCategory String No Disk category. Valid values: cloud, cloud_efficiency, cloud_ssd.
- Default value: cloud.
SnapshotId String No The ID of the snapshot from which the disk is created. - If this parameter and Size are both specified, Size is ignored, and the size of the new disk is the same as the size of the specified snapshot.- Snapshots created earlier than July 15, 2013 (included) cannnot be used to create a disk.
Size Integer No Disk size. Value ranges by disk category:
- cloud: [5 GB, 2000 GB];
- cloud_efficiency: [20 GB, 2048 GB];
- cloud_ssd: [20 GB, 1024 GB].
- The value of this parameter must be greater than or equal to the value of SnapshotId.

Tags syntax

  1. "Tags" : [
  2. {
  3. "Value" : String,
  4. "Key" : String
  5. }
  6. ]

Tags properties

Name Type Required Description Constraints
Key String Yes None. None.
Value String No None. None.

Return values

Fn::GetAtt

  • DiskId: The ID of the disk created.

  • Status: The status of the disk created.

Example

  1. {
  2. "ROSTemplateFormatVersion" : "2015-09-01",
  3. "Resources" : {
  4. "DataDisk": {
  5. "Type": "ALIYUN::ECS::Disk",
  6. "Properties": {
  7. "Size": 10,
  8. "ZoneId": "cn-beijing-a",
  9. "DiskName": "\u4e2d\u6587",
  10. "Description": "Chinese"
  11. }
  12. }
  13. },
  14. "Outputs": {
  15. "DiskId": {
  16. "Value" : {"Fn::GetAtt": ["DataDisk","DiskId"]}
  17. },
  18. "Status": {
  19. "Value" : {"Fn::GetAtt": ["DataDisk","Status"]}
  20. }
  21. }
  22. }
Thank you! We've received your feedback.