Available in VPC
Run a scaling policy of Auto Scaling Group.
Syntax
The executePolicy syntax is as follows:
./ncloud vautoscaling executePolicy \
--autoScalingGroupNo <auto-scaling-group-no> \
--policyNo <policy-no> \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
Options
This section describes the options available when running executePolicy.
Required options
The following options are required for executePolicy.
| Options | Type | Required | Description |
|---|---|---|---|
--autoScalingGroupNo |
String | Required | Auto Scaling Group number |
--policyNo |
String | Required | Policy number |
Common options
For information on options commonly used in the vautoscaling command, see Auto Scaling (VPC) options.
Examples
If the request to execute a scaling policy is successful, the configuration information for the executed scaling policy is returned.
Command
The command example is as follows:
./ncloud vautoscaling executePolicy \
--autoScalingGroupNo 20461037 \
--policyNo 28470019 \
--regionCode KR \
--output json
Output
The output example is as follows:
{
"executePolicyResponse": {
"totalRows": 1,
"scalingPolicyList": [
{
"autoScalingGroupNo": "20461037",
"policyNo": "28470019",
"policyName": "policy-01",
"adjustmentType": {
"code": "CHANG",
"codeName": "Capacity change amount"
},
"scalingAdjustment": 1,
"coolDown": 300
}
],
"requestId": "c9d0e1f2-a3b4-5678-cdef-901234567890",
"returnCode": "0",
"returnMessage": "success"
}
}