putScalingPolicy
    • PDF

    putScalingPolicy

    • PDF

    Article Summary

    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

    ParameterRequiredTypeLimitationsDescription
    policyNameYStringMin: 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.
    autoScalingGroupNameYStringMin: 1, Max: 255Name of the Auto Scaling group for which you want to execute the policy
    adjustmentTypeCodeYStringMin: 1, Max: 5Type code to adjust the Auto Scaling group’s capacity
    CHANG (Change In Capacity)
    EXACT (ExactCapacity)
    PRCNT (PercentChangeInCapacity)
    scalingAdjustmentYIntegerMin: -2147483647, Max: 2147483647Group capacity adjustment value for scaling
    cooldownNIntegerMin: 0, Max: 2147483647During the cooldown period after the scaling action is terminated, Auto Scaling will ignore alarm notifications.
    minAdjustmentStepNIntegerMin: 1, Max: 2147483647Minimum 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 codeReturn codeReturn message
    40050130The quota for capacity groups or launch configurations for this customer has already been reached.

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.