Query a scaling rule

Last Updated: May 11, 2017

Description

Queries information of a scaling rule. You can query all scaling rules in a scaling group by specifying the scaling group ID.

Request parameters

Name Type Required? Description
Action String Yes Operation interface, required. The parameter value is DescribeScalingRules.
RegionId String Yes Region ID of the scaling group of a scaling rule.
ScalingGroupId String No Scaling group ID.
ScalingRuleId.N String No ID of a scaling rule. A maximum of 10 values can be entered. Invalid scaling rule IDs are neglected in the query result and no error is reported.
ScalingRuleName.N String No Name of a scaling rule. A maximum of 10 values can be entered. Invalid scaling rule names are neglected in the query result and no error is reported.
ScalingRuleAri.N String No Unique identifier of a scaling rule. A maximum of 10 values can be entered. Invalid unique identifiers of scaling rules are neglected in the query result and no error is reported.
PageNumber Integer No Page number of the scaling rule list. The initial value and default value are both 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 rules
PageNumber Integer Current page number
PageSize Integer Number of lines per page
ScalingRules ScalingRuleSetType Scaling rule information set

ScalingRuleSetType is a set of ScalingRuleItemTypes:

Name Type Description
ScalingRule ScalingRuleItemType Scaling rule information

The attributes of ScalingRuleItemType are listed below:

Name Type Description
ScalingRuleId String ID of a scaling rule
ScalingGroupId String Scaling group ID
ScalingRuleName String Name of a scaling rule
Cooldown Integer Cool-down time
AdjustmentType String Adjustment mode
AdjustmentValue Integer Adjustment value
ScalingRuleAri String Unique identifier of a scaling rule

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=DescribeScalingRules
  2. &RegionId=cn-qingdao
  3. &ScalingGroupId=AG6CQdPU8OKdwLjgZcJ2eaQ
  4. &PageSize=50
  5. &<Public Request Parameters>
Return example

XML format:

  1. <DescribeScalingRulesResponse>
  2. <PageNumber>1</PageNumber>
  3. <PageSize>50</PageSize>
  4. <ScalingRules>
  5. <ScalingRule>
  6. <AdjustmentType>QuantityChangeInCapacity</AdjustmentType>
  7. <AdjustmentValue>1</AdjustmentValue>
  8. <Cooldown>20</Cooldown>
  9. <ScalingGroupId>AG6CQdPU8OKdwLjgZcJ2eaQ</ScalingGroupId> <ScalingRuleAri>
  10. ari:acs:ess:cn-qingdao:1344371:scalingRule/eMKWG8SRNb9dBLAjweNI1Ik
  11. </ScalingRuleAri>
  12. <ScalingRuleId>eMKWG8SRNb9dBLAjweNI1Ik</ScalingRuleId> <ScalingRuleName>eMKWG8SRNb9dBLAjweNI1Ik</ScalingRuleName>
  13. </ScalingRule>
  14. </ScalingRules>
  15. <TotalCount>1</TotalCount>
  16. <RequestId>3306A40D-3412-4101-9F19-5F81E3055DAD</RequestId>
  17. </DescribeScalingRulesResponse>

JSON format:

  1. {
  2. "RequestId": "B583BFEF-A779-427A-9B74-262DDD249702",
  3. "TotalCount": 1,
  4. "PageNumber": 1,
  5. "PageSize": 10,
  6. "ScalingRules": {
  7. "ScalingRule": [
  8. {
  9. "ScalingRuleId": "efcqrZdjlookc0UkE3dA5I0a",
  10. "ScalingRuleAri": "ari:acs:ess:cn-qingdao:1344371:scalingRule/efcqrZdjlookc0UkE3dA5I0a",
  11. "Cooldown": 500,
  12. "ScalingGroupId": "ccMvs9dcZlE5c9CtrwbXzizr",
  13. "AdjustmentType": "TotalCapacity",
  14. "ScalingRuleName": "KFJoxGKXXt",
  15. "AdjustmentValue": 5
  16. }
  17. ]
  18. }
  19. }
Thank you! We've received your feedback.