DescribeInstanceRefreshes
Queries the instance refresh tasks of a scaling group.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:DescribeInstanceRefreshes |
get |
*ScalingGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the scaling group. |
cn-hangzhou |
| NextToken |
string |
No |
The query token. Set the value to the NextToken value returned from the previous call. You do not need to specify this parameter for the first call. |
caeba0bbb2be03f84eb48b699f0a**** |
| MaxResults |
integer |
No |
The maximum number of entries to return per page in a paging query. Valid values: 1 to 50. Default value: 10. |
10 |
| ScalingGroupId |
string |
Yes |
The ID of the scaling group. |
asg-bp1ffogfdauy0jw0**** |
| InstanceRefreshTaskId |
array |
No |
The ID of the instance refresh task to query. |
|
|
string |
No |
The ID of instance refresh task N to query. Valid values of N: 1 to 20. |
ir-adfa12312***** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| NextToken |
string |
The token for the next query. An empty NextToken indicates that no more results are available. |
caeba0bbb2be03f84eb48b699f**** |
| MaxResults |
integer |
The maximum number of entries returned per page. |
50 |
| TotalCount |
integer |
The total number of instance refresh tasks. |
100 |
| InstanceRefreshTasks |
object |
||
| InstanceRefreshTask |
array<object> |
The list of instance refresh tasks. |
|
|
array<object> |
The instance refresh task. |
||
| InstanceRefreshTaskId |
string |
The ID of the instance refresh task. |
ir-1adfa123**** |
| ScalingGroupId |
string |
The ID of the scaling group. |
asg-bp16pbfcr8j9***** |
| RegionId |
string |
The region ID of the scaling group. |
cn-hangzhou |
| EndTime |
string |
The end time of the instance refresh task in ISO 8601 format. The time is in UTC. |
2024-08-22T02:09:00Z |
| StartTime |
string |
The start time of the instance refresh task in ISO 8601 format. The time is in UTC. |
2024-08-22T01:09:00Z |
| Status |
string |
The current status of the instance refresh task. Valid values:
|
InProgress |
| Detail |
string |
The specific cause of the failure when the instance refresh task fails. |
The task exceeded its maximum run time of one week. So the task failed. |
| MinHealthyPercentage |
integer |
The minimum percentage of instances that must remain healthy and in service relative to the capacity of the scaling group during the instance refresh. |
80 |
| MaxHealthyPercentage |
integer |
The maximum percentage by which the instance count can exceed the scaling group capacity during the instance refresh. |
120 |
| DesiredConfiguration |
object |
The desired configuration for the instance refresh. |
|
| ImageId |
string |
The ID of the image file. The image resource used for the automatic creation of instances. |
m-uf6g5noisr**** |
| ScalingConfigurationId |
string |
The ID of the scaling configuration. |
asc-wz91ibkhfor**** |
| LaunchTemplateId |
string |
The ID of the launch template used to specify the launch configuration for the scaling group. |
lt-2ze5x4mp***** |
| LaunchTemplateVersion |
string |
The version of the launch template. Valid values:
|
Latest |
| LaunchTemplateOverrides |
object |
||
| LaunchTemplateOverride |
array<object> |
The instance type overrides for the launch template. |
|
|
object |
The instance type overrides for the launch template. |
||
| InstanceType |
string |
The specified instance type, which overrides the instance type in the launch template. |
ecs.g7.2xlarge |
| Containers |
object |
||
| Container |
array<object> |
The list of containers included in the instance. |
|
|
array<object> |
The list of containers included in the instance. |
||
| Name |
string |
The custom name of the container. |
name |
| Image |
string |
The container image. |
registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:latest |
| Commands |
object |
||
| Command |
array |
The startup command of the container. |
|
|
string |
The startup command of the container. |
sleep |
|
| EnvironmentVars |
object |
||
| EnvironmentVar |
array<object> |
The environment variable information. |
|
|
object |
The environment variable information. |
||
| Key |
string |
The name of the environment variable. |
PATH |
| Value |
string |
The value of the environment variable. |
/usr/local/bin |
| FieldRefFieldPath |
string |
Note
This parameter is not available for use. |
fieldPath |
| Args |
object |
||
| Arg |
array |
The arguments for the container startup command. |
|
|
string |
The arguments for the container startup command. |
100 |
|
| FinishedUpdateCapacity |
integer |
The capacity that has been refreshed. |
10 |
| TotalNeedUpdateCapacity |
integer |
The total capacity that needs to be refreshed. |
20 |
| SkipMatching |
boolean |
Specifies whether to skip instances that match the desired configuration. Note
The system determines whether an instance matches based on the ID of the desired scaling configuration, without comparing specific configuration items. Valid values:
|
true |
| CheckpointPauseTime |
integer |
The pause duration when a refresh task checkpoint is reached. Unit: minutes. |
30 |
| Checkpoints |
object |
||
| Checkpoint |
array<object> |
The refresh task checkpoint. Specifies that the task is automatically paused for CheckpointPauseTime minutes when the percentage of new instances reaches the specified value during the instance refresh. |
|
|
object |
The refresh task checkpoint. Specifies that the task is automatically paused for CheckpointPauseTime minutes when the percentage of new instances reaches the specified value during the instance refresh. |
||
| Percentage |
integer |
The percentage of new instances relative to the total instances in the scaling group. The task is automatically paused when this percentage is reached. |
60 |
| Strategy |
string |
The execution strategy of the instance refresh task. Valid values: Rolling: Refreshes instances by creating new instances and releasing old ones. ReplaceSystemDisk: Updates the system disks of existing instances. |
Rolling |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"NextToken": "caeba0bbb2be03f84eb48b699f****",
"MaxResults": 50,
"TotalCount": 100,
"InstanceRefreshTasks": {
"InstanceRefreshTask": [
{
"InstanceRefreshTaskId": "ir-1adfa123****",
"ScalingGroupId": "asg-bp16pbfcr8j9*****",
"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****",
"LaunchTemplateId": "lt-2ze5x4mp*****",
"LaunchTemplateVersion": "Latest",
"LaunchTemplateOverrides": {
"LaunchTemplateOverride": [
{
"InstanceType": "ecs.g7.2xlarge"
}
]
},
"Containers": {
"Container": [
{
"Name": "name",
"Image": "registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:latest",
"Commands": {
"Command": [
"sleep"
]
},
"EnvironmentVars": {
"EnvironmentVar": [
{
"Key": "PATH",
"Value": "/usr/local/bin",
"FieldRefFieldPath": "fieldPath"
}
]
},
"Args": {
"Arg": [
"100"
]
}
}
]
}
},
"FinishedUpdateCapacity": 10,
"TotalNeedUpdateCapacity": 20,
"SkipMatching": true,
"CheckpointPauseTime": 30,
"Checkpoints": {
"Checkpoint": [
{
"Percentage": 60
}
]
},
"Strategy": "Rolling"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.