All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ECS::Disk

Last Updated:Jul 02, 2024

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 http:// or https://. It can contain letters, digits, periods (.), underscores (_), and hyphens (-).

Description

String

No

No

The description of the cloud disk.

The description must be 2 to 256 characters in length. It cannot start with http:// or https://.

InstanceId

String

No

No

The ID of the ECS instance to which the cloud disk is automatically attached.

  • If you specify InstanceId, the defined values of ResourceGroupId, Tags, and KMSKeyId are ignored.

  • You cannot specify both ZoneId and InstanceId.

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:

  • cloud (default): basic disk

  • cloud_efficiency: ultra disk

  • cloud_ssd: standard SSD

  • cloud_essd: Enterprise SSD (ESSD)

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:

  • PL0: An ESSD can deliver up to 10,000 random read/write IOPS.

  • PL1 (default): An ESSD can deliver up to 50,000 random read/write IOPS.

  • PL2: An ESSD can deliver up to 100,000 random read/write IOPS.

  • PL3: An ESSD can deliver up to 1,000,000 random read/write IOPS.

For more information about how to select ESSD PLs, see ESSDs.

Size

Integer

No

No

The size of the cloud disk.

  • Valid values when DiskCategory is set to cloud: 5 to 2000.

  • Valid values when DiskCategory is set to cloud_efficiency: 20 to 32768.

  • Valid values when DiskCategory is set to cloud_ssd: 20 to 32768.

  • Valid values when DiskCategory is set 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 the burst mode.

Valid values:

  • true

  • false (default)

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:

  • true

  • false (default)

DeleteAutoSnapshot

Boolean

No

No

Specifies whether to delete the automatic snapshots of a cloud disk when the cloud disk is released.

Valid values:

  • true (default)

  • false

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:

  • Disabled (default): disables the multi-attach feature.

  • Enabled: enables the multi-attach feature. This value is valid only for ESSDs.

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 http:// or https://. It cannot start with aliyun or acs:.

Value

String

No

No

The tag value.

The tag value can be up to 128 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.

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"
        ]
      }
    }
  }
}