All Products
Search
Document Center

Auto Scaling:DescribeInstanceRefreshes

Last Updated:Nov 11, 2024

Queries instance refresh tasks. If you want to view the basic information and execution progress of an instance refresh task, you can call the DescribeInstanceRefreshes operation.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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
ess:DescribeInstanceRefreshesget
  • ScalingGroup
    acs:ess:{#regionId}:{#accountId}:scalinggroup/{#ScalingGroupId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the scaling group to which the instance refresh task belongs.

cn-hangzhou
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.

caeba0bbb2be03f84eb48b699f0a****
MaxResultsintegerNo

The maximum number of entries per page. Valid values: 1 to 50. Default value: 10.

10
ScalingGroupIdstringNo

The ID of the scaling group.

Note When you call this operation, you must specify one of the following parameters: ScalingGroupId and InstanceRefreshTaskIds. You cannot specify both of them. If you specify neither of them, an error is reported.
asg-bp1ffogfdauy0jw0****
InstanceRefreshTaskIdsarrayNo

The IDs of the instance refresh tasks that you want to query.

stringNo

The ID of the instance refresh task that you want to query.

ir-adfa12312*****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results. If NextToken is empty, no next page exists.

caeba0bbb2be03f84eb48b699f****
MaxResultsinteger

The maximum number of entries per page.

50
TotalCountinteger

The total number of instance refresh tasks.

100
InstanceRefreshTasksarray<object>

The instance refresh tasks.

InstanceRefreshTaskobject

The instance refresh task.

ScalingGroupIdstring

The ID of the scaling group.

asg-bp16pbfcr8j9*****
InstanceRefreshTaskIdstring

The ID of the instance refresh task.

ir-1adfa123****
RegionIdstring

The region ID of the scaling group.

cn-hangzhou
EndTimestring

The end time of the instance refresh task.

2024-08-22T02:09:00Z
StartTimestring

The start time of the instance refresh task.

2024-08-22T01:09:00Z
Statusstring

The status of the instance refresh task. Valid values:

  • Pending: The instance refresh task is created and is waiting to be scheduled.
  • InProgress: The instance refresh task is being executed.
  • Paused: The instance refresh task is suspended.
  • Failed: The instance refresh task failed to be executed.
  • Successful: The instance refresh task is successful.
  • Cancelling: The instance refresh task is being canceled.
  • Cancelled: The instance refresh task is canceled.
  • RollbackInProgress: The instance refresh task is being rolled back.
  • RollbackSuccessful: The instance refresh task is rolled back.
  • RollbackFailed: The instance refresh task fails to be rolled back.
InProgress
Detailstring

The reason why the instance refresh task failed to be executed.

The task exceeded its maximum run time of one week. So the task failed.
MinHealthyPercentageinteger

The ratio of the number of instances that provide services to the total number of instances in the scaling group during instance refresh.

80
MaxHealthyPercentageinteger

The ratio by which the number of instances in the scaling group can exceed the upper limit for the number of instances in the scaling group during instance refresh.

120
DesiredConfigurationobject

The desired configurations of the instance refresh task.

ImageIdstring

The ID of the image file that provides the image resource for Auto Scaling to create instances.

m-uf6g5noisr****
ScalingConfigurationIdstring

The ID of the scaling configuration.

asc-wz91ibkhfor****
FinishedUpdateCapacityinteger

The refreshed number of instances in the scaling group.

10
TotalNeedUpdateCapacityinteger

The total number of instances whose configurations are refreshed.

20

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
  "NextToken": "caeba0bbb2be03f84eb48b699f****",
  "MaxResults": 50,
  "TotalCount": 100,
  "InstanceRefreshTasks": [
    {
      "ScalingGroupId": "asg-bp16pbfcr8j9*****",
      "InstanceRefreshTaskId": "ir-1adfa123****",
      "RegionId": "cn-hangzhou",
      "EndTime": "2024-08-22T02:09:00Z",
      "StartTime": "2024-08-22T01:09:00Z",
      "Status": "InProgress",
      "Detail": "The task exceeded its maximum run time of one week. So the task failed.",
      "MinHealthyPercentage": 80,
      "MaxHealthyPercentage": 120,
      "DesiredConfiguration": {
        "ImageId": "m-uf6g5noisr****",
        "ScalingConfigurationId": "asc-wz91ibkhfor****"
      },
      "FinishedUpdateCapacity": 10,
      "TotalNeedUpdateCapacity": 20
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.