putScheduledUpdateGroupAction

Prev Next

Can be used in a VPC environment.

Summary

Create or edit scaling action schedules.
You can set one-time and repeated schedules.
Specify a startTime and do not set a recurrence to create an one-time schedule.
Set a recurrence to create a repeated schedule. (If you set the repeated schedule same as the startTime, it will be executed after startTime.)

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 scheduled action.
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.
scheduledActionNo Conditional String The scheduled action number to edit
You can specify a schedule to edit by using with a scheduled action number.
Do not enter if you create a new scheduled action.
Either scheduledActionNo or scheduledActionName is required to be entered if you edit.
You can obtain the scheduledActionNo through the getScheduledActionList action.
scheduledActionName 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.
Scheduled action name
You can enter a scheduled action name to create or edit.
If a scheduled action with the specified name already exists, the scheduled action is edited.
Either scheduledActionNo or scheduledActionName is required to be entered if you edit.
You must enter the scheduledActionName if you create.
You can obtain the scheduledActionName through the getScheduledActionList action.
minSize Yes Integer Min : 0, Max : 30 Minimum capacity
This is the minimum number of Auto Scaling Groups. The number of servers that are larger or equal to this value is always maintained. Set it to 0 if you want no server.
The minimum capacity settings of the Auto Scaling Group are changed by the action.
It must be less than or equal to the maxSize.
maxSize Yes Integer Min : 0, Max : 30 Maximum capacity
This is the allowed maximum number of servers in the Auto Scaling Group.
The maximum capacity settings of the Auto Scaling Group are changed by the action.
It must be more than or equal to the minSize.
desiredCapacity Yes Integer Min : 0, Max : 30 Desired capacity
The number of servers is adjusted depending on the expected capacity value.
The expected capacity settings of the Auto Scaling Group are changed by the action.
It must be more than or equal to the minSize, and less than or equal to the maxSize.
startTime Conditional Date yyyy-MM-ddTHH:mm:ssZ Schedule start date
You can decide the date and time when the schedule initially starts.
If you enter it simultaneously with recurrence, the action is executed on the fastest repeated schedule after the startTime.
If you only enter the recurrence, the fastest repeated schedule is specified as the startTime.
If you do not enter a recurrence, you must enter a startTime.
It can't overlap with the startTime of different schedules, and must be later than current time and earlier than the endTime.
format : yyyy-MM-ddTHH:mm:ssZ
ex) 2020-07-25T17:50:00+0900, 2020-07-25T17:50:00+09:00
endTime No Date yyyy-MM-ddTHH:mm:ssZ Schedule end date
You can decide the date and time when the repeated schedule ends.
It must be later than the current time and startTime.
format : yyyy-MM-ddTHH:mm:ssZ
ex) 2020-07-25T17:50:00+0900, 2020-07-25T17:50:00+09:00
recurrence No String crontab expression Recurrence
You can specify a repeated schedule as the crontab format.
Specify the minute, hour, day of month, month, and day of week fields, using a space as a delimiter.
You can enter the following valid values in each field.
0-59
0-23
1-31
1 to 12 (or English name of the month)
0 to 7 (or English name of the day, 0 or 7 shall be Sunday)
You can also use asterisk (*), which means all the values from the start to the end.
e.g., 1) Every hour on the hour 0 * * * *
e.g., 2) Every Saturday, at 4:30 PM 30 16 * * 6
e.g., 3) Every 1st day, at midnight 0 0 1 * *
e.g., 4) January 1st of every year, at midnight 0 0 1 Jan *
timeZone No String Time range
You can specify a time range for the repeated settings.
Options : KST (UTC+9) | UTC (UTC+0)
Default : KST
responseFormatType No String Format type of the response results
Options : xml | json
Default : xml

Response

Response data type

  • ScheduledUpdateGroupActionList type
ScheduledUpdateGroupActionList extends CommonResponse
private Integer totalRows;
private List scheduledUpdateGroupActionList = new ArrayList<>();
ScheduledUpdateGroupAction
private String autoScalingGroupNo;
private String scheduledActionNo;
private String scheduledActionName;
private Integer minSize;
private Integer maxSize;
private Integer desiredCapacity;
private Date startTime;
private Date endTime;
private String recurrence;
private String timeZone;

Example

Request example

ncloud vautoscaling putScheduledUpdateGroupAction --regionCode KR --autoScalingGroupNo ***700 --scheduledActionName test-*** --minSize 0 --maxSize 0 --desiredCapacity 0 --startTime "2020-12-15T17:00:00+0900" --endTime "2020-12-15T18:00:00+0900" --recurrence "5 * * * *" --timeZone KST

Response example

<putScheduledUpdateGroupActionResponse>
  <requestId></requestId>
  <returnCode>0</returnCode>
  <returnMessage>success</returnMessage>
  <totalRows>1</totalRows>
  <scheduledUpdateGroupActionList>
    <scheduledUpdateGroupAction>
      <autoScalingGroupNo>***700</autoScalingGroupNo>
      <scheduledActionNo>***281</scheduledActionNo>
      <scheduledActionName>test-***</scheduledActionName>
      <minSize>0</minSize>
      <maxSize>0</maxSize>
      <desiredCapacity>0</desiredCapacity>
      <startTime>2020-12-15T17:05:00+0900</startTime>
      <endTime>2020-12-15T18:00:00+0900</endTime>
      <recurrence>5 * * * *</recurrence>
      <timeZone>KST</timeZone>
    </scheduledUpdateGroupAction>
  </scheduledUpdateGroupActionList>
</putScheduledUpdateGroupActionResponse>