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


281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# File 'gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/notification_configuration.rb', line 281

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
    Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
      batch[0].client.put_notification_configuration(params)
    end
  end
  nil
end