Class: Aws::RailsProvisioner::Scaling::MetricScaling::Metric
- Inherits:
-
Object
- Object
- Aws::RailsProvisioner::Scaling::MetricScaling::Metric
- Defined in:
- lib/aws-rails-provisioner/scaling.rb
Instance Attribute Summary collapse
- #color ⇒ String readonly
- #dimensions ⇒ String readonly
- #label ⇒ String readonly
- #name ⇒ String readonly
- #namespace ⇒ String readonly
- #period_sec ⇒ Integer readonly
- #statistic ⇒ String readonly
- #unit ⇒ String readonly
Instance Method Summary collapse
-
#initialize(type, options = {}) ⇒ Metric
constructor
Metric to scale on docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html.
Constructor Details
#initialize(type, options = {}) ⇒ Metric
293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/aws-rails-provisioner/scaling.rb', line 293 def initialize(type, = {}) @name = .fetch(:name) @namespace = .fetch(:namespace) @color = [:color] @dimensions = Aws::RailsProvisioner::Utils.to_pairs( [:dimensions]) if [:dimensions] @label = [:label] @period_sec = [:period] @statistic = [:statistics] @unit = [:unit] end |
Instance Attribute Details
#color ⇒ String (readonly)
312 313 314 |
# File 'lib/aws-rails-provisioner/scaling.rb', line 312 def color @color end |
#dimensions ⇒ String (readonly)
315 316 317 |
# File 'lib/aws-rails-provisioner/scaling.rb', line 315 def dimensions @dimensions end |
#label ⇒ String (readonly)
318 319 320 |
# File 'lib/aws-rails-provisioner/scaling.rb', line 318 def label @label end |
#name ⇒ String (readonly)
306 307 308 |
# File 'lib/aws-rails-provisioner/scaling.rb', line 306 def name @name end |
#namespace ⇒ String (readonly)
309 310 311 |
# File 'lib/aws-rails-provisioner/scaling.rb', line 309 def namespace @namespace end |
#period_sec ⇒ Integer (readonly)
321 322 323 |
# File 'lib/aws-rails-provisioner/scaling.rb', line 321 def period_sec @period_sec end |
#statistic ⇒ String (readonly)
324 325 326 |
# File 'lib/aws-rails-provisioner/scaling.rb', line 324 def statistic @statistic end |
#unit ⇒ String (readonly)
327 328 329 |
# File 'lib/aws-rails-provisioner/scaling.rb', line 327 def unit @unit end |