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,
"Cores": List,
"Memories": List,
"Architectures": List,
"ExcludedInstanceTypes": List,
"ImageId": String,
"BurstablePerformance": String,
"InstanceFamilyLevel": String
}
]LaunchTemplateConfig屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
Priority | Integer | 否 | 否 | 擴充啟動模板中執行個體規格的優先順序。 | 取值:大於等於0。 取值為0時優先順序最高。 |
WeightedCapacity | Integer | 否 | 否 | 擴充啟動模板中,執行個體規格的權重。 | 取值:大於0的整數。 取值越高,單台執行個體滿足計算力需求的能力越大,所需的執行個體數量越小。 您可以根據指定執行個體規格的計算力和叢集單節點最低計算力得出權重值。 例如:單節點最低計算力為8vCPU、60GiB,則8vCPU、60GiB的執行個體規格權重可以設定為1;16vCPU、120GiB的執行個體規格權重可以設定為2。 |
VSwitchId | String | 是 | 否 | 擴充啟動模板中,ECS執行個體加入的交換器的ID。 | 擴充模板中啟動的ECS執行個體可用性區域由交換器決定。 |
InstanceType | String | 否 | 否 | 擴充啟動模板對應的執行個體規格。 | 無 |
Cores | List | 否 | 否 | 擴充啟動模板中,執行個體規格的vCPU核心數目。 | 無 |
Memories | List | 否 | 否 | 執行個體規格的記憶體大小列表。 | 執行個體規格的記憶體大小,單位為 GiB,用於篩選符合要求的執行個體規格範圍。更多資訊,請參見執行個體規格類型系列。N 的取值範圍:1~10。 |
Architectures | List | 否 | 否 | 執行個體規格所屬的架構類型列表。 | 執行個體規格所屬的架構類型。取值範圍:
預設值:包含所有架構類型。 |
ExcludedInstanceTypes | List | 否 | 否 | 需要排除的執行個體規格列表。 | 需要排除的執行個體規格。通過使用萬用字元(*)可以排除單個規格或者整個規格類型系列。例如:
|
ImageId | String | 否 | 否 | 鏡像 ID | 無 |
BurstablePerformance | String | 否 | 否 | 是否為效能突發執行個體規格。 | 取值範圍:
預設值:Include。 |
InstanceFamilyLevel | 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,
"ImageFamily": String,
"HostNames": List,
"InternetMaxBandwidthOut": Integer,
"SystemDiskBurstingEnabled": Boolean,
"IoOptimized": String,
"Tag": List,
"ImageId": String,
"ResourceGroupId": String,
"SystemDiskKMSKeyId": String,
"KeyPairName": String,
"PasswordInherit": Boolean,
"UserData": String,
"AutoReleaseTime": String,
"InstanceName": String,
"SystemDiskSize": Integer,
"SecurityGroupIds": List,
"DeploymentSetId": String,
"InternetChargeType": String,
"SecurityEnhancementStrategy": String
}LaunchConfiguration屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
InstanceDescription | String | 否 | 否 | 執行個體描述。 | 長度為2~256個字元,不能以 |
SystemDiskName | String | 否 | 否 | 系統硬碟名稱。 | 長度為2~128個字元。必須以英文字母或漢字開頭,不能以 |
RamRoleName | String | 否 | 否 | 執行個體RAM角色名稱。 | 無 |
SystemDiskCategory | String | 否 | 否 | 系統硬碟類型。 | 取值:
已停售的執行個體規格且非I/O最佳化執行個體預設值為cloud,否則預設值為cloud_efficiency。 |
HostNames | List | 否 | 否 | 主機名稱列表。 | 無 |
SecurityGroupId | String | 是 | 否 | 執行個體所屬的安全性群組ID。 | 無 |
CreditSpecification | String | 否 | 否 | 修改突發效能執行個體的運行模式。 | 取值:
|
HostName | String | 否 | 否 | 執行個體主機名稱。 | 半形句號(.)和短劃線(-)不能作為首尾字元,更不能連續使用。取值要求如下:
|
SystemDiskBurstingEnabled | Boolean | 否 | 否 | 系統硬碟是否開啟Burst(效能突發)。 | 取值:
|
SystemDiskDescription | String | 否 | 否 | 系統硬碟的描述。 | 長度為2~256個字元,不能以 |
ImageFamily | String | 否 | 否 | 鏡像族系名稱。 | 長度為 2~128 個英文或中文字元。必須以大小寫字母或中文開頭,不能以 |
SecurityGroupIds | List | 否 | 否 | ECS所屬的一個或多個安全性群組ID。 | 無 |
AutoReleaseTime | String | 否 | 否 | ECS執行個體自動釋放的時間。 | 時間格式必須遵守ISO8601規範,例如: |
SystemDiskPerformanceLevel | String | 否 | 否 | 建立ESSD雲端硬碟作為系統硬碟使用時,設定雲端硬碟的效能等級。 | 取值:
|
DataDisk | List | 否 | 否 | 資料盤。 | 最多支援16塊資料盤。 更多資訊,請參見DataDisk屬性。 |
InternetMaxBandwidthOut | Integer | 否 | 否 | 公網出頻寬最大值。 | 取值範圍:0~100。 預設值:0。 單位為Mbps。 |
IoOptimized | String | 否 | 否 | 是否為I/O最佳化執行個體。 | 取值:
|
SystemDiskKMSKeyId | String | 否 | 否 | 系統硬碟使用的KMS密鑰ID。 | 無 |
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 | 否 | 否 | 網路計費類型。 | 取值:
說明 按使用流量計費模式下的出入頻寬峰值都是頻寬上限,不作為業務承諾指標。當出現資源爭搶時,頻寬峰值可能會受到限制。如果您的業務需要有頻寬的保障,請使用按固定頻寬計費模式。 |
SystemDiskProvisionedIops | Integer | 否 | 否 | 系統硬碟預配的 IOPS。 | 無 |
SystemDiskEncrypted | Boolean | 否 | 否 | 系統硬碟是否加密。 | 取值:
|
DeploymentSetId | String | 否 | 否 | 部署集 ID。 | 無 |
SecurityEnhancementStrategy | String | 否 | 否 | 是否開啟安全強化。 | 取值:
|
DataDisk文法
"DataDisk": [
{
"DiskName": String,
"Size": Integer,
"Category": String,
"Description": String,
"DeleteWithInstance": Boolean,
"SnapshotId": String,
"Device": String,
"Encrypted": Boolean,
"KmsKeyId": String,
"InternetChargeType": String,
"ProvisionedIops": Integer,
"BurstingEnabled": Boolean
"PerformanceLevel": String
}
]DataDisk屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
DiskName | String | 否 | 否 | 資料盤名稱。 | 長度為2~128個字元。必須以英文字母或漢字開頭,不能以 |
Size | Integer | 否 | 否 | 資料盤的容量大小。 | 取值範圍:
單位:GiB。 |
Device | String | 否 | 否 | 資料盤在ECS中的名稱。 | 取值樣本: |
Category | String | 否 | 否 | 資料盤類型。 | 取值:
對於I/O最佳化執行個體,預設值為cloud_efficiency。對於非I/O最佳化執行個體,預設值為cloud。 |
ProvisionedIops | Integer | 否 | 否 | 預配的IOPS。 | 無 |
BurstingEnabled | Boolean | 否 | 否 | 是否啟用突發。 | 取值:
|
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"
]
}
}
}
}