All Products
Search
Document Center

Elastic Compute Service:DescribeAutoProvisioningGroups

Last Updated:Apr 29, 2026

Queries one or more Auto Provisioning Groups.

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:DescribeAutoProvisioningGroups

get

*All Resource

*

None

None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The ID of the region where the auto provisioning group is located.

cn-hangzhou

PageNumber

integer

No

The page number to return.

Start value: 1.

Default value: 1.

1

PageSize

integer

No

The number of entries to return per page.

Maximum value: 100.

Default value: 10.

2

AutoProvisioningGroupName

string

No

The name of the auto provisioning group.

testAutoProvisioningGroupName

ResourceGroupId

string

No

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

rg-bp67acfmxazb4p****

AutoProvisioningGroupId

array

No

The IDs of the auto provisioning groups. You can specify up to 20 IDs.

apg-sn54avj8htgvtyh8****

string

No

The ID of the auto provisioning group.

apg-sn54avj8htgvtyh8****

AutoProvisioningGroupStatus

array

No

The statuses of the auto provisioning groups.

active

string

No

The status of the auto provisioning group. Valid values:

  • submitted: The auto provisioning group is created but has not started scheduling tasks.

  • active: The auto provisioning group is executing scheduling tasks.

  • deleted: The auto provisioning group is deleted.

  • delete-running: The auto provisioning group is being deleted.

  • modifying: The auto provisioning group is being modified.

active

Tag

array<object>

No

The tags used to filter auto provisioning groups. You can specify up to 20 tags.

object

No

Key

string

No

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

TestKey

Value

string

No

The value of the tag. The value can be up to 128 characters in length and can be an empty string. It cannot contain http:// or https://.

TestValue

Response elements

Element

Type

Description

Example

object

PageSize

integer

The number of entries per page.

10

RequestId

string

The request ID.

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

PageNumber

integer

The page number.

1

TotalCount

integer

The total number of auto provisioning groups found.

10

AutoProvisioningGroups

object

The auto provisioning groups.

AutoProvisioningGroup

array<object>

Details about the auto provisioning groups.

array<object>

Details of the auto provisioning group.

CreationTime

string

The time when the auto provisioning group was created.

2019-04-01T15:10:20Z

AutoProvisioningGroupName

string

The name of the auto provisioning group.

EcsDocTest

Status

string

The status of the auto provisioning group. Valid values:

  • submitted: The auto provisioning group is created but has not started scheduling tasks.

  • active: The auto provisioning group is executing scheduling tasks.

  • deleted: The auto provisioning group is deleted.

  • delete-running: The auto provisioning group is being deleted.

  • modifying: The auto provisioning group is being modified.

submitted

TerminateInstances

boolean

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

false

MaxSpotPrice

number

The maximum price for preemptible instances.

Note

If you specify MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice, the lower value of the two parameters is used.

The LaunchTemplateConfig.N.MaxPrice parameter is set when the auto provisioning group is created and cannot be modified.

2

State

string

The state of the auto provisioning group. Valid values:

  • fulfilled: The scheduling task is complete and the instance cluster is provisioned.

  • pending-fulfillment: The instances are being created.

  • pending-termination: The instances are being removed.

  • error: An error occurred during scheduling and the instance cluster failed to be provisioned.

fulfilled

LaunchTemplateId

string

The ID of the launch template.

lt-bp1fgzds4bdogu03****

ValidFrom

string

The time when the auto provisioning group starts. The combination of ValidFrom and ValidUntil determines the validity period of the auto provisioning group.

2019-04-01T15:10:20Z

LaunchTemplateVersion

string

The version of the launch template.

1

TerminateInstancesWithExpiration

boolean

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

  • true: Releases the instances.

  • false: Removes the instances from the auto provisioning group but does not release them.

true

RegionId

string

The region ID of the auto provisioning group.

cn-hangzhou

ValidUntil

string

The time when the auto provisioning group expires. The combination of ValidFrom and ValidUntil determines the validity period of the auto provisioning group.

2019-06-01T15:10:20Z

AutoProvisioningGroupType

string

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

  • request: one-time delivery. After the auto provisioning group is started, it delivers the instance cluster only once. If the instances fail to be delivered, the group does not retry the delivery.

  • maintain: continuous delivery. After the auto provisioning group is started, it attempts to deliver the instance cluster and monitors the real-time capacity. If the target capacity is not reached, the group continues to create ECS instances.

maintain

AutoProvisioningGroupId

string

The ID of the auto provisioning group.

apg-sn54avj8htgvtyh8****

ExcessCapacityTerminationPolicy

string

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

  • termination: releases the scaled-in instances.

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

termination

ResourceGroupId

string

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

rg-bp67acfmxazb4p****

LaunchTemplateConfigs

object

The extended configurations of the launch template.

LaunchTemplateConfig

array<object>

The details of the extended launch template.

object

MaxPrice

number

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

3

Priority

number

The priority of the instance type in the extended launch template. A value of 0 indicates the highest priority.

1

VSwitchId

string

The vSwitch ID of the instance type in the extended launch template.

vsw-sn5bsitu4lfzgc5o7****

WeightedCapacity

