putScalingPolicy
    • PDF

    putScalingPolicy

    • PDF

    Article Summary

    Can be used in a VPC environment.

    Summary

    Create or edit scaling policies.

    Request

    Request Parameters

    Parameter nameRequirement statusTypeRestrictionsDescription
    regionCodeNoStringRegion code
    You can decide the region of Auto Scaling Group to create or edit the scaling policy.
    You can obtain the regionCode through the getRegionList action.
    Default: Select the first region of the getRegionList search results
    autoScalingGroupNoYesStringAuto Scaling Group number
    You can obtain the autoScalingGroupNo through the getAutoScalingGroupList action.
    policyNoConditionalStringThe scaling policy number to edit
    You can specify a policy to edit by using a scaling policy number.
    Do not enter if you create a new scaling policy.
    Either policyNo or policyName is required to be entered if you edit.
    You can obtain the policyNo through the getAutoScalingPolicyList action.
    policyNameConditionalStringMin : 1, Max : 255
    Only lower case English letters, numbers, and "-" are allowed, and it has to start with an English letter.
    It must end with an English letter or number.
    Scaling policy name
    You can enter a scaling policy name that you will create or edit.
    If a scaling policy with the specified name already exists, the scaling policy is edited.
    Either policyNo or policyName is required to be entered if you edit.
    You must enter the policyName if you create.
    You can obtain the policyName through the getAutoScalingPolicyList action.
    adjustmentTypeCodeYesStringAdjustment type code
    Determine how to adjust the number of servers when executing the scaling policy.
    Options :
    CHANG (Change in capacity): You can add or remove the number of specified servers directly regardless of the current group size.
    PRCNT (Percent change in capacity): You can increase or decrease the number of specified servers at a certain rate (%) compared to the current group size.
    EXACT (Exact capacity): You can fix the group size to the specified value.
    You can obtain the adjustmentTypeCode through the getAdjustmentTypeList action.
    scalingAdjustmentYesIntegerMin: The minimum value range varies depending on the adjustmentTypeCode.
    CHANG : -2147483648
    PRCNT : -100
    EXACT : 0
    Max : 2147483647
    Adjustment value
    Specify an adjustment value suitable for the adjustment type.
    If you want to decrease it when the adjustmentTypeCode is either CHANG or PRCNT, enter a negative value.
    The unit can be (unit) or (%) depending on the adjustment type.
    minAdjustmentStepNoIntegerMin: 1, Max : 2147483647Minimum adjustment step
    Change the number of server instances as much as the minimum adjustment step.
    It is valid only when the adjustmentTypeCode is PRCNT.
    coolDownNoIntegerMin: 0, Max : 2147483647Cooldown
    Even after a server is created, it may take some time to prepare the actual implementation of the service for various reasons, such as initialization script executions or update installations. Cooldown refers to the set time period which any monitoring event notifications occurring during or after scaling are ignored with no response to them.
    Default: 300 seconds
    responseFormatTypeNoStringFormat type of the response results
    Options : xml | json
    Default : xml

    Response

    Response data type

    • ScalingPolicyList type
    ScalingPolicyList extends CommonResponse
    private Integer totalRows;
    private List scalingPolicyList = new ArrayList<>();
    ScalingPolicy
    private String autoScalingGroupNo;
    private String policyNo;
    private String policyName;
    private CommonCode adjustmentType;
    private Integer scalingAdjustment;
    private Integer minAdjustmentStep;
    private Integer coolDown;

    Example

    Request example

    ncloud vautoscaling putScalingPolicy --regionCode KR --autoScalingGroupNo ***700 --policyName test-*** --adjustmentTypeCode CHANG --scalingAdjustment 1 --coolDown 300 --timeZone KST
    

    Response example

    <putScalingPolicyResponse>
      <requestId>dcbf41de-b9d4-460d-a594-60d77ec25bf1</requestId>
        <returnCode>0</returnCode>
        <returnMessage>success</returnMessage>
        <totalRows>1</totalRows>
        <scalingPolicyList>
          <scalingPolicy>
            <autoScalingGroupNo>***700</autoScalingGroupNo>
            <policyNo>***922</policyNo>
            <policyName>test-***</policyName>
            <adjustmentType>
              <code>CHANG</code>
              <codeName>ChangeInCapacity</codeName>
            </adjustmentType>
            <scalingAdjustment>1</scalingAdjustment>
            <coolDown>300</coolDown>
          </scalingPolicy>
        </scalingPolicyList>
    </putScalingPolicyResponse>
    

    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.