All Products
Search
Document Center

:DescribeAutoProvisioningGroups

更新時間:Dec 20, 2023

Queries auto provisioning groups.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes DescribeAutoProvisioningGroups

The operation that you want to perform. Set the value to DescribeAutoProvisioningGroups.

RegionId String Yes cn-hangzhou

The region ID of the auto provisioning group.

PageNumber Integer No 1

The page number.

Pages start from page 1.

Default value: 1.

PageSize Integer No 2

The number of entries per page.

Valid values: 1 to 100.

Default value: 10.

AutoProvisioningGroupName String No testAutoProvisioningGroupName

The name of the auto provisioning group.

AutoProvisioningGroupId.N String No apg-sn54avj8htgvtyh8****

The ID of auto provisioning group N.

AutoProvisioningGroupStatus.N String No active

The status of auto provisioning group N. Valid values:

  • submitted: The auto provisioning group is created but does not 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.

Response parameters

Parameter

Type

Example

Description

PageSize Integer 10

The number of entries per page.

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

The ID of the request.

PageNumber Integer 1

The page number.

TotalCount Integer 10

The number of queried auto provisioning groups.

AutoProvisioningGroups Array of AutoProvisioningGroup

The details of the auto provisioning groups.

AutoProvisioningGroup
CreationTime String 2019-04-01T15:10:20Z

The time when the auto provisioning group was created.

AutoProvisioningGroupName String EcsDocTest

The name of the auto provisioning group.

Status String submitted

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.
  • deleted-running: The auto provisioning group was being deleted.
  • modifying: The auto provisioning group was being modified.
TerminateInstances Boolean false

Indicates whether the instances in the auto provisioning group were released when the auto provisioning group was deleted. Valid values:

  • true: releases the instances.
  • false: only removes the instances from the auto provisioning group but does not release them.
MaxSpotPrice Float 2

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

Note If you specify both the MaxSpotPrice and LaunchTemplateConfig.N.MaxPrice parameters, the maximum price is the lower value of the two parameters.

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

State String fulfilled

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

  • fulfilled: Scheduling was complete and the instance cluster was delivered.
  • pending-fulfillment: The instances were being created.
  • pending-termination: The instances were being removed.
  • error: An exception occurred during scheduling and the instance cluster was not delivered.
LaunchTemplateId String lt-bp1fgzds4bdogu03****

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

ValidFrom String 2019-04-01T15:10:20Z

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

LaunchTemplateVersion String 1

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

TerminateInstancesWithExpiration Boolean true

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

  • true: releases the instances.
  • false: only removes the instances from the auto provisioning group but does not release them.
RegionId String cn-hangzhou

The region ID of the auto provisioning group.

ValidUntil String 2019-06-01T15:10:20Z

The expiration time of the auto provisioning group. The provisioning group is started from the point in time specified by the ValidFrom parameter.

AutoProvisioningGroupType String maintain

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

  • request: one-time delivery. When the auto provisioning group starts, 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, it attempts to deliver an instance cluster that meets 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.
AutoProvisioningGroupId String apg-sn54avj8htgvtyh8****

The ID of the auto provisioning group.

ExcessCapacityTerminationPolicy String termination

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: released the scaled-in instances.
  • no-termination: removed the scaled-in instances from the auto provisioning group, but did not release the instances.
LaunchTemplateConfigs Array of LaunchTemplateConfig

The details of the extended configurations.

LaunchTemplateConfig
MaxPrice Float 3

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

Priority Float 1

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

VSwitchId String vsw-sn5bsitu4lfzgc5o7****

The ID of the vSwitch specified in the extended configuration.

WeightedCapacity Float 2

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

InstanceType String ecs.g5.large

The instance type that is specified in the extended configuration.

SpotOptions Object

The policy related to preemptible instances.

InstancePoolsToUseCount Integer 2

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.
AllocationStrategy String diversified

The provisioning policy for preemptible instances. Valid values:

  • lowest-price: the 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.
InstanceInterruptionBehavior String stop

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.
PayAsYouGoOptions Object

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

AllocationStrategy String prioritized

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

  • lowest-price: the cost optimization policy. This policy indicates that lowest-cost instance types are used to create 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.
TargetCapacitySpecification Object

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

SpotTargetCapacity Float 20

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

PayAsYouGoTargetCapacity Float 30

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

DefaultTargetCapacityType String Spot