number

The weight of the instance type in the extended launch template.

2

InstanceType

string

The instance type in the extended launch template.

ecs.g5.large

SpotOptions

object

The policies related to preemptible instances.

InstancePoolsToUseCount

integer

The number of lowest-priced instance types that the auto provisioning group selects to create instances.

Note

This parameter is set when the auto provisioning group is created and cannot be modified.

2

AllocationStrategy

string

The policy for creating preemptible instances. Valid values:

  • lowest-price: cost-optimized 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 the zones that are specified in the extended launch template and distributes the instances evenly across the zones.

diversified

InstanceInterruptionBehavior

string

The action to be performed after the excess preemptible instances are stopped. Valid values:

  • stop: stops the instances.

  • terminate: releases the instances.

stop

PayAsYouGoOptions

object

The policies related to pay-as-you-go instances.

AllocationStrategy

string

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

  • lowest-price: cost-optimized 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.

Note

The LaunchTemplateConfig.N.Priority parameter is set when the auto provisioning group is created and cannot be modified.

prioritized

TargetCapacitySpecification

object

The target capacity of the auto provisioning group.

SpotTargetCapacity

number

The target capacity of preemptible instances.

20

PayAsYouGoTargetCapacity

number

The target capacity of pay-as-you-go instances.

30

DefaultTargetCapacityType

string

The billing method of the balance of capacity when the sum of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than TotalTargetCapacity. Valid values:

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

  • Spot: preemptible instances.

Spot

TotalTargetCapacity

number

The total target capacity of the auto provisioning group. The capacity consists of the following three parts:

  • PayAsYouGoTargetCapacity

  • SpotTargetCapacity

  • The balance of capacity other than PayAsYouGoTargetCapacity and SpotTargetCapacity.

60

Tags

object

Tag

array<object>

The tags that are added to the auto provisioning group.

object

The tags that are added to the auto provisioning group.

TagKey

string

The key of tag N that is added to the auto provisioning group.

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 aliyun or acs:. It cannot contain http:// or https://.

TestKey

TagValue

string

The value of tag N that is added to the auto provisioning group.

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

TestValue

CandidateOptions

object

TimeoutMinutes

integer

60

CapacitySpecification

object

PayAsYouGoCapacity

number

2

PrePaidCapacity

number

0

SpotCapacity

number

3

TotalCapacity

number

5

SuspendedProcesses

object

SuspendedProcess

array

string

ScaleOut

Examples

Success response

JSON format

{
  "PageSize": 10,
  "RequestId": "745CEC9F-0DD7-4451-9FE7-8B752F39****",
  "PageNumber": 1,
  "TotalCount": 10,
  "AutoProvisioningGroups": {
    "AutoProvisioningGroup": [
      {
        "CreationTime": "2019-04-01T15:10:20Z",
        "AutoProvisioningGroupName": "EcsDocTest",
        "Status": "submitted",
        "TerminateInstances": false,
        "MaxSpotPrice": 2,
        "State": "fulfilled",
        "LaunchTemplateId": "lt-bp1fgzds4bdogu03****",
        "ValidFrom": "2019-04-01T15:10:20Z",
        "LaunchTemplateVersion": "1",
        "TerminateInstancesWithExpiration": true,
        "RegionId": "cn-hangzhou",
        "ValidUntil": "2019-06-01T15:10:20Z",
        "AutoProvisioningGroupType": "maintain",
        "AutoProvisioningGroupId": "apg-sn54avj8htgvtyh8****",
        "ExcessCapacityTerminationPolicy": "termination",
        "ResourceGroupId": "rg-bp67acfmxazb4p****",
        "LaunchTemplateConfigs": {
          "LaunchTemplateConfig": [
            {
              "MaxPrice": 3,
              "Priority": 1,
              "VSwitchId": "vsw-sn5bsitu4lfzgc5o7****",
              "WeightedCapacity": 2,
              "InstanceType": "ecs.g5.large"
            }
          ]
        },
        "SpotOptions": {
          "InstancePoolsToUseCount": 2,
          "AllocationStrategy": "diversified",
          "InstanceInterruptionBehavior": "stop"
        },
        "PayAsYouGoOptions": {
          "AllocationStrategy": "prioritized"
        },
        "TargetCapacitySpecification": {
          "SpotTargetCapacity": 20,
          "PayAsYouGoTargetCapacity": 30,
          "DefaultTargetCapacityType": "Spot",
          "TotalTargetCapacity": 60
        },
        "Tags": {
          "Tag": [
            {
              "TagKey": "TestKey",
              "TagValue": "TestValue"
            }
          ]
        },
        "CandidateOptions": {
          "TimeoutMinutes": 60
        },
        "CapacitySpecification": {
          "PayAsYouGoCapacity": 2,
          "PrePaidCapacity": 0,
          "SpotCapacity": 3,
          "TotalCapacity": 5
        },
        "SuspendedProcesses": {
          "SuspendedProcess": [
            "ScaleOut"
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400

MissingParamter.RegionId

The regionId should not be null.

The RegionId parameter is required.

400

InvalidName.Malformed

The specified parameter "AutoProvisioningGroupName" is not valid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.