Overview
Create or renew a scaling action schedule for the specified Auto Scaling Group.
When this action is called, if a schedule with the same name already exists, the schedule is changed; otherwise, a schedule is created.
The types of schedules are divided into one-time schedules and recurring schedules.
If you want to create a one-time schedule, you can specify the start time and not set the recurrence. If you want to set a recurring schedule, you can set the recurrence.
When calling, at least one of the parameters among min size, desired capacity, and max size must be specified.
When the schedule is executed, the corresponding attributes of Auto Scaling Group of the specified parameter of the three parameters mentioned above are changed.
The min size, desired capacity, and max size of Auto Scaling Group changed by the schedule must maintain the relationship of min size <= desired capacity <= max size even after the change.
Otherwise, the schedule will not be applied and no effect will be produced.
Request
Request parameters
Parameter name | Required | Type | Restrictions | Description |
---|---|---|---|---|
autoScalingGroupName | Yes | String | Min: 1 Max: 255 |
Enter the name of the auto scaling group you want to query. |
scheduledActionName | Yes | String | Min: 1 Max: 255 |
- Scaling action schedule name Unique name within the Auto Scaling Group specified as a schedule identifier role When calling this action, if a schedule with the same name already exists, the schedule is changed; otherwise, a schedule is created |
desiredCapacity | Conditional | String | Min: 1, Max: 30 | - Expected service capacity Set the number of server instances to be operated as a member of the group. This value must not be less than the existing attribute min size, which is already set for autoscaling, and must not be greater than max size. |
minSize | Conditional | String | Min: 1, Max: 30 | Minimum size Minimum of 0, must be less than or equal to the maxSize value |
maxSize | Conditional | String | Min: 1, Max: 30 | Maximum size |
startTime | Conditional | Date | yyyy-MM-dd’T’HH:mm:ssZ | Required if there is no recurrenceInKST (repeat schedule setting)format : yyyy-MM-dd'T'HH:mm:ssZ e.g., 2018-07-25T17:50:00+0900 |
endTime | No | Date | yyyy-MM-dd’T’HH:mm:ssZ | Required if there is no recurrenceInKST (repeat schedule setting)format : yyyy-MM-dd'T'HH:mm:ssZ e.g., 2018-07-25T17:50:00+0900 |
recurrenceInKST | No | String | - | - Set a repeat schedule The configuration format is crontab configuration method. Specify the minute, hour, day of month, month, and day of week fields, using a space as a separator. Valid values that can be entered into the minute, hour, day of month, month, and day of week fields are respectively: 0-59 0-23 1-31 1-12 (or English name of the month)0-7 (or English name of the day, 0 or 7 to be Sunday)You can enter asterisk ('*') as a field value, which means all values from the first value to the last value. Example 1: Every hour on the hour: 0 * * * * Example 2: Every Saturday, at 4:30 PM: 30 16 * * 6 Example 3: First day of every month at midnight: 0 0 1 * * Example 4: January 1st of every year, at midnight: 0 0 1 Jan * |
responseFormatType | No | String | - Format type of the response result Options: xml | json Default: xml |
Response
Response body
Examples
Request example
{AUTOSCALILNG_API_URL}/putScheduledUpdateGroupAction
?autoScalingGroupName=asg-0212
&desiredCapacity=3
&scheduledActionName=sa-0303
&startTime=2014-03-05T10%3A00%3A00%2B0900
Response example
<putScheduledUpdateGroupActionResponse>
<requestId>948b7bc1-47e6-4d5c-a71d-e85622ab16ef</requestId>
<returnCode>0</returnCode>
<returnMessage>success</returnMessage>
<totalRows>1</totalRows>
<scheduledUpdateGroupActionList>
<scheduledUpdateGroupAction>
<autoScalingGroupName>asg-0212</autoScalingGroupName>
<scheduledActionName>sa-0303</scheduledActionName>
<desiredCapacity>3</desiredCapacity>
<startTime>2014-03-05T10:00:00+0900</startTime>
<recurrenceInKST />
</scheduledUpdateGroupAction>
</scheduledUpdateGroupActionList>
</putScheduledUpdateGroupActionResponse>
Errors
Errors that may occur while using this action are listed below. For more information about common errors, see NAVER Cloud Platform API.
HTTP Response Code | Return code | Return message |
---|---|---|
400 | 50100 | The named Auto Scaling group or launch configuration already exists. |
400 | 50130 | The quota for capacity groups or launch configurations for this customer has already been reached. |