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

Class: Aws::CloudWatch::Alarm::Collection

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

Batch Actions collapse

Methods inherited from Resources::Collection

#each, #first, #limit, #size

Instance Method Details

#batch_delete!(options = {}) ⇒ void

This method returns an undefined value.

Parameters:

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


508
509
510
511
512
513
514
515
516
517
518
# File 'gems/aws-sdk-cloudwatch/lib/aws-sdk-cloudwatch/alarm.rb', line 508

def batch_delete!(options = {})
  batch_enum.each do |batch|
    params = Aws::Util.copy_hash(options)
    params[:alarm_names] ||= []
    batch.each do |item|
      params[:alarm_names] << item.name
    end
    batch[0].client.delete_alarms(params)
  end
  nil
end

#batch_disable_actions(options = {}) ⇒ void

This method returns an undefined value.

Parameters:

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


522
523
524
525
526
527
528
529
530
531
532
# File 'gems/aws-sdk-cloudwatch/lib/aws-sdk-cloudwatch/alarm.rb', line 522

def batch_disable_actions(options = {})
  batch_enum.each do |batch|
    params = Aws::Util.copy_hash(options)
    params[:alarm_names] ||= []
    batch.each do |item|
      params[:alarm_names] << item.name
    end
    batch[0].client.disable_alarm_actions(params)
  end
  nil
end

#batch_enable_actions(options = {}) ⇒ void

This method returns an undefined value.

Parameters:

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


536
537
538
539
540
541
542
543
544
545
546
# File 'gems/aws-sdk-cloudwatch/lib/aws-sdk-cloudwatch/alarm.rb', line 536

def batch_enable_actions(options = {})
  batch_enum.each do |batch|
    params = Aws::Util.copy_hash(options)
    params[:alarm_names] ||= []
    batch.each do |item|
      params[:alarm_names] << item.name
    end
    batch[0].client.enable_alarm_actions(params)
  end
  nil
end