All Products
Search
Document Center

Elastic Compute Service:CreateAutoProvisioningGroup

Last Updated:May 22, 2024

Creates an auto provisioning group.

Operation description

Usage notes

  • Auto Provisioning is a service that allows quick deployment of an instance cluster that consists of preemptible instances and pay-as-you-go instances. Auto Provisioning supports push-button deployment of instance clusters across different billing methods, instance families, and zones. For more information, see Use auto provisioning group-related API operations to create multiple ECS instances at the same time.
  • Auto Provisioning uses auto provisioning groups to schedule and maintain computing resources. You can use auto provisioning groups to obtain a steady supply of computing resources. This helps reduce the impact on compute capacity when preemptible instances are reclaimed.
  • Auto Provisioning is provided free of charge. However, you are charged for instance resources that are created in auto provisioning groups. For more information, see Overview of preemptible instances and Pay-as-you-go.
  • When you specify both a launch template (LaunchTemplateId) and extended configurations (LaunchConfiguration.* parameters), LaunchTemplateId takes precedence.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region in which to create the auto provisioning group. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
ResourceGroupIdstringNo

The ID of the resource group to which to assign the auto provisioning group.

rg-bp67acfmxazb4p****
AutoProvisioningGroupNamestringNo

The name of the auto provisioning group. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).

apg-test
AutoProvisioningGroupTypestringNo

The delivery type of the auto provisioning group. Valid values:

  • request: one-time asynchronous delivery. When the auto provisioning group is started, it attempts to asynchronously deliver an instance cluster that meets the target capacity only once. The group does not retry the operation regardless of whether all the instances are delivered.
  • instant: one-time synchronous delivery. When the auto provisioning group is started, it attempts to synchronously deliver an instance cluster that meets the target capacity only once. The list of delivered instances and the causes of delivery failures are returned in the response.
  • maintain: continuous delivery. When the auto provisioning group is started, it attempts to deliver an instance cluster that meets the target capacity, and monitors the real-time capacity. If the target capacity of the auto provisioning group is not reached, the auto provisioning group continues to create instances until the target capacity is reached.

Default value: maintain.

maintain
SpotAllocationStrategystringNo

The policy for creating preemptible instances. Valid values:

  • lowest-price: cost optimization policy. The auto provisioning group selects the lowest-priced instance type to create instances.
  • diversified: balanced distribution policy. The auto provisioning group creates instances in zones that are specified in extended configurations and then evenly distributes the instances across the zones.
  • capacity-optimized: capacity-optimized distribution policy. The auto provisioning group creates instances of the optimal instance types across the optimal zones based on resource availability.

Default value: lowest-price.

diversified
SpotInstanceInterruptionBehaviorstringNo

The operation to be performed on the preemptible instance when it is interrupted. Valid values:

  • stop: stops the preemptible instance.
  • terminate: releases the preemptible instance.

Default value: terminate.

terminate
SpotInstancePoolsToUseCountintegerNo

The number of preemptible instances of the lowest-priced instance type to be created by the auto provisioning group. This parameter takes effect when SpotAllocationStrategy is set to lowest-price.

The value must be smaller than the N value specified in LaunchTemplateConfig.N.

2
PayAsYouGoAllocationStrategystringNo

The policy for creating pay-as-you-go instances. Valid values:

  • lowest-price: cost optimization policy. The auto provisioning group selects the lowest-priced instance type to create instances.
  • prioritized: priority-based policy. The auto provisioning group creates instances based on the priority specified by LaunchTemplateConfig.N.Priority.

Default value: lowest-price.

prioritized
ExcessCapacityTerminationPolicystringNo

Specifies whether to release scaled-in instances when the real-time capacity of the auto provisioning group exceeds the target capacity and the group is triggered to scale in. Valid values:

  • termination: releases the scaled-in instances in the auto provisioning group.
  • no-termination: only removes the scaled-in instances from the auto provisioning group but does not release the instances.

Default value: no-termination.

termination
ValidFromstringNo

The time at which to start the auto provisioning group. The period of time between this point in time and the point in time specified by ValidUntil is the validity period of the auto provisioning group.

Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

