putScalingPolicy
- Print
- PDF
putScalingPolicy
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
Creates or updates a scaling policy. When the executePolicy is called, Auto Scaling performs scale-in or scale-out actions depending on the configured policy.
Request
Request parameters
Parameter | Required | Type | Limitations | Description |
---|---|---|---|---|
policyName | Y | String | Min: 1 Max: 255 | Scaling policy identifier A policy belongs to a specific Auto Scaling group, and its name must be unique within the group. If the policy name does not exist in the specified Auto Scaling group, the API request creates a new policy; if the policy name already exists, the API request updates it. You can create up to 10 policies per Auto Scaling group. |
autoScalingGroupName | Y | String | Min: 1, Max: 255 | Name of the Auto Scaling group for which you want to execute the policy |
adjustmentTypeCode | Y | String | Min: 1, Max: 5 | Type code to adjust the Auto Scaling group’s capacity CHANG (Change In Capacity) EXACT (ExactCapacity) PRCNT (PercentChangeInCapacity) |
scalingAdjustment | Y | Integer | Min: -2147483647, Max: 2147483647 | Group capacity adjustment value for scaling |
cooldown | N | Integer | Min: 0, Max: 2147483647 | During the cooldown period after the scaling action is terminated, Auto Scaling will ignore alarm notifications. |
minAdjustmentStep | N | Integer | Min: 1, Max: 2147483647 | Minimum adjustment step You can specify this parameter only when adjustmentTypeCode is PRCNT(PercentChangeInCapacity) . (This parameter is optional.)When adjustmentTypeCode is PRCNT(PercentChangeInCapacity) , if the change by scalingAdjustment is less than minAdjustmentStep, it is set to minAdjustmentStep. |
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>
Error codes
Errors that may occur while using this action are listed below. For information on common errors, refer to 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. |
Was this article helpful?