The billing method of supplemental instances when the target capacity of the auto provisioning group must be at least the sum (TotalTargetCapacity) 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
TotalTargetCapacity Float 60

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.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DescribeAutoProvisioningGroups
&AutoProvisioningGroupId.1=apg-sn54avj8htgvtyh8****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeAutoProvisioningGroups>
  <PageNumber>1</PageNumber>
  <TotalCount>1</TotalCount>
  <PageSize>10</PageSize>
  <RequestId>85331AC9-82C0-4604-9A14-048865BE****</RequestId>
  <AutoProvisioningGroups>
    <AutoProvisioningGroup>
      <TerminateInstancesWithExpiration>false</TerminateInstancesWithExpiration>
      <TerminateInstances>false</TerminateInstances>
      <ValidFrom>2019-06-17T15:22Z</ValidFrom>
      <AutoProvisioningGroupType>maintain</AutoProvisioningGroupType>
      <PayAsYouGoOptions>
        <AllocationStrategy>lowest-price</AllocationStrategy>
      </PayAsYouGoOptions>
      <AutoProvisioningGroupName>test61****</AutoProvisioningGroupName>
      <CreationTime></CreationTime>
      <ExcessCapacityTerminationPolicy>no-termination</ExcessCapacityTerminationPolicy>
      <Status>active</Status>
      <MaxSpotPrice>5</MaxSpotPrice>
      <LaunchTemplateVersion>1</LaunchTemplateVersion>
      <ValidUntil>2100-01-01T07:59Z</ValidUntil>
      <TargetCapacitySpecification>
        <SpotTargetCapacity>180</SpotTargetCapacity>
        <TotalTargetCapacity>300</TotalTargetCapacity>
        <PayAsYouGoTargetCapacity>120</PayAsYouGoTargetCapacity>
        <DefaultTargetCapacityType>PayAsYouGo</DefaultTargetCapacityType>
      </TargetCapacitySpecification>
      <State>fulfilled</State>
      <LaunchTemplateId>lt-uf657o6auob6aivd****</LaunchTemplateId>
      <RegionId>cn-shanghai</RegionId>
      <AutoProvisioningGroupId>apg-uf6c7pl7b30t4m98****</AutoProvisioningGroupId>
      <SpotOptions>
        <InstancePoolsToUseCount>1</InstancePoolsToUseCount>
        <InstanceInterruptionBehavior>terminate</InstanceInterruptionBehavior>
        <AllocationStrategy>lowest-price</AllocationStrategy>
      </SpotOptions>
      <LaunchTemplateConfigs>
        <LaunchTemplateConfig>
          <MaxPrice>3</MaxPrice>
          <WeightedCapacity>1</WeightedCapacity>
          <VSwitchId>vsw-uf6qbjwokzl67uqqf****</VSwitchId>
          <Priority>1</Priority>
          <InstanceType>ecs.c5.xlarge</InstanceType>
        </LaunchTemplateConfig>
        <LaunchTemplateConfig>
          <MaxPrice>2</MaxPrice>
          <WeightedCapacity>2</WeightedCapacity>
          <VSwitchId>vsw-uf6n6iy1ib39eqvph****</VSwitchId>
          <Priority>1</Priority>
          <InstanceType>ecs.g5.large</InstanceType>
        </LaunchTemplateConfig>
        <LaunchTemplateConfig>
          <MaxPrice>1</MaxPrice>
          <WeightedCapacity>3</WeightedCapacity>
          <VSwitchId>vsw-uf6gs8uerj5osels4****</VSwitchId>
          <Priority>1</Priority>
          <InstanceType>ecs.hfc5.large</InstanceType>
        </LaunchTemplateConfig>
      </LaunchTemplateConfigs>
    </AutoProvisioningGroup>
  </AutoProvisioningGroups>
</DescribeAutoProvisioningGroups>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "PageNumber" : 1,
  "TotalCount" : 1,
  "PageSize" : 10,
  "RequestId" : "85331AC9-82C0-4604-9A14-048865BE****",
  "AutoProvisioningGroups" : {
    "AutoProvisioningGroup" : {
      "TerminateInstancesWithExpiration" : false,
      "TerminateInstances" : false,
      "ValidFrom" : "2019-06-17T15:22Z",
      "AutoProvisioningGroupType" : "maintain",
      "PayAsYouGoOptions" : {
        "AllocationStrategy" : "lowest-price"
      },
      "AutoProvisioningGroupName" : "test61****",
      "CreationTime" : "",
      "ExcessCapacityTerminationPolicy" : "no-termination",
      "Status" : "active",
      "MaxSpotPrice" : 5,
      "LaunchTemplateVersion" : 1,
      "ValidUntil" : "2100-01-01T07:59Z",
      "TargetCapacitySpecification" : {
        "SpotTargetCapacity" : 180,
        "TotalTargetCapacity" : 300,
        "PayAsYouGoTargetCapacity" : 120,
        "DefaultTargetCapacityType" : "PayAsYouGo"
      },
      "State" : "fulfilled",
      "LaunchTemplateId" : "lt-uf657o6auob6aivd****",
      "RegionId" : "cn-shanghai",
      "AutoProvisioningGroupId" : "apg-uf6c7pl7b30t4m98****",
      "SpotOptions" : {
        "InstancePoolsToUseCount" : 1,
        "InstanceInterruptionBehavior" : "terminate",
        "AllocationStrategy" : "lowest-price"
      },
      "LaunchTemplateConfigs" : {
        "LaunchTemplateConfig" : [ {
          "MaxPrice" : 3,
          "WeightedCapacity" : 1,
          "VSwitchId" : "vsw-uf6qbjwokzl67uqqf****",
          "Priority" : 1,
          "InstanceType" : "ecs.c5.xlarge"
        }, {
          "MaxPrice" : 2,
          "WeightedCapacity" : 2,
          "VSwitchId" : "vsw-uf6n6iy1ib39eqvph****",
          "Priority" : 1,
          "InstanceType" : "ecs.g5.large"
        }, {
          "MaxPrice" : 1,
          "WeightedCapacity" : 3,
          "VSwitchId" : "vsw-uf6gs8uerj5osels4****",
          "Priority" : 1,
          "InstanceType" : "ecs.hfc5.large"
        } ]
      }
    }
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 MissingParamter.RegionId The regionId should not be null. RegionId is required.

For a list of error codes, see Service error codes.