Querying an AS Policy¶
Function¶
This API is used to query details about a specified AS policy by policy ID.
URI¶
GET /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id}
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Specifies the project ID. |
scaling_policy_id | Yes | String | Specifies the AS policy ID. |
Request¶
None
Example Request¶
This example queries the details about the AS policy with ID fd7d63ce-8f5c-443e-b9a0-bef9386b23b3.
GET https://{Endpoint}/autoscaling-api/v1/{project_id}/scaling_policy/fd7d63ce-8f5c-443e-b9a0-bef9386b23b3
Response¶
Parameter | Type | Description |
---|---|---|
scaling_policy | scaling_policy object | Specifies details about the AS policy. For details, see Table 3. |
Parameter | Type | Description |
---|---|---|
scaling_group_id | String | Specifies the AS group ID. |
scaling_policy_name | String | Specifies the AS policy name. Supports fuzzy search. |
scaling_policy_id | String | Specifies the AS policy ID. |
policy_status | String | Specifies the AS policy status.
|
scaling_policy_type | String | Specifies the AS policy type.
|
alarm_id | String | Specifies the alarm ID. |
scheduled_policy | scheduled_policy object | Specifies the periodic or scheduled AS policy. For details, see Table 4. |
scaling_policy_action | scaling_policy_action object | Specifies the scaling action of the AS policy. For details, see Table 5. |
cool_down_time | Integer | Specifies the cooldown period (s). |
create_time | String | Specifies the time when an AS policy was created. The time format complies with UTC. |
Parameter | Type | Description |
---|---|---|
launch_time | String | Specifies the time when the scaling action is triggered. The time format complies with UTC.
|
recurrence_type | String | Specifies the type of a periodically triggered scaling action.
|
recurrence_value | String | Specifies the frequency at which scaling actions are triggered.
|
start_time | String | Specifies the start time of the scaling action triggered periodically. The time format complies with UTC. The time format is YYYY-MM-DDThh:mmZ. |
end_time | String | Specifies the end time of the scaling action triggered periodically. The time format complies with UTC. The time format is YYYY-MM-DDThh:mmZ. |
Parameter | Type | Description |
---|---|---|
operation | String | Specifies the scaling action.
|
instance_number | Integer | Specifies the number of instances to be operated. |
instance_percentage | Integer | Specifies the percentage of instances to be operated. |
Example Response¶
{
"scaling_policy": {
"scaling_policy_id": "fd7d63ce-8f5c-443e-b9a0-bef9386b23b3",
"scaling_group_id": "e5d27f5c-dd76-4a61-b4bc-a67c5686719a",
"scaling_policy_name": "Scheduled 1",
"scaling_policy_type": "SCHEDULED",
"scheduled_policy": {
"launch_time": "2015-07-24T01:21Z"
},
"cool_down_time": 300,
"scaling_policy_action": {
"operation": "REMOVE",
"instance_number": 1
},
"policy_status": "INSERVICE",
"create_time": "2015-07-24T01:09:30Z"
}
}
Returned Values¶
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 to process the request.
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 Error Codes.