Menu
Auto Scaling
API Reference (API Version 2011-01-01)

PutScheduledUpdateGroupAction

Creates or updates a scheduled scaling action for an Auto Scaling group. When updating a scheduled scaling action, if you leave a parameter unspecified, the corresponding value remains unchanged.

For more information, see Scheduled Scaling in the Auto Scaling User Guide.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

AutoScalingGroupName

The name of the Auto Scaling group.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

DesiredCapacity

The number of EC2 instances that should be running in the group.

Type: Integer

Required: No

EndTime

The time for the recurring schedule to end. Auto Scaling does not perform the action after this time.

Type: Timestamp

Required: No

MaxSize

The maximum size for the Auto Scaling group.

Type: Integer

Required: No

MinSize

The minimum size for the Auto Scaling group.

Type: Integer

Required: No

Recurrence

The recurring schedule for this action, in Unix cron syntax format. For more information, see Cron in Wikipedia.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

ScheduledActionName

The name of this scaling action.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

StartTime

The time for this action to start, in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT only (for example, 2014-06-01T00:00:00Z).

If you specify Recurrence and StartTime, Auto Scaling performs the action at this time, and then performs the action based on the specified recurrence.

If you try to schedule your action in the past, Auto Scaling returns an error message.

Type: Timestamp

Required: No

Time

This parameter is deprecated.

Type: Timestamp

Required: No

Errors

For information about the errors that are common to all actions, see Common Errors.

AlreadyExists

You already have an Auto Scaling group or launch configuration with this name.

HTTP Status Code: 400

LimitExceeded

You have already reached a limit for your Auto Scaling resources (for example, groups, launch configurations, or lifecycle hooks). For more information, see DescribeAccountLimits.

HTTP Status Code: 400

ResourceContention

You already have a pending update to an Auto Scaling resource (for example, a group, instance, or load balancer).

HTTP Status Code: 500

Examples

Example 1: Schedule based on a specific date and time

Sample Request

https://autoscaling.amazonaws.com/?Action=PutScheduledUpdateGroupAction &AutoScalingGroupName=my-asg &ScheduledActionName=ScaleUp &StartTime=2013-05-25T08:00:00Z &DesiredCapacity=3 &Version=2011-01-01 &AUTHPARAMS

Example 2: Recurring Schedule

Sample Request

https://autoscaling.amazonaws.com/?Action="PutScheduledUpdateGroupAction &AutoScalingGroupName=my-asg &ScheduledActionName=scaleup-schedule-year &Recurrence="30 0 1 1,6,12 *" &DesiredCapacity=3 &Version=2011-01-01 &AUTHPARAMS

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: