Class: Aws::CloudWatch::CompositeAlarm::Collection

Inherits:
Resources::Collection show all
Defined in:
gems/aws-sdk-cloudwatch/lib/aws-sdk-cloudwatch/composite_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: {})


435
436
437
438
439
440
441
442
443
444
445
# File 'gems/aws-sdk-cloudwatch/lib/aws-sdk-cloudwatch/composite_alarm.rb', line 435

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


449
450
451
452
453
454
455
456
457
458
459
# File 'gems/aws-sdk-cloudwatch/lib/aws-sdk-cloudwatch/composite_alarm.rb', line 449

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


463
464
465
466
467
468
469
470
471
472
473
# File 'gems/aws-sdk-cloudwatch/lib/aws-sdk-cloudwatch/composite_alarm.rb', line 463

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