Queries auto provisioning groups.
Debugging
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:
|
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:
|
TerminateInstances | Boolean | false | Indicates whether the instances in the auto provisioning group were released when the auto provisioning group was deleted. Valid values:
|
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:
|
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 |
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:
|
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 |
AutoProvisioningGroupType | String | maintain | The delivery type of the auto provisioning group. Valid values:
|
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:
|
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:
|
InstanceInterruptionBehavior | String | stop | The action to be performed after the excess preemptible instances are stopped. Valid values:
|
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:
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 | Float | 60 | The target capacity of the auto provisioning group. The capacity consists of the following parts:
|
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.