Class: Aws::RailsProvisioner::Scaling::MetricScaling::ScalingInterval

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ScalingInterval

Configuration for each scaling interval in scaling steps

Parameters:

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

Options Hash (options):

  • :change (Integer)

    the capacity adjustment to apply in this interval, interpreted differently based on :adjustment_type

    • `changeincapacity` - add the adjustment to the current capacity. The number can be positive or negative

    • `percentchangeincapacity` - add or remove the given percentage of the current capacity to itself. The number can be in the range [-100..100]

    • `exactcapacity` - set the capacity to this number. The number must be positive

  • :lower (Integer)

    lower bound of the interval, scaling adjustment will be applied if the metric is higher than this value

  • :upper (Integer)

    upper bound of the interval, scaling adjustment will be applied if the metric is lower than this value



246
247
248
249
250
# File 'lib/aws-rails-provisioner/scaling.rb', line 246

def initialize(options = {})
  @change = options[:change]
  @lower = options[:lower]
  @upper = options[:upper]
end

Instance Attribute Details

#changeInteger (readonly)

Returns:

  • (Integer)


253
254
255
# File 'lib/aws-rails-provisioner/scaling.rb', line 253

def change
  @change
end

#lowerInteger (readonly)

Returns:

  • (Integer)


256
257
258
# File 'lib/aws-rails-provisioner/scaling.rb', line 256

def lower
  @lower
end

#upperInteger (readonly)

Returns:

  • (Integer)


259
260
261
# File 'lib/aws-rails-provisioner/scaling.rb', line 259

def upper
  @upper
end