ALIYUN::ECS::CloneDisks

更新时间:
复制为 MD 格式

ALIYUN::ECS::CloneDisks类型用于克隆一个或多个ECS云盘。

语法

{
  "Type": "ALIYUN::ECS::CloneDisks",
  "Properties": {
    "DiskCategory": String,
    "MultiAttach": String,
    "Size": Integer,
    "SourceDiskId": String,
    "BurstingEnabled": Boolean,
    "DiskName": String,
    "Encrypted": Boolean,
    "KmsKeyId": String,
    "PerformanceLevel": String,
    "ProvisionedIops": Integer,
    "ResourceGroupId": String,
    "Tags": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

DiskCategory

String

磁盘类型。

MultiAttach

String

是否启用磁盘的多挂载功能。

取值:

  • Enabled

  • Disabled

Size

Integer

磁盘大小。

最小值:1。

(单位:GiB)。

SourceDiskId

String

源磁盘ID。

BurstingEnabled

Boolean

是否启用磁盘的突发性能功能。

DiskName

String

磁盘名称。

Encrypted

Boolean

是否加密磁盘。

KmsKeyId

String

用于加密磁盘的KMS密钥ID。

PerformanceLevel

String

磁盘性能等级。

ProvisionedIops

Integer

磁盘预配置的IOPS。

最小值:0

ResourceGroupId

String

资源组ID。

Tags

List

要绑定到磁盘的标签。

创建磁盘时最多支持添加20个标签。每个标签包含KeyValue两个属性,其中Key为必填属性。更多信息,请参考Tags属性

Tags语法

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

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

Value

String

标签值。

返回值

Fn::GetAtt

DiskIds:磁盘ID列表。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ResourceGroupId:
    Type: String
    Description:
      en: The ID of the resource group.
    AssociationProperty: ALIYUN::ECS::ResourceGroup::ResourceGroupId
    Default: Null
    Required: false
  SourceDiskId:
    Type: String
    Description:
      en: The ID of the source disk.
    Required: true
  DiskName:
    Type: String
    Description:
      en: The name of the disk.
    Default: Null
    Required: false
  DiskCategory:
    Type: String
    Description:
      en: The category of the disk.
    Required: true
  PerformanceLevel:
    Type: String
    Description:
      en: The performance level of the disk.
    Default: Null
    Required: false
  Size:
    Type: Number
    Description:
      en: The size of the disk in GiB.
    MinValue: 1
    Required: true
  MultiAttach:
    Type: String
    Description:
      en: 'Whether to enable multi-attach for the disk. Valid values: Enabled, Disabled.'
    AllowedValues:
      - Enabled
      - Disabled
    Required: true
  ProvisionedIops:
    Type: Number
    Description:
      en: The provisioned IOPS for the disk.
    MinValue: 0
    Default: Null
    Required: false
  BurstingEnabled:
    Type: Boolean
    Description:
      en: Whether to enable bursting for the disk.
    Default: Null
    Required: false
  Encrypted:
    Type: Boolean
    Description:
      en: Whether to encrypt the disk.
    Default: Null
    Required: false
  KmsKeyId:
    Type: String
    Description:
      en: The ID of the KMS key used to encrypt the disk.
    Default: Null
    Required: false
  Tags:
    Description:
      en: Tags to attach to disk. Max support 20 tags to add during create disk. Each tag with two properties Key and Value, and Key is required.
    Required: false
    Default: Null
    Type: Json
    MaxLength: 20
    AssociationProperty: List[Parameters]
    AssociationPropertyMetadata:
      Parameters:
        Key:
          Type: String
          Required: true
        Value:
          Type: String
          Default: Null
          Required: false
      ListMetadata:
        Order:
          - Key
          - Value
Resources:
  CloneDisks:
    Type: ALIYUN::ECS::CloneDisks
    Properties:
      ResourceGroupId:
        Ref: ResourceGroupId
      SourceDiskId:
        Ref: SourceDiskId
      DiskName:
        Ref: DiskName
      DiskCategory:
        Ref: DiskCategory
      PerformanceLevel:
        Ref: PerformanceLevel
      Size:
        Ref: Size
      MultiAttach:
        Ref: MultiAttach
      ProvisionedIops:
        Ref: ProvisionedIops
      BurstingEnabled:
        Ref: BurstingEnabled
      Encrypted:
        Ref: Encrypted
      KmsKeyId:
        Ref: KmsKeyId
      Tags:
        Ref: Tags
Outputs:
  DiskIds:
    Value:
      Fn::GetAtt:
        - CloneDisks
        - DiskIds
    Description: The IDS of the disk.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ResourceGroupId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the resource group."
      },
      "AssociationProperty": "ALIYUN::ECS::ResourceGroup::ResourceGroupId",
      "Default": null,
      "Required": false
    },
    "SourceDiskId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the source disk."
      },
      "Required": true
    },
    "DiskName": {
      "Type": "String",
      "Description": {
        "en": "The name of the disk."
      },
      "Default": null,
      "Required": false
    },
    "DiskCategory": {
      "Type": "String",
      "Description": {
        "en": "The category of the disk."
      },
      "Required": true
    },
    "PerformanceLevel": {
      "Type": "String",
      "Description": {
        "en": "The performance level of the disk."
      },
      "Default": null,
      "Required": false
    },
    "Size": {
      "Type": "Number",
      "Description": {
        "en": "The size of the disk in GiB."
      },
      "MinValue": 1,
      "Required": true
    },
    "MultiAttach": {
      "Type": "String",
      "Description": {
        "en": "Whether to enable multi-attach for the disk. Valid values: Enabled, Disabled."
      },
      "AllowedValues": [
        "Enabled",
        "Disabled"
      ],
      "Required": true
    },
    "ProvisionedIops": {
      "Type": "Number",
      "Description": {
        "en": "The provisioned IOPS for the disk."
      },
      "MinValue": 0,
      "Default": null,
      "Required": false
    },
    "BurstingEnabled": {
      "Type": "Boolean",
      "Description": {
        "en": "Whether to enable bursting for the disk."
      },
      "Default": null,
      "Required": false
    },
    "Encrypted": {
      "Type": "Boolean",
      "Description": {
        "en": "Whether to encrypt the disk."
      },
      "Default": null,
      "Required": false
    },
    "KmsKeyId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the KMS key used to encrypt the disk."
      },
      "Default": null,
      "Required": false
    },
    "Tags": {
      "Description": {
        "en": "Tags to attach to disk. Max support 20 tags to add during create disk. Each tag with two properties Key and Value, and Key is required."
      },
      "Required": false,
      "Default": null,
      "Type": "Json",
      "MaxLength": 20,
      "AssociationProperty": "List[Parameters]",
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Key": {
            "Type": "String",
            "Required": true
          },
          "Value": {
            "Type": "String",
            "Default": null,
            "Required": false
          }
        },
        "ListMetadata": {
          "Order": [
            "Key",
            "Value"
          ]
        }
      }
    }
  },
  "Resources": {
    "CloneDisks": {
      "Type": "ALIYUN::ECS::CloneDisks",
      "Properties": {
        "ResourceGroupId": {
          "Ref": "ResourceGroupId"
        },
        "SourceDiskId": {
          "Ref": "SourceDiskId"
        },
        "DiskName": {
          "Ref": "DiskName"
        },
        "DiskCategory": {
          "Ref": "DiskCategory"
        },
        "PerformanceLevel": {
          "Ref": "PerformanceLevel"
        },
        "Size": {
          "Ref": "Size"
        },
        "MultiAttach": {
          "Ref": "MultiAttach"
        },
        "ProvisionedIops": {
          "Ref": "ProvisionedIops"
        },
        "BurstingEnabled": {
          "Ref": "BurstingEnabled"
        },
        "Encrypted": {
          "Ref": "Encrypted"
        },
        "KmsKeyId": {
          "Ref": "KmsKeyId"
        },
        "Tags": {
          "Ref": "Tags"
        }
      }
    }
  },
  "Outputs": {
    "DiskIds": {
      "Value": {
        "Fn::GetAtt": [
          "CloneDisks",
          "DiskIds"
        ]
      },
      "Description": "The IDS of the disk."
    }
  }
}