All Products
Search
Document Center

Auto Scaling:DescribeScalingActivities

Last Updated:Sep 17, 2026

Queries the details of scaling activities by calling the DescribeScalingActivities operation. You can use this operation to view the results of scaling activities triggered by scheduled tasks, event-triggered tasks, or manual execution of scaling rules. For example, you can view the status, cause, and total number of instances after the change for a scaling activity.

Operation description

Operation description

  • You can specify a scaling group ID to query all scaling activities in the scaling group.

  • You can filter query results by the status of scaling activities.

  • You can query scaling activities within the last 30 days.

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

ess:DescribeScalingActivities

get

*ScalingGroup

acs:ess:{#regionId}:{#accountId}:scalinggroup/{#ScalingGroupId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the scaling group to which the scaling activities belong.

cn-hangzhou

PageNumber

integer

No

The page number of the scaling activity list. Minimum value: 1.

Default value: 1.

1

PageSize

integer

No

The number of entries per page for a paged query. 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 either ScalingGroupId or ScalingActivityId.N. An error is returned if neither parameter is specified.

asg-bp18p2yfxow2dloq****

StatusCode

string

No

The status of the scaling activity. Valid values:

  • Successful: The scaling activity was executed successfully.

  • Warning: The scaling activity was partially successful.

  • Failed: The scaling activity failed.

  • InProgress: The scaling activity is being executed.

  • Rejected: The request to execute the scaling activity was rejected.

Successful

ScalingActivityId

array

No

The IDs of the scaling activities that you want to query.

Note

When you call this operation, you must specify either ScalingGroupId or ScalingActivityId.N. An error is returned if neither parameter is specified.

string

No

The ID of the scaling activity that you want to query.

Note

When you call this operation, you must specify either ScalingGroupId or ScalingActivityId.N. An error is returned if neither parameter is specified.

asa-bp161xudmuxdzofe****

InstanceRefreshTaskId

string

No

The ID of the instance refresh task. You can specify this parameter to query the list of scaling activities associated with the instance refresh task.

ir-a12ds234fasd*****

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

CC107349-57B7-4405-B1BF-9BF5AF7F****

PageNumber

integer

The current page number.

1

PageSize

integer

The number of entries per page.

10

TotalCount

integer

The total number of scaling activities.

1

ScalingActivities

object

ScalingActivity

array<object>

The collection of scaling activity information.

array<object>

The collection of scaling activity information.

Progress

integer

The execution progress of the scaling activity.

100

ScalingInstanceNumber

integer

  • If the scaling activity is a scale-out activity, this parameter indicates the number of instances that were created or started from the Economical Mode (Stopped) state during the scaling activity.

  • If the scaling activity is a scale-in activity, this parameter indicates the number of instances that were deleted or entered the Economical Mode (Stopped) state during the scaling activity.

1

AttachedCapacity

string

The total number of instances that were manually added to the scaling group after the scaling activity was complete.

0

TotalCapacity

string

The total number of instances in the scaling group after the scaling activity was complete.

2

ScalingGroupId

string

The ID of the scaling group.

asg-bp18p2yfxow2dloq****

AutoCreatedCapacity

string

The total number of instances in the scaling group that were subject to automatic creation by the scaling group after the scaling activity was executed.

2

EndTime

string

The end time of the scaling activity.

2020-09-10T09:54Z

StartTime

string

The start time of the scaling activity.

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: The scaling activity was executed successfully.

  • Warning: The scaling activity was partially successful.

  • Failed: The scaling activity failed.

  • InProgress: The scaling activity is being executed.

  • Rejected: The request to execute the scaling activity was rejected.

Successful

Cause

string

The cause that triggered the scaling activity.

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 created during the current scaling activity.

1

DestroyedCapacity

integer

The number of instances released during the current scaling activity.

1

StartedCapacity

integer

The number of instances started from the Economical Mode (Stopped) state during the current scaling activity.

1

StoppedCapacity

integer

The number of instances that entered the Economical Mode (Stopped) state during the current scaling activity.

1

CreatedInstances

object

CreatedInstance

array

The list of instances created during the current scaling activity.

string

The list of instances created during the current scaling activity.

[ "i-abc1", "i-abc2" ]

DestroyedInstances

object

DestroyedInstance

array

The list of instances released during the current scaling activity.

string

The list of instances released during the current scaling activity.

[ "i-abc1", "i-abc2" ]

StartedInstances

object

StartedInstance

array

The list of instances started from the Economical Mode (Stopped) state during the current scaling activity.

string

The list of instances started from the Economical Mode (Stopped) state during the current scaling activity.

[ "i-abc1", "i-abc2" ]

StoppedInstances

object

StoppedInstance

array

The list of instances that entered the Economical Mode (Stopped) state during the current scaling activity.

string

The list of instances that entered the Economical Mode (Stopped) state during the current scaling activity.

[ "i-abc1", "i-abc2" ]

ErrorCode

string

The error code returned when the scaling activity failed.

OperationDenied.NoStock

ErrorMessage

string

The error message returned when the scaling activity failed.

The specified ECS resource is out of stock in this region. Please try again later.

Detail

string

The detailed information of the scaling activity.

"new ECS instances "i-j6c8ilerw, i-j6c8iler4mx" are created."

TriggerSourceType

string

The type of the trigger source for the scaling activity. Valid values:

  • Cms: The scaling activity was triggered by an event-triggered task.

  • Api: The scaling activity was triggered by a user through an API call.

  • Ess: The scaling activity was triggered by a system task.

Api

TriggerSourceId

string

The ID of the trigger source for the scaling activity. Valid values:

  • Cms trigger source ID: the ID of the event-triggered task.

  • Api trigger source ID: the UID of the Alibaba Cloud account or RAM user.

  • Ess trigger source ID: empty.

2346366580*****

LifecycleHookContext

object

The context information of lifecycle hooks.

DisableLifecycleHook

boolean

Indicates whether all lifecycle hooks are disabled for the scaling activity. Valid values:

  • true: Disabled.

  • false: Not disabled.

false

IgnoredLifecycleHookIds

object

IgnoredLifecycleHookId

array

The list of lifecycle hook IDs that are disabled for the scaling activity.

string

The list of lifecycle hook IDs that are disabled for the scaling activity.

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

object

ErrorMessages

array<object>

The error messages returned when the scaling activity failed or was partially successful.

array<object>

Description

string

The exception description of the scaling activity.

Fail to create instances into scaling group.

Code

string

The error code returned when the scaling activity failed or was partially successful.

OperationDenied.NoStock

Message

string

The error messages returned when the scaling activity failed or was partially successful.

The resource is out of stock in the specified zone. Please try other types, or choose other regions and zones.

FailedInstanceIds

object

FailedInstanceIds

array

The list of failed instance IDs.

string

The instance ID.

i-8vbedazhjj6a6******

Examples

Success response

JSON format

{
  "RequestId": "CC107349-57B7-4405-B1BF-9BF5AF7F****",
  "PageNumber": 1,
  "PageSize": 10,
  "TotalCount": 1,
  "ScalingActivities": {
    "ScalingActivity": [
      {
        "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": {
          "CreatedInstance": [
            "[ \"i-abc1\", \"i-abc2\" ]"
          ]
        },
        "DestroyedInstances": {
          "DestroyedInstance": [
            "[ \"i-abc1\", \"i-abc2\" ]"
          ]
        },
        "StartedInstances": {
          "StartedInstance": [
            "[ \"i-abc1\", \"i-abc2\" ]"
          ]
        },
        "StoppedInstances": {
          "StoppedInstance": [
            "[ \"i-abc1\", \"i-abc2\" ]"
          ]
        },
        "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": {
            "IgnoredLifecycleHookId": [
              "ash-bp14zolna43z266bq***"
            ]
          }
        },
        "ActivityMetadata": "{\\\"goatscaler.io/managed\\\":\\\"true\\\"}",
        "InstanceRefreshTaskId": "ir-asdf12adsxg*****",
        "ErrorMessages": {
          "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": {
                "FailedInstanceIds": [
                  "i-8vbedazhjj6a6******"
                ]
              }
            }
          ]
        }
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.