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 |
是 |
否 |
是否启用磁盘的多挂载功能。 |
取值:
|
|
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个标签。每个标签包含Key和Value两个属性,其中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."
}
}
}该文章对您有帮助吗?