putScalingPolicy
- Print
- PDF
putScalingPolicy
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Can be used in a VPC environment.
Summary
Create or edit scaling policies.
Request
Request Parameters
Parameter name | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
regionCode | No | String | Region 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 | |
autoScalingGroupNo | Yes | String | Auto Scaling Group number You can obtain the autoScalingGroupNo through the getAutoScalingGroupList action. | |
policyNo | Conditional | String | The 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. | |
policyName | Conditional | String | Min : 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. |
adjustmentTypeCode | Yes | String | Adjustment 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. | |
scalingAdjustment | Yes | Integer | Min: 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. |
minAdjustmentStep | No | Integer | Min: 1, Max : 2147483647 | Minimum adjustment step Change the number of server instances as much as the minimum adjustment step. It is valid only when the adjustmentTypeCode is PRCNT. |
coolDown | No | Integer | Min: 0, Max : 2147483647 | Cooldown 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 |
responseFormatType | No | String | Format type of the response results Options : xml | json Default : xml |
Response
Response data type
- ScalingPolicyList type
ScalingPolicyList extends CommonResponse |
---|
private Integer totalRows; |
private List |
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?