CreateAutoProvisioningGroup

Updated at:

Creates an auto provisioning group.

Operation description

  • Auto provisioning is a solution that uses spot instances and pay-as-you-go instances to quickly deploy an instance cluster. It supports one-click deployment of instance clusters across billing methods, zones, and instance families. For more information, see Use the auto provisioning group API to batch create ECS instances.

  • Auto provisioning uses auto provisioning groups for scheduling and maintenance of compute resources. You can use auto provisioning groups to stably provide computing power and mitigate the instability caused by the revoke mechanism of spot instances.

  • Auto provisioning is a free feature, but you are billed for the instance resources created by using auto provisioning groups. For more information, see Billing of spot instances and Pay-as-you-go.

  • If you specify both a launch template (LaunchTemplateId) and launch configuration information (LaunchConfiguration.*), the system preferentially uses the launch template.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:CreateAutoProvisioningGroup

create

*All Resource

*

None
  • ram:CreateServiceLinkedRole

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The ID of the region where the auto provisioning group resides. You can invoke the DescribeRegions operation to query the most recent region list.

cn-hangzhou

ResourceGroupId

string

No

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

rg-bp67acfmxazb4p****

AutoProvisioningGroupName

string

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 http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).

apg-test

AutoProvisioningGroupType

string

No

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

  • request: one-time asynchronous delivery. The auto provisioning group asynchronously delivers the instance cluster only at startup and does not retry if the scheduling fails.

  • instant: one-time synchronous delivery. The auto provisioning group creates instances only at startup and returns the list of successfully created instances and the causes of creation failures in the response.

  • maintain: continuous delivery. The auto provisioning group attempts to deliver the instance cluster at startup, performs monitoring of the real-time capacity, and continues to create ECS instances if the target capacity is not reached.

Default value: maintain.

maintain

SpotAllocationStrategy

string

No

The policy for creating spot instances. Valid values:

  • lowest-price: cost optimization policy. The instance type with the lowest price is selected.

  • diversified: zone balancing policy. Instances are created in the zones specified by the extended launch template and evenly distributed across the zones.

  • capacity-optimized: capacity optimization policy. The optimal instance type and zone are selected based on inventory.

Default value: lowest-price.

diversified

SpotInstanceInterruptionBehavior

string

No

The behavior when a spot instance is interrupted. Valid values:

  • stop: stops the instance.

  • terminate: releases the instance.

Default value: terminate.

terminate

SpotInstancePoolsToUseCount

integer

No

The number of instance types with the lowest prices from which the auto provisioning group selects to create instances. This parameter takes effect only when SpotAllocationStrategy is set to lowest-price.

Valid values: less than the value of N in LaunchTemplateConfig.N.

2

PayAsYouGoAllocationStrategy

string

No

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

  • lowest-price: cost optimization policy. The instance type with the lowest price is selected.

  • prioritized: priority-based policy. Instances are created based on the priority specified by LaunchTemplateConfig.N.Priority.

Default value: lowest-price.

prioritized

ExcessCapacityTerminationPolicy

string

No

Specifies whether to release the instances that are removed during a scale-down event when the real-time capacity of the auto provisioning group exceeds the target capacity and triggers a scale-down. Valid values:

  • termination: releases the instances.

  • no-termination: only removes the instances from the auto provisioning group.

Default value: no-termination.

termination

ValidFrom

string

No

The time when the auto provisioning group starts. This parameter and ValidUntil determine the validity period.

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

Default value: the UNIX timestamp when the API operation takes effect.

2019-04-01T15:10:20Z

ValidUntil

string

No

The time when the auto provisioning group expires. This parameter and ValidFrom determine the validity period.

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

TerminateInstancesWithExpiration

boolean

No

Specifies whether to release the 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.

Default value: false.

true

TerminateInstances

boolean

No

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

  • true: releases the instances.

  • false: retains the instances.

Default value: false.

true

MaxSpotPrice

number

No

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

Note

If both MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice are specified, the lower value prevails.

2

TotalTargetCapacity

string

Yes

The total target capacity of the auto provisioning group. Valid values: positive integers.

The total target capacity must be greater than or equal to the sum of PayAsYouGoTargetCapacity (the target capacity of pay-as-you-go instances) and SpotTargetCapacity (the target capacity of spot instances).

60

PayAsYouGoTargetCapacity

string

No

The target capacity of pay-as-you-go instances in the auto provisioning group. Valid values: less than or equal to the parameter value of TotalTargetCapacity.

30

SpotTargetCapacity

string

No

The target capacity of spot instances in the auto provisioning group. Valid values: less than or equal to the parameter value of TotalTargetCapacity.

20

DefaultTargetCapacityType

string

No

The billing method for the supplemental capacity when the sum of PayAsYouGoTargetCapacity and SpotTargetCapacity is less than TotalTargetCapacity. Valid values:

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

  • Spot: spot instances.

Default value: Spot.

Spot

LaunchTemplateId

string

No

The ID of the launch template associated with the auto provisioning group. You can invoke the DescribeLaunchTemplates operation to query available launch templates for the instance. If you specify both a launch template and launch configuration information (LaunchConfiguration.*), the system preferentially uses the launch template.

lt-bp1fgzds4bdogu03****

LaunchTemplateVersion

