class CloudwatchToGraphite::MetricDimension

A hashable representation of an AWS CloudWatch metric dimension

Constants

Name
Value

Attributes

Name[R]
Value[R]

Public Class Methods

create(name, value) click to toggle source
# File lib/cloudwatchtographite/metricdimension.rb, line 32
def self.create(name, value)
  md = MetricDimension.new
  md.Name = name
  md.Value = value
  md
end
create_from_hash(dhash) click to toggle source
# File lib/cloudwatchtographite/metricdimension.rb, line 39
def self.create_from_hash(dhash)
  Validator::hash_with_keys(dhash, ['name', 'value'])

  MetricDimension::create(
    dhash['name'],
    dhash['value']
  )
end

Public Instance Methods

Name=(n) click to toggle source
# File lib/cloudwatchtographite/metricdimension.rb, line 22
def Name=(n)
  Validator::string_shorter_than(n, 256)
  @Name=n
end
Value=(n) click to toggle source
# File lib/cloudwatchtographite/metricdimension.rb, line 27
def Value=(n)
  Validator::string_shorter_than(n, 256)
  @Value=n
end