By default, an auto provisioning group is started immediately after it is created.

2019-04-01T15:10:20Z
ValidUntilstringNo

The time at which the auto provisioning group expires. The period of time between this point in time and the point in time specified by ValidFrom is the validity period of the auto provisioning group.

Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Default value: 2099-12-31T23:59:59Z.

2019-06-01T15:10:20Z
TerminateInstancesWithExpirationbooleanNo

Specifies whether to release instances in the auto provisioning group when the group expires. Valid values:

  • true: releases the instances.
  • false: only removes the instances from the auto provisioning group but does not release them.

Default value: false.

true
TerminateInstancesbooleanNo

Specifies whether to release instances in the auto provisioning group when the auto provisioning group is deleted. Valid values:

  • true: releases the instances.
  • false: retains the instances.

Default value: false.

true
MaxSpotPricefloatNo

The maximum price of preemptible instances in the auto provisioning group.

Note When both MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice are specified, the smaller one of the two parameter values is used.
2
TotalTargetCapacitystringYes

The total target capacity of the auto provisioning group. The value must be a positive integer.

The total target capacity of the auto provisioning group must be greater than or equal to the sum of the target capacity of pay-as-you-go instances specified by PayAsYouGoTargetCapacity and the target capacity of preemptible instances specified by SpotTargetCapacity.

60
PayAsYouGoTargetCapacitystringNo

The target capacity of pay-as-you-go instances in the auto provisioning group. The value must be less than or equal to the TotalTargetCapacity value.

30
SpotTargetCapacitystringNo

The target capacity of preemptible instances in the auto provisioning group. The value must be less than or equal to the TotalTargetCapacity value.

20
DefaultTargetCapacityTypestringNo

The type of supplemental instances. When the sum of the PayAsYouGoTargetCapacity and SpotTargetCapacity values is smaller than the TotalTargetCapacity value, the auto provisioning group creates instances of the specified type to meet the total target capacity. Valid values:

  • PayAsYouGo: pay-as-you-go instances
  • Spot: preemptible instances.

Default value: Spot.

Spot
LaunchTemplateIdstringNo

The ID of the launch template associated with the auto provisioning group. You can call the DescribeLaunchTemplates operation to query available launch templates. When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

lt-bp1fgzds4bdogu03****
LaunchTemplateVersionstringNo

The version of the launch template associated with the auto provisioning group. You can call the DescribeLaunchTemplateVersions operation to query the versions of available launch templates.

Default value: the default version of the launch template.

1
DescriptionstringNo

The description of the auto provisioning group.

testDescription
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

0c593ea1-3bea-11e9-b96b-88e9fe637760
LaunchConfiguration.ImageIdstringNo

The ID of the image to be used to create the instance. You can call the DescribeImages operation to query available image resources. When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

m-bp1g7004ksh0oeuc****
LaunchConfiguration.SecurityGroupIdstringNo

The ID of the security group to which to assign the instance. When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

sg-bp15ed6xe1yxeycg****
LaunchConfiguration.IoOptimizedstringNo

Specifies whether the instance is I/O optimized. Valid values:

  • none: The instance is not I/O optimized.
  • optimized: The instance is I/O optimized.

For instances of retired instance types, the default value is none. For instances of other instance types, the default value is optimized.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

optimized
LaunchConfiguration.InternetChargeTypestringNo

The billing method for network usage. Valid values:

  • PayByBandwidth: pay-by-bandwidth
  • PayByTraffic: pay-by-traffic
Note When the pay-by-traffic billing method for network usage is used, the maximum inbound and outbound bandwidth values are used as the upper limits of bandwidth instead of guaranteed performance specifications. When demands outstrip resource supplies, the maximum bandwidths may be limited. If you want guaranteed bandwidth for your instance, use the pay-by-bandwidth billing method.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

PayByTraffic
LaunchConfiguration.InternetMaxBandwidthInintegerNo

