Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . autoscaling ]

set-desired-capacity

Description

Sets the size of the specified Auto Scaling group.

For more information about desired capacity, see What Is Amazon EC2 Auto Scaling? in the Amazon EC2 Auto Scaling User Guide .

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  set-desired-capacity
--auto-scaling-group-name <value>
--desired-capacity <value>
[--honor-cooldown | --no-honor-cooldown]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--auto-scaling-group-name (string)

The name of the Auto Scaling group.

--desired-capacity (integer)

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

--honor-cooldown | --no-honor-cooldown (boolean)

Indicates whether Amazon EC2 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, Amazon EC2 Auto Scaling does not honor the cooldown period during manual scaling activities.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Examples

To set the desired capacity for an Auto Scaling group

This example sets the desired capacity for the specified Auto Scaling group:

aws autoscaling set-desired-capacity --auto-scaling-group-name my-auto-scaling-group --desired-capacity 2 --honor-cooldown

Output

None