AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Class: Aws::RailsProvisioner::Scaling::MetricScaling::Metric

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-rails-provisioner/scaling.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, options = {}) ⇒ Metric

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :name (String)
  • :namespace (String)
  • :period (Integer)
  • :statistic (String)
  • :color (String)
  • :label (String)
  • :dimensions (Hash)
  • :unit (String)

    available unit: `Seconds`, `Microseconds`, `Milliseconds` `Bytes`, `Kilobytes`, `Megabytes`, `Gigabytes`, `Terabytes` `Bits`, `Kilobits`, `Megabits`, `Gigabits`, `Terabits`, `Percent`, `Count`, `None`, `BytesPerSecond`, `KilobytesPerSecond`, `MegabytesPerSecond`, `GigabytesPerSecond`, `TerabytesPerSecond`, `BitsPerSecond`, `KilobitsPerSecond`, `MegabitsPerSecond`, `GigabitsPerSecond`, `TerabitsPerSecond`, `CountPerSecond`



293
294
295
296
297
298
299
300
301
302
303
# File 'lib/aws-rails-provisioner/scaling.rb', line 293

def initialize(type, options = {})
  @name = options.fetch(:name)
  @namespace = options.fetch(:namespace)
  @color = options[:color]
  @dimensions = Aws::RailsProvisioner::Utils.to_pairs(
    options[:dimensions]) if options[:dimensions]
  @label = options[:label]
  @period_sec = options[:period]
  @statistic = options[:statistics]
  @unit = options[:unit]
end

Instance Attribute Details

#colorString (readonly)

Returns:

  • (String)


312
313
314
# File 'lib/aws-rails-provisioner/scaling.rb', line 312

def color
  @color
end

#dimensionsString (readonly)

Returns:

  • (String)


315
316
317
# File 'lib/aws-rails-provisioner/scaling.rb', line 315

def dimensions
  @dimensions
end

#labelString (readonly)

Returns:

  • (String)


318
319
320
# File 'lib/aws-rails-provisioner/scaling.rb', line 318

def label
  @label
end

#nameString (readonly)

Returns:

  • (String)


306
307
308
# File 'lib/aws-rails-provisioner/scaling.rb', line 306

def name
  @name
end

#namespaceString (readonly)

Returns:

  • (String)


309
310
311
# File 'lib/aws-rails-provisioner/scaling.rb', line 309

def namespace
  @namespace
end

#period_secInteger (readonly)

Returns:

  • (Integer)


321
322
323
# File 'lib/aws-rails-provisioner/scaling.rb', line 321

def period_sec
  @period_sec
end

#statisticString (readonly)

Returns:

  • (String)


324
325
326
# File 'lib/aws-rails-provisioner/scaling.rb', line 324

def statistic
  @statistic
end

#unitString (readonly)

Returns:

  • (String)


327
328
329
# File 'lib/aws-rails-provisioner/scaling.rb', line 327

def unit
  @unit
end