The maximum inbound public bandwidth. Unit: Mbit/s. Valid values:

  • When the maximum outbound public bandwidth is less than or equal to 10 Mbit/s, the valid values of this parameter are 1 to 10 and the default value is 10.
  • When the maximum outbound public bandwidth is greater than 10 Mbit/s, the valid values of this parameter are 1 to the value of LaunchConfiguration.InternetMaxBandwidthOut, and the default value is the value of LaunchConfiguration.InternetMaxBandwidthOut.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

10
LaunchConfiguration.InternetMaxBandwidthOutintegerNo

The maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100.

Default value: 0.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

10
LaunchConfiguration.InstanceNamestringNo

The instance name. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).

The default value of this parameter is the InstanceId value.

When you batch create instances, you can batch configure sequential names for the instances. For more information, see Batch configure sequential names or hostnames for multiple instances.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

k8s-node-[1,4]-alibabacloud
LaunchConfiguration.HostNamestringNo

The instance hostname. Take note of the following items:

  • The hostname cannot start or end with a period (.) or hyphen (-). The hostname cannot contain consecutive periods (.) or hyphens (-).
  • For Windows instances, the hostname must be 2 to 15 characters in length and cannot contain periods (.) or contain only digits. It can contain letters, digits, and hyphens (-).
  • For instances that run other operating systems such as Linux, the hostname must be 2 to 64 characters in length. You can use periods (.) to separate a hostname into multiple segments. Each segment can contain letters, digits, and hyphens (-).
  • You cannot specify both LaunchConfiguration.HostName and LaunchConfiguration.HostNames.N. Otherwise, an error is returned.
  • When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.
k8s-node-[1,4]-ecshost
LaunchConfiguration.InstanceDescriptionstringNo

The instance description. The description must be 2 to 256 characters in length. The description can contain letters and cannot start with http:// or https://. When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

Instance_Description
LaunchConfiguration.KeyPairNamestringNo

The key pair name.

  • For Windows instances, this parameter is ignored. This parameter is empty by default.
  • By default, password-based logon is disabled for Linux instances.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

KeyPair_Name
LaunchConfiguration.RamRoleNamestringNo

The name of the instance Resource Access Management (RAM) role. You can call the ListRoles operation provided by RAM to query the instance RAM roles that you created. When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

RAM_Name
LaunchConfiguration.SecurityEnhancementStrategystringNo

Specifies whether to enable security hardening. Valid values:

  • Active: enables security hardening. This value is applicable only to public images.
  • Deactive: disables security hardening. This value is applicable to all image types.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

Active
LaunchConfiguration.UserDatastringNo

The instance user data. The user data must be encoded in Base64. The raw data can be up to 32 KB in size. When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

ZWNobyBoZWxsbyBlY3Mh
LaunchConfiguration.SystemDiskCategorystringNo

The category of the system disk. Valid values:

  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: enhanced SSD (ESSD)
  • cloud: basic disk

For non-I/O optimized instances of retired instance types, the default value is cloud. For other instances, the default value is cloud_efficiency.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

cloud_ssd
LaunchConfiguration.SystemDiskSizeintegerNo

The size of the system disk. Valid values: 20 to 500. Unit: GiB. The value must be at least 20 and greater than or equal to the size of the image specified by LaunchConfiguration.ImageId.

Default value: 40 or the size of the image specified by LaunchConfiguration.ImageId, whichever is greater.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

40
LaunchConfiguration.SystemDiskNamestringNo

The name of the system disk. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-).

This parameter is empty by default.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

cloud_ssdSystem
LaunchConfiguration.SystemDiskDescriptionstringNo

The description of the system disk. The description must be 2 to 256 characters in length. The description can contain letters and cannot start with http:// or https://.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

SystemDisk_Description
LaunchConfiguration.SystemDiskPerformanceLevelstringNo

The performance level of the ESSD to be used as the system disk. Valid values:

  • PL0 (default): A single ESSD can deliver up to 10,000 random read/write IOPS.
  • PL1: A single ESSD can deliver up to 50,000 random read/write IOPS.
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS.

For more information about ESSD performance levels, see ESSDs .

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

PL0
LaunchConfiguration.PasswordInheritbooleanNo

Specifies whether to use the password preset in the image. Valid values:

  • true: uses the password preset in the image.
  • false: does not use the password preset in the image.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