string

No

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

Default value: the default version of the launch template.

1

Description

string

No

The description of the auto provisioning group.

testDescription

ClientToken

string

No

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 Ensure idempotence.

0c593ea1-3bea-11e9-b96b-88e9fe637760

LaunchConfiguration.ImageId

string

No

The ID of the image. The image is used to create the instance. You can call the DescribeImages operation to query available images. If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

m-bp1g7004ksh0oeuc****

LaunchConfiguration.SecurityGroupId

string

No

The ID of the security group to which the instance belongs. If both a launch template and launch configuration information are specified, the launch template takes precedence.

sg-bp15ed6xe1yxeycg****

LaunchConfiguration.IoOptimized

string

No

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

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

  • optimized: The instance is I/O optimized.

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

If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

optimized

LaunchConfiguration.InternetChargeType

string

No

The billing method for network usage. Valid values:

  • PayByBandwidth: pay-by-bandwidth.

  • PayByTraffic: pay-by-traffic.

Note

In pay-by-traffic mode, the peak inbound and outbound bandwidths are upper limits and not guaranteed service metrics. When resource contention occurs, the peak bandwidths may be limited. If your business requires guaranteed bandwidth, use the pay-by-bandwidth mode.

If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

PayByTraffic

LaunchConfiguration.InternetMaxBandwidthIn

integer

No

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

  • When the outbound public bandwidth is less than or equal to 10 Mbit/s: 1 to 10. Default value: 10.

  • When the outbound public bandwidth is greater than 10 Mbit/s: 1 to the value of LaunchConfiguration.InternetMaxBandwidthOut. Default value: the value of LaunchConfiguration.InternetMaxBandwidthOut.

If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

10

LaunchConfiguration.InternetMaxBandwidthOut

integer

No

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

Default value: 0.

If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

10

LaunchConfiguration.InstanceName

string

No

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

Default value: the InstanceId of the instance.

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

If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

k8s-node-[1,4]-alibabacloud

LaunchConfiguration.HostName

string

No

The hostname of the instance. Limits:

  • Periods (.) and hyphens (-) cannot be used as the first or last character and cannot be used consecutively.

  • Windows instances: The hostname must be 2 to 15 characters in length. Periods (.) are not supported, and the hostname cannot contain only digits. It can contain letters, digits, and hyphens (-).

  • Other instances such as Linux instances: The hostname must be 2 to 64 characters in length. Multiple periods (.) are supported. The string between two periods is a segment, and each segment can contain letters, digits, and hyphens (-).

  • You cannot specify both LaunchConfiguration.HostName and LaunchConfiguration.HostNames.N. Otherwise, an error is returned.

  • If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

k8s-node-[1,4]-ecshost

LaunchConfiguration.InstanceDescription

string

No

The description of the instance. The description must be 2 to 256 characters in length and cannot start with http:// or https://. If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

Instance_Description

LaunchConfiguration.KeyPairName

string

No

The name of the SSH key pair.

  • For Windows instances, this parameter is ignored. Default value: null.

  • For Linux instances, password logon is disabled by default.

If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

KeyPair_Name

LaunchConfiguration.RamRoleName

string

No

The name of the instance RAM role. You can use the RAM API operation ListRoles to query the instance RAM roles that you have created. If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

RAM_Name

LaunchConfiguration.SecurityEnhancementStrategy

string

No

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.

If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

Active

LaunchConfiguration.UserData

string

No

Instance user data of the instance. Instance user data must be encoded in Base64. The maximum size of the raw data is 32 KB. If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

ZWNobyBoZWxsbyBlY3Mh

LaunchConfiguration.SystemDiskCategory

string

No

The category of the system disk. Valid values:

  • cloud_efficiency: ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: enterprise SSD.

  • cloud: basic disk.

For retired instance types that do not support I/O optimization, the default value is cloud. For other instance types, the default value is cloud_efficiency.

If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

cloud_ssd

LaunchConfiguration.SystemDiskSize

integer

No

The size of the system disk. Unit: GiB. Valid values: 20 to 500. The value of this parameter must be greater than or equal to max{20, the size of the image specified by LaunchConfiguration.ImageId}.

Default value: max{40, the size of the image specified by LaunchConfiguration.ImageId}.

If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

40

LaunchConfiguration.SystemDiskName

string

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 http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-).

Default value: null.

If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

cloud_ssdSystem

LaunchConfiguration.SystemDiskDescription

string

No

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

If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

SystemDisk_Description

LaunchConfiguration.SystemDiskPerformanceLevel

string

No

The performance level of the enterprise SSD used as the system disk. Valid values:

  • PL0 (default): A single enterprise SSD can deliver up to 10,000 random read/write IOPS.

  • PL1: A single enterprise SSD can deliver up to 50,000 random read/write IOPS.

  • PL2: A single enterprise SSD can deliver up to 100,000 random read/write IOPS.

  • PL3: A single enterprise SSD can deliver up to 1,000,000 random read/write IOPS.

For more information about how to select the performance level for an enterprise SSD, see enterprise SSDs.

If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

PL0

LaunchConfiguration.PasswordInherit

boolean

No

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

  • true: uses the preset password.

  • false: does not use the preset password.

If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

true

LaunchConfiguration.ResourceGroupId

