# File 'lib/aws/auto_scaling/group.rb', line 153defauto_scaling_instancesinstances.collectdo|details|Instance.new_from(:describe_auto_scaling_groups,details,details.instance_id,:auto_scaling_group_name=>name,# not provided by the response
:config=>config)endend

#set_desired_capacity(capacity, options = {}) ⇒ nil

Adjusts the desired size of the Auto Scaling group by initiating
scaling activities. When reducing the size of the group, it is
not possible to define which Amazon EC2 instances will be
terminated. This applies to any Auto Scaling decisions that might
result in terminating instances.

The launch configuration to use with the Auto Scaling group.
This may be a LaunchConfiguration object or a launch configuration
name string.

:availability_zones(required, Array<String>)
—

A list of Availability Zones for the Auto Scaling group.
This can be EC2::AvailabilityZone objects or availability
zone names.

:default_cooldown(Integer)
—

The amount of time, in seconds, after a scaling activity completes
before any further trigger-related scaling activities can start.

:desired_capacity(Integer)
—

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

:health_check_grace_period(Integer)
—

Length of time in seconds after a new Amazon EC2 instance comes
into service that Auto Scaling starts checking its health.

:health_check_type(Symbol)
—

The service you want the health status from,
Amazon EC2 or Elastic Load Balancer. Valid values are
:ec2 or :elb.

:placement_group(String)
—

Physical location of your cluster placement group created in
Amazon EC2. For more information about cluster placement group, see
Using Cluster Instances.

:termination_policies(Array<String>)
—

A standalone termination policy or a list of termination policies used
to select the instance to terminate. The policies are executed in the
order they are listed. For more information on creating a termination
policy for your Auto Scaling group, go to
Instance Termination Policy for Your Auto Scaling Group
in the Auto Scaling Developer Guide.

:tags(Array<Hash>)
—

A list of tags to apply launched
instances. Each tag hash may have the following keys:

:key - (required,String) The tag name.

:value - (String) The optional tag value.

:propagate_at_launch - (Boolean) Whether or not to propagate
to instances, defaults to true.

# File 'lib/aws/auto_scaling/group.rb', line 313defupdateoptions={}group_opts=group_options(options)# tags must be updated using a separate request from the
# other attributes, *sigh*
iftags=group_opts.delete(:tags)tags.map(&:to_hash).eachdo|tag|tag[:resource_type]='auto-scaling-group'tag[:resource_id]=nameendclient.create_or_update_tags(:tags=>tags)endunlessgroup_opts.empty?client_opts=group_opts.merge(:auto_scaling_group_name=>name)client.update_auto_scaling_group(client_opts)endnilend