- Print
- PDF
putScheduledUpdateGroupAction
- Print
- PDF
Overview
Creates or updates scheduled scaling actions for the specified auto scaling group.
If the same scheduled action already exists, this API request updates it; if the same scheduled action does not exist, it creates a new one.
There are two types of schedules: one-time schedule and recurrent schedule.
To create a one-time schedule, specify startTime and do not specify recurrenceInKST. To create a recurrent schedule, specify recurrenceInKST.
At least one of minSize, desiredCapacity and maxSize must be specified.
Then, the auto scaling group’s properties associated with the specified parameters mentioned before are updated.
Even if the minSize, desiredCapacity or maxSize is changed, the following condition must be satisfied: Min size <= Desired Capacity <= max size.
Otherwise, the properties are not updated as the schedule is not applied.
Request
Request parameters
Parameter | Required | Type | Limitations | Description |
---|---|---|---|---|
autoScalingGroupName | Y | String | Min: 1 Max: 255 | Name of the Auto Scaling group to get |
scheduledActionName | Y | String | Min: 1 Max: 255 | Scheduled scaling action name It must be unique within the specified Auto Scaling group. If the same scheduled action already exists, this API request updates it; if the same scheduled action does not exist, it creates a new one. |
desiredCapacity | Conditional | String | Min: 1, Max: 30 | It is desired capacity, which is the number of server instances that belong to the Auto Scaling group. It must be greater than or equal to the current minSize and less than or equal to the current maxSize of the Auto Scaling group. |
minSize | Conditional | String | Min: 1, Max: 30 | Minimum size. It is at least 0 and less than or equal to the maxSize. |
maxSize | Conditional | String | Min: 1, Max: 30 | Maximum size |
startTime | Conditional | Date | yyyy-MM-dd’T’HH:mm:ssZ | Required if recurrenceInKST (recurrence schedule configuration) does not exist.Format: yyyy-MM-dd'T'HH:mm:ssZ Example) 2018-07-25T17:50:00+0900 |
endTime | N | Date | yyyy-MM-dd’T’HH:mm:ssZ | Required if recurrenceInKST (recurrence schedule configuration) does not exist.Format: yyyy-MM-dd'T'HH:mm:ssZ Example) 2018-07-25T17:50:00+0900 |
recurrenceInKST | N | String | - | Recurrence schedule configuration Specify the value in crontab format. Specify the minute, hour, day of month, month and day of week fields, using a space as a delimiter. Valid values for each field are as follows: Minute: 0-59 Hour: 0-23 Day of month: 1-31 Month: 1-12 (or names of months in English) Day of week: 0-7 (0 or 7 is Sunday, or names of the days of the week in English) You can use asterisk('*'), which means all the values from the start to the end. See the examples below. Example 1: Every hour on the hour: 0 * * * * Example 2: On every Saturday, at 16:30: 30 16 * * 6 Example 3: On the first day of every month, at midnight: 0 0 1 * * Example 4: On January 1st of every year, at midnight: 0 0 1 Jan * |
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>
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 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. |