MENU
      putScalingPolicy

        putScalingPolicy


        Article summary

        Overview

        Create or edit a scaling policy

        Description

        Create or edit a scaling policy. Once a policy has been called to be enforced, the scale-in or scale-out action is operated based on the set scaling policy.

        Request Parameters

        ParameterRequiredTypeRestrictionsDescription
        policyNameYesStringMin : 1, Max : 255Policy name. The identifier of a scaling policy.
        The policy name belongs to a specific Auto Scaling Group, and the name cannot be duplicated within the same group.
        If there is no existing policy name within the selected Auto Scaling Group range when calling the api, create a new one. If there is the policy name created, change the details.
        Each Auto Scaling Group can have up to 10 policies.
        autoScalingGroupNameYesStringMin : 1, Max : 255Name(Identifier) of Auto Scaling Group that a policy will be operated
        adjustmentTypeCodeYesStringMin : 1, Max : 5Type code to control capacity of a group
        There are 3 valid codes as follows. (Applicable codes are written in the brackets.)

        * ChangeInCapacity(CHANG) : The value of capacity is changed into the assigned value.
        Equation) (new desired capacity) = (current actual capacity) + (scalingAdjustment of ChangeInCapacity type)
        * ExactCapacity(EXACT): The capacity is changed as much as the assigned percentage value.
        Equation) (new desired capacity) = (scalingAdjustment of ExactCapacity type)
        * PercentChangeInCapacity(PRCNT) : Capacity changes by the specified perecent value
        Equation) (new desired capacity) = (current actual capacity) + (current actual capacity) X (scalingAdjustment of PercentChangeInCapacity type) / 100
        scalingAdjustmentYesIntegerMin: -2147483647, Max : 2147483647Adjustment value of group capacity for a scaling
        If the adjustmentTypeCode value is ChangeInCapacity(CHANG) or PercentChangeInCapacity(PRCNT) type,

        i ) If scalingAdjustment is positive, then the capacity is increased and scale-out
        ii) If scalingAdjustment is negative, the capacity is reduced to scale-in

        The minimum value of scalingAdjustment of type PercentChangeInCapacity (PRCNT) is -100.
        cooldownNoIntegerMin : 0, Max : 2147483647Once a scaling action is over, ignore any alarm occurred during the cooldown period.
        minAdjustmentStepNoIntegerMin : 1, Max : 2147483647Minimum adjustment step
        It can only be assigned when the adjustmentTypeCode is PercentChangeInCapacity(PRCNT).(Therefore, the assignment is not necessary.)
        It cannot be specified under any other code types.
        When the changed value due to the scalingAdjustment is lower than the minAdjustmentStep under PercentChangeInCapacity(PRCNT) type, set the change value as the minAdjustmetStep.

        Response Data type

        • CommonResponse Type
        CommonResponse extends BaseObject
        private String requestId;
        private String returnCode;
        private String returnMessage;

        Examples

        Request

        ncloud autoscaling putScalingPolicy --policyName test-autoscaling-policy --autoScalingGroupName soso02 --adjustmentTypeCode EXACT --scalingAdjustment 22
        Plain text

        Response

        {
          "putScalingPolicyResponse": {
            "requestId": "e824e13a-c339-45cf-8192-e28b34a6765f",
            "returnCode": "0",
            "returnMessage": "success"
          }
        }
        JSON
        <?xml version="1.0" encoding="UTF-8" ?>
        <putScalingPolicyResponse>
          <requestId>e824e13a-c339-45cf-8192-e28b34a6765f</requestId>
          <returnCode>0</returnCode>
          <returnMessage>success</returnMessage>
        </putScalingPolicyResponse>
        XML

        Was this article helpful?

        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.