Class: AWS::CloudWatch::MetricCollection
- Inherits:
-
MetricBase
- Object
- MetricBase
- AWS::CloudWatch::MetricCollection
- Includes:
- Enumerable
- Defined in:
- lib/aws/cloud_watch/metric_collection.rb
Instance Attribute Summary
Attributes inherited from MetricBase
#dimensions, #name, #namespace
Instance Method Summary collapse
- #each(&block) ⇒ Object
- #get_by_name(name) ⇒ Object (also: #[])
Methods inherited from MetricBase
#attr_names, #camel_case, #initialize, #inspect, #method_missing, #options, #set_attributes, #to_sym
Constructor Details
This class inherits a constructor from AWS::CloudWatch::MetricBase
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class AWS::CloudWatch::MetricBase
Instance Method Details
#each(&block) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/aws/cloud_watch/metric_collection.rb', line 21 def each &block next_token = nil begin = .merge(next_token ? { :next_token => next_token } : {}) response = client.list_metrics() response.metrics.each do |t| metric = Metric.new(t.merge :config => config) yield(metric) end end while(next_token = response.data[:next_token]) nil end |