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: {})


174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# File 'gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/notification_configuration.rb', line 174

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] << {
        notification_type: item.notification_type
      }
    end
    batch[0].client.put_notification_configuration(params)
  end
  nil
end