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

Inherits:
Resources::Collection
  • Object
show all
Defined in:
sig/alarm.rbs,
lib/aws-sdk-cloudwatch/alarm.rb

Batch Actions collapse

Instance Method Details

#batch_delete!(options = {}) ⇒ void

This method returns an undefined value.

Parameters:

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


637
638
639
640
641
642
643
644
645
646
647
648
649
# File 'lib/aws-sdk-cloudwatch/alarm.rb', line 637

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

#batch_disable_actions(options = {}) ⇒ void

This method returns an undefined value.

Parameters:

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


653
654
655
656
657
658
659
660
661
662
663
664
665
# File 'lib/aws-sdk-cloudwatch/alarm.rb', line 653

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

#batch_enable_actions(options = {}) ⇒ void

This method returns an undefined value.

Parameters:

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


669
670
671
672
673
674
675
676
677
678
679
680
681
# File 'lib/aws-sdk-cloudwatch/alarm.rb', line 669

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