Query a scaling group

Last Updated: May 11, 2017

Description

This operation queries the information of a scaling group. Scaling groups have the following life cycle states:

  • Active: In this state, the scaling group can receive scaling rule execution requests and trigger scaling activities.
  • Inactive: In this state, the scaling group does not receive scaling rule execution requests.
  • Deleting: The scaling group is being deleted and does not receive scaling rule execution requests.

Request parameters

Name Type Required? Description
Action String Yes Operation interface name, required parameter. Value: DescribeScalingGroups
RegionId String Yes ID of the region where the scaling group is located.
ScalingGroupId.N String No Scaling group ID. You can enter up to 20 IDs. Invalid scaling group IDs are not displayed in query results, and no error is reported.
ScalingGroupName.N String No Scaling group name. You can enter up to 20 names. Invalid scaling group names are not displayed in query results, and no error is reported.
PageNumber Integer No Page number of the scaling group list, staring from 1. Default value: 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 scaling groups
PageNumber Integer Current page number
PageSize Integer Number of lines per page
ScalingGroups ScalingGroupSetType Scaling group information set

ScalingGroupSetType is a set of ScalingGroupItemTypes:

Name Type Description
ScalingGroup ScalingGroupItemType Scaling group information

The attributes of ScalingGroupItemType are listed below:

Name Type Description
ScalingGroupId String Scaling group ID.
ScalingGroupName String Name shown for the scaling group.
ActiveScalingConfigurationId String ID of the active scaling configuration in the scaling group.
RegionId String ID of the region where the scaling group is located.
MinSize Integer Minimum number of ECS instances in the scaling group.
MaxSize Integer Maximum number of ECS instances in the scaling group.
DefaultCooldown Integer Default cool-down time of the scaling group.
RemovalPolicies RemovalPolicySetType A set of policies for removing ECS instances from the scaling group.
LoadBalancerId String ID of the Server Load Balancer instance.
DBInstanceIds DBInstanceIdSetType ID of the RDS instance.
VSwitchId String ID of the virtual switch corresponding to the scaling group.
LifecycleState String Status of the scaling group.
TotalCapacity Integer Total number of ECS instances in the scaling group.
ActiveCapacity Integer Number of ECS instances which have been attached to the scaling group and are running properly.
PendingCapacity Integer Number of ECS instances which are being attached to the scaling group with relevant configurations not completed.
RemovingCapacity Integer Number of ECS instances which are being removed from the scaling group.
CreationTime String Time when the scaling group is created.

RemovalPolicySetType is a set of String types:

Name Type Description
RemovalPolicy String Policy for removing ECS instances from the scaling group.

DBInstanceIdSetType is a set of String types:

Name Type Description
DBInstanceId String ID of the RDS instance

Error code

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

Example

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

XML format:

  1. <DescribeScalingGroupsResponse>
  2. <RequestId>6393C3A8-B611-42F2-AFA6-F080FC45D5D0</RequestId>
  3. <TotalCount>1</TotalCount>
  4. <PageNumber>1</PageNumber>
  5. <PageSize>10</PageSize>
  6. <ScalingGroups>
  7. <ScalingGroup>
  8. <ActiveCapacity>1</ActiveCapacity> <ActiveScalingConfigurationId>
  9. dyo713cNYIB4ddEVlKbcpOef
  10. </ActiveScalingConfigurationId>
  11. <DBInstanceIds>
  12. <DBInstanceId>rdszzzyyunybaeu</DBInstanceId>
  13. </DBInstanceIds>
  14. <VSwitchId>vpc-25j4god4l</VSwitchId>
  15. <DefaultCooldown>20</DefaultCooldown>
  16. <LifecycleState>Active</LifecycleState>
  17. <LoadBalancerId>147b46d767c-cn-qingdao-cm5-a01</LoadBalancerId>
  18. <MaxSize>1</MaxSize>
  19. <MinSize>0</MinSize>
  20. <PendingCapacity>0</PendingCapacity>
  21. <RegionId>cn-qingdao</RegionId>
  22. <RemovingCapacity>0</RemovingCapacity>
  23. <ScalingGroupId>dyrSuvBOtO1dEdIlIbplQb8</ScalingGroupId>
  24. <ScalingGroupName>dyrSuvBOtO1dEdIlIbplQb8</ScalingGroupName>
  25. <RemovalPolicies>
  26. <RemovalPolicy>OldestScalingConfiguration</RemovalPolicy>
  27. <RemovalPolicy>OldestInstance</RemovalPolicy>
  28. </RemovalPolicies>
  29. <TotalCapacity>1</TotalCapacity>
  30. <CreationTime>2014-08-14T10:58Z</CreationTime>
  31. </ScalingGroup>
  32. </ScalingGroups>
  33. </DescribeScalingGroupsResponse>

JSON format:

  1. {
  2. "RequestId": "68386699-8B9E-4D5B-BC4C-75A28F6C2A00",
  3. "TotalCount": 1,
  4. "PageSize": 10,
  5. "PageNumber": 1,
  6. "ScalingGroups": {
  7. "ScalingGroup": [
  8. {
  9. "ScalingGroupId": "b8pYCVbIV5k9cz4PWpbe0k19",
  10. "ScalingGroupName": "b8pYCVbIV5k9cz4PWpbe0k19",
  11. "RegionId": "cn-qingdao",
  12. "RemovingCapacity": 0,
  13. "DefaultCooldown": 300,
  14. "MinSize": 1,
  15. "MaxSize": 2,
  16. "LifecycleState": "Inactive",
  17. "ActiveScalingConfigurationId": " dyo713cNYIB4ddEVlKbcpOef",
  18. "LoadBalancerId": "147b46d767c-cn-qingdao-cm5-a01",
  19. "PendingCapacity": 0,
  20. "TotalCapacity": 0,
  21. "ActiveCapacity": 0,
  22. "CreationTime": "2014-08-14T10:58Z",
  23. "DBInstanceIds": {
  24. "DBInstanceId": [
  25. "rdsia3u3yia3u3y",
  26. "rdszzzyyunybaeu"
  27. ]
  28. },
  29. "VSwitchId":"vpc-25j4god4l",
  30. "RemovalPolicies": {
  31. "RemovalPolicy": [
  32. "OldestScalingConfiguration",
  33. "OldestInstance"
  34. ]
  35. }
  36. }
  37. ]
  38. }
  39. }
Thank you! We've received your feedback.