true
LaunchConfiguration.ResourceGroupIdstringNo

The ID of the resource group to which to assign the instance. When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

rg-bp67acfmxazb4p****
LaunchConfiguration.CreditSpecificationstringNo

The performance mode of the burstable instance. Valid values:

This parameter is empty by default.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

Standard
LaunchConfiguration.PasswordstringNo

The instance password. The password must be 8 to 30 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The password can contain the following special characters:

( ) ` ~ ! @ # $ % ^ & * - _ + = | { } : ; ' < > , . ? /`` For Windows instances, the password cannot start with a forward slash (/). When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence. `

EcsV587!
LaunchConfiguration.DeploymentSetIdstringNo

The ID of the deployment set.

ds-bp1frxuzdg87zh4p****
LaunchTemplateConfigobject []No

The extended configurations of the launch template.

VSwitchIdstringNo

The ID of the vSwitch in extended configuration N. The zone of the ECS instances created from the extended configuration is determined by the vSwitch.

Note If you specify one or more other LaunchTemplateConfig.N.* parameters, you must also specify LaunchTemplateConfig.N.VSwitchId.
vsw-sn5bsitu4lfzgc5o7****
MaxPricedoubleNo

The maximum price of preemptible instances in extended configuration N.

Note If you specify one or more other LaunchTemplateConfig.N.* parameters, you must also specify LaunchTemplateConfig.N.MaxPrice.
3
PriorityintegerNo

The priority of extended configuration N. A value of 0 indicates the highest priority. Valid values: 0 to ∞.

1
InstanceTypestringNo

The instance type in extended configuration N. Valid values of N: 1 to 20. For more information about the valid values of this parameter, see Instance families.

ecs.g5.large
WeightedCapacitydoubleNo

The weight of the instance type in extended configuration N. A greater weight indicates that a single instance has more computing power and fewer instances are required. The value must be greater than 0.

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, assume that the minimum computing power of a single instance is 8 vCPUs and 60 GiB of memory.

  • For an instance type with 8 vCPUs and 60 GiB of memory, you can set the weight to 1.
  • For an instance type with 16 vCPUs and 120 GiB of memory, you can set the weight to 2.
2
MaxQuantityintegerNo
Note This parameter is in invitational preview and is not publicly available.
false
CoresarrayNo

The number of vCPU cores of the instance type.

integerNo

The number of vCPUs of the instance type in extended configuration N. This parameter is used to filter instance types. For more information, see Overview of instance families. Valid values of N: 1 to 10.

2
MemoriesarrayNo

The memory sizes of the instance type.

floatNo

The memory size of the instance type in extended configuration N. Unit: GiB. This parameter is used to filter instance types. For more information, see Overview of instance families. Valid values of N: 1 to 10.

4
InstanceFamilyLevelstringNo

The instance family level of the instance type in extended configuration N. This parameter is used to filter instance types. Valid values:

  • EntryLevel: entry level (shared instance types). Instance types of this level are the most cost-effective but may not provide stable computing performance. Instance types of this level are suitable for scenarios in which the CPU utilization is low. For more information, see Shared instance families.
  • EnterpriseLevel: enterprise level. Instance types of this level provide stable performance and dedicated resources and are suitable for scenarios that require high stability. For more information, see the Overview of instance families topic.
  • CreditEntryLevel: credit entry level (burstable instance types). CPU credits are used to ensure computing performance. Instance types of this level are suitable for scenarios in which the CPU utilization is low but may fluctuate in specific cases. For more information, see Overview of burstable instances.

Valid values of N: 1 to 10.

EnterpriseLevel
ExcludedInstanceTypesarrayNo

The instance types that you want to exclude.

stringNo

Instance type N that you want to exclude in extended configuration N. You can use wildcard characters, such as an asterisk (*), to exclude an instance type or an instance family. Examples:

  • ecs.c6.large: The ecs.c6.large instance type is excluded.
  • ecs.c6.*: The c6 instance family is excluded.
