Queries scaling activities triggered by scheduled tasks, event-triggered tasks, or manual execution of scaling rules. You can view the status, cause, and total number of instances after a scaling activity is complete.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:DescribeScalingActivities |
get |
*ScalingGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the scaling group. |
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: 50. Default value: 10. |
10 |
| ScalingGroupId |
string |
No |
The ID of the scaling group. Note
When you call this operation, you must specify one of the following parameters: |
asg-bp18p2yfxow2dloq**** |
| StatusCode |
string |
No |
The status of the scaling activity. Valid values:
|
Successful |
| ScalingActivityIds |
array |
No |
The IDs of the scaling activities. Note
When you call this operation, you must specify one of the following parameters: |
|
|
string |
No |
The ID of the scaling activity. Note
When you call this operation, you must specify one of the following parameters: |
asa-bp161xudmuxdzofe**** |
|
| InstanceRefreshTaskId |
string |
No |
The ID of the instance refresh task. If specified, this operation returns the scaling activities associated with the task. |
ir-a12ds234fasd***** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
CC107349-57B7-4405-B1BF-9BF5AF7F2A46 |
| PageNumber |
integer |
The page number of the returned page. |
1 |
| PageSize |
integer |
The number of entries returned per page. |
10 |
| TotalCount |
integer |
The total number of scaling activities. |
1 |
| ScalingActivities |
array<object> |
The scaling activities. |
|
|
array<object> |
The scaling activity. |
||
| Progress |
integer |
The execution progress of the scaling activity. |
100 |
| ScalingInstanceNumber |
integer |
|
1 |
| AttachedCapacity |
string |
The total number of instances that are manually added to the scaling group after the scaling activity is complete. |
0 |
| TotalCapacity |
string |
The total number of instances in the scaling group after the scaling activity is complete. |
2 |
| ScalingGroupId |
string |
The ID of the scaling group. |
asg-bp18p2yfxow2dloq**** |
| AutoCreatedCapacity |
string |
The total number of instances that are created by Auto Scaling after the scaling activity is complete. |
2 |
| EndTime |
string |
The time when the scaling activity is complete. |
2020-09-10T09:54Z |
| StartTime |
string |
The time when the scaling activity started. |
2020-09-10T09:54Z |
| Description |
string |
The description of the scaling activity. |
Add \"1\" ECS instance |
| StatusCode |
string |
The status of the scaling activity. Valid values:
|
Successful |
| Cause |
string |
The reason why the scaling activity was triggered. |
A user requests to execute scaling rule \"asr-bp12tcnol686y1ik****\", changing the Total Capacity from \"1\" to \"2\". |
| ScalingActivityId |
string |
The ID of the scaling activity. |
asa-bp161xudmuxdzofe**** |
| StatusMessage |
string |
The status message of the scaling activity. |
\"1\" ECS instances are added |
| CreatedCapacity |
integer |
The number of instances that are created during the scale-out event. |
1 |
| DestroyedCapacity |
integer |
The number of instances that are released during the scale-in event. |
1 |
| StartedCapacity |
integer |
The number of instances that are started from the Economical Mode during the scale-out event. |
1 |
| StoppedCapacity |
integer |
The number of instances that are stopped in the Economical Mode during the scale-in event. |
1 |
| CreatedInstances |
array |
The instances that are created during the scale-out event. |
|
|
string |
The instances that are created during the scale-out event. |
["i-abc1","i-abc2"] |
|
| DestroyedInstances |
array |
The instances that are released during the scale-in event. |
|
|
string |
The instances that are released during the scale-in event. |
[ "i-abc1", "i-abc2" ] |
|
| StartedInstances |
array |
The instances that are started from the Economical Mode during the scale-out event. |
|
|
string |
The instances that are started from the Economical Mode during the scale-out event. |
[ "i-abc1", "i-abc2" ] |
|
| StoppedInstances |
array |
The instances that are stopped in the Economical Mode during the scale-in event. |
|
|
string |
The instances that are stopped in the Economical Mode during the scale-in event. |
[ "i-abc1", "i-abc2" ] |
|
| ErrorCode |
string |
The error code that is returned when the scaling activity failed. |
OperationDenied.NoStock |
| ErrorMessage |
string |
The error message that is returned when the scaling activity failed. |
The specified ECS resource is out of stock in this region. Please try again later. |
| Detail |
string |
Details of the scaling activity. |
"new ECS instances "i-j6c8ilerw, i-j6c8iler4mx" are created." |
| TriggerSourceType |
string |
The type of the trigger source of the scaling activity. Valid values:
|
Api |
| TriggerSourceId |
string |
The ID of the trigger source of the scaling activity. Valid values:
|
2346366580***** |
| LifecycleHookContext |
object |
The context of the lifecycle hook. |
|
| DisableLifecycleHook |
boolean |
Indicates whether all lifecycle hooks are disabled when the scaling activity is triggered.
|
false |
| IgnoredLifecycleHookIds |
array |
The IDs of the lifecycle hooks that are disabled. |
|
|
string |
The ID of the lifecycle hook that is disabled. |
ash-bp14zolna43z266bq*** |
|
| ActivityMetadata |
string |
The metadata of the scaling activity. |
{\"goatscaler.io/managed\":\"true\"} |
| InstanceRefreshTaskId |
string |
The ID of the instance refresh task. |
ir-asdf12adsxg***** |
| ErrorMessages |
array<object> |
The error messages that are returned when the scaling activities failed or are partially successful. |
|
|
object |
|||
| Description |
string |
The description of the scaling activity exception. |
Fail to create instances into scaling group. |
| Code |
string |
The error code that is returned when the scaling activity failed. |
OperationDenied.NoStock |
| Message |
string |
The error message that is returned when the scaling activity failed or is partially successful. |
The resource is out of stock in the specified zone. Please try other types, or choose other regions and zones. |
| FailedInstanceIds |
array |
The IDs of the instances included in the failed scaling activities. |
|
|
string |
The ID of the instance included in the failed scaling activity. |
i-8vbedazhjj6a6****** |
Examples
Success response
JSON format
{
"RequestId": "CC107349-57B7-4405-B1BF-9BF5AF7F2A46",
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 1,
"ScalingActivities": [
{
"Progress": 100,
"ScalingInstanceNumber": 1,
"AttachedCapacity": "0",
"TotalCapacity": "2",
"ScalingGroupId": "asg-bp18p2yfxow2dloq****",
"AutoCreatedCapacity": "2",
"EndTime": "2020-09-10T09:54Z",
"StartTime": "2020-09-10T09:54Z",
"Description": "Add \\\"1\\\" ECS instance",
"StatusCode": "Successful",
"Cause": "A user requests to execute scaling rule \\\"asr-bp12tcnol686y1ik****\\\", changing the Total Capacity from \\\"1\\\" to \\\"2\\\".",
"ScalingActivityId": "asa-bp161xudmuxdzofe****",
"StatusMessage": "\\\"1\\\" ECS instances are added",
"CreatedCapacity": 1,
"DestroyedCapacity": 1,
"StartedCapacity": 1,
"StoppedCapacity": 1,
"CreatedInstances": [
"[\"i-abc1\",\"i-abc2\"]"
],
"DestroyedInstances": [
"[\n \"i-abc1\",\n \"i-abc2\"\n]"
],
"StartedInstances": [
"[\n \"i-abc1\",\n \"i-abc2\"\n]"
],
"StoppedInstances": [
"[\n \"i-abc1\",\n \"i-abc2\"\n]"
],
"ErrorCode": "OperationDenied.NoStock",
"ErrorMessage": "The specified ECS resource is out of stock in this region. Please try again later.",
"Detail": "\"new ECS instances \"i-j6c8ilerw, i-j6c8iler4mx\" are created.\"",
"TriggerSourceType": "Api",
"TriggerSourceId": "2346366580*****",
"LifecycleHookContext": {
"DisableLifecycleHook": false,
"IgnoredLifecycleHookIds": [
"ash-bp14zolna43z266bq***\n"
]
},
"ActivityMetadata": "{\\\"goatscaler.io/managed\\\":\\\"true\\\"}",
"InstanceRefreshTaskId": "ir-asdf12adsxg*****",
"ErrorMessages": [
{
"Description": "Fail to create instances into scaling group.",
"Code": "OperationDenied.NoStock",
"Message": "The resource is out of stock in the specified zone. Please try other types, or choose other regions and zones.",
"FailedInstanceIds": [
"i-8vbedazhjj6a6******"
]
}
]
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.