tencent cloud



Last updated: 2023-08-07 17:53:20

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.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

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 Params. The value used for this API: DescribeScalingPolicies.
Version Yes String Common Params. The value used for this API: 2018-04-19.
Region No String Common Params. This parameter is not required for this API.
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 Filters.
  • auto-scaling-policy-id - String - Optional - Filter by the alarm policy ID.
  • auto-scaling-group-id - String - Optional - Filter by the scaling group ID.
  • scaling-policy-name - String - Optional - Filter by the alarm policy name.
  • scaling-policy-type - String - Optional - Filter by the alarm policy type. Valid values: SIMPLE, TARGET_TRACKING.

  • The maximum number of Filters per request is 10. The upper limit for Filter.Values is 5. You cannot specify 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 a simple policy

    This example shows you how to query a simple alarm triggering policy by a specific policy ID.

    Input Example

    POST / HTTP/1.1
    Host: as.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeScalingPolicies
    <Common request parameters>
        "AutoScalingPolicyIds": [

    Output Example

        "Response": {
            "TotalCount": 1,
            "ScalingPolicySet": [
                    "EstimatedInstanceWarmup": null,
                    "MetricAlarms": null,
                    "AutoScalingGroupId": "asg-9dn1a5y6",
                    "PredefinedMetricType": null,
                    "ScalingPolicyType": "SIMPLE",
                    "DisableScaleIn": null,
                    "AutoScalingPolicyId": "asp-7mme2ule",
                    "NotificationUserGroupIds": [],
                    "Cooldown": 666,
                    "ScalingPolicyName": "simple_policy_test",
                    "AdjustmentType": "CHANGE_IN_CAPACITY",
                    "MetricAlarm": {
                        "ComparisonOperator": "GREATER_THAN",
                        "Period": 60,
                        "ContinuousTime": 5,
                        "Threshold": 20,
                        "Statistic": "AVERAGE",
                        "PreciseThreshold": 20,
                        "MetricName": "CPU_UTILIZATION"
                    "TargetValue": null,
                    "AdjustmentValue": 3
            "RequestId": "297c6ed3-aa1c-43f4-be0f-10e513a86e6e"

    5. Developer Resources


    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
    InternalError.CallMonitorError Monitor API call failed.
    InternalError.RequestError An internal request error occurred.
    InvalidParameter.ActionNotFound Invalid Action request.
    InvalidParameter.Conflict Multiple parameters specified conflict and cannot co-exist.
    InvalidParameterValue.InvalidAutoScalingGroupId Invalid scaling group ID.
    InvalidParameterValue.InvalidAutoScalingPolicyId Invalid alarm-triggered policy ID.
    InvalidParameterValue.InvalidFilter Invalid filter condition.
    LimitExceeded The quota limit is exceeded.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support