ecs.n1.small/ecs.n1.*/*7*
ArchitecturesarrayNo

The architectures of the instance types.

stringNo

Architecture N of the instance type in extended configuration N. Valid values:

  • X86: x86
  • Heterogeneous: heterogeneous computing, such as GPU-accelerated or FPGA-accelerated
  • BareMetal: ECS Bare Metal Instance
  • Arm: Arm
  • SuperComputeCluster: Super Computing Cluster

By default, all values are included.

X86
BurstablePerformancestringNo

Specifies whether to include burstable instance types. Valid values:

  • Exclude: does not include burstable instance types.
  • Include: includes burstable instance types.
  • Required: includes only burstable instance types.

Default value: Include.

Include
LaunchConfiguration.DataDiskobject []No

The cloud disks in the extended configurations of the launch template.

PerformanceLevelstringNo

The performance level of the ESSD to use as data disk N. The value of N in this parameter must be the same as the value of N in LaunchConfiguration.DataDisk.N.Category. Valid values:

  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • PL1 (default): A single ESSD can deliver up to 50,000 random read/write IOPS.
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS.

For information about ESSD performance levels, see ESSDs .

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

PL1
KmsKeyIdstringNo

The ID of the Key Management Service (KMS) key to use for data disk N. When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

0e478b7a-4262-4802-b8cb-00d3fb40****
DescriptionstringNo

The description of data disk N. The description must be 2 to 256 characters in length and cannot start with http:// or https://. When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

DataDisk_Description
SnapshotIdstringNo

The ID of the snapshot to use to create data disk N. Valid values of N: 1 to 16.

After this parameter is specified, LaunchConfiguration.DataDisk.N.Size is ignored. The size of data disk N is the same as that of the snapshot specified by this parameter. Use snapshots created on or after July 15, 2013. Otherwise, an error is returned and your request is rejected.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

s-bp17441ohwka0yuh****
SizeintegerNo

The size of data disk N. Valid values of N: 1 to 16. Unit: GiB. Valid values:

  • Valid values if you set LaunchConfiguration.DataDisk.N.Category to cloud_efficiency: 20 to 32768.

  • Valid values if you set LaunchConfiguration.DataDisk.N.Category to cloud_ssd: 20 to 32768.

  • Valid values if you set LaunchConfiguration.DataDisk.N.Category to cloud_essd: vary based on the LaunchConfiguration.DataDisk.N.PerformanceLevel value.

    • Valid values if you set LaunchConfiguration.DataDisk.N.PerformanceLevel to PL0: 40 to 32768.
    • Valid values if you set LaunchConfiguration.DataDisk.N.PerformanceLevel to PL1: 20 to 32768.
    • Valid values if you set LaunchConfiguration.DataDisk.N.PerformanceLevel to PL2: 461 to 32768.
    • Valid values if you set LaunchConfiguration.DataDisk.N.PerformanceLevel to PL3: 1261 to 32768.
  • Valid values if you set LaunchConfiguration.DataDisk.N.Category to cloud: 5 to 2000.

Note The value of this parameter must be greater than or equal to the size of the snapshot specified by LaunchConfiguration.DataDisk.N.SnapshotId.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

20
DevicestringNo

The mount point of data disk N. When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

/dev/vd1
DiskNamestringNo

The name of data disk N. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-).

By default, this parameter is left empty.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

cloud_ssdData
CategorystringNo

The category of data disk N. Valid values of N: 1 to 16. Valid values:

  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: ESSD
  • cloud: basic disk

For I/O optimized instances, the default value is cloud_efficiency. For non-I/O optimized instances, the default value is cloud.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

cloud_ssd
DeleteWithInstancebooleanNo

Specifies whether to release data disk N when the instance to which the data disk is attached is released. Valid values:

  • true
  • false

Default value: true.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

true
EncryptedbooleanNo

Specifies whether to encrypt data disk N. Valid values:

  • true
  • false

Default value: false.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

false
LaunchConfiguration.Tagobject []No

The tag in the extended configurations of the launch template.

KeystringNo

The key of the tag. Valid values of N: 1 to 20. The tag key cannot be an empty string. It can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://. If both the LaunchTemplateId and LaunchConfiguration.* parameters are specified, the LaunchTemplateId parameter takes precedence.

TestKey
ValuestringNo

The value of the tag. Valid values of N: 1 to 20. The tag value can be an empty string. It can be up to 128 characters in length. It cannot start with acs: or contain http:// or https://. If both the LaunchTemplateId and LaunchConfiguration.* parameters are specified, the LaunchTemplateId parameter takes precedence.

TestValue
SystemDiskConfigobject []No

The information of system disks on the instance.

DiskCategorystringNo

The category of the system disk. You can specify multiple disk categories, and the disk categories are prioritized in the order in which they are specified. If a specified disk category is unavailable, the system uses the next available disk category. Valid values:

  • cloud_efficiency: ultra disk.
  • cloud_ssd: standard SSD.
  • cloud_essd: ESSD
  • cloud: basic disk.
cloud_ssd
DataDiskConfigobject []No

The information of data disks on the instance.

DiskCategorystringNo

The category of data disk N. You can use this parameter to specify multiple disk categories, and the disk categories are prioritized in the order in which they are specified. If a specified disk category is unavailable, the system uses the next available disk category. Valid values:

  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: ESSD
  • cloud: basic disk
cloud_efficiency
LaunchConfiguration.HostNamesarrayNo

The hostname of instance N. You can use this parameter to specify different hostnames for multiple instances. Take note of the following items:

  • This parameter takes effect only when AutoProvisioningGroupType is set to instant.
  • The value of N indicates the number of instances. Valid values of N: 1 to 1000. The value of N must be the same as the TotalTargetCapacity value.
  • The hostname cannot start or end with a period (.) or hyphen (-). The hostname cannot contain consecutive periods (.) or hyphens (-).
  • For Windows instances, the hostname must be 2 to 15 characters in length and cannot contain periods (.) or contain only digits. The hostname can contain letters, digits, and hyphens (-).
  • For instances that run other operating systems such as Linux, the hostname must be 2 to 64 characters in length. You can use periods (.) to separate the hostname into multiple segments. Each segment can contain letters, digits, and hyphens (-).
  • You cannot specify both LaunchConfiguration.HostName and LaunchConfiguration.HostNames.N. Otherwise, an error is returned.
  • When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.
stringNo

The hostname of instance N. You can use this parameter to specify different hostnames for multiple instances. Take note of the following items:

  • This parameter takes effect only when AutoProvisioningGroupType is set to instant.
  • The value of N indicates the number of instances. Valid values of N: 1 to 1000. The value of N must be the same as the TotalTargetCapacity value.
  • The hostname cannot start or end with a period (.) or hyphen (-). The hostname cannot contain consecutive periods (.) or hyphens (-).
  • For Windows instances, the hostname must be 2 to 15 characters in length and cannot contain periods (.) or contain only digits. The hostname can contain letters, digits, and hyphens (-).
  • For instances that run other operating systems such as Linux, the hostname must be 2 to 64 characters in length. You can use periods (.) to separate the hostname into multiple segments. Each segment can contain letters, digits, and hyphens (-).
  • You cannot specify both LaunchConfiguration.HostName and LaunchConfiguration.HostNames.N. Otherwise, an error is returned.
  • When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.
ecs-host-01
MinTargetCapacitystringNo

The minimum target capacity of the auto provisioning group. The value must be a positive integer. When you specify this parameter, take note of the following items:

  • This parameter takes effect only when AutoProvisioningGroupType is set to instant.
  • If the number of instances that can be created in the current region is smaller than the value of this parameter, the operation cannot be called and no instances are created.
  • If the number of instances that can be created in the current region is greater than the value of this parameter, instances can be created based on the specified parameters.
20
LaunchConfiguration.SecurityGroupIdsarrayNo

The IDs of the security groups to which the new ECS instances belong.

stringNo

The ID of security group N to which to assign the instance. When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

sg-bp15ed6xe1yxeycg****
LaunchConfiguration.SystemDiskobjectNo

The system disk information of instances. When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

EncryptedstringNo

Specifies whether to encrypt system disk N. Valid values:

  • true
  • false

Default value: false.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

false
KMSKeyIdstringNo

The ID of the KMS key to use for system disk N.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

0e478b7a-4262-4802-b8cb-00d3fb40****
EncryptAlgorithmstringNo

The algorithm to use to encrypt system disk N. Valid values:

  • aes-256
  • sm4-128

Default value: aes-256.

When both LaunchTemplateId and LaunchConfiguration.* parameters are specified, LaunchTemplateId takes precedence.

aes-256
LaunchConfiguration.Arnobject []No

This parameter is unavailable for public use.

RolearnstringNo

This parameter is not publicly available.

acs:ram::123456789012****:role/adminrole
RoleTypestringNo

This parameter is not publicly available.

34458433936495****:alice
AssumeRoleForlongNo

This parameter is not publicly available.

123456789012****
HibernationOptionsConfiguredbooleanNo
Note This parameter is in invitational preview and is not publicly available.
false
LaunchConfiguration.AutoReleaseTimestringNo

The automatic release time of the pay-as-you-go instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in Coordinated Universal Time (UTC).

  • If the value of ss is not 00, the start time is automatically rounded down to the nearest minute based on the value of mm.
  • The specified time must be at least 30 minutes later than the current time.
  • The specified time can be at most three years later than the current time.
2018-01-01T12:05:00Z
LaunchConfiguration.ImageFamilystringNo

The name of the image family. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with aliyun or acs:. The name cannot contain http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).

hangzhou-daily-update
Tagobject []No

The tags to add to the auto provisioning group.

KeystringNo

The key of tag N to add to the auto provisioning group.

Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot contain http:// or https://. The tag key cannot start with acs: or aliyun.

TestKey
ValuestringNo

The value of tag N to add to the auto provisioning group.

Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain http:// or https://.

TestValue

Response parameters

ParameterTypeDescriptionExample
object
AutoProvisioningGroupIdstring

The ID of the auto provisioning group.

apg-sn54avj8htgvtyh8****
RequestIdstring

The ID of the request.

745CEC9F-0DD7-4451-9FE7-8B752F39****
LaunchResultsobject []

The instances created by the auto provisioning group. The values of the parameters in this array are returned only when AutoProvisioningGroupType is set to instant.

ZoneIdstring

The zone ID of the instance.

cn-hangzhou-g
ErrorMsgstring

The error message returned when the instance cannot be created.

Specific parameter is not valid.
InstanceTypestring

The instance type of the instance.

ecs.g5.large
ErrorCodestring

The error code returned when the instance cannot be created.

InvalidParameter
SpotStrategystring

The bidding policy for the pay-as-you-go instance. Valid values:

  • NoSpot: The instance is a regular pay-as-you-go instance.
  • SpotWithPriceLimit: The instance is a preemptible instance for which you specify the maximum hourly price.
  • SpotAsPriceGo: The instance is a preemptible instance for which the market price at the time of purchase is used as the bid price.
NoSpot
Amountinteger

The number of created instances.

1
InstanceIdsarray

The IDs of created instances.

string

The ID of the created instance.

["i-bp67acfmxazb4p****"]

Examples

Sample success responses

JSONformat

{
  "AutoProvisioningGroupId": "apg-sn54avj8htgvtyh8****",
  "RequestId": "745CEC9F-0DD7-4451-9FE7-8B752F39****",
  "LaunchResults": {
    "LaunchResult": [
      {
        "ZoneId": "cn-hangzhou-g",
        "ErrorMsg": "Specific parameter is not valid.",
        "InstanceType": "ecs.g5.large",
        "ErrorCode": "InvalidParameter",
        "SpotStrategy": "NoSpot",
        "Amount": 1,
        "InstanceIds": {
          "InstanceId": [
            "[\"i-bp67acfmxazb4p****\"]"
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameter%sThe specified parameter is invalid.
400InvalidAutoProvisioningGroupName.MalformedThe specified parameter "AutoProvisioningGroupName" is not valid.-
400InvalidAutoProvisioningGroupType.ValueNotSupportedThe specified parameter "AutoProvisioningGroupType" is not supported.-
400InvalidFleetExcessCapacityTerminationPolicy.ValueNotSupportedThe specified parameter "ExcessCapacityTerminationPolicy" is not supported.-
400InvalidDefaultTargetCapacityType.ValueNotSupportedThe specified parameter "DefaultTargetCapacityType" is not supported.-
400InvalidSpotAllocationStrategy.ValueNotSupportedThe specified parameter "SpotAllocationStrategy" is not supported.-
400InvalidSpotInstanceInterruptionBehavior.ValueNotSupportedThe specified parameter "SpotInstanceInterruptionBehavior" is not supported.-
400InvalidPayAsYouGoAllocationStrategy.ValueNotSupportedThe specified parameter "PayAsYouGoAllocationStrategy" is not supported.-
400MissingParameter.SpotAllocationStrategyThe specified parameter "SpotAllocationStrategy" is empty.-
400MissingParameter.LaunchTemplateConfigsThe specified parameter "LaunchTemplateConfigs" is empty.-
400InvalidValidTime.MalFormedThe specified parameter "ValidTime" is not supported.-
400InvalidLaunchTemplateVersion.ValueNotSupportedThe specified parameter "LaunchTemplateVersion" is not valid.-
400MissingParameterThe specified parameter "AutoProvisioningGroup" should not be null.-
400InvalidRegion.ValueNotSupportedThe specified Region does not exist.-
400InvalidDescription.ValueNotSupportedThe specified description is illegal.-
400MissingParameterThe specified launchTemplate does not exist.-
400InvalidLaunchTemplate.ValueNotSupportedThe SecurityGroupId or imageId in LaunchTemplate is not exists.-
400MissingParameterThe launchTemplateConfigs should not be null.-
400InvalidCapacity.ValueNotSupportedThe Capacity is illegal, or the TargetCapacity is large than SpotCapacity + PayAsYouGoCapacity.-
400MissingParameterThe specified parameter "instanceType" should not be null.-
400InvalidInstanceType.ValueNotSupportedThe instanceType is illegal.-
400MissingParameterThe specified parameter "VSWitchId" should not be null.-
400InternalErrorThe request processing has failed due to some unknown error.An internal error has occurred. Try again later.
400InvalidLaunchTemplateConfigs.SizeExceedThe size of LaunchTemplateConfigs exceeds limit.-
400InvalidPayAsYouGoAllocationStrategy.ValueNotSupportedThe specified parameter "PayAsYouGoAllocationStrategy" is not valid.-
400InvalidSpotAllocationStrategy.ValueNotSupportedThe specified parameter "SpotAllocationStrategy" is not valid.-
400InvalidParameter.SpotInstancePoolsToUseCountThe specified parameter "SpotInstancePoolsToUseCount" is not valid.-
400InvalidParameter.ResourceGroupIdThe specified parameter "ResourceGroupId" is not valid.-
400InvalidParameter.TargetCapacityThe Capacity is illegal, TotalTargetCapacity, PayAsYouGoTargetCapacity, SpotTargetCapacity must be specified, meanwhile, the TargetCapacity must be larger than or equal to the sum of SpotCapacity and OnDemandCapacity.-
400MissingParameter.WeightedCapacityThe WeightedCapacity of LaunchTemplateConfig should not be empty.-
400InvalidParameter.WeightedCapacityBeyondRangeThe WeightedCaTpacity of LaunchTemplateConfig beyond permitted range.-
400InvalidParameter.MaxPriceThe specified parameter "MaxSpotPrice" or "MaxPrice" of LaunchTemplateConfig is not valid.-
400NoPermission%s-
400Duplicate.DiskCategoryThe specified disk configs contains duplicate DiskCategory.-
400MissingParameter%sA parameter is not specified.
400InvalidVSwitchId.NotFound%sThe specified vSwitch does not exist.
400InvalidImageFamily.ConfictThe specified parameter ImageFamily should be empty when the parameter ImageId is specified.The specified parameter ImageFamily should be empty when the parameter ImageId is specified.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-04-26The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 500
2024-02-29The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Tag
2023-11-06The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: LaunchConfiguration.ImageFamily
2023-06-14The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 500
Output ParametersThe response structure of the API has changed.
2023-04-04The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 500
2022-09-21The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: HibernationOptionsConfigured