class Aws::AutoScaling::Instance::Collection
Public Instance Methods
batch_attach(options = {})
click to toggle source
@param options ({}) @return [void]
# File lib/aws-sdk-autoscaling/instance.rb, line 456 def batch_attach(options = {}) batch_enum.each do |batch| params = Aws::Util.copy_hash(options) params[:auto_scaling_group_name] = batch[0].group_name params[:instance_ids] ||= [] batch.each do |item| params[:instance_ids] << item.id end batch[0].client.attach_instances(params) end nil end
batch_detach(options = {})
click to toggle source
@example Request syntax with placeholder values
instance.batch_detach({ should_decrement_desired_capacity: false, # required })
@param options ({}) @option options [required, Boolean] :should_decrement_desired_capacity
Indicates whether the Auto Scaling group decrements the desired capacity value by the number of instances detached.
@return [void]
# File lib/aws-sdk-autoscaling/instance.rb, line 479 def batch_detach(options = {}) batch_enum.each do |batch| params = Aws::Util.copy_hash(options) params[:auto_scaling_group_name] = batch[0].group_name params[:instance_ids] ||= [] batch.each do |item| params[:instance_ids] << item.id end batch[0].client.detach_instances(params) end nil end
batch_enter_standby(options = {})
click to toggle source
@example Request syntax with placeholder values
instance.batch_enter_standby({ should_decrement_desired_capacity: false, # required })
@param options ({}) @option options [required, Boolean] :should_decrement_desired_capacity
Indicates whether to decrement the desired capacity of the Auto Scaling group by the number of instances moved to `Standby` mode.
@return [void]
# File lib/aws-sdk-autoscaling/instance.rb, line 502 def batch_enter_standby(options = {}) batch_enum.each do |batch| params = Aws::Util.copy_hash(options) params[:auto_scaling_group_name] = batch[0].group_name params[:instance_ids] ||= [] batch.each do |item| params[:instance_ids] << item.id end batch[0].client.enter_standby(params) end nil end
batch_exit_standby(options = {})
click to toggle source
@param options ({}) @return [void]
# File lib/aws-sdk-autoscaling/instance.rb, line 517 def batch_exit_standby(options = {}) batch_enum.each do |batch| params = Aws::Util.copy_hash(options) params[:auto_scaling_group_name] = batch[0].group_name params[:instance_ids] ||= [] batch.each do |item| params[:instance_ids] << item.id end batch[0].client.exit_standby(params) end nil end