ALIYUN::GWS::Instance类型用于创建实例。
语法
{
"Type": "ALIYUN::GWS::Instance",
"Properties": {
"ClusterId": String,
"SystemDiskSize": Integer,
"InstanceChargeType": String,
"AutoRenew": Boolean,
"VSwitchId": String,
"Period": Integer,
"AllocatePublicAddress": Boolean,
"SystemDiskCategory": String,
"Name": String,
"InternetChargeType": String,
"InternetMaxBandwidthOut": Integer,
"InternetMaxBandwidthIn": Integer,
"ImageId": String,
"InstanceType": String,
"AppList": List,
"WorkMode": String,
"PeriodUnit": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
ClusterId | String | 是 | 否 | 集群ID。 | 无 |
SystemDiskSize | Integer | 是 | 否 | 系统盘大小。 | 无 |
InstanceChargeType | String | 否 | 否 | 实例付费方式。 | 取值:
|
AutoRenew | Boolean | 否 | 否 | 自动续费。 | 取值:
|
VSwitchId | String | 否 | 否 | 交换机ID。 | 无 |
Period | Integer | 否 | 否 | 付费周期。 | InstanceChargeType取值为PostPaid(包年包月)时该参数生效。
|
AllocatePublicAddress | Boolean | 否 | 否 | 是否分配公网地址。 | 取值:
|
SystemDiskCategory | String | 是 | 否 | 系统盘的种类。 | 取值:
|
Name | String | 否 | 是 | 实例名称。 | 无 |
InternetChargeType | String | 否 | 否 | 网络计费方式。 | AllocatePublicAddress取值为true时该参数生效。取值:
|
InternetMaxBandwidthOut | Integer | 否 | 否 | 公网出带宽最大值。 | AllocatePublicAddress取值为true时该参数生效。
取值范围:1~200。 单位:Mbps。 |
InternetMaxBandwidthIn | Integer | 否 | 否 | 公网入带宽最大值。 | AllocatePublicAddress取值为true时该参数生效。
取值范围:1~200。 单位:Mbps。 默认值:200。 |
ImageId | String | 是 | 否 | 镜像ID。 | 无 |
InstanceType | String | 是 | 否 | 实例规格。 | 无 |
AppList | List | 否 | 否 | 应用列表。 | WorkMode取值为Application时该参数生效。
最多支持添加10个应用。 详情请参见AppList属性。 |
WorkMode | String | 是 | 否 | 工作模式。 | 取值:
|
PeriodUnit | String | 否 | 否 | 包年包月的单位。 |
InstanceChargeType取值为PostPaid(包年包月)时该参数生效。 取值:
|
AppList语法
"AppList": [
{
"AppArgs": String,
"AppPath": String,
"AppName": String
}
]
AppList属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
AppArgs | String | 否 | 否 | 应用的运行参数。 | 无 |
AppPath | String | 否 | 否 | 应用的运行路径。 | 无 |
AppName | String | 否 | 否 | 应用名称。 | 无 |
返回值
Fn::GetAtt
- MaxBandwidthOut:公网出带宽最大值。
- MaxBandwidthIn:公网入带宽最大值。
- InstanceId:实例ID。
- ClusterId:集群ID。
- InstanceChargeType:付费类型。
- Name:实例名称。
示例
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ClusterId": {
"Type": "String",
"Description": "Cluster id"
},
"SystemDiskSize": {
"Type": "Number",
"Description": "System disk size"
},
"InstanceChargeType": {
"Type": "String",
"Description": "Instance charge type:\nPostPaid (default): Pay-As-You-Go\nPrePaid: Subscription",
"AllowedValues": [
"PostPaid",
"PrePaid"
]
},
"AutoRenew": {
"Type": "Boolean",
"Description": "Whether auto renew",
"AllowedValues": [
"True",
"true",
"False",
"false"
]
},
"VSwitchId": {
"Type": "String",
"Description": "VSwitch id"
},
"Period": {
"Type": "Number",
"Description": "Period of subscription.\nWhen PeriodUnit is Week, the value range is 1-4\nWhen PeriodUnit is Month, the value range is 1-9, 12, 24, 36, 48, 60\nThis value is only valid when InstanceChargeType is PrePaid."
},
"AllocatePublicAddress": {
"Type": "Boolean",
"Description": "Whether to allocate a public network address",
"AllowedValues": [
"True",
"true",
"False",
"false"
]
},
"SystemDiskCategory": {
"Type": "String",
"Description": "System disk categories: cloud_ssd, cloud_essd, cloud, cloud and so on."
},
"Name": {
"Type": "String",
"Description": "Instance name"
},
"InternetChargeType": {
"Type": "String",
"Description": "Network charge type:\nPayByTraffic (default): Flow-per-use billing\nPayByBandwidth: fixed-bandwidth billing\nThis value is only valid when AllocatePublicAddress is true.",
"AllowedValues": [
"PayByTraffic",
"PayByBandwidth"
]
},
"InternetMaxBandwidthOut": {
"Type": "Number",
"Description": "Maximum outbound bandwidth of the public network (in Mbps).\nValue range: 1-200\nDefault: 200\nThis value is only valid when AllocatePublicAddress is true."
},
"InternetMaxBandwidthIn": {
"Type": "Number",
"Description": "Maximum inbound bandwidth of the public network (in Mbps).\nValue range: 1-200\nDefault: 200\nThis value is only valid when AllocatePublicAddress is true."
},
"ImageId": {
"Type": "String",
"Description": "Mirror id"
},
"InstanceType": {
"Type": "String",
"Description": "Examples of specifications, see examples of racial or specifications call DescribeInstanceTypes get specification sheet."
},
"AppList": {
"Type": "Json",
"Description": "App list. This value is only valid when WorkMode is Application.",
"MaxLength": 10
},
"WorkMode": {
"Type": "String",
"Description": "Work mode:\nDesktop\nApplication",
"AllowedValues": [
"Desktop",
"Application"
]
},
"PeriodUnit": {
"Type": "String",
"Description": "Unit of period. Week or Month.\nThis value is only valid when InstanceChargeType is PrePaid.",
"AllowedValues": [
"Week",
"Month"
]
}
},
"Resources": {
"Instance": {
"Type": "ALIYUN::GWS::Instance",
"Properties": {
"ClusterId": {
"Ref": "ClusterId"
},
"SystemDiskSize": {
"Ref": "SystemDiskSize"
},
"InstanceChargeType": {
"Ref": "InstanceChargeType"
},
"AutoRenew": {
"Ref": "AutoRenew"
},
"VSwitchId": {
"Ref": "VSwitchId"
},
"Period": {
"Ref": "Period"
},
"AllocatePublicAddress": {
"Ref": "AllocatePublicAddress"
},
"SystemDiskCategory": {
"Ref": "SystemDiskCategory"
},
"Name": {
"Ref": "Name"
},
"InternetChargeType": {
"Ref": "InternetChargeType"
},
"InternetMaxBandwidthOut": {
"Ref": "InternetMaxBandwidthOut"
},
"InternetMaxBandwidthIn": {
"Ref": "InternetMaxBandwidthIn"
},
"ImageId": {
"Ref": "ImageId"
},
"InstanceType": {
"Ref": "InstanceType"
},
"AppList": {
"Ref": "AppList"
},
"WorkMode": {
"Ref": "WorkMode"
},
"PeriodUnit": {
"Ref": "PeriodUnit"
}
}
}
},
"Outputs": {
"MaxBandwidthOut": {
"Description": "Maximum outbound bandwidth of the public network (in Mbps)",
"Value": {
"Fn::GetAtt": [
"Instance",
"MaxBandwidthOut"
]
}
},
"MaxBandwidthIn": {
"Description": "Maximum inbound bandwidth of the public network (in Mbps)",
"Value": {
"Fn::GetAtt": [
"Instance",
"MaxBandwidthIn"
]
}
},
"InstanceId": {
"Description": "Instance id",
"Value": {
"Fn::GetAtt": [
"Instance",
"InstanceId"
]
}
},
"ClusterId": {
"Description": "Cluster id",
"Value": {
"Fn::GetAtt": [
"Instance",
"ClusterId"
]
}
},
"InstanceChargeType": {
"Description": "Instance charge type",
"Value": {
"Fn::GetAtt": [
"Instance",
"InstanceChargeType"
]
}
},
"Name": {
"Description": "Instance name",
"Value": {
"Fn::GetAtt": [
"Instance",
"Name"
]
}
}
}
}
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ClusterId:
Type: String
Description: Cluster id
SystemDiskSize:
Type: Number
Description: System disk size
InstanceChargeType:
Type: String
Description: |-
Instance charge type:
PostPaid (default): Pay-As-You-Go
PrePaid: Subscription
AllowedValues:
- PostPaid
- PrePaid
AutoRenew:
Type: Boolean
Description: Whether auto renew
AllowedValues:
- 'True'
- 'true'
- 'False'
- 'false'
VSwitchId:
Type: String
Description: VSwitch id
Period:
Type: Number
Description: |-
Period of subscription.
When PeriodUnit is Week, the value range is 1-4
When PeriodUnit is Month, the value range is 1-9, 12, 24, 36, 48, 60
This value is only valid when InstanceChargeType is PrePaid.
AllocatePublicAddress:
Type: Boolean
Description: Whether to allocate a public network address
AllowedValues:
- 'True'
- 'true'
- 'False'
- 'false'
SystemDiskCategory:
Type: String
Description: 'System disk categories: cloud_ssd, cloud_essd, cloud, cloud and so on.'
Name:
Type: String
Description: Instance name
InternetChargeType:
Type: String
Description: |-
Network charge type:
PayByTraffic (default): Flow-per-use billing
PayByBandwidth: fixed-bandwidth billing
This value is only valid when AllocatePublicAddress is true.
AllowedValues:
- PayByTraffic
- PayByBandwidth
InternetMaxBandwidthOut:
Type: Number
Description: |-
Maximum outbound bandwidth of the public network (in Mbps).
Value range: 1-200
Default: 200
This value is only valid when AllocatePublicAddress is true.
InternetMaxBandwidthIn:
Type: Number
Description: |-
Maximum inbound bandwidth of the public network (in Mbps).
Value range: 1-200
Default: 200
This value is only valid when AllocatePublicAddress is true.
ImageId:
Type: String
Description: Mirror id
InstanceType:
Type: String
Description: >-
Examples of specifications, see examples of racial or specifications call
DescribeInstanceTypes get specification sheet.
AppList:
Type: Json
Description: App list. This value is only valid when WorkMode is Application.
MaxLength: 10
WorkMode:
Type: String
Description: |-
Work mode:
Desktop
Application
AllowedValues:
- Desktop
- Application
PeriodUnit:
Type: String
Description: |-
Unit of period. Week or Month.
This value is only valid when InstanceChargeType is PrePaid.
AllowedValues:
- Week
- Month
Resources:
Instance:
Type: 'ALIYUN::GWS::Instance'
Properties:
ClusterId:
Ref: ClusterId
SystemDiskSize:
Ref: SystemDiskSize
InstanceChargeType:
Ref: InstanceChargeType
AutoRenew:
Ref: AutoRenew
VSwitchId:
Ref: VSwitchId
Period:
Ref: Period
AllocatePublicAddress:
Ref: AllocatePublicAddress
SystemDiskCategory:
Ref: SystemDiskCategory
Name:
Ref: Name
InternetChargeType:
Ref: InternetChargeType
InternetMaxBandwidthOut:
Ref: InternetMaxBandwidthOut
InternetMaxBandwidthIn:
Ref: InternetMaxBandwidthIn
ImageId:
Ref: ImageId
InstanceType:
Ref: InstanceType
AppList:
Ref: AppList
WorkMode:
Ref: WorkMode
PeriodUnit:
Ref: PeriodUnit
Outputs:
MaxBandwidthOut:
Description: Maximum outbound bandwidth of the public network (in Mbps)
Value:
'Fn::GetAtt':
- Instance
- MaxBandwidthOut
MaxBandwidthIn:
Description: Maximum inbound bandwidth of the public network (in Mbps)
Value:
'Fn::GetAtt':
- Instance
- MaxBandwidthIn
InstanceId:
Description: Instance id
Value:
'Fn::GetAtt':
- Instance
- InstanceId
ClusterId:
Description: Cluster id
Value:
'Fn::GetAtt':
- Instance
- ClusterId
InstanceChargeType:
Description: Instance charge type
Value:
'Fn::GetAtt':
- Instance
- InstanceChargeType
Name:
Description: Instance name
Value:
'Fn::GetAtt':
- Instance
- Name