DescribeAutoScalingActivities

Last updated: 2019-12-05 14:09:19

PDF

1. API Description

Domain name for API request: as.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.

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: DescribeAutoScalingActivities
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.
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 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 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, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Using Filters to View the List of Scaling Activities

    Input Example

    https://as.tencentcloudapi.com/?Action=DescribeAutoScalingActivities
    &Filters.0.Name=activity-id
    &Filters.0.Values.0=asa-o4v87ae9
    &<Common request parameter>

    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",
            "ActivityRelatedInstanceSet": [
              {
                "InstanceId": "ins-q3ss14yo",
                "InstanceStatus": "SUCCESSFUL"
              }
            ],
            "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"
          }
        ],
        "RequestId": "1082ab5d-c985-4d8c-bb9d-0d05e282b4a7"
      }
    }

    Example2 Querying the List of Scaling Activities by Scaling Activity ID

    Input Example

    https://as.tencentcloudapi.com/?Action=DescribeAutoScalingActivities
    &ActivityIds.0=asa-o4v87ae9
    &<Common request parameter>

    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",
            "ActivityRelatedInstanceSet": [
              {
                "InstanceId": "ins-q3ss14yo",
                "InstanceStatus": "SUCCESSFUL"
              }
            ],
            "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"
          }
        ],
        "RequestId": "1082ab5d-c985-4d8c-bb9d-0d05e282b4a7"
      }
    }

    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.

    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 Internal error.
    InvalidParameter.Conflict Multiple parameters specified conflict and cannot co-exist.
    InvalidParameterValue.Filter Invalid filter.
    InvalidParameterValue.LimitExceeded The value exceeds the limit.