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

Class: AWS::CloudWatch::AlarmHistoryItemCollection

Inherits:
Object
  • Object
show all
Includes:
AWS::Core::Collection::WithLimitAndNextToken
Defined in:
lib/aws/cloud_watch/alarm_history_item_collection.rb

Instance Method Summary collapse

Methods included from AWS::Core::Collection

#each, #each_batch, #enum, #first, #in_groups_of, #page

Instance Method Details

#filter(name, value) ⇒ AlarmHistoryItemCollection

Parameters:

  • name (String, Symbol)
  • value (String)

Returns:



32
33
34
35
# File 'lib/aws/cloud_watch/alarm_history_item_collection.rb', line 32

def filter name, value
  filters = @filters.merge(name.to_s.to_sym => value)
  AlarmHistoryItemCollection.new(:filters => filters, :config => config)
end

#with_alarm_name(name) ⇒ AlarmHistoryItemCollection

Parameters:

  • name (String)

Returns:



39
40
41
# File 'lib/aws/cloud_watch/alarm_history_item_collection.rb', line 39

def with_alarm_name name
  filter(:alarm_name, name)
end

#with_end_date(date) ⇒ AlarmHistoryItemCollection

Parameters:

  • date (Time, DateTime, String<ISO8601>)

Returns:



52
53
54
55
# File 'lib/aws/cloud_watch/alarm_history_item_collection.rb', line 52

def with_end_date date
  date = date.iso8601 if date.respond_to?(:iso8601)
  filter(:end_date, date)
end

#with_start_date(date) ⇒ AlarmHistoryItemCollection

Parameters:

  • date (Time, DateTime, String<ISO8601>)

Returns:



45
46
47
48
# File 'lib/aws/cloud_watch/alarm_history_item_collection.rb', line 45

def with_start_date date
  date = date.iso8601 if date.respond_to?(:iso8601)
  filter(:start_date, date)
end

#with_type(type) ⇒ AlarmHistoryItemCollection

Parameters:

  • type (String)

Returns:



59
60
61
# File 'lib/aws/cloud_watch/alarm_history_item_collection.rb', line 59

def with_type type
  filter(:history_item_type, type)
end