Executing, Enabling, or Disabling an AS Policy

Function

This interface is used to immediately execute, enable, or disable a specified AS policy.

An AS policy can be executed only when the AS group and AS policy are in the INSERVICE state. Otherwise, the execution fails.

URI

POST /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id}/action

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

scaling_policy_id

Yes

String

Specifies the AS policy ID.

Request

Table 2 Request parameters

Parameter

Mandatory

Type

Description

action

Yes

String

Specifies the operation for an AS policy.

  • execute: immediately executes the AS policy.
  • resume: enables the AS group.
  • pause: disables the AS group.

Example Request

This example executes the AS policy with ID 906f73ff-56e8-41b2-a005-8157d0c60361.
POST https://{Endpoint}/autoscaling-api/v1/{project_id}/scaling_policy/906f73ff-56e8-41b2-a005-8157d0c60361/action

{
    "action": "execute"
}

Response

None

Example Response

None

Returned Values

Error Codes

See Error Codes.