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::ScheduleScaling

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 = {}) ⇒ ScheduleScaling

Configurations for scaling policy based on time

Parameters:

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

Options Hash (options):

  • :schedule (required, String)

    when to perform this action support formats:

    * 'at(yyyy-mm-ddThh:mm:ss)'
    * 'rate(value unit)'
    * 'cron(fields)'
    
  • :max_capacity (Integer)

    the new maximum capacity

  • :min_capacity (Integer)

    the new minimum capacity

  • :start_time (Integer)

    when this scheduled action becomes active milliseconds since Epoch time

  • :end_time (Integer)

    when this scheduled action expires milliseconds since Epoch time



421
422
423
424
425
426
427
# File 'lib/aws-rails-provisioner/scaling.rb', line 421

def initialize(options = {})
  @schedule = options.fetch(:schedule)
  @max_capacity = options[:max_capacity]
  @min_capacity = options[:min_capacity]
  @start_time = options[:start_time]
  @end_time = options[:end_time]
end

Instance Attribute Details

#end_timeInteger (readonly)

Returns:

  • (Integer)


442
443
444
# File 'lib/aws-rails-provisioner/scaling.rb', line 442

def end_time
  @end_time
end

#max_capacityInteger (readonly)

Returns:

  • (Integer)


433
434
435
# File 'lib/aws-rails-provisioner/scaling.rb', line 433

def max_capacity
  @max_capacity
end

#min_capacityInteger (readonly)

Returns:

  • (Integer)


436
437
438
# File 'lib/aws-rails-provisioner/scaling.rb', line 436

def min_capacity
  @min_capacity
end

#scheduleString (readonly)

Returns:

  • (String)


430
431
432
# File 'lib/aws-rails-provisioner/scaling.rb', line 430

def schedule
  @schedule
end

#start_timeInteger (readonly)

Returns:

  • (Integer)


439
440
441
# File 'lib/aws-rails-provisioner/scaling.rb', line 439

def start_time
  @start_time
end