You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::AutoScaling::NotificationConfiguration::Collection

Inherits:
Resources::Collection show all
Defined in:
gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/notification_configuration.rb

Batch Actions collapse

Methods inherited from Resources::Collection

#each, #first, #limit, #size

Instance Method Details

#batch_put(options = {}) ⇒ void

This method returns an undefined value.

Parameters:

  • options ({}) (defaults to: {})


269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/notification_configuration.rb', line 269

def batch_put(options = {})
  batch_enum.each do |batch|
    params = Aws::Util.copy_hash(options)
    params[:auto_scaling_group_name] = batch[0].name
    params[:topic_arn] = batch[0].topic_arn
    params[:notification_types] ||= []
    batch.each do |item|
      params[:notification_types] << item.notification_type
    end
    batch[0].client.put_notification_configuration(params)
  end
  nil
end