ALIYUN::ECS::AutoProvisioningGroup类型用于创建弹性供应组。
语法
{
"Type": "ALIYUN::ECS::AutoProvisioningGroup",
"Properties": {
"SpotInstancePoolsToUseCount": Integer,
"AutoProvisioningGroupName": String,
"ValidUntil": String,
"Description": String,
"PayAsYouGoAllocationStrategy": String,
"MaxSpotPrice": Number,
"LaunchTemplateId": String,
"DefaultTargetCapacityType": String,
"SpotInstanceInterruptionBehavior": String,
"SpotTargetCapacity": String,
"SpotAllocationStrategy": String,
"PayAsYouGoTargetCapacity": String,
"TotalTargetCapacity": String,
"AutoProvisioningGroupType": String,
"LaunchTemplateVersion": String,
"ValidFrom": String,
"ExcessCapacityTerminationPolicy": String,
"TerminateInstances": Boolean,
"TerminateInstancesWithExpiration": Boolean,
"CheckExecutionStatus": Boolean,
"LaunchConfiguration": Map
"LaunchTemplateConfig": List,
"MinTargetCapacity": String,
"ResourcePoolOptions": Map,
"DataDiskConfig": List,
"ResourceGroupId": String,
"SystemDiskConfig": List
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
SpotInstancePoolsToUseCount | Integer | 否 | 否 | 弹性供应组选择价格最低的实例规格创建实例的数量。 | 取值:小于启动模板的扩展设置数量。 当SpotAllocationStrategy取值为lowest-price时该参数生效。 |
AutoProvisioningGroupName | String | 否 | 否 | 弹性供应组的名称。 | 长度为2~128个字符,必须以英文字母或汉字开头,不能以 |
ValidUntil | String | 否 | 否 | 弹性供应组的到期时间,和ValidFrom共同确定有效时段。 | 按照ISO8601标准表示,并使用UTC时间,格式为 |
Description | String | 否 | 否 | 弹性供应组的描述信息。 | 无 |
PayAsYouGoAllocationStrategy | String | 否 | 否 | 创建按量付费实例的策略。 | 取值:
|
MaxSpotPrice | Number | 否 | 是 | 弹性供应组内抢占式实例的最高价格。 | 同时设置MaxSpotPrice和MaxPrice时,以最低值为准。关于MaxPrice参数的更多信息,请参见LaunchTemplateConfig 属性。 |
LaunchTemplateId | String | 否 | 否 | 弹性供应组关联的实例启动模板的ID。 | 您可以调用DescribeLaunchTemplates查询可用的实例启动模板。 同时指定LaunchTemplateId和LaunchConfiguration时,优先使用启动模板。 |
DefaultTargetCapacityType | String | 否 | 是 | PayAsYouGoTargetCapacity和SpotTargetCapacity之和小于TotalTargetCapacity时,指定差额容量的计费方式。 | 取值:
|
SpotInstanceInterruptionBehavior | String | 否 | 否 | 停止了超额抢占式实例后的下一步动作。 | 取值:
|
SpotTargetCapacity | String | 否 | 是 | 弹性供应组内,抢占式实例的目标容量。 | 取值:小于TotalTargetCapacity参数取值。 |
SpotAllocationStrategy | String | 否 | 否 | 创建抢占式实例的策略。 | 取值:
|
PayAsYouGoTargetCapacity | String | 否 | 是 | 弹性供应组内,按量付费实例的目标容量。 | 取值:小于TotalTargetCapacity参数取值。 |
TotalTargetCapacity | String | 是 | 是 | 弹性供应组的目标总容量。 | 取值(正整数):总容量必须大于等于PayAsYouGoTargetCapacity(指定的按量付费实例目标容量)和SpotTargetCapacity(指定的抢占式实例目标容量)取值之和。 |
AutoProvisioningGroupType | String | 否 | 否 | 弹性供应组的交付类型。 | 取值:
|
LaunchTemplateVersion | String | 否 | 否 | 弹性供应组关联实例启动模板的版本。 | 您可以调用DescribeLaunchTemplateVersions查询可用的实例启动模板版本。 |
ValidFrom | String | 否 | 否 | 弹性供应组的启动时间,和ValidUntil共同确定有效时段。 | 按照ISO8601标准表示,并使用UTC时间,格式为 |
ExcessCapacityTerminationPolicy | String | 否 | 是 | 弹性供应组超过目标总容量时,是否停止超额的抢占式实例。 | 取值:
|
TerminateInstances | Boolean | 否 | 否 | 删除弹性供应组时,是否释放组内实例。 | 取值:
|
TerminateInstancesWithExpiration | Boolean | 否 | 是 | 弹性供应组到期时,是否停止抢占式实例。 | 取值:
|
CheckExecutionStatus | Boolean | 否 | 否 | 是否检查执行状态。 | 取值:
|
LaunchConfiguration | Map | 否 | 否 | 启动配置信息。 | 同时指定LaunchTemplateId和LaunchConfiguration时,优先使用启动模板。 更多信息,请参见LaunchConfiguration属性。 |
LaunchTemplateConfig | List | 否 | 否 | 启动模板的扩展设置。 | 最多支持20个扩展设置。 更多信息,请参见LaunchTemplateConfig 属性。 |
MinTargetCapacity | String | 否 | 否 | 弹性供应组的目标最小容量。 | 取值范围:正整数。 当您设置该参数后,需要注意:
|
ResourcePoolOptions | Map | 否 | 否 | 创建实例时使用的资源池策略。 | 更多信息,请参见ResourcePoolOptions属性。 |
DataDiskConfig | List | 否 | 否 | 实例数据盘信息列表。 | 更多信息,请参见DataDiskConfig属性。 |
ResourceGroupId | String | 否 | 否 | 弹性供应组所在的企业资源组 ID。 | 无 |
SystemDiskConfig | List | 否 | 否 | 实例系统盘信息列表。 | 更多信息,请参见SystemDiskConfig属性。 |
LaunchTemplateConfig 语法
"LaunchTemplateConfig": [
{
"Priority": Integer,
"WeightedCapacity": Integer,
"VSwitchId": String,
"InstanceType": String,
"MaxPrice": Integer
}
]
LaunchTemplateConfig 属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Priority | Integer | 否 | 否 | 扩展启动模板中实例规格的优先级。 | 取值:大于等于0。 取值为0时优先级最高。 |
WeightedCapacity | Integer | 否 | 否 | 扩展启动模板中,实例规格的权重。 | 取值:大于0的整数。 取值越高,单台实例满足计算力需求的能力越大,所需的实例数量越小。 您可以根据指定实例规格的计算力和集群单节点最低计算力得出权重值。 例如:单节点最低计算力为8vCPU、60GiB,则8vCPU、60GiB的实例规格权重可以设置为1;16vCPU、120GiB的实例规格权重可以设置为2。 |
VSwitchId | String | 是 | 否 | 扩展启动模板中,ECS实例加入的交换机的ID。 | 扩展模板中启动的ECS实例可用区由交换机决定。 |
InstanceType | String | 否 | 否 | 扩展启动模板对应的实例规格。 | 无 |
MaxPrice | Integer | 否 | 否 | 扩展启动模板中,抢占式实例的价格上限。 | 无 |
LaunchConfiguration语法
"LaunchConfiguration": {
"InstanceDescription": String,
"SystemDiskName": String,
"RamRoleName": String,
"SystemDiskCategory": String,
"SecurityGroupId": String,
"CreditSpecification": String,
"HostName": String,
"SystemDiskDescription": String,
"SystemDiskPerformanceLevel": String,
"DataDisk": List,
"InternetMaxBandwidthOut": Integer,
"IoOptimized": String,
"Tag": List,
"ImageId": String,
"ResourceGroupId": String,
"KeyPairName": String,
"PasswordInherit": Boolean,
"UserData": String,
"InstanceName": String,
"SystemDiskSize": Integer,
"InternetChargeType": String,
"SecurityEnhancementStrategy": String
}
LaunchConfiguration属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
InstanceDescription | String | 否 | 否 | 实例描述。 | 长度为2~256个字符,不能以 |
SystemDiskName | String | 否 | 否 | 系统盘名称。 | 长度为2~128个字符。必须以英文字母或汉字开头,不能以 |
RamRoleName | String | 否 | 否 | 实例RAM角色名称。 | 无 |
SystemDiskCategory | String | 否 | 否 | 系统盘类型。 | 取值:
已停售的实例规格且非I/O优化实例默认值为cloud,否则默认值为cloud_efficiency。 |
SecurityGroupId | String | 是 | 否 | 实例所属的安全组ID。 | 无 |
CreditSpecification | String | 否 | 否 | 修改突发性能实例的运行模式。 | 取值:
|
HostName | String | 否 | 否 | 实例主机名称。 | 半角句号(.)和短划线(-)不能作为首尾字符,更不能连续使用。取值要求如下:
|
SystemDiskDescription | String | 否 | 否 | 系统盘的描述。 | 长度为2~256个字符,不能以 |
SystemDiskPerformanceLevel | String | 否 | 否 | 创建ESSD云盘作为系统盘使用时,设置云盘的性能等级。 | 取值:
|
DataDisk | List | 否 | 否 | 数据盘。 | 最多支持16块数据盘。 更多信息,请参见DataDisk属性。 |
InternetMaxBandwidthOut | Integer | 否 | 否 | 公网出带宽最大值。 | 取值范围:0~100。 默认值:0。 单位为Mbps。 |
IoOptimized | String | 否 | 否 | 是否为I/O优化实例。 | 取值:
|
Tag | List | 否 | 否 | 实例的标签。 | 最多20个标签。 更多信息,请参见Tag属性。 |
ImageId | String | 是 | 否 | 镜像ID。 | 无 |
ResourceGroupId | String | 否 | 否 | 实例所在的企业资源组ID。 | 无 |
KeyPairName | String | 否 | 否 | 密钥对名称。 | Windows实例,忽略该参数。默认为空。 Linux实例的密码登录方式会被初始化成禁止。 |
PasswordInherit | Boolean | 否 | 否 | 是否使用镜像预设的密码。 | 取值:
|
UserData | String | 否 | 否 | 实例自定义数据。 | 需要以Base64方式编码,原始数据最多为16 KB。 |
InstanceName | String | 否 | 否 | 实例名称。 | 默认值为实例的InstanceId。 长度为2~128个字符,必须以英文字母或汉字开头,不能以 |
SystemDiskSize | Integer | 否 | 否 | 系统盘大小。 | 取值范围:20~500。必须大于等于镜像大小。 默认值:40或镜像大小。 单位:GiB。 |
InternetChargeType | String | 否 | 否 | 网络计费类型。 | 取值:
按使用流量计费模式下的出入带宽峰值都是带宽上限,不作为业务承诺指标。当出现资源争抢时,带宽峰值可能会受到限制。如果您的业务需要有带宽的保障,请使用按固定带宽计费模式。 |
SecurityEnhancementStrategy | String | 否 | 否 | 是否开启安全加固。 | 取值:
|
DataDisk语法
"DataDisk": [
{
"DiskName": String,
"Size": Integer,
"Category": String,
"Description": String,
"DeleteWithInstance": Boolean,
"SnapshotId": String,
"Encrypted": Boolean,
"KmsKeyId": String,
"InternetChargeType": String,
"PerformanceLevel": String
}
]
DataDisk属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
DiskName | String | 否 | 否 | 数据盘名称。 | 长度为2~128个字符。必须以英文字母或汉字开头,不能以 |
Size | Integer | 否 | 否 | 数据盘的容量大小。 | 取值范围:
单位:GiB。 |
Category | String | 否 | 否 | 数据盘类型。 | 取值:
对于I/O优化实例,默认值为cloud_efficiency。对于非I/O优化实例,默认值为cloud。 |
Description | String | 否 | 否 | 数据盘的描述。 | 长度为2~256个字符,不能以 |
DeleteWithInstance | Boolean | 否 | 否 | 数据盘是否随实例释放。 | 取值:
|
SnapshotId | String | 否 | 否 | 创建数据盘使用的快照。 | 指定该参数后,参数Size会被忽略,实际创建的云盘大小为指定的快照的大小。 不能使用2013年07月15日之前创建的快照,请求会报错被拒绝。 |
Encrypted | Boolean | 否 | 否 | 数据盘是否加密。 | 取值:
|
KmsKeyId | String | 否 | 否 | 数据盘对应的KMS密钥ID。 | 无 |
InternetChargeType | String | 否 | 否 | 网络计费类型。 | 取值:
按使用流量计费模式下的出入带宽峰值都是带宽上限,不作为业务承诺指标。当出现资源争抢时,带宽峰值可能会受到限制。如果您的业务需要有带宽的保障,请使用按固定带宽计费模式。 |
PerformanceLevel | String | 否 | 否 | 创建ESSD云盘作为数据盘使用时,设置云盘的性能等级。 | 取值:
|
Tag语法
"Tag": [
{
"Key": String,
"Value": String
}
]
Tag属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Key | String | 是 | 否 | 标签键。 | 长度为1~128个字符,不能以 |
Value | String | 否 | 否 | 标签值。 | 长度为0~128个字符,不能以 |
DataDiskConfig语法
"DataDiskConfig": [
{
"DiskCategory": String
}
]
DataDiskConfig属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
DiskCategory | String | 是 | 否 | 实例数据盘信息。 | 无 |
SystemDiskConfig语法
"SystemDiskConfig": [
{
"DiskCategory": String
}
]
SystemDiskConfig属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
DiskCategory | String | 是 | 否 | 实例系统盘信息。 | 无 |
ResourcePoolOptions语法
"ResourcePoolOptions":
{
"Strategy": String,
"PrivatePoolIds": List
}
ResourcePoolOptions属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Strategy | String | 否 | 否 | 资源池包括弹性保障服务或容量预定服务生效后生成的私有池以及公共池,供实例启动时选择。 | 取值范围:
默认值:PublicPoolOnly。 |
PrivatePoolIds | List | 否 | 否 | 私有池 ID列表。 | 即弹性保障服务 ID 或容量预定服务 ID。该参数只能传入 Target 模式私有池 ID。最多支持配置20个私有池。 |
返回值
Fn::GetAtt
AutoProvisioningGroupId:弹性供应组的ID。
AutoProvisioningGroupName:弹性供应组的名称。
示例
ROSTemplateFormatVersion: '2015-09-01'
Description: Test ECS AutoProvisioningGroup
Parameters:
LaunchTemplateId:
Type: String
Description: |-
The ID of the instance launch template associated with the auto provisioning group.
You can call the DescribeLaunchTemplates operation to query available instance launch templates.
An auto provisioning group can be associated with only one instance launch template.
But you can configure multiple extended configurations for the launch template through
the LaunchTemplateConfig parameter.
PayAsYouGoTargetCapacity:
Type: String
Description: The target capacity of pay-as-you-go instances in the auto provisioning group.
Default: '1'
TotalTargetCapacity:
Type: String
Description: |-
The total target capacity of the auto provisioning group. The target capacity consists
of the following three parts:
The target capacity of pay-as-you-go instances specified by the PayAsYouGoTargetCapacity parameter
The target capacity of preemptible instances specified by the SpotTargetCapacity parameter
The supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity
Default: '2'
SpotTargetCapacity:
Type: String
Description: The target capacity of preemptible instances in the auto provisioning group.
Default: '1'
AutoProvisioningGroupName:
Type: String
Description: |-
The name of the auto provisioning group to be created. It must be 2 to 128 characters
in length. It must start with a letter but cannot start with http:// or https://.
It can contain letters, digits, colons (:), underscores (_), and hyphens (-).
Default: mytest
SpotAllocationStrategy:
Type: String
Description: |-
The scale-out policy for preemptible instances. Valid values:
lowest-price: The cost optimization policy the auto provisioning group follows to select instance
types of the lowest cost to create instances.
diversified: The distribution balancing policy the auto provisioning group follows to evenly create
instances across zones specified in multiple extended template configurations.
Default value: lowest-price
AllowedValues:
- diversified
- lowest-price
Default: lowest-price
PayAsYouGoAllocationStrategy:
Type: String
Description: |-
The scale-out policy for pay-as-you-go instances. Valid values:
lowest-price: The cost optimization policy the auto provisioning group follows to select instance
types of the lowest cost to create instances.
prioritized: The priority-based policy the auto provisioning group follows to create instances.
The priority of an instance type is specified by the LaunchTemplateConfig.N.Priority parameter.
Default value: lowest-price
AllowedValues:
- lowest-price
- prioritized
Default: lowest-price
MaxSpotPrice:
Type: Number
Description: |-
The global maximum price for preemptible instances in the auto provisioning group.
If both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.
Default: 5
DefaultTargetCapacityType:
Type: String
Description: |-
The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet
the capacity requirements. Valid values:
PayAsYouGo: Pay-as-you-go instances.
Spot: Preemptible instances.
Default value: Spot
AllowedValues:
- PayAsYouGo
- Spot
Default: PayAsYouGo
AutoProvisioningGroupType:
Type: String
Description: |-
The type of the auto provisioning group. Valid values:
request: One-time delivery. After the auto provisioning group is started, it only attempts
to create an instance cluster once. If the cluster fails to be created, the group
does not try again.
maintain: The continuous delivery and maintain capacity type. After the auto provisioning group
is started, it continuously attempts to create and maintain the instance cluster.
The auto provisioning group compares the real-time and target capacity of the cluster.
If the cluster does not meet the target capacity, the group will create instances
until the cluster meets the target capacity.
Default value: maintain
AllowedValues:
- maintain
- request
Default: maintain
ExcessCapacityTerminationPolicy:
Type: String
Description: |-
The shutdown policy for excess preemptible instances followed when the capacity of
the auto provisioning group exceeds the target capacity. Valid values:
no-termination: Excess preemptible instances are not shut down.
termination: Excess preemptible instances are to be shut down. The action to be performed on these
shutdown instances is specified by the SpotInstanceInterruptionBehavior parameter.
Default value: no-termination
AllowedValues:
- no-termination
- termination
Default: termination
TerminateInstances:
Type: Boolean
Description: |-
Specifies whether to release instances of the auto provisioning group. Valid values:
true
false
Default: false
AllowedValues:
- true
- false
Default: true
TerminateInstancesWithExpiration:
Type: Boolean
Description: |-
The shutdown policy for preemptible instances when the auto provisioning group expires.
Valid values:
true: shuts down preemptible instances. The action to be performed on these shutdown instances
is specified by the SpotInstanceInterruptionBehavior parameter.
false: does not shut down preemptible instances.
Default: false
AllowedValues:
- true
- false
Default: true
Resources:
AutoProvisioningGroup:
Type: ALIYUN::ECS::AutoProvisioningGroup
Properties:
LaunchTemplateId:
Ref: LaunchTemplateId
LaunchTemplateVersion: '1'
TotalTargetCapacity:
Ref: TotalTargetCapacity
PayAsYouGoTargetCapacity:
Ref: PayAsYouGoTargetCapacity
SpotTargetCapacity:
Ref: SpotTargetCapacity
AutoProvisioningGroupName:
Ref: AutoProvisioningGroupName
SpotAllocationStrategy:
Ref: SpotAllocationStrategy
Description: Test AutoProvisioningGroup
PayAsYouGoAllocationStrategy:
Ref: PayAsYouGoAllocationStrategy
MaxSpotPrice:
Ref: MaxSpotPrice
DefaultTargetCapacityType:
Ref: DefaultTargetCapacityType
AutoProvisioningGroupType:
Ref: AutoProvisioningGroupType
ExcessCapacityTerminationPolicy:
Ref: ExcessCapacityTerminationPolicy
TerminateInstances:
Ref: TerminateInstances
TerminateInstancesWithExpiration:
Ref: TerminateInstancesWithExpiration
Outputs:
AutoProvisioningGroupId:
Description: The ID of the auto provisioning group.
Value:
Fn::GetAtt:
- AutoProvisioningGroup
- AutoProvisioningGroupId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": "Test ECS AutoProvisioningGroup",
"Parameters": {
"LaunchTemplateId": {
"Type": "String",
"Description": "The ID of the instance launch template associated with the auto provisioning group.\nYou can call the DescribeLaunchTemplates operation to query available instance launch templates.\nAn auto provisioning group can be associated with only one instance launch template.\nBut you can configure multiple extended configurations for the launch template through\nthe LaunchTemplateConfig parameter."
},
"PayAsYouGoTargetCapacity": {
"Type": "String",
"Description": "The target capacity of pay-as-you-go instances in the auto provisioning group.",
"Default": "1"
},
"TotalTargetCapacity": {
"Type": "String",
"Description": "The total target capacity of the auto provisioning group. The target capacity consists\nof the following three parts:\nThe target capacity of pay-as-you-go instances specified by the PayAsYouGoTargetCapacity parameter\nThe target capacity of preemptible instances specified by the SpotTargetCapacity parameter\nThe supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity",
"Default": "2"
},
"SpotTargetCapacity": {
"Type": "String",
"Description": "The target capacity of preemptible instances in the auto provisioning group.",
"Default": "1"
},
"AutoProvisioningGroupName": {
"Type": "String",
"Description": "The name of the auto provisioning group to be created. It must be 2 to 128 characters\nin length. It must start with a letter but cannot start with http:// or https://.\nIt can contain letters, digits, colons (:), underscores (_), and hyphens (-).",
"Default": "mytest"
},
"SpotAllocationStrategy": {
"Type": "String",
"Description": "The scale-out policy for preemptible instances. Valid values:\nlowest-price: The cost optimization policy the auto provisioning group follows to select instance\ntypes of the lowest cost to create instances.\ndiversified: The distribution balancing policy the auto provisioning group follows to evenly create\ninstances across zones specified in multiple extended template configurations.\nDefault value: lowest-price",
"AllowedValues": [
"diversified",
"lowest-price"
],
"Default": "lowest-price"
},
"PayAsYouGoAllocationStrategy": {
"Type": "String",
"Description": "The scale-out policy for pay-as-you-go instances. Valid values:\nlowest-price: The cost optimization policy the auto provisioning group follows to select instance\ntypes of the lowest cost to create instances.\nprioritized: The priority-based policy the auto provisioning group follows to create instances.\nThe priority of an instance type is specified by the LaunchTemplateConfig.N.Priority parameter.\nDefault value: lowest-price",
"AllowedValues": [
"lowest-price",
"prioritized"
],
"Default": "lowest-price"
},
"MaxSpotPrice": {
"Type": "Number",
"Description": "The global maximum price for preemptible instances in the auto provisioning group.\nIf both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters are specified, the maximum price is the lower value of the two.",
"Default": 5
},
"DefaultTargetCapacityType": {
"Type": "String",
"Description": "The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet\nthe capacity requirements. Valid values:\nPayAsYouGo: Pay-as-you-go instances.\nSpot: Preemptible instances.\nDefault value: Spot",
"AllowedValues": [
"PayAsYouGo",
"Spot"
],
"Default": "PayAsYouGo"
},
"AutoProvisioningGroupType": {
"Type": "String",
"Description": "The type of the auto provisioning group. Valid values:\nrequest: One-time delivery. After the auto provisioning group is started, it only attempts\nto create an instance cluster once. If the cluster fails to be created, the group\ndoes not try again.\nmaintain: The continuous delivery and maintain capacity type. After the auto provisioning group\nis started, it continuously attempts to create and maintain the instance cluster.\nThe auto provisioning group compares the real-time and target capacity of the cluster.\nIf the cluster does not meet the target capacity, the group will create instances\nuntil the cluster meets the target capacity.\nDefault value: maintain",
"AllowedValues": [
"maintain",
"request"
],
"Default": "maintain"
},
"ExcessCapacityTerminationPolicy": {
"Type": "String",
"Description": "The shutdown policy for excess preemptible instances followed when the capacity of\nthe auto provisioning group exceeds the target capacity. Valid values:\nno-termination: Excess preemptible instances are not shut down.\ntermination: Excess preemptible instances are to be shut down. The action to be performed on these\nshutdown instances is specified by the SpotInstanceInterruptionBehavior parameter.\nDefault value: no-termination",
"AllowedValues": [
"no-termination",
"termination"
],
"Default": "termination"
},
"TerminateInstances": {
"Type": "Boolean",
"Description": "Specifies whether to release instances of the auto provisioning group. Valid values:\ntrue\nfalse\nDefault: false",
"AllowedValues": [
true,
false
],
"Default": true
},
"TerminateInstancesWithExpiration": {
"Type": "Boolean",
"Description": "The shutdown policy for preemptible instances when the auto provisioning group expires.\nValid values:\ntrue: shuts down preemptible instances. The action to be performed on these shutdown instances\nis specified by the SpotInstanceInterruptionBehavior parameter.\nfalse: does not shut down preemptible instances.\nDefault: false",
"AllowedValues": [
true,
false
],
"Default": true
}
},
"Resources": {
"AutoProvisioningGroup": {
"Type": "ALIYUN::ECS::AutoProvisioningGroup",
"Properties": {
"LaunchTemplateId": {
"Ref": "LaunchTemplateId"
},
"LaunchTemplateVersion": "1",
"TotalTargetCapacity": {
"Ref": "TotalTargetCapacity"
},
"PayAsYouGoTargetCapacity": {
"Ref": "PayAsYouGoTargetCapacity"
},
"SpotTargetCapacity": {
"Ref": "SpotTargetCapacity"
},
"AutoProvisioningGroupName": {
"Ref": "AutoProvisioningGroupName"
},
"SpotAllocationStrategy": {
"Ref": "SpotAllocationStrategy"
},
"Description": "Test AutoProvisioningGroup",
"PayAsYouGoAllocationStrategy": {
"Ref": "PayAsYouGoAllocationStrategy"
},
"MaxSpotPrice": {
"Ref": "MaxSpotPrice"
},
"DefaultTargetCapacityType": {
"Ref": "DefaultTargetCapacityType"
},
"AutoProvisioningGroupType": {
"Ref": "AutoProvisioningGroupType"
},
"ExcessCapacityTerminationPolicy": {
"Ref": "ExcessCapacityTerminationPolicy"
},
"TerminateInstances": {
"Ref": "TerminateInstances"
},
"TerminateInstancesWithExpiration": {
"Ref": "TerminateInstancesWithExpiration"
}
}
}
},
"Outputs": {
"AutoProvisioningGroupId": {
"Description": "The ID of the auto provisioning group.",
"Value": {
"Fn::GetAtt": [
"AutoProvisioningGroup",
"AutoProvisioningGroupId"
]
}
}
}
}