Auto Scaling
API Reference (API Version 2011-01-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

SetDesiredCapacity

Description

Sets the desired size of the specified AutoScalingGroup.

Request Parameters

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

AutoScalingGroupName

The name of the Auto Scaling group.

Type: String

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

Required: Yes

DesiredCapacity

The new capacity setting for the Auto Scaling group.

Type: Integer

Required: Yes

HonorCooldown

By default, SetDesiredCapacity overrides any cooldown period associated with the Auto Scaling group. Set to True if you want Auto Scaling to wait for the cooldown period associated with the Auto Scaling group to complete before initiating a scaling activity to set your Auto Scaling group to the new capacity setting.

Type: Boolean

Required: No

Errors

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

ScalingActivityInProgress

You cannot delete an Auto Scaling group while there are scaling activities in progress for that group.

HTTP Status Code: 400

Examples

Sample Request

https://autoscaling.amazonaws.com/?AutoScalingGroupName=my-test-asg
&HonorCooldown=false
&DesiredCapacity=2
&Version=2011-01-01
&Action=SetDesiredCapacity
&AUTHPARAMS 

Sample Response

<SetDesiredCapacityResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/">
  <ResponseMetadata>
    <RequestId>9fb7e2db-6998-11e2-a985-57c82EXAMPLE</RequestId>
  </ResponseMetadata>
</SetDesiredCapacityResponse>