• Auto Scaling

as
  1. Help Center
  2. Auto Scaling
  3. API Reference
  4. API
  5. AS Policies
  6. Performing Operations on AS Policies in Batches

Performing Operations on AS Policies in Batches

Function

This interface is used to enable, disable, or delete AS policies in batches.

A batch operation can be performed on a maximum of 20 AS policies at a time.

URI

POST /autoscaling-api/v1/{project_id}/scaling_policies/action
Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

Request Message

  • Request parameters
    Table 2 Request parameters

    Parameter

    Mandatory

    Type

    Description

    scaling_policy_id

    Yes

    List<String>

    Specifies the AS policy ID.

    force_delete

    No

    String

    Specifies whether to forcibly delete AS policies. The value can be yes or no (default).

    This parameter is available only when action is set to delete.

    action

    Yes

    String

    Specifies an action to be performed on AS policies in batches. The options are as follows:

    • delete: deletes AS policies.
    • resume: enables AS policies.
    • pause: disables AS policies.
  • Example request
    {
        "action": "resume",
        "scaling_policy_id": [
            "policy_id1",
            "policy_id2"
        ]
    }

Response Message

  • Response parameters

    None

  • Example response

    None

Returned Values

  • Normal

    204

  • 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.