edit-icon download-icon

Query a scaling activity

Last Updated: Sep 19, 2018


Queries a scaling activity.

  • You can specify a scaling group ID to query all scaling activities in this scaling group.
  • You can filter the query results based on the scaling activity status.
  • Only scaling activities during the last 30 days can be returned.

Request parameters

Name Type Required Description
Action String Yes Operation interface name, required parameter. Value: DescribeScalingActivities
RegionId String Yes Region of the scaling activity
ScalingGroupId String No Scaling group ID
ScalingActivityId.N String No Scaling group ID. You can enter up to 10 IDs.
Invalid scaling group IDs are neglected in the query results, and no error is reported.
StatusCode String No Scaling activity status. Optional values:
- Successful: Successful scaling activities.
- Warning: Partially successful scaling activities.
- Failed: Failed scaling activities.
- InProgress. Scaling activities in progress.
- Rejected: The scaling activity request is rejected.
PageNumber Integer No Page number of the scaling activity list starting from 1. The default value is 1.
PageSize Integer No When querying by page, this parameter indicates the number of lines per page. Maximum value: 50; default value: 10

Return parameters

Name Type Description
TotalCount Integer Total number of the scaling activities
PageNumber Integer Current page number
PageSize Integer Number of lines per page
ScalingActivities ScalingActivitySetType Set of the scaling activity information

ScalingActivities is a set consisting of the ScalingActivityItemType:

Name Type Description
ScalingActivity ScalingActivityItemType Scaling activity information

Attributes of the ScalingActivityItemType are introduced as follows:

Name Type Description
ScalingActivityId String Scaling activity ID
ScalingGroupId String Scaling group ID
Description String Description on the scaling activity
Cause String Cause that triggers the scaling activity
StartTime String Start time of the scaling activity
EndTime String End time of the scaling activity
Progress Integer Running speed of the scaling activity
StatusCode String Current status of the scaling activity
StatusMessage String Message about the scaling activity status


Request example

  1. http://ess.aliyuncs.com/?Action=DescribeScalingActivities
  2. &RegionId=cn-qingdao
  3. &PageSize=50
  4. &<Public Request Parameters>

Return example

XML format

  1. <DescribeScalingActivitiesResponse>
  2. <RequestId>8FAAE99E-EB43-4838-85AD-93F62454904C</RequestId>
  3. <TotalCount>1</TotalCount>
  4. <PageNumber>1</PageNumber>
  5. <PageSize>10</PageSize>
  6. <ScalingActivities>
  7. <ScalingActivity>
  8. <Cause>A scheduled task excuete scaling rule "srtest", changing the Total Capacity from "0" to "1".</Cause>
  9. <Description>Add "1" ECS instance</Description>
  10. <EndTime>2014-08-17T12:39Z</EndTime>
  11. <Progress>100</Progress>
  12. <ScalingActivityId>ebta5WbUzC8gcwUWvfchyT4U</ScalingActivityId>
  13. <ScalingGroupId>AG6CQdPU8OKdwLjgZcJ2eaQ</ScalingGroupId>
  14. <StartTime>2014-08-17T12:39Z</StartTime>
  15. <StatusCode>Successful</StatusCode>
  16. <StatusMessage>"1" ECS instances is added. </StatusMessage>
  17. </ScalingActivity>
  18. </ScalingActivities>
  19. </DescribeScalingActivitiesResponse>

JSON format

  1. {
  2. "RequestId":"0A016AD6-A91F-4210-9DEE-D5BBD4270F45",
  3. "TotalCount":2582,
  4. "PageNumber":1,
  5. "PageSize":1,
  6. "ScalingActivities":{
  7. "ScalingActivity":[
  8. {
  9. "ScalingActivityId":"bBxOR5dhKFoccGkbTrcyHE2g",
  10. "StartTime":"2014-08-18T20:49Z",
  11. "EndTime":"2014-08-18T20:49Z",
  12. "Cause":" A scheduled task excuete scaling rule \"srtest\", changing the Total Capacity from \"0\" to \"1\".",
  13. "Description":" Add \"1\" ECS instance ",
  14. "Progress":100,
  15. "ScalingGroupId":"c7acXJbAJmpPcGE7G3bwwbS9",
  16. "StatusCode":"Successful",
  17. "StatusMessage":"\"1\" ECS instances is added. "
  18. }
  19. ]
  20. },
  21. }

Error code

For errors common to all interfaces, see Client Error Table or Server Error Table.

Thank you! We've received your feedback.