Class AWS::CloudWatch::MetricStatistics
In: lib/aws/cloud_watch/metric_statistics.rb
Parent: Object

Statistics for a metric.

This class is an enumerable collection of data points.

## Enumerating Statistics

    metric = CloudWatch::Metric.new('my/namepace', 'metric-name')

    stats = metric.statistics(
      :start_time => Time.now - 3600,
      :end_time => Time.now,
      :statistics => ['Average'])

    stats.label #=> 'some-label'
    stats.each do |datapoint|
      # datapoint is a hash
    end

@see Core::Collection

Methods

_each_item   new  

Included Modules

Core::Collection::Simple

Attributes

datapoints  [R]  @return [Array<Hash>]
label  [R]  @return [String]
metric  [R]  @return [Metric]

Public Class methods

@param [Metric] metric @param [String] label @param [Array<Hash>] datapoints

Protected Instance methods

[Validate]