Creates an auto provisioning group.
Syntax
{
"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
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
SpotInstancePoolsToUseCount |
Integer |
No |
No |
The number of lowest-price instance types used to create instances. |
Must be smaller than the number of extended launch template configurations. This property takes effect when SpotAllocationStrategy is set to lowest-price. |
|
AutoProvisioningGroupName |
String |
No |
No |
The name of the auto provisioning group. |
The name must be 2 to 128 characters in length. It must start with a letter and cannot start with |
|
ValidUntil |
String |
No |
No |
The time at which the auto provisioning group expires. The group is valid between ValidFrom and ValidUntil. |
Specify the time in the ISO 8601 standard in the |
|
Description |
String |
No |
No |
The description of the auto provisioning group. |
None. |
|
PayAsYouGoAllocationStrategy |
String |
No |
No |
The allocation strategy for pay-as-you-go instances. |
Valid values:
|
|
MaxSpotPrice |
Number |
No |
Yes |
The maximum price of preemptible instances in the auto provisioning group. |
When both MaxSpotPrice and MaxPrice are specified, the smaller value takes precedence. MaxPrice is defined in LaunchTemplateConfig properties. |
|
LaunchTemplateId |
String |
No |
No |
The ID of the associated launch template. |
You can call the DescribeLaunchTemplates operation to query available launch templates. When LaunchTemplateId and LaunchConfiguration are specified, LaunchTemplateId takes precedence. |
|
DefaultTargetCapacityType |
String |
No |
Yes |
The billing method for supplemental instances created when PayAsYouGoTargetCapacity plus SpotTargetCapacity is less than TotalTargetCapacity. |
Valid values:
|
|
SpotInstanceInterruptionBehavior |
String |
No |
No |
The action to perform on excess preemptible instances after they stop. |
Valid values:
|
|
SpotTargetCapacity |
String |
No |
Yes |
The target capacity of preemptible instances in the auto provisioning group. |
The value of this property must be smaller than the TotalTargetCapacity value. |
|
SpotAllocationStrategy |
String |
No |
No |
The policy for creating preemptible instances. |
Valid values:
|
|
PayAsYouGoTargetCapacity |
String |
No |
Yes |
The target capacity of pay-as-you-go instances in the auto provisioning group. |
The value of this property must be smaller than the TotalTargetCapacity value. |
|
TotalTargetCapacity |
String |
Yes |
Yes |
The total target capacity of the auto provisioning group. |
The value must be a positive integer that is greater than or equal to the sum of the PayAsYouGoTargetCapacity and SpotTargetCapacity values. |
|
AutoProvisioningGroupType |
String |
No |
No |
The delivery type of the auto provisioning group. |
Valid values:
|
|
LaunchTemplateVersion |
String |
No |
No |
The version of the associated launch template. |
You can call the DescribeLaunchTemplateVersions operation to query available instance launch template versions. |
|
ValidFrom |
String |
No |
No |
The time at which the auto provisioning group takes effect. The group is valid between ValidFrom and ValidUntil. |
Specify the time in the ISO 8601 standard in the |
|
ExcessCapacityTerminationPolicy |
String |
No |
Yes |
Specifies whether to stop excess preemptible instances when the target capacity is exceeded. |
Valid values:
|
|
TerminateInstances |
Boolean |
No |
No |
Specifies whether to release instances when the auto provisioning group is deleted. |
Valid values:
|
|
TerminateInstancesWithExpiration |
Boolean |
No |
Yes |
Specifies whether to stop preemptible instances when the auto provisioning group expires. |
Valid values:
|
|
CheckExecutionStatus |
Boolean |
No |
No |
Specifies whether to check the execution status. |
Valid values:
|
|
LaunchConfiguration |
Map |
No |
No |
The launch configurations. |
When LaunchTemplateId and LaunchConfiguration are specified, LaunchTemplateId takes precedence. For more information, see LaunchConfiguration properties. |
|
LaunchTemplateConfig |
List |
No |
No |
The extended configurations of the launch template. |
You can specify up to 20 extended configurations. |
|
MinTargetCapacity |
String |
No |
No |
The minimum target capacity of the auto provisioning group. |
The value must be a positive integer. When you specify this property, take note of the following items:
|
|
ResourcePoolOptions |
Map |
No |
No |
The resource pool options for instance creation. |
Defined in ResourcePoolOptions properties. |
|
DataDiskConfig |
List |
No |
No |
The data disk configurations. |
Defined in DataDiskConfig property. |
|
ResourceGroupId |
String |
No |
Yes |
The resource group ID. |
None. |
|
SystemDiskConfig |
List |
No |
No |
The system disk configurations. |
Defined in SystemDiskConfig property. |
LaunchTemplateConfig syntax
"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 properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Priority |
Integer |
No |
No |
The priority of the instance type. |
The value must be an integer that is greater than or equal to 0. A value of 0 specifies the highest priority. |
|
WeightedCapacity |
Integer |
No |
No |
The weight of the instance type. |
The value must be an integer that is greater than 0. A larger value indicates that more computing power is provided by a single instance and fewer instances are required. The weight is calculated based on the computing power of the specified instance type and the minimum computing power of a single instance in the cluster to be created by the auto provisioning group. For example, if the minimum computing power of a single instance is 8 vCPUs and 60 GiB of memory, you can set the weight of the instance type that has 8 vCPUs and 60 GiB of memory to 1 and the weight of the instance type that has 16 vCPUs and 120 GiB of memory to 2. |
|
VSwitchId |
String |
Yes |
No |
The vSwitch ID. |
Instances connect to this vSwitch. The vSwitch determines the instance zone. |
|
InstanceType |
String |
No |
No |
The instance type. |
None. |
|
Cores |
List |
No |
No |
The number of vCPUs. |
None. |
|
Memories |
List |
No |
No |
The memory sizes of the instance types. |
Unit: GiB. You can use this property to filter the instance types that meet your requirements. For more information, see Instance family overview. You can specify 1 to 10 memory sizes, indicated by N. |
|
Architectures |
List |
No |
No |
The instance type architectures. |
Valid values:
By default, all values are included. |
|
ExcludedInstanceTypes |
List |
No |
No |
The instance types to exclude. |
You can use the wildcard character (*) to exclude an instance type or an instance family. Examples:
|
|
ImageId |
String |
No |
No |
The ID of the image. |
None. |
|
BurstablePerformance |
String |
No |
No |
Specifies whether to include burstable instance types. |
Valid values:
Default value: Include. |
|
InstanceFamilyLevel |
String |
No |
No |
The level of the instance family. |
You can use this property to filter the instance types that meet your requirements. Valid values:
|
|
MaxPrice |
Integer |
No |
No |
The maximum price of preemptible instances in the extended configuration. |
None. |
LaunchConfiguration syntax
"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 properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
InstanceDescription |
String |
No |
No |
The description of the instance. |
The description must be 2 to 256 characters in length, and cannot start with |
|
SystemDiskName |
String |
No |
No |
The name of the system disk. |
The name must be 2 to 128 characters in length. It must start with a letter and cannot start with |
|
RamRoleName |
String |
No |
No |
The name of the instance Resource Access Management (RAM) role. |
None. |
|
SystemDiskCategory |
String |
No |
No |
The category of the system disk. |
Valid values:
For non-I/O optimized instances of a retired instance type, the default value is cloud. For instances of other types, the default value is cloud_efficiency. |
|
HostNames |
List |
No |
No |
The hostnames. |
None. |
|
SecurityGroupId |
String |
Yes |
No |
The security group ID. |
None. |
|
CreditSpecification |
String |
No |
No |
The performance mode of the burstable instance. |
Valid values:
|
|
HostName |
String |
No |
No |
The hostname of the instance. |
The hostname cannot start or end with a period (.) or hyphen (-). It cannot contain consecutive periods (.) or hyphens (-). The hostname must meet the following requirements:
|
|
SystemDiskBurstingEnabled |
Boolean |
No |
No |
Specifies whether to enable the performance burst feature for the system disk. |
Valid values:
|
|
SystemDiskDescription |
String |
No |
No |
The description of the system disk. |
The description must be 2 to 256 characters in length, and cannot start with |
|
ImageFamily |
String |
No |
No |
The name of the image family. |
The name must be 2 to 128 characters in length. It must start with a letter and cannot start with |
|
SecurityGroupIds |
List |
No |
No |
The security group IDs. |
None. |
|
AutoReleaseTime |
String |
No |
No |
The automatic release time. |
Specify the time in the ISO 8601 standard in the |
|
SystemDiskPerformanceLevel |
String |
No |
No |
The performance level (PL) of the ESSD that you want to use as the system disk. |
Valid values:
|
|
DataDisk |
List |
No |
No |
The data disks. |
You can attach up to 16 data disks. For more information, see DataDisk properties. |
|
InternetMaxBandwidthOut |
Integer |
No |
No |
The maximum outbound public bandwidth. |
Valid values: 0 to 100. Default value: 0. Unit: Mbit/s. |
|
IoOptimized |
String |
No |
No |
Specifies whether the instance is I/O optimized. |
Valid values:
|
|
SystemDiskKMSKeyId |
String |
No |
No |
The KMS key ID for the system disk. |
None. |
|
Tag |
List |
No |
No |
The tags of the instance. |
You can add up to 20 tags. For more information, see Tag properties. |
|
ImageId |
String |
Yes |
No |
The ID of the image. |
None. |
|
ResourceGroupId |
String |
No |
No |
The resource group ID. |
None. |
|
KeyPairName |
String |
No |
No |
The name of the key pair. |
Windows instance: You do not need to specify this property. This property is empty by default. Linux instance: If you specify this property, password-based logons are disabled for Linux instances during initialization. |
|
PasswordInherit |
Boolean |
No |
No |
Specifies whether to use the preset password of the image. |
Valid values:
|
|
UserData |
String |
No |
No |
The user data of the instance. |
Must be Base64-encoded. Maximum raw data size: 16 KB. |
|
InstanceName |
String |
No |
No |
The name of the instance. |
Default: the InstanceId value. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with |
|
SystemDiskSize |
Integer |
No |
No |
The size of the system disk. |
Valid values: 20 to 500. The size of the system disk must be greater than or equal to the size of the image. Default value: 40 or the image size. Unit: GiB. |
|
InternetChargeType |
String |
No |
No |
The metering method for network usage. |
Valid values:
Note
When the pay-by-data-transfer metering method is used, the maximum inbound and outbound bandwidths are used as upper limits of bandwidths instead of guaranteed performance specifications. When demands outstrip resource supplies, the maximum bandwidths may be limited. If you require guaranteed bandwidths for your business, use the pay-by-bandwidth metering method. |
|
SystemDiskProvisionedIops |
Integer |
No |
No |
The provisioned IOPS of the system disk. |
None. |
|
SystemDiskEncrypted |
Boolean |
No |
No |
Specifies whether to encrypt the system disk. |
Valid values:
|
|
DeploymentSetId |
String |
No |
No |
The ID of the deployment set. |
None. |
|
SecurityEnhancementStrategy |
String |
No |
No |
Specifies whether to enable security hardening. |
Valid values:
|
DataDisk syntax
"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 properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
DiskName |
String |
No |
No |
The name of the data disk. |
The name must be 2 to 128 characters in length. It must start with a letter and cannot start with |
|
Size |
Integer |
No |
No |
The size of the data disk. |
Valid values:
Unit: GiB. |
|
Device |
String |
No |
No |
The device name of the data disk. |
Examples: |
|
Category |
String |
No |
No |
The category of data disk. |
Valid values:
For I/O optimized instances, the default value is cloud_efficiency. For non-I/O optimized instances, the default value is cloud. |
|
ProvisionedIops |
Integer |
No |
No |
The provisioned IOPS. |
None. |
|
BurstingEnabled |
Boolean |
No |
No |
Specifies whether to enable the burst mode. |
Valid values:
|
|
Description |
String |
No |
No |
The description of the data disk. |
The description must be 2 to 256 characters in length, and cannot start with |
|
DeleteWithInstance |
Boolean |
No |
No |
Specifies whether to release the data disk when the instance is released. |
Valid values:
|
|
SnapshotId |
String |
No |
No |
The snapshot ID for data disk creation. |
If specified, the Size value is ignored. The disk size matches the snapshot size. Note
Use snapshots that were created after July 15, 2013. Otherwise, an error is returned, and your request is rejected. |
|
Encrypted |
Boolean |
No |
No |
Specifies whether to encrypt the data disk. |
Valid values:
|
|
KmsKeyId |
String |
No |
No |
The ID of the key that you want to use for the data disk. |
None. |
|
InternetChargeType |
String |
No |
No |
The metering method for network usage. |
Valid values:
Note
When the pay-by-data-transfer metering method is used, the maximum inbound and outbound bandwidths are used as upper limits of bandwidths instead of guaranteed performance specifications. When demands outstrip resource supplies, the maximum bandwidths may be limited. If you require guaranteed bandwidths for your business, use the pay-by-bandwidth metering method. |
|
PerformanceLevel |
String |
No |
No |
The PL of the ESSD that you want to use as the data disk. |
Valid values:
|
Tag syntax
"Tag": [
{
"Key": String,
"Value": String
}
]
Tag properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Key |
String |
Yes |
No |
The key of the tag. |
The key must be 1 to 128 characters in length, and cannot contain |
|
Value |
String |
No |
No |
The value of the tag. |
The value can be up to 128 characters in length, and cannot contain |
DataDiskConfig syntax
"DataDiskConfig": [
{
"DiskCategory": String
}
]
DataDiskConfig property
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
DiskCategory |
String |
Yes |
No |
The information about the data disk of the instance. |
None. |
SystemDiskConfig syntax
"SystemDiskConfig": [
{
"DiskCategory": String
}
]
SystemDiskConfig property
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
DiskCategory |
String |
Yes |
No |
The information about the system disk of the instance. |
None. |
ResourcePoolOptions syntax
"ResourcePoolOptions":
{
"Strategy": String,
"PrivatePoolIds": List
}
ResourcePoolOptions properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Strategy |
String |
No |
No |
The strategy for selecting resource pools to create instances. Resource pools include private pools (from elasticity assurances or capacity reservations) and the public pool. |
Valid values:
Default value: PublicPoolOnly. |
|
PrivatePoolIds |
List |
No |
No |
The IDs of the private pools. |
A private pool ID equals the associated elasticity assurance or capacity reservation ID. Only Target-mode private pools are supported. Maximum: 20. |
Return values
Fn::GetAtt
-
AutoProvisioningGroupId: the ID of the auto provisioning group.
-
AutoProvisioningGroupName: the name of the auto provisioning group.
Examples
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"
]
}
}
}
}