putScalingPolicy

Prev Next

Overview

Create or change a scaling policy. When a policy execution request is made, a scale-in or scale-out action is performed according to the set policy.

Request

Request parameters

Parameter name Required Type Restrictions Description
policyName Yes String Min: 1
Max: 255
- Identifier of the scaling policy
It belongs to a specific Auto Scaling Group and the name can't be duplicated within that group.
If there is no policy name within the Auto Scaling Group, it is created. If it already exists, the content must be changed.
Up to 10 policies can be created per Auto Scaling Group.
autoScalingGroupName Yes String Min: 1, Max: 255 Enter the name of the auto scaling group in which the policy will be performed.
adjustmentTypeCode Yes String Min: 1, Max: 5 Type code for adjusting the capacity of the group
CHANG (change in capacity)
EXACT (exact capacity)
PRCNT (percent change in capacity)
scalingAdjustment Yes Integer Min: -2147483647, Max: 2147483647 Group capacity adjustment value for scaling
cooldown No Integer Min: 0, Max: 2147483647 Ignore alarm notifications during the cooldown period after the scaling action ends.
minAdjustmentStep No Integer Min: 1, Max: 2147483647 - Minimum adjustment step
Can only be specified when the adjustmentTypeCode type is PRCNT (PercentChangeInCapacity) (not specifying is also possible).
In case of the PRCNT (PercentChangeInCapacity) type, when the change amount due to scalingAdjustment is less than the minAdjustmentStep value, the change amount is set to minAdjustmentStep.
responseFormatType No String - Response result's format type
Options: xml | json
Default: xml

Response

Response body

Examples

Request example

{AUTOSCALILNG_API_URL}/putScalingPolicy
?adjustmentTypeCode=PRCNT
&autoScalingGroupName=asg-0602b
&cooldown=100
&minAdjustmentStep=2
&policyName=p-0602
&scalingAdjustment=40

Response example

<putScalingPolicyResponse>
   <requestId>492648d9-9016-4b29-9773-bc457c2bdefd</requestId>
   <returnCode>0</returnCode>
   <returnMessage>success</returnMessage>
</putScalingPolicyResponse>

Errors

Errors that may occur while using this action are listed below. For more information about common errors, see NAVER Cloud Platform API.

HTTP Response Code Return code Return message
400 50130 The quota for capacity groups or launch configurations for this customer has already been reached.