All Products
Search
Document Center

Elastic Compute Service:DescribeAutoProvisioningGroups

Last Updated:Mar 19, 2024

Queries information of auto provisioning groups.

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 region ID of the auto provisioning group.

cn-hangzhou
PageNumberintegerNo

The number of the page to return.

Pages start from page 1.

Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page.

Maximum value: 100.

Default value: 10.

2
AutoProvisioningGroupNamestringNo

The name of the auto provisioning group.

testAutoProvisioningGroupName
AutoProvisioningGroupIdarrayNo

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

stringNo

The ID of the auto provisioning group.

apg-sn54avj8htgvtyh8****
AutoProvisioningGroupStatusarrayNo

The status of the auto provisioning group.

stringNo

The status of auto provisioning group N. Valid values:

  • submitted: The auto provisioning group is created but has not started to execute scheduling tasks.
  • active: The auto provisioning group is executing scheduling tasks.
  • deleted: The auto provisioning group is deleted.
  • deleted-running: The auto provisioning group is being deleted.
  • modifying: The auto provisioning group is being modified.
active

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries returned per page.

10
RequestIdstring

The ID of the request.

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

The number of the page returned.

1
TotalCountinteger

The number of queried auto provisioning groups.

10
AutoProvisioningGroupsobject []

Details about the auto provisioning groups.

CreationTimestring

The creation time.

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

The name of the auto provisioning group.

EcsDocTest
Statusstring

The status of the auto provisioning group. Valid values:

  • submitted: The auto provisioning group is created but has not started to execute scheduling tasks.
  • active: The auto provisioning group is executing scheduling tasks.
  • deleted: The auto provisioning group is deleted.
  • deleted-running: The auto provisioning group is being deleted.
  • modifying: The auto provisioning group is being modified.
submitted
TerminateInstancesboolean

Indicates whether the instances in the auto provisioning group are released when the auto provisioning group is deleted. Valid values:

  • true: releases instances in the auto provisioning group.
  • false: retains instances in the auto provisioning group.
false
MaxSpotPricefloat

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

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

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

2
Statestring

The overall status of instance scheduling of the auto provisioning group. Valid values:

  • fulfilled: Scheduling is complete and the instance cluster is delivered.
  • pending-fulfillment: The instances are being created.
  • pending-termination: The instances are being removed.
  • error: An exception occurred during scheduling and the instance cluster is not delivered.
fulfilled
LaunchTemplateIdstring

The ID of the launch template associated with the auto provisioning group.

lt-bp1fgzds4bdogu03****
ValidFromstring

The time at which the auto provisioning group is started. The provisioning group is effective to the point in time specified by the ValidUntil parameter.

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

The version of the launch template associated with the auto provisioning group.

1
TerminateInstancesWithExpirationboolean

Indicates whether the instances in the auto provisioning group are released when the auto provisioning group expires. Valid values:

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

The region ID of the auto provisioning group.

cn-hangzhou
ValidUntilstring

The time at which the auto provisioning group expires. The provisioning group is started from the point in time specified by the ValidFrom parameter.

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

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

  • request: the one-time delivery. When the auto provisioning group is started, the system delivers clusters only once. If the clusters fail to be delivered, the system does not retry the delivery.
  • maintain: continuous delivery. When the auto provisioning group is started, the system delivers clusters until the target capacity is reached. The system also monitors the capacity in real time. If the target capacity of the auto provisioning group is not reached, the system continues creating ECS instances until the target capacity is reached.
maintain
AutoProvisioningGroupIdstring

The ID of the auto provisioning group.

apg-sn54avj8htgvtyh8****
ExcessCapacityTerminationPolicystring

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

  • termination: releases the removed instances.
  • no-termination: removes the instances from the auto provisioning group but does not release them.
termination
LaunchTemplateConfigsobject []

Details about the extended configurations.

MaxPricefloat

The maximum price of the instance type specified in the extended configurations.

3
Priorityfloat

The priority of the instance type specified in the extended configurations. A value of 0 indicates the highest priority.

1
VSwitchIdstring

The ID of the vSwitch specified in the extended configurations.

vsw-sn5bsitu4lfzgc5o7****
WeightedCapacityfloat

The weight of the instance type specified in the extended configurations.

2
InstanceTypestring

The instance type that is specified in the extended configurations.

ecs.g5.large
SpotOptionsobject

The policy related to preemptible instances.

InstancePoolsToUseCountinteger

The number of instances that the auto provisioning group creates by selecting the instance type of the lowest price.

Note This parameter is set when the auto provisioning group is created, and cannot be modified.
2
AllocationStrategystring

The policy for creating preemptible instances. Valid values:

  • lowest-price: the cost optimization policy. The auto provisioning group selects the instance type of the lowest price to create preemptible instances.
  • diversified: the balanced distribution policy. The auto provisioning group creates the instances in the zones that are specified in extended configurations and evenly distributes the instances across the zones.
diversified
InstanceInterruptionBehaviorstring

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

  • stop: retains the extra preemptible instances in the stopped state.
  • terminate: releases the excess preemptible instances.
stop
PayAsYouGoOptionsobject

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

AllocationStrategystring

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

  • lowest-price: the cost optimization policy. The auto provisioning group selects the instance type of the lowest price to create pay-as-you-go instances.
  • prioritized: the priority-based policy. This policy indicates that instances are created based on the priority specified by the LaunchTemplateConfig.N.Priority parameter.
Note The LaunchTemplateConfig.N.Priority parameter is set when the auto provisioning group is created, and cannot be modified.
prioritized
TargetCapacitySpecificationobject

The settings of the target capacity of the auto provisioning group.

SpotTargetCapacityfloat

The target capacity of preemptible instances in the auto provisioning group.

20
PayAsYouGoTargetCapacityfloat

The target capacity of pay-as-you-go instances in the auto provisioning group.

30
DefaultTargetCapacityTypestring

The billing method of supplemental instances. The target capacity of the auto provisioning group must be at least the sum of the pay-as-you-go instance capacity specified by the PayAsYouGoTargetCapacity parameter and the preemptible instance capacity specified by the SpotTargetCapacity parameter. Valid values:

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

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

  • PayAsYouGoTargetCapacity
  • SpotTargetCapacity
  • The supplemental capacity besides instance capacities specified by the PayAsYouGoTargetCapacity and SpotTargetCapacity parameters
60

Examples

Sample success responses

JSONformat

{
  "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",
        "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
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParamter.RegionIdThe regionId should not be null.The RegionId parameter is required.
400InvalidName.MalformedThe specified parameter "AutoProvisioningGroupName" is not valid.-

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

Change history

Change timeSummary of changesOperation
2024-02-29The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Tag
Output ParametersThe response structure of the API has changed.
2024-01-04The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ResourceGroupId
Output ParametersThe response structure of the API has changed.