All Products
Search
Document Center

Elastic Compute Service:DescribeAutoProvisioningGroupHistory

Last Updated:Apr 29, 2026

Call DescribeAutoProvisioningGroupHistory to query the history of scheduling tasks for an auto provisioning group.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:DescribeAutoProvisioningGroupHistory

get

*All Resource

*

None

None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The ID of the region where the Auto Provisioning Group is located.

cn-hangzhou

PageNumber

integer

No

The page number. Pages start from page 1.

Default value: 1.

1

PageSize

integer

No

The number of entries per page. Maximum value: 100.

Default value: 10.

5

AutoProvisioningGroupId

string

Yes

The ID of the auto provisioning group.

apg-bp67acfmxazb4p****

StartTime

string

No

The beginning of the time range to query the scheduling history. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2019-04-01T15:10:20Z

EndTime

string

No

The end of the time range to query the scheduling history. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2019-06-20T15:10:20Z

Response elements

Element

Type

Description

Example

object

PageSize

integer

The number of entries per page.

10

RequestId

string

The request ID.

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

PageNumber

integer

The page number.

1

TotalCount

integer

The total number of scheduled tasks.

10

AutoProvisioningGroupHistories

object

An array of scheduled task history records.

AutoProvisioningGroupHistory

array<object>

An array of scheduled task history records.

array<object>

Status

string

The status of a scheduled task. Valid values:

  • prepare: The scheduled task is in progress.

  • success: The scheduled task succeeded.

  • failed: The scheduled task failed.

success

StartTime

string

The time when the scheduled task started.

2019-04-01T15:10:20Z

TaskId

string

The ID of the scheduled task.

apg-task-bp67acfmxazb4p****

LastEventTime

string

The execution time of the last instance creation activity.

2019-04-01T15:10:20Z

ActivityDetails

object

An array of instance creation activities within the scheduled task.

ActivityDetail

array<object>

An array of instance creation activities within the scheduled task.

array<object>

Status

string

The status of an instance creation activity. Valid values:

  • Successful: The instance creation activity succeeded.

  • Failed: The instance creation activity failed.

  • InProgress: The instance creation activity is in progress.

  • Warning: The instance creation activity was partially successful.

Successful

Detail

string

A human-readable summary of the activity.

New ECS instances "i-bp67acfmxazb4p****, i-bp67acfmxazb5p****" created.

CreatedInstanceIds

object

The IDs of the created instances.

CreatedInstanceId

array

The ID of a created instance.

string

The ID of a created instance.

i-123xxxyyy

DestroyedInstanceIds

object

The IDs of the released instances.

DestroyedInstanceId

array

The ID of a released instance.

string

The ID of a released instance.

i-werq2xxdfs

ErrorMessages

object

The error messages returned if the instance creation activity fails.

ErrorMessage

array<object>

The error messages returned if the instance creation activity fails.

array<object>

Code

string

The error code.

InvalidSecurityGroupId.NotFound

Message

string

The error message.

The specified SecurityGroupId "sg-bp1d8modxxxxx" is not found.

FailedInstanceIds

object

The IDs of the failed instances.

FailedInstanceId

array

The IDs of the failed instances.

string

The ID of a failed instance.

i-sdf234sdf23

Examples

Success response

JSON format

{
  "PageSize": 10,
  "RequestId": "B48A12CD-1295-4A38-A8F0-0E92C937****",
  "PageNumber": 1,
  "TotalCount": 10,
  "AutoProvisioningGroupHistories": {
    "AutoProvisioningGroupHistory": [
      {
        "Status": "success",
        "StartTime": "2019-04-01T15:10:20Z",
        "TaskId": "apg-task-bp67acfmxazb4p****",
        "LastEventTime": "2019-04-01T15:10:20Z",
        "ActivityDetails": {
          "ActivityDetail": [
            {
              "Status": "Successful",
              "Detail": "New ECS instances \"i-bp67acfmxazb4p****, i-bp67acfmxazb5p****\" created.",
              "CreatedInstanceIds": {
                "CreatedInstanceId": [
                  "i-123xxxyyy"
                ]
              },
              "DestroyedInstanceIds": {
                "DestroyedInstanceId": [
                  "i-werq2xxdfs"
                ]
              },
              "ErrorMessages": {
                "ErrorMessage": [
                  {
                    "Code": "InvalidSecurityGroupId.NotFound",
                    "Message": "The specified SecurityGroupId \"sg-bp1d8modxxxxx\" is not found.",
                    "FailedInstanceIds": {
                      "FailedInstanceId": [
                        "i-sdf234sdf23"
                      ]
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400

MissingParameter

The specified parameter "AutoProvisioningGroupId" should not be null.

Elastic Supply Group Id(AutoProvisioningGroupId) must be filled in.

400

MissingParamter.RegionId

The regionId should not be null.

The RegionId parameter is required.

400

InvalidParameter.periodTime

The format of startTime or endTime is invalid.

403

Forbidden.RAM

User not authorized to operate on the specified resource, or this API doesn't support RAM.

404

InvalidAutoProvisioningGroupId.NotFound

The specified AutoProvisioningGroupId does not exist.

The specified elastic supply group does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.