All Products
Search
Document Center

Elastic Compute Service:DescribeAutoProvisioningGroups

Last Updated:Apr 11, 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 page number.

Pages start from page 1.

Default value: 1.

1
PageSizeintegerNo

The number of entries per page.

Valid values: 1 to 100.

Default value: 10.

2
AutoProvisioningGroupNamestringNo

The name of the auto provisioning group.

testAutoProvisioningGroupName
ResourceGroupIdstringNo

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

rg-bp67acfmxazb4p****
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 []

The details of the auto provisioning groups.

CreationTimestring

The time when the auto provisioning group was created.

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

The name of the auto provisioning group.

EcsDocTest
Statusstring

The state of the auto provisioning group. Valid values:

  • submitted: The auto provisioning group was created but did not execute scheduling tasks.
  • active: The auto provisioning group was executing scheduling tasks.
  • deleted: The auto provisioning group was deleted.
  • delete-running: The auto provisioning group was being deleted.
  • modifying: The auto provisioning group was 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 the instances.
  • false: retains the instances.
false
MaxSpotPricefloat

The maximum price for 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.

The value of LaunchTemplateConfig.N.MaxPrice is specified when the auto provisioning group is created, and the value cannot be modified.

2
Statestring

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

  • fulfilled: Scheduling was complete and the instances were delivered.
  • pending-fulfillment: The instances were being created.
  • pending-termination: The instances were being removed.
  • error: An exception occurred during scheduling and the instances were 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 until the point in time specified by ValidUntil.

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

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

1
TerminateInstancesWithExpirationboolean

Indicates 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 the instances.
true
RegionIdstring

The region ID of the auto provisioning group.

cn-hangzhou
ValidUntilstring

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 the ValidFrom parameter is the validity period of the auto provisioning group.

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

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

  • request: one-time delivery. When the auto provisioning group is started, it delivers instances only once. If the instances fail to be delivered, the auto provisioning group does not retry the delivery.
  • maintain: continuous delivery. When the auto provisioning group is started, it attempts to deliver instances that meet 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.
maintain
AutoProvisioningGroupIdstring

The ID of the auto provisioning group.

apg-sn54avj8htgvtyh8****
ExcessCapacityTerminationPolicystring

Indicates whether to release the scaled-in instances when the real-time capacity exceeds the target capacity and the group scales in. Valid values:

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

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

rg-bp67acfmxazb4p****
LaunchTemplateConfigsobject []

The details of the extended configurations.

MaxPricefloat

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

3
Priorityfloat

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

1
VSwitchIdstring

The ID of the vSwitch specified in the extended configuration.

vsw-sn5bsitu4lfzgc5o7****
WeightedCapacityfloat

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

2
InstanceTypestring

The instance type that is specified in the extended configuration.

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 provisioning policy for preemptible instances. Valid values:

  • lowest-price: cost optimization policy. This policy indicates that lowest-cost instance types are used to create instances.
  • diversified: balanced distribution policy. This policy indicates that instances are created evenly across multiple zones specified in the extended configuration.
diversified
InstanceInterruptionBehaviorstring

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

  • stop: retains the excess 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: cost optimization policy. This policy indicates that lowest-cost instance types are used to create instances.
  • prioritized: priority-based policy. This policy indicates that instances are created based on the priority specified by LaunchTemplateConfig.N.Priority.
Note The value of LaunchTemplateConfig.N.Priority is specified when the auto provisioning group is created, and the value 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 type of supplemental instances. When the sum of the PayAsYouGoTargetCapacity and SpotTargetCapacity values is less than the TotalTargetCapacity value, the auto provisioning group creates instances of the specified billing method to meet the target capacity. 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 PayAsYouGoTargetCapacity and SpotTargetCapacity.
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",
        "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"
            }
          ]
        }
      }
    ]
  }
}

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.