ALIYUN::CDT::ResourcePackage类型用于创建资源包。
语法
{
"Type": "ALIYUN::CDT::ResourcePackage",
"Properties": {
"Capacity": Integer,
"Pack": String,
"Region": String,
"ISP": String
}
}属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Capacity | Integer | 是 | 否 | CDT资源包的容量。 | 取值范围:50~102400。单位:GB。 |
Pack | String | 是 | 否 | CDT 资源包的套餐信息。 | 无 |
Region | String | 是 | 否 | 资源包所属地域。 | 取值:
|
ISP | String | 否 | 否 | CDT 资源包的运营商。 | 无 |
返回值
Fn::GetAtt
InstanceId:CDT资源包ID。
OrderId:订单ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Capacity:
Type: Number
Description:
en: The capacity of the specified CDT resource package.
Required: true
MinValue: 50
MaxValue: 102400
Region:
Type: String
Description:
en: The region of the specified CDT resource package.
AllowedValues:
- chinese-mainland
- asia-pacific
- europe
- north-america
- south-america
- middleeast
- finance-cloud
Required: true
Pack:
Type: String
Description:
en: The pack of the specified CDT resource package. It can be obtained from the `components` field in the payload of the `getPrice` network request on the CDT common buy page.
Required: true
Resources:
ResourcePackage:
Type: ALIYUN::CDT::ResourcePackage
Properties:
Capacity:
Ref: Capacity
Region:
Ref: Region
Pack:
Ref: Pack
Outputs:
InstanceId:
Description: The ID of the specified instance.
Value:
Fn::GetAtt:
- ResourcePackage
- InstanceId
OrderId:
Description: The ID of the specified order.
Value:
Fn::GetAtt:
- ResourcePackage
- OrderId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Capacity": {
"Type": "Number",
"Description": {
"en": "The capacity of the specified CDT resource package."
},
"Required": true,
"MinValue": 50,
"MaxValue": 102400
},
"Region": {
"Type": "String",
"Description": {
"en": "The region of the specified CDT resource package."
},
"AllowedValues": [
"chinese-mainland",
"asia-pacific",
"europe",
"north-america",
"south-america",
"middleeast",
"finance-cloud"
],
"Required": true
},
"Pack": {
"Type": "String",
"Description": {
"en": "The pack of the specified CDT resource package. It can be obtained from the `components` field in the payload of the `getPrice` network request on the CDT common buy page."
},
"Required": true
}
},
"Resources": {
"ResourcePackage": {
"Type": "ALIYUN::CDT::ResourcePackage",
"Properties": {
"Capacity": {
"Ref": "Capacity"
},
"Region": {
"Ref": "Region"
},
"Pack": {
"Ref": "Pack"
}
}
}
},
"Outputs": {
"InstanceId": {
"Description": "The ID of the specified instance.",
"Value": {
"Fn::GetAtt": [
"ResourcePackage",
"InstanceId"
]
}
},
"OrderId": {
"Description": "The ID of the specified order.",
"Value": {
"Fn::GetAtt": [
"ResourcePackage",
"OrderId"
]
}
}
}
}
该文章对您有帮助吗?