string

No

The ID of the resource group to which the instance belongs. If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

rg-bp67acfmxazb4p****

LaunchConfiguration.CreditSpecification

string

No

The performance mode of the burstable instance. Valid values:

Default value: null.

If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

Standard

LaunchConfiguration.Password

string

No

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

()`~!@#$%^&*-_+=|{}`[]`:;'<>,.?/

For Windows instances, the password cannot start with a forward slash (/).

If you specify both a launch template and launch configuration information, the system preferentially uses the launch template.

EcsV587!

LaunchConfiguration.DeploymentSetId

string

No

The ID of the deployment set.

ds-bp1frxuzdg87zh4p****

LaunchTemplateConfig

array<object>

No

The extended launch templates.

object

No

The details of the extended launch template.

VSwitchId

string

No

The ID of the vSwitch to which the ECS instance in the extended launch template is connected. The zone of the ECS instance created from the extended template is determined by the vSwitch.

Note

If you specify LaunchTemplateConfig, LaunchTemplateConfig.N.VSwitchId is required.

vsw-sn5bsitu4lfzgc5o7****

MaxPrice

number

No

The maximum price of the spot instance in the extended launch template.

Note

After LaunchTemplateConfig is specified, LaunchTemplateConfig.N.MaxPrice is required.

3

Priority

integer

No

The priority of the extended launch template. A value of 0 indicates the highest priority. Valid values: 0 to +∞.

1

InstanceType

string

No

The instance type in the extended launch template. Valid values of N: 1 to 20. For more information about valid values, see instance family.

ecs.g5.large

WeightedCapacity

number

No

The weight of the instance type in the extended launch template. A higher weight indicates that a single instance has more computing power and fewer instances are required. Valid values: greater than 0.

You can determine the weight based on the computing power of the specified instance type and the minimum computing power of a single node in the cluster. For example, if the minimum computing power of a single node is 8 vCPUs and 60 GiB of memory:

  • You can set the weight to 1 for an instance type that has 8 vCPUs and 60 GiB of memory.

  • You can set the weight to 2 for an instance type that has 16 vCPUs and 120 GiB of memory.

2

MaxQuantity

integer

No

Note

This parameter is in invitational preview and is not supported.

false

Cores

array

No

The list of vCPU counts for the instance type.

integer

No

The number of vCPU cores for the instance type. This parameter is used to filter instance families that meet the requirements. For more information, see instance family. Valid values of N: 1 to 10.

2

Memories

array

No

The list of memory sizes for the instance type.

number

No

The memory size of the instance type. Unit: GiB. This parameter is used to filter instance families that meet the requirements. For more information, see instance family. Valid values of N: 1 to 10.

4

InstanceFamilyLevel

string

No

The level of the instance family. This parameter is used to filter instance families that meet the requirements. Valid values:

  • EntryLevel: entry-level, which refers to shared instance types. Entry-level instance types are more cost-effective but cannot guarantee stable computing performance. They are suitable for scenarios with low CPU utilization. For more information, see Shared instance families.

  • EnterpriseLevel: enterprise-level. Enterprise-level instance types provide stable performance and dedicated resources. They are suitable for scenarios that require high stability. For more information, see Instance families.

  • CreditEntryLevel: credit entry-level, which refers to burstable instances. Burstable instances use CPU credits to ensure computing performance and are suitable for scenarios with low CPU utilization but occasional CPU usage spikes. For more information, see Overview of burstable instances.

Valid values of N: 1 to 10.

EnterpriseLevel

ExcludedInstanceTypes

array

No

The list of instance types to exclude.

string

No

The instance type to exclude. You can use a wildcard (*) to exclude a single instance type or an entire instance family. Examples:

  • ecs.c6.large: excludes the ecs.c6.large instance type.

  • ecs.c6.*: excludes all instance types in the c6 instance family.

ecs.n1.small/ecs.n1.*/*7*

Architectures

array

No

The list of architecture types for the instance type.

string

No

The architecture type of the instance type. Valid values:

  • X86: x86 computing.

  • Heterogeneous: heterogeneous computing, such as GPU or FPGA.

  • BareMental: ECS Bare Metal.

  • Arm: Arm computing.

  • SuperComputeCluster: Super Computing Cluster (SCC).

Default value: all architecture types.

X86

BurstablePerformance

string

No

Specifies whether the instance type is a burstable instance type. Valid values:

  • Exclude: excludes burstable instance types.

  • Include: includes burstable instance types.

  • Required: includes only burstable instance types.

Default value: Include.

Include

ImageId

string

No

The ID of the image. You can use this parameter to specify the image used by the current resource pool. If this parameter is not specified, the image specified by LaunchConfiguration.ImageId or in the launch template is used by default. You can call the DescribeImages operation to query available images. Note: This parameter is supported only when AutoProvisioningGroupType is set to instant.

aliyun_3_x64_20G_alibase_20210425.vhd

LaunchConfiguration.DataDisk

array<object>

No

The extended list of data disk configurations for the launch template.

object

No

The extended data disk configuration information for the launch template.

PerformanceLevel

string

No

The performance level of the ESSD when it is used as a data disk. The value of N must be the same as the value of N in LaunchConfiguration.DataDisk.N.Category. Valid values:

  • PL0: A single ESSD delivers up to 10,000 random read/write IOPS.

  • PL1 (default): A single ESSD delivers up to 50,000 random read/write IOPS.

  • PL2: A single ESSD delivers up to 100,000 random read/write IOPS.

  • PL3: A single ESSD delivers up to 1,000,000 random read/write IOPS.

For more information about how to select the ESSD performance level, see ESSD.

If both the launch template and the launch configurations are specified, the launch template takes precedence.

PL1

KmsKeyId

string

No

The ID of the KMS key for the data disk. If both a launch template and launch configuration are specified, the launch template takes precedence.

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

Description

string

No

The description of the data disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://. If both the launch template and the launch configurations are specified, the launch template takes precedence.

DataDisk_Description

SnapshotId

string

No

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

If this parameter is specified, the LaunchConfiguration.DataDisk.N.Size parameter is ignored, and the size of the created disk is the same as the size of the specified snapshot. You cannot use snapshots that were created on or before July 15, 2013. Otherwise, the request is rejected and an error is returned.

If both the launch template and the launch configurations are specified, the launch template takes precedence.

s-bp17441ohwka0yuh****

Size

integer

No

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

  • cloud_efficiency: 20 to 32768.

  • cloud_ssd: 20 to 32768.

  • cloud_essd: The valid values vary based on the value of LaunchConfiguration.DataDisk.N.PerformanceLevel.
    • PL0: 40 to 32768.

    • PL1: 20 to 32768.

    • PL2: 461 to 32768.

    • PL3: 1261 to 32768.

  • cloud: 5 to 2000.

Note

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

If both the launch template and the launch configurations are specified, the launch template takes precedence.

20

Device

string

No

The mount point of the data disk. If both the launch template and the launch configurations are specified, the launch template takes precedence.

/dev/vd1

DiskName

string

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 http:// or https://. It can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-).

Default value: null.

If both the launch template and the launch configurations are specified, the launch template takes precedence.

cloud_ssdData

Category

string

No

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: enterprise SSD.

  • 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.

If both the launch template and the launch configurations are specified, the launch template takes precedence.

cloud_ssd

DeleteWithInstance

boolean

No

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

  • true: The data disk is released when the instance is released.

  • false: The data disk is not released when the instance is released.

Default value: true.

If both the launch template and the launch configurations are specified, the launch template takes precedence.

true

Encrypted

boolean

No

Specifies whether to encrypt data disk N. Valid values:

  • true: The disk is encrypted.

  • false: The disk is not encrypted.

Default value: false.

If both the launch template and the launch configurations are specified, the launch template takes precedence.

false

EncryptAlgorithm

string

No

Note

This parameter is not available.

null

ProvisionedIops

integer

No

The number of provisioned read/write IOPS for the ESSD AutoPL disk. Valid values: 0 to min{50,000, 1000 × Capacity - Baseline performance}.

Baseline performance = min{1,800 + 50 × Capacity, 50,000}.

Note

This parameter is supported only when the DiskCategory parameter is set to cloud_auto. For more information, see ESSD AutoPL disks.

40000

BurstingEnabled

boolean

No

Specifies whether to enable the performance burst feature. Valid values:

  • true: yes.

  • false: no.

Note

This parameter is supported only when the DiskCategory parameter is set to cloud_auto. For more information, see ESSD AutoPL disks.

false

AutoSnapshotPolicyId

string

No

The ID of the automatic snapshot policy applied to the data disk.

Note the following limits when you configure this parameter:

  • This parameter takes effect only when you create an auto provisioning group of the one-time synchronous delivery type (AutoProvisioningGroupType=instant).

sp-bp67acfmxazb4p****

LaunchConfiguration.Tag

array<object>

No

The extended list of tags for the launch template.

object

No

The extended tag information for the launch template.

Key

string

No

The tag key of the instance. Valid values of N: 1 to 20. If this parameter is specified, it cannot be left empty. The tag key can be up to 128 characters in length and cannot start with aliyun or acs:. It cannot contain http:// or https://. If both the launch template and the launch configurations are specified, the launch template takes precedence.

TestKey

Value

string

No

The tag value of the instance. Valid values of N: 1 to 20. If this parameter is specified, it can be an empty string. The tag value can be up to 128 characters in length and cannot start with acs:. It cannot contain http:// or https://. If both the launch template and the launch configurations are specified, the launch template takes precedence.

TestValue

SystemDiskConfig

array<object>

No

The list of system disk configurations for the instance.

object

No

The system disk configuration for the instance.

DiskCategory

string

No

The system disk category of the instance. You can use this parameter to specify multiple candidate disk categories. The specified order determines the priority of the disk categories. If a disk category is not active, the system automatically switches to the next disk category. Valid values:

  • cloud_efficiency: ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: enterprise SSD.

  • cloud: basic disk.

cloud_ssd

DataDiskConfig

array<object>

No

The list of data disk configurations for the instance.

object

No

The data disk configuration for the instance.

DiskCategory

string

No

The data disk category of the instance. You can use this parameter to specify multiple candidate disk categories. The specified order determines the priority of the disk categories. If a disk category is not active, the system automatically switches to the next disk category. Valid values:

  • cloud_efficiency: ultra disk.

  • cloud_ssd: standard SSD.

  • cloud_essd: enterprise SSD.

  • cloud: basic disk.

cloud_efficiency

LaunchConfiguration.HostNames

array

No

The list of hostnames for one or more instances. Limits:

  • This parameter takes effect only when you create an auto provisioning group of the one-time synchronous delivery type (AutoProvisioningGroupType=instant).

  • N indicates the number of instances. Valid values of N: 1 to 1000. The value of N must be the same as the value of the TotalTargetCapacity parameter.

  • Periods (.) and hyphens (-) cannot be used as the first or last character and cannot be used consecutively.

  • If both the launch template and the launch configurations are specified, the launch template takes precedence.

ecs-host-01

string

No

The hostname. Limits:

  • Periods (.) and hyphens (-) cannot be used as the first or last character and cannot be used consecutively.

  • For Windows instances, the hostname must be 2 to 15 characters in length. It cannot contain periods (.) and cannot contain only digits. It can contain letters, digits, and hyphens (-).

  • For instances of other operating systems such as Linux, the hostname must be 2 to 64 characters in length. It can contain multiple periods (.). The characters between two consecutive periods are considered a segment. Each segment can contain letters, digits, and hyphens (-).

  • You cannot specify both LaunchConfiguration.HostName and LaunchConfiguration.HostNames.N. Otherwise, an error is returned.

ecs-host-01

MinTargetCapacity

string

No

The minimum target capacity of the auto provisioning group. Valid values: positive integers.

Note the following limits when you configure this parameter:

  • This parameter takes effect only when you create an auto provisioning group of the one-time synchronous delivery type (AutoProvisioningGroupType=instant).

  • If the instance inventory in the current region is less than the value of this parameter, the API call fails and no instances are created.

  • If the instance inventory in the current region is greater than the value of this parameter, instances are created based on the values of other configured parameters.

20

LaunchConfiguration.SecurityGroupIds

array

No

The list of security groups to which the instance belongs.

string

No

The ID of the security group to which the instance belongs. If both a launch template and launch configuration information are specified, the launch template takes precedence.

sg-bp15ed6xe1yxeycg****

LaunchConfiguration.SystemDisk

object

No

The system disk configuration of the instance. If both the launch template and the launch configurations are specified, the launch template takes precedence.

Encrypted

string

No

Specifies whether to encrypt system disk N. Valid values:

  • true: The disk is encrypted.

  • false: The disk is not encrypted.

Default value: false.

If both the launch template and the launch configurations are specified, the launch template takes precedence.

false

KMSKeyId

string

No

The KMS key ID of the system disk.

When both a launch template and launch configuration information are specified, the launch template takes precedence.

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

EncryptAlgorithm

string

No

The encryption algorithm of the system disk. Valid values:

  • aes-256.

  • sm4-128.

Default value: aes-256.

If both the launch template and the launch configurations are specified, the launch template takes precedence.

Note

This parameter is not available.

aes-256

ProvisionedIops

integer

No

The number of provisioned read/write IOPS for the ESSD AutoPL disk. Valid values: 0 to min{50,000, 1000 × Capacity - Baseline performance}.

Baseline performance = min{1,800 + 50 × Capacity, 50,000}.

Note

This parameter is supported only when the SystemDisk.Category parameter is set to cloud_auto. For more information, see ESSD AutoPL disks.

40000

BurstingEnabled

boolean

No

Specifies whether to enable the performance burst feature. Valid values:

  • true: yes.

  • false: no.

Note

This parameter is supported only when the SystemDisk.Category parameter is set to cloud_auto. For more information, see ESSD AutoPL disks.

false

AutoSnapshotPolicyId

string

No

The ID of the automatic snapshot policy applied to the system disk.

Note the following limits when you configure this parameter:

  • This parameter takes effect only when you create an auto provisioning group of the one-time synchronous delivery type (AutoProvisioningGroupType=instant).

sp-bp67acfmxazb4p****

LaunchConfiguration.Arn

array<object>

No

Note

This parameter is in invitational preview and is not supported.

object

No

Note

This parameter is in invitational preview and is not supported.

Rolearn

string

No

Note

This parameter is in invitational preview and is not supported.

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

RoleType

string

No

Note

This parameter is in invitational preview and is not supported.

34458433936495****:alice

AssumeRoleFor

integer

No

Note

This parameter is in invitational preview and is not supported.

123456789012****

HibernationOptionsConfigured

boolean

No

Note

This parameter is in invitational preview and is not available.

false

LaunchConfiguration.AutoReleaseTime

string

No

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 UTC.

  • If the value of the seconds (ss) is not 00, the time is automatically rounded down to the current minute (mm).

  • The earliest release time is half an hour after the current time.

  • The latest release time cannot be more than three years after the current time.

2018-01-01T12:05:00Z

LaunchConfiguration.ImageFamily

string

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 aliyun or acs:. It cannot contain http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).

hangzhou-daily-update

Tag

array<object>

No

The list of tags bound to the auto provisioning group.

object

No

The tags bound to the auto provisioning group.

Key

string

No

The tag key of the auto provisioning group.

Valid values of N: 1 to 20. If this parameter is specified, it cannot be left empty. The tag key can be up to 128 characters in length and cannot start with aliyun or acs:. It cannot contain http:// or https://.

TestKey

Value

string

No

The tag value of the auto provisioning group.

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

TestValue

ResourcePoolOptions

object

No

The resource pool policy used when creating instances. Note the following limits when you configure this parameter:

  • This parameter takes effect only when you create pay-as-you-go instances.

  • This parameter takes effect only when you create an auto provisioning group of the one-time synchronous delivery type (AutoProvisioningGroupType=instant).

Strategy

string

No

The resource pool policy. Resource pools include private pools generated after the Resource Assurance or Capacity Reservation service takes effect, as well as the public pool. Valid values:

  • PrivatePoolFirst: Private pools are used first. If this policy is selected and ResourcePoolOptions.PrivatePoolIds is specified, the specified private pools are used first. If no private pools are specified or the specified private pools have insufficient capacity, the system automatically matches open private pools. If no eligible private pools are available, the public pool is used to create instances.

  • PrivatePoolOnly: Only private pools are used. If this policy is selected, you must specify ResourcePoolOptions.PrivatePoolIds. If the specified private pools have insufficient capacity, the instances fail to start.

  • PublicPoolOnly: The public pool is used to create instances.

Default value: PublicPoolOnly.

PrivatePoolFirst

PrivatePoolIds

array

No

The list of private pool IDs. Valid values of N: 1 to 20.

string

No

The ID of the private pool, which is the ID of the Resource Assurance or Capacity Reservation service. You can specify only the ID of a private pool in Target mode.

eap-bp67acfmxazb4****

LaunchConfiguration

object

No

The launch configurations.

Period

integer

No

The subscription period of the resource. The unit is specified by the PeriodUnit parameter. This parameter is required and takes effect only when you create subscription instances. Valid values:

  • When PeriodUnit is set to Week, valid values of Period are 1, 2, 3, and 4.

  • When PeriodUnit is set to Month, valid values of Period are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.

1

PeriodUnit

string

No

The time unit of the subscription billing method. Valid values:

  • Week.

  • Month (default).

Month

AutoRenew

boolean

No

Specifies whether to enable auto-renewal. This parameter takes effect when you create subscription instances. Valid values:

  • true: Auto-renewal is enabled.

  • false (default): Auto-renewal is disabled.

true

AutoRenewPeriod

integer

No

The auto-renewal period. Valid values:

  • When PeriodUnit is set to Week: 1, 2, and 3.

  • When PeriodUnit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60.

Default value: 1.

1

SpotDuration

integer

No

The protection period of the spot instance. Unit: hours. Default value: 1. Valid values:

  • 1: Alibaba Cloud guarantees that the instance is not subject to automatic release within 1 hour after it is created. After 1 hour, the system automatically compares the bid price with the marketplace price and checks the resource inventory to determine whether to retain or revoke the instance.

  • 0: Alibaba Cloud does not guarantee that the instance runs for 1 hour after it is created. The system automatically compares the bid price with the marketplace price and checks the resource inventory to determine whether to retain or revoke the instance.

Alibaba Cloud sends you a notification through an ECS system event 5 minutes before the instance is revoked. Spot instances use billing by the second. Select an appropriate protection period based on the execution duration of your tasks.

Note the following limits when you configure this parameter:

  • This parameter takes effect only when you create an auto provisioning group of the one-time synchronous delivery type (AutoProvisioningGroupType=instant).

1

SpotInterruptionBehavior

string

No

The break mode of the spot instance. Valid values:

  • Terminate: The instance is released.

  • Stop: The instance enters economical mode.

For more information about economical mode, see Economical mode.

Default value: Terminate.

Note the following limits when you configure this parameter:

  • This parameter takes effect only when you create an auto provisioning group of the one-time synchronous delivery type (AutoProvisioningGroupType=instant).

Terminate

ImageOptions

object

No

The image properties.

Note the following limits when you configure this parameter:

  • This parameter takes effect only when you create an auto provisioning group of the one-time synchronous delivery type (AutoProvisioningGroupType=instant).

LoginAsNonRoot

boolean

No

Specifies whether the instance that uses this image supports logon as the ecs-user user. Valid values:

  • true: yes.

  • false: no.

false

SchedulerOptions

object

No

The scheduling options.

DedicatedHostId

string

No

The ID of the dedicated host.

dh-bp67acfmxazb4p01

DedicatedHostClusterId

string

No

The ID of the dedicated host cluster.

dc-bp12wlf6bw0vz9v2

SecurityOptions

object

No

The security options of the instance.

TrustedSystemMode

string

No

The trusted system mode. Set the value to vTPM.

vTPM

CpuOptions

object

No

The CPU configurations.

Core

integer

No

The number of CPU cores.

Default value: For more information, see Customize CPU options.

2

ThreadsPerCore

integer

No

The number of threads per core. The number of vCPUs of the ECS instance = the value of CpuOptions.Core × the value of CpuOptions.ThreadsPerCore.

A value of 1 for CpuOptions.ThreadsPerCore indicates that CPU hyper-threading is disabled.

Only specific instance types support the configuration of the number of threads per core.

Valid values and default value: For more information, see Customize CPU options.

2

PrePaidOptions

object

No

The detailed capacity configurations for subscription instances.

SpecifyCapacityDistribution

array<object>

No

The minimum capacity set for different instance types. This parameter is supported only when AutoProvisioningGroupType is set to request.

object

No

The minimum capacity for the instance type.

InstanceTypes

array

No

The set of instance types. Duplicate instance types are not allowed, and the instance types must be within the scope of LaunchTemplateConfig.InstanceType.

string

No

The instance type.

ecs.c6.large

MinTargetCapacity

integer

No

The minimum number of instances to be delivered within the scope of InstanceTypes.

Note

sum(MinTargetCapacity) <= TotalTargetCapacity. The sum of MinTargetCapacity for all instance type sets cannot exceed TotalTargetCapacity. If the MinTargetCapacity requirement for any instance type set cannot be met due to inventory or other reasons, the entire request fails.

5

ExecutionMode

string

No

CandidateOptions

object

No

The configuration options when AutoProvisioningGroupType is set to candidate.

TimeoutMinutes

integer

No

The timeout period for the auto provisioning group to scale out to the target capacity. After the timeout period elapses, no further scale-out attempts are made. Unit: minutes.

60

Evaluate

boolean

No

Specifies whether to only evaluate the success rate of candidate delivery for the target capacity in the current request. If this parameter is set to true, no scale-out is performed. Only the delivery success rate is evaluated and returned in the LaunchResult.CandidateEvaluateLevel field of the response. Default value: false.

Response elements

Element

Type

Description

Example

object

AutoProvisioningGroupId

string

The ID of the auto provisioning group.

apg-sn54avj8htgvtyh8****

RequestId

string

The request ID.

745CEC9F-0DD7-4451-9FE7-8B752F39****

LaunchResults

object

LaunchResult

array<object>

The collection of instances created by the auto provisioning group. This collection is returned only when the delivery type of the auto provisioning group is one-time synchronous delivery (instant).

array<object>

The information about the instances created by the auto provisioning group.

ZoneId

string

The zone ID of the instance.

cn-hangzhou-g

ErrorMsg

string

The error message returned when the instance fails to be created.

Specific parameter is not valid.

InstanceType

string

The instance type.

ecs.g5.large

ErrorCode

string

The error code returned when the instance fails to be created.

InvalidParameter

SpotStrategy

string

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

  • NoSpot: regular pay-as-you-go instances.

  • SpotWithPriceLimit: spot instances with a maximum price limit.

  • SpotAsPriceGo: spot instances whose price automatically follows the current market price.

NoSpot

Amount

integer

The number of instances in the list of successfully created instance IDs.

1

InstanceIds

object

InstanceId

array

The list of successfully created instance IDs.

string

The list of successfully created instance IDs.

["i-bp67acfmxazb4p****"]

CandidateEvaluateLevel

string

The candidate success rate for the current instance type when CandidateOptions.Evaluate is set to true. Valid values: Low, Medium, and High.

Low

Examples

Success response

JSON format

{
  "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****\"]"
          ]
        },
        "CandidateEvaluateLevel": "Low"
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter %s The specified parameter is invalid.
400 InvalidAutoProvisioningGroupName.Malformed The specified parameter "AutoProvisioningGroupName" is not valid. The specified elastic provisioning group name AutoProvisioningGroupName is invalid.
400 InvalidAutoProvisioningGroupType.ValueNotSupported The specified parameter "AutoProvisioningGroupType" is not supported.
400 InvalidFleetExcessCapacityTerminationPolicy.ValueNotSupported The specified parameter "ExcessCapacityTerminationPolicy" is not supported.
400 InvalidDefaultTargetCapacityType.ValueNotSupported The specified parameter "DefaultTargetCapacityType" is not supported.
400 InvalidSpotAllocationStrategy.ValueNotSupported The specified parameter "SpotAllocationStrategy" is not supported.
400 InvalidSpotInstanceInterruptionBehavior.ValueNotSupported The specified parameter "SpotInstanceInterruptionBehavior" is not supported.
400 InvalidPayAsYouGoAllocationStrategy.ValueNotSupported The specified parameter "PayAsYouGoAllocationStrategy" is not supported.
400 MissingParameter.SpotAllocationStrategy The specified parameter "SpotAllocationStrategy" is empty.
400 MissingParameter.LaunchTemplateConfigs The specified parameter "LaunchTemplateConfigs" is empty. The specified LaunchTemplateConfigs parameter is empty
400 InvalidValidTime.MalFormed The specified parameter "ValidTime" is not supported.
400 InvalidLaunchTemplateVersion.ValueNotSupported The specified parameter "LaunchTemplateVersion" is not valid.
400 MissingParameter The specified parameter "AutoProvisioningGroup" should not be null.
400 InvalidRegion.ValueNotSupported The specified Region does not exist.
400 InvalidDescription.ValueNotSupported The specified description is illegal.
400 InvalidLaunchTemplate.ValueNotSupported The SecurityGroupId or imageId in LaunchTemplate is not exists. The security group ID or image ID in the launch template does not exist.
400 InvalidCapacity.ValueNotSupported The Capacity is illegal, or the TargetCapacity is large than SpotCapacity + PayAsYouGoCapacity.
400 InvalidInstanceType.ValueNotSupported The instanceType is illegal.
400 InternalError The request processing has failed due to some unknown error. An internal error has occurred. Try again later.
400 InvalidLaunchTemplateConfigs.SizeExceed The size of LaunchTemplateConfigs exceeds limit. The number of LaunchTemplateConfig in the elastic supply group exceeds the limit.
400 InvalidParameter.SpotInstancePoolsToUseCount The specified parameter "SpotInstancePoolsToUseCount" is not valid.
400 InvalidParameter.ResourceGroupId The specified parameter "ResourceGroupId" is not valid.
400 InvalidParameter.TargetCapacity The 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.
400 MissingParameter.WeightedCapacity The WeightedCapacity of LaunchTemplateConfig should not be empty.
400 InvalidParameter.WeightedCapacityBeyondRange The WeightedCaTpacity of LaunchTemplateConfig beyond permitted range.
400 InvalidParameter.MaxPrice The specified parameter "MaxSpotPrice" or "MaxPrice" of LaunchTemplateConfig is not valid.
400 NoPermission %s
400 Duplicate.DiskCategory The specified disk configs contains duplicate DiskCategory.
400 InvalidImageFamily.Confict The 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.
400 Invalid.ResourcePoolOptions.PrivatePoolIds The zone or instancetype of the ResourcePoolOptions.PrivatePoolIds does not match the LaunchTemplateConfig. The zone or instancetype of the ResourcePoolOptions.PrivatePoolIds does not match the LaunchTemplateConfig.
400 Invalid.ResourcePoolOptions.Strategy The specified ResourcePoolOptions.Strategy is invalid. The specified ResourcePoolOptions.Strategy is invalid.
400 Invalid.ResourcePoolOptionsPrivatePoolIds.SizeExceed The size of ResourcePoolOptions.PrivatePoolIds exceeds limit. The size of ResourcePoolOptions.PrivatePoolIds exceeds limit.
400 MissingParameter.ResourcePoolOptions.PrivatePoolIds The specified ResourcePoolOptions.PrivatePoolIds should not be null when ResourcePoolOptions.Strategy is PrivatePoolOnly. The specified ResourcePoolOptions.PrivatePoolIds should not be null when ResourcePoolOptions.Strategy is PrivatePoolOnly.
400 InvalidSpotDuration The specified SpotDuration is not valid. The specified SpotDuration parameter is invalid.
400 InvalidSpotInterruptionBehavior %s The specified SpotInterruptionBehavior parameter is not supported.
400 InvalidParameter.SecurityGroupIdRepeated The SecurityGroupId is repeated. Duplicate security group.
400 VpcMismatch.SecurityGroupAndVSwitch Specified security group and virtual switch are not in the same VPC. The specified security group is not in the same VPC as the VSwitch.
400 InvalidMinTargetCapacity.NotSatisfied The inventory of specified InstanceType does not meet the MinTargetCapacity. The inventory of specified InstanceType does not meet the MinTargetCapacity.
400 InvalidParameterRange.MinTargetCapacity The MinTargetCapacity exceeds the limit[0-TotalTargetCapacity]. The target minimum capacity exceeds the limit [0-total capacity].
400 InvalidUserData.Base64FormatInvalid The specified parameter UserData must be base64 encoded. The specified parameter UserData must be base64-encoded.
400 InvalidUserData.SizeExceeded The specified parameter UserData exceeds the size. The size of user data specified by the UserData parameter exceeds the upper limit.
400 InvalidAutoReleaseTime.Malformed The specified parameter AutoReleaseTime is not valid. The specified automatic release time AutoReleaseTime is invalid.
400 QuotaExceeded.AutoProvisioningGroup The count of AutoProvisioningGroup exceeds the limit. The count of AutoProvisioningGroup exceeds the limit.
400 Invalid.PrivatePoolOptions.status The PrivatePool status is not valid. The specified private pool state is incorrect.
500 InternalError The request processing has failed due to some unknown error.
403 TotalTargetCapacityLimitExceed The TotalTargetCapacity exceeds the limit[0-2000]. The TotalTargetCapacity value exceeds the limit [0~2000].
403 SpotTargetCapacityLimitExceed The SpotTargetCapacity exceeds the limit[0-2000]. SpotTargetCapacity exceeds limit [0-2000].
403 PayAsYouGoTargetCapacityLimitExceed The PayAsYouGoTargetCapacity exceeds the limit[0-2000]. PayAsYouGoTargetCapacity capacity exceeds limit [0~2000].
403 OperationDenied.NoStock The resource is out of stock in the specified zone. Please try other types, or choose other regions and zones. The requested resources are unavailable in the specified zone. Try a different resource type or select a different region or zone.
403 CandidateDenied.NoStock The resource is out of stock and there are no candidate resources in the specified zone. Please try other types, or choose other regions and zones. The resources of the current instance type have been sold out and there are no candidate resources in the near future. Please select another instance type or zone as required.
404 InvalidResourcePoolOptionsPrivatePoolIds.NotFound The ResourcePoolOptions.PrivatePoolIds do not exist. The ResourcePoolOptions.PrivatePoolIds do not exist.
404 InvalidSecurityGroupId.NotFound The SecurityGroupId %s provided does not exist in our records. The security group provided does not exist.
404 InvalidVSwitchId.NotFound The specified virtual switch %s does not exist. The specified switch does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.