You can call this operation to query the scheduling tasks of an auto provisioning group.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
AutoProvisioningGroupId String Yes apg-uf6jel2bbl62wh13****

The ID of the auto provisioning group for which to query scheduling tasks.

RegionId String Yes cn-hangzhou

The region ID of the auto provisioning group.

Action String No DescribeAutoProvisioningGroupHistory

The operation that you want to perform. Set this parameter to DescribeAutoProvisioningGroupHistory.

EndTime String No 2019-06-20T15:10:20Z

The end of the time range where the data is queried. The period of time between this point in time and the point in time specified by StartTime is the time range for query.

StartTime String No 2019-04-01T15:10:20Z

The beginning of the time range where the data is queried. The period of time between this point in time and the point in time specified by EndTime is the time range for query.

Response parameters

Parameter Type Example Description
AutoProvisioningGroupHistories

The information about all scheduling tasks.

  └ActivityDetails

The detailed information about a single scheduling task.

    └Detail String New ECS instances "i-instanc****, i-instanc****" created.

The execution details of instance creation performed by a single scheduling task.

    └Status String Successful

The execution status of instance creation performed by a single scheduling task. Valid values:

  • Successful: Instances are created.
  • Failed: Instances failed to be created.
  • InProgress: Instances are being created.
  • Warning: Partial instances are created.
  └LastEventTime String 2019-04-01T15:10:20Z

The execution time of the last instance creation performed by a single scheduling task.

  └StartTime String 2019-04-01T15:10:20Z

The execution time of a single scheduling task.

  └Status String success

The execution status of a single scheduling task. Valid values:

  • prepare: The scheduling task is being executed.
  • success: The scheduling task is executed.
  • failed: The scheduling task failed to be executed.
  └TaskId String apg-task-uf60****

The ID of the scheduling task.

PageNumber Integer 1

The number of the page returned.

PageSize Integer 10

The number of entries returned on each page.

RequestId String B48A12CD-1295-4A38-A8F0-0E92C937****

The ID of the request.

TotalCount Integer 10

The number of queried scheduling tasks in the auto provisioning group.

Examples

Sample requests


http(s)://ecs.aliyuncs.com/? Action=DescribeAutoProvisioningGroupHistory
&AutoProvisioningGroupId=apg-uf6jel2bbl62wh13****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<DescribeAutoProvisioningGroups>
  <PageNumber>1</PageNumber>
  <TotalCount>1</TotalCount>
  <PageSize>10</PageSize>
  <RequestId>85331AC9-82C0-4604-9A14-048865BE7603</RequestId>
  <AutoProvisioningGroupHistorys>
    <AutoProvisioningGroupHistory>
      <Status>success</Status>
      <ActivityDetails>
        <ActivityDetail/>
      </ActivityDetails>
      <LastEventTime>2019-06-17T08:48:00Z</LastEventTime>
      <StartTime>2019-06-17T08:47:52Z</StartTime>
      <TaskId>apg-task-uf66bqtabg10wcf6****</TaskId>
    </AutoProvisioningGroupHistory>
  </AutoProvisioningGroupHistorys>
</DescribeAutoProvisioningGroups>

JSON format

{
	"PageNumber":1,
	"TotalCount":1,
	"PageSize":10,
	"RequestId":"BA55349F-6E36-4E64-964B-419515D1****",
	"AutoProvisioningGroupHistorys":{
		"AutoProvisioningGroupHistory":[
			{
				"Status":"success",
				"LastEventTime":"2019-06-17T08:48:00Z",
				"ActivityDetails":{
					"ActivityDetail":[]
				},
				"TaskId":"apg-task-uf66bqtabg10wcf6****",
				"StartTime":"2019-06-17T08:47:52Z"
			}
		]
	}
}

Error codes

HTTP status code Error code Error message Description
403 Forbidden.RAM User not authorized to operate on the specified resource, or this API doesn't support RAM. The error message returned because the RAM user is not authorized.
400 MissingParamter.RegionId The regionId should not be null. The error message returned because the RegionId parameter is not specified.

View error codes