tencent cloud

Feedback

DescribeAutoScalingActivities

Last updated: 2024-12-03 17:50:38

    1. API Description

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

    This API (DescribeAutoScalingActivities) is used to query the activity history of an auto scaling group.

    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: DescribeAutoScalingActivities.
    Version Yes String Common Params. The value used for this API: 2018-04-19.
    Region Yes String Common Params. For more information, please see the list of regions supported by the product.
    ActivityIds.N No Array of String Queries by one or more scaling activity IDs in the format of asa-5l2ejpfo. The maximum quantity per request is 100. This parameter does not support specifying both ActivityIds and Filters at the same time.
    Filters.N No Array of Filter Filter.
  • auto-scaling-group-id - String - Required: No - (Filter) Filter by auto scaling group ID.
  • activity-status-code - String - Required: No - (Filter) Filter by scaling activity status . (INIT: initializing | RUNNING: running | SUCCESSFUL: succeeded | PARTIALLY_SUCCESSFUL: partially succeeded | FAILED: failed | CANCELLED: canceled)
  • activity-type - String - Required: No - (Filter) Filter by scaling activity type. (SCALE_OUT: scale-out | SCALE_IN: scale-in | ATTACH_INSTANCES: adding an instance | REMOVE_INSTANCES: terminating an instance | DETACH_INSTANCES: removing an instance | TERMINATE_INSTANCES_UNEXPECTEDLY: terminating an instance in the CVM console | REPLACE_UNHEALTHY_INSTANCE: replacing an unhealthy instance | UPDATE_LOAD_BALANCERS: updating a load balancer)
  • activity-id - String - Required: No - (Filter) Filter by scaling activity ID.

  • The maximum number of Filters per request is 10. The upper limit for Filter.Values is 5. This parameter does not support specifying both ActivityIds 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.
    StartTime No Timestamp ISO8601 The earliest start time of the scaling activity, which will be ignored if ActivityIds is specified. The value is in UTC time in the format of YYYY-MM-DDThh:mm:ssZ according to the ISO8601 standard.
    EndTime No Timestamp ISO8601 The latest end time of the scaling activity, which will be ignored if ActivityIds is specified. The value is in UTC time in the format of YYYY-MM-DDThh:mm:ssZ according to the ISO8601 standard.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Number of eligible scaling activities.
    ActivitySet Array of Activity Information set of eligible scaling activities.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Viewing the List of Scaling Activities by Using Filters

    Input Example

    POST / HTTP/1.1
    Host: as.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeAutoScalingActivities
    <Common request parameters>
    
    {
        "Filters": [
            {
                "Values": [
                    "asa-o4v87ae9"
                ],
                "Name": "activity-id"
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 1,
            "ActivitySet": [
                {
                    "Description": "Activity was launched in response to a difference between desired capacity and actual capacity, scale out 1 instance(s).",
                    "AutoScalingGroupId": "asg-2umy3jbd",
                    "RelatedInstanceSet": [
                        {
                            "InstanceId": "ins-q3ss14yo",
                            "InstanceStatus": "SUCCESSFUL"
                        }
                    ],
                    "LifecycleActionResultSet": [],
                    "DetailedStatusMessageSet": [],
                    "ActivityType": "SCALE_OUT",
                    "ActivityId": "asa-o4v87ae9",
                    "StartTime": "2018-11-20T08:33:56Z",
                    "CreatedTime": "2018-11-20T08:33:56Z",
                    "EndTime": "2018-11-20T08:34:52Z",
                    "Cause": "Activity was launched in response to a difference between desired capacity and actual capacity.",
                    "StatusMessageSimplified": "Success",
                    "StatusMessage": "Success",
                    "StatusCode": "SUCCESSFUL",
                    "InvocationResultSet": []
                }
            ],
            "RequestId": "1082ab5d-c985-4d8c-bb9d-0d05e282b4a7"
        }
    }
    

    Example2 Querying the List of Scaling Activities by Scaling Activity ID

    Input Example

    POST / HTTP/1.1
    Host: as.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeAutoScalingActivities
    <Common request parameters>
    
    {
        "ActivityIds": [
            "asa-o4v87ae9"
        ]
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 1,
            "ActivitySet": [
                {
                    "Description": "Activity was launched in response to a difference between desired capacity and actual capacity, scale out 1 instance(s).",
                    "AutoScalingGroupId": "asg-2umy3jbd",
                    "RelatedInstanceSet": [
                        {
                            "InstanceId": "ins-q3ss14yo",
                            "InstanceStatus": "SUCCESSFUL"
                        }
                    ],
                    "LifecycleActionResultSet": [],
                    "DetailedStatusMessageSet": [],
                    "ActivityType": "SCALE_OUT",
                    "ActivityId": "asa-o4v87ae9",
                    "StartTime": "2018-11-20T08:33:56Z",
                    "CreatedTime": "2018-11-20T08:33:56Z",
                    "EndTime": "2018-11-20T08:34:52Z",
                    "Cause": "Activity was launched in response to a difference between desired capacity and actual capacity.",
                    "StatusMessageSimplified": "Success",
                    "StatusMessage": "Success",
                    "StatusCode": "SUCCESSFUL",
                    "InvocationResultSet": []
                }
            ],
            "RequestId": "1082ab5d-c985-4d8c-bb9d-0d05e282b4a7"
        }
    }
    

    5. Developer Resources

    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
    InternalError An internal error occurred.
    InvalidParameter.ActionNotFound Invalid Action request.
    InvalidParameter.Conflict Multiple parameters specified conflict and cannot co-exist.
    InvalidParameterValue.Filter Invalid filter.
    InvalidParameterValue.InvalidActivityId Invalid scaling activity ID.
    InvalidParameterValue.InvalidAutoScalingGroupId Invalid scaling group ID.
    InvalidParameterValue.InvalidFilter Invalid filter condition.
    InvalidParameterValue.LimitExceeded The value exceeds the limit.
    LimitExceeded.FilterValuesTooLong Too many values for the specified filter
    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