All Products
Search
Document Center

Elastic Compute Service:DescribeAutoProvisioningGroups

Last Updated:Sep 29, 2024

Queries the information of one or more 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

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:DescribeAutoProvisioningGroupsget
  • All Resources
    *
    none
none

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
Tagarray<object>No

The tags that are added to the auto provisioning group.

objectNo
KeystringNo

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. The tag key can be up to 128 characters in length and cannot contain http:// or https://. The tag key cannot start with acs: or aliyun.

TestKey
ValuestringNo

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

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

TestValue

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
AutoProvisioningGroupsarray<object>

Details about the auto provisioning groups.

AutoProvisioningGroupobject
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 status 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 to release instances in the auto provisioning group when the auto provisioning group is deleted. Valid values:

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

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

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

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

2
Statestring

The overall status 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 of the auto provisioning group exceeds the target capacity and the group is triggered to scale in. Valid values:

  • termination: releases the scaled-in instances.
  • 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****
LaunchTemplateConfigsarray<object>

Details about the extended configurations.

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

  • lowest-price: cost optimization policy. This policy indicates that the lowest-priced instance type is 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 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 that the auto provisioning group provisions.

20
PayAsYouGoTargetCapacityfloat

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

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
Tagsarray<object>

The tags that are added to the auto provisioning group.

Tagobject
TagKeystring

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. The tag key can be up to 128 characters in length and cannot contain http:// or https://. The tag key cannot start with acs: or aliyun.

TestKey
TagValuestring

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. The tag value can be up to 128 characters in length and cannot contain http:// or https://.

TestValue

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 changedView Change Details
2024-01-04The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details