DescribeScalingPolicies

Last updated: 2020-03-06 20:45:54

    1. API Description

    Domain name for API request: as.tencentcloudapi.com.

    This API (DescribeScalingPolicies) is used to query alarm trigger policies.

    A maximum of 20 requests can be initiated per second for this API.

    Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: as.ap-shanghai-fsi.tencentcloudapi.com

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common parameter. The value used for this API: DescribeScalingPolicies.
    Version Yes String Common parameter. The value used for this API: 2018-04-19.
    Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
    AutoScalingPolicyIds.N No Array of String Queries by one or more alarm policy IDs in the format of asp-i9vkg894. The maximum number of instances per request is 100. This parameter does not support specifying both AutoScalingPolicyIds and Filters at the same time.
    Filters.N No Array of Filter Filter.
  • auto-scaling-policy-id - String - Required: No - (Filter) Filter by alarm policy ID.
  • auto-scaling-group-id - String - Required: No - (Filter) Filter by auto scaling group ID.
  • scaling-policy-name - String - Required: No - (Filter) Filter by alarm policy name.

  • The maximum number of Filters per request is 10. The upper limit for Filter.Values is 5. This parameter does not support specifying both AutoScalingPolicyIds and Filters at the same time.
    Limit No Integer Number of returned results. Default value: 20. Maximum value: 100. For more information on Limit, see the relevant section in the API overview.
    Offset No Integer Offset. Default value: 0. For more information on Offset, see the relevant section in the API overview.

    3. Output Parameters

    Parameter Name Type Description
    ScalingPolicySet Array of ScalingPolicy List of AS alarm trigger policy details.
    TotalCount Integer Number of eligible notifications.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying Alarm Trigger Policies

    Input Example

    https://as.tencentcloudapi.com/?Action=DescribeScalingPolicies
    &AutoScalingPolicyIds.0=asp-5zffv598
    &<common request parameters>

    Output Example

    {
      "Response": {
        "TotalCount": 1,
        "ScalingPolicySet": [
          {
            "AutoScalingGroupId": "asg-gbqa1n66",
            "AutoScalingPolicyId": "asp-5zffv598",
            "Cooldown": 100,
            "ScalingPolicyName": "cpu-test",
            "AdjustmentType": "CHANGE_IN_CAPACITY",
            "MetricAlarm": {
              "Period": 60,
              "ContinuousTime": 5,
              "ComparisonOperator": "GREATER_THAN_OR_EQUAL_TO",
              "Statistic": "AVERAGE",
              "Threshold": 60,
              "MetricName": "CPU_UTILIZATION"
            },
            "NotificationUserGroupIds": [],
            "AdjustmentValue": 10
          }
        ],
        "RequestId": "351dd0ef-27bc-4312-9287-48cd0835274b"
      }
    }

    5. Developer Resources

    API Explorer

    This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InvalidFilter Invalid filter.
    InvalidParameter.Conflict Multiple parameters specified conflict and cannot co-exist.
    LimitExceeded Quota limit is exceeded.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help