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

SetDesiredCapacity

Sets the size of the specified Auto Scaling group.

For more information about desired capacity, see What Is Auto 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 Auto Scaling group.

Type: Integer

Required: Yes

HonorCooldown

Indicates whether Auto Scaling waits for the cooldown period to complete before initiating a scaling activity to set your Auto Scaling group to its new capacity. By default, Auto Scaling does not honor the cooldown period during manual scaling activities.

Type: Boolean

Required: No

Errors

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

ResourceContention

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

HTTP Status Code: 500

ScalingActivityInProgress

The operation can't be performed because there are scaling activities in progress.

HTTP Status Code: 400

Example

Sample Request

https://autoscaling.amazonaws.com/?Action=SetDesiredCapacity
&AutoScalingGroupName=my-asg
&HonorCooldown=false
&DesiredCapacity=2
&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: