ALIYUN::ECS::Disk

更新时间:
复制 MD 格式

ALIYUN::ECS::Disk creates an ECS cloud disk.

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 resource group ID of the cloud disk.

None.

ZoneId

String

No

No

The zone ID for creating the pay-as-you-go cloud disk.

  • If you do not specify InstanceId, you must specify ZoneId.

  • You cannot specify both ZoneId and InstanceId.

DiskName

String

No

No

The cloud disk name.

2 to 128 characters. Must start with a letter. Cannot start with http:// or https://. Can contain letters, digits, periods (.), underscores (_), and hyphens (-).

Description

String

No

No

The cloud disk description.

2 to 256 characters. Cannot start with http:// or https://.

InstanceId

String

No

No

The subscription instance ID to attach the subscription cloud disk to.

  • If InstanceId is specified, ResourceGroupId, Tags, and KMSKeyId are ignored.

  • You cannot specify both ZoneId and InstanceId.

Default: null. Creates a pay-as-you-go cloud disk in the region and zone specified by RegionId and ZoneId.

Tags

List

No

No

The tags.

Up to 20 tags.

Tags properties.

DiskCategory

String

No

No

The cloud disk category.

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 both SnapshotId and Size are specified, SnapshotId takes precedence.

The created cloud disk uses the specified snapshot size.

Note

Snapshots created on or before July 15, 2013 cannot create cloud disks.

PerformanceLevel

String

No

No

The ESSD performance level (PL).

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.

ESSDs.

Size

Integer

No

No

The cloud disk size.

  • cloud: 5 to 2000.

  • cloud_efficiency: 20 to 32768.

  • cloud_ssd: 20 to 32768.

  • cloud_essd: 20 to 32768.

Unit: GiB.

Must be greater than or equal to the specified snapshot size.

BurstingEnabled

Boolean

No

No

Whether to enable burst mode.

Valid values:

  • true

  • false (default)

ProvisionedIops

Integer

No

No

The preconfigured IOPS.

None.

AutoSnapshotPolicyId

String

No

No

The automatic snapshot policy ID.

None.

Encrypted

Boolean

No

No

Whether to encrypt the cloud disk.

Valid values:

  • true

  • false (default)

DeleteAutoSnapshot

Boolean

No

No

Whether to delete automatic snapshots when the cloud disk is released.

Valid values:

  • true (default)

  • false

StorageSetId

String

No

No

The storage set ID.

None.

KMSKeyId

String

No

No

The Key Management Service (KMS) key ID for the cloud disk.

None.

StorageSetPartitionNumber

Integer

No

No

The number of storage set partitions.

None.

MultiAttach

String

No

No

Whether to enable multi-attach.

Valid values:

  • Disabled (default): Multi-attach is disabled.

  • Enabled: Enables multi-attach. Valid only for ESSDs.

Note

Multi-attach cloud disks support only pay-as-you-go billing.

Tags syntax

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

Tags properties

Property

Type

Required

Editable

Description

Constraint

Key

String

Yes

No

The tag key.

1 to 128 characters. Cannot contain http:// or https://. Cannot start with aliyun or acs:.

Value

String

No

No

The tag value.

Up to 128 characters. Cannot contain http:// or https://. Cannot start with aliyun or acs:.

Return values

Fn::GetAtt

  • DiskId: the cloud disk ID.

  • Status: the cloud disk state.

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