Class AWS::AutoScaling::ScheduledActionCollection
In: lib/aws/auto_scaling/scheduled_action_collection.rb
Parent: Object

Methods

Included Modules

Core::Collection::Limitable

Public Class methods

Public Instance methods

@param [String] name The name of the scheduled action. @return [ScheduledAction]

Creates a scheduled scaling action for an Auto Scaling group. If you leave a parameter unspecified, the corresponding attribute remains unchanged in the group.

You must specify an Auto Scaling group. This can be implicit or explicit:

  # given explicity
  auto_scaling.secheduled_actions.create('action-name', :group => 'group-name')

  # implied by the group
  group = auto_scaling.groups.first
  group.secheduled_actions.create('action-name')

@param [String] name

@param [Hash] options

@option options [Group,String] :group

@option options [Integer] :desired_capacity

@option options [Integer] :max_size

@option options [Integer] :min_size

@option options [String] :recurrence

@option options [Time] :start_time

@option options [Time] :end_time

@return [ScheduledAction]

Returns a new {ScheduledActionCollection} filtered by the given options.

  auto_scaling.scheduled_actions.filter(:end_time => Time.now).each do |a|
     # ...
  end

You can chain filter calls:

  actions = auto_scaling.scheduled_actions.
     filter(:group => 'auto-scaling-group-name').
     filter(:start_time => Time.now - 3600).
     filter(:end_time => Time.now)

  actions.each {|scheduled_action| ... }

@param [Hash] filters

@option filters [Group,String] :group

@option filters [Array<String>] :scheduled_actions

   A list of scheduled actions to be described. If this list is
   omitted, all scheduled actions are described. The list of
   requested scheduled actions cannot contain more than 50 items.
   If an Auto Scaling group name is provided,
   the results are limited to that group. If unknown scheduled
   actions are requested, they are ignored with no error.

@option opitons [Time,String] :start_time The earliest scheduled

  start time to return. If +:scheduled_actions+ is provided,
  this field will be ignored.  Should be a Time object or
  an iso8601 string.

@option filters [Time,String] :end_time

@return [ScheduledActionCollection] Returns a scheduled action

  collection that will filter the actions returned by the
  given criteria.
put(name, options = {})

Alias for create

Protected Instance methods

[Validate]