• Auto Scaling

as
  1. Help Center
  2. Auto Scaling
  3. API Reference
  4. API
  5. Scaling Action Logs
  6. Querying Scaling Action Logs

Querying Scaling Action Logs

Function

This interface is used to query scaling action logs. The results are filtered based on the conditions you input and displayed by page.

URI

GET /autoscaling-api/v1/{project_id}/scaling_activity_log/{scaling_group_id}{?start_time,end_time,start_number,limit}

NOTE:

You can type the question mark (?) and ampersand (&) at the end of the URI to define multiple search criteria. You can filter all non-mandatory parameters in the parameter description.

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

scaling_group_id

Yes

String

Specifies the AS group ID.

start_time

No

String

Specifies the start time for querying scaling action logs. The format of the start time is yyyy-MM-ddThh:mm:ssZ.

end_time

No

String

Specifies the end time for querying scaling action logs. The format of the end time is yyyy-MM-ddThh:mm:ssZ.

start_number

No

Integer

Specifies the start line number. The default value is 0.

limit

No

Integer

Specifies the total number of query records. The default value is 20 and the maximum value is 100.

Request Message

  • Request parameters

    None

  • Example request

    None

Response Message

  • Response parameters
    Table 2 Response parameters

    Parameter

    Type

    Description

    total_number

    Integer

    Specifies the total number of query records.

    start_number

    Integer

    Specifies the start line number.

    limit

    Integer

    Specifies the maximum number of resources to be queried.

    scaling_activity_log

    List data structure

    Specifies the scaling action log list.

    Table 3 scaling_activity_log field data structure description

    Parameter

    Type

    Description

    status

    String

    Specifies the status of the scaling action.

    SUCCESS: indicates the scaling action is successfully performed.

    FAIL: indicates the action failed to be performed.

    DOING: indicates the scaling action is being performed.

    start_time

    String

    Specifies the start time of the scaling action. The time format must comply with UTC.

    end_time

    String

    Specifies the end time of the scaling action. The time format must comply with UTC.

    id

    String

    Specifies the scaling action log ID.

    instance_removed_list

    String

    Specifies the name list of the instances removed from the AS group after the scaling action is complete. The instance names are separated by commas (,).

    instance_deleted_list

    String

    Specifies the name list of the instances deleted from the AS group and deleted after the scaling action is complete. The instance names are separated by commas (,).

    instance_added_list

    String

    Specifies the name list of the instances added to the AS group after the scaling action is complete. The instance names are separated by commas (,).

    scaling_value

    String

    Specifies the number of added or deleted instances during the scaling.

    description

    String

    Specifies the description of the scaling action.

    instance_value

    Integer

    Specifies the number of instances in the AS group.

    desire_value

    Integer

    Specifies the expected number of instances in the scaling action.

  • Example response
    {
        "limit": 20,
        "scaling_activity_log": [
            {
                "id": "a8924393-1024-4c24-8ac6-e4d481360884",
                "status": "SUCCESS",
                "description": "{\"reason\":[{\"change_reason\":\"SCHEDULED\",\"old_value\":1,\"change_time\":\"2015-07-24T01:21:00Z\",\"new_value\":0}]}",
                "instance_value": 1,
                "desire_value": 0,
                "start_time": "2015-07-24T01:21:02Z",
                "end_time": "2015-07-24T01:23:31Z",
                "instance_name_list": "discuz_446E0983"
            },
            {
                "id": "423bbb2d-043c-4afe-8754-03e418a6ac42",
                "status": "SUCCESS",
                "description": "{\"reason\":[{\"change_reason\":\"DIFF\",\"old_value\":0,\"scaling_policy_name\":\"policy_for_test\",\"scaling_policy_id\":\"f8924393-1024-4c24-8ac6-e4d481360856\",\"change_time\":\"2015-07-23T15:11:52Z\",\"new_value\":1}]}",
                "instance_value": 0,
                "desire_value": 1,
                "start_time": "2015-07-23T15:11:52Z",
                "end_time": "2015-07-23T15:16:30Z",
                "instance_name_list": "discuz_446E0983"
            }
        ],
        "total_number": 2,
        "start_number": 0
    }

Returned Value

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    The server failed to process the request.

    401 Unauthorized

    You must enter the username and password to access the requested page.

    403 Forbidden

    You are forbidden to access the requested page.

    404 Not Found

    The server could not find the requested page.

    405 Method Not Allowed

    You are not allowed to use the method specified in the request.

    406 Not Acceptable

    The response generated by the server could not be accepted by the client.

    407 Proxy Authentication Required

    You must use the proxy server for authentication so that the request can be processed.

    408 Request Timeout

    The request timed out.

    409 Conflict

    The request could not be processed due to a conflict.

    500 Internal Server Error

    Failed to complete the request because of an internal service error.

    501 Not Implemented

    Failed to complete the request because the server does not support the requested function.

    502 Bad Gateway

    Failed to complete the request because the request is invalid.

    503 Service Unavailable

    Failed to complete the request because the system is unavailable.

    504 Gateway Timeout

    A gateway timeout error occurred.

Error Codes

See section Error Codes.