class AWS::AutoScaling::ScheduledActionCollection

def [] name

Returns:
  • (ScheduledAction) -

Parameters:
  • name (String) -- The name of the scheduled action.
def [] name
  options = {}
  options[:config] = config
  if group = @filters[:auto_scaling_group_name]
    options[:auto_scaling_group_name] = group
  end
  ScheduledAction.new(name, options)
end

def _each_item next_token, limit, options = {}, &block

def _each_item next_token, limit, options = {}, &block
  options[:next_token] = next_token if next_token
  options[:max_records] = limit if limit
  resp = client.describe_scheduled_actions(options.merge(@filters))
  resp.scheduled_update_group_actions.each do |details|
    
    scheduled_action = ScheduledAction.new_from(
      :describe_scheduled_actions,
      details,
      details.scheduled_action_name,
      :config => config)
    yield(scheduled_action)
    
  end
  resp.data[:next_token]
end

def auto_scaling_group_name_opt options

def auto_scaling_group_name_opt options
  group = options.delete(:group)
  group ||= @filters[:auto_scaling_group_name]
  group = group.name if group.is_a?(Group)
  unless group
    raise ArgumentError, 'missing required option :group'
  end
  group
end

def create name, options = {}

Returns:
  • (ScheduledAction) -

Options Hash: (**options)
  • :end_time (Time) --
  • :start_time (Time) --
  • :recurrence (String) --
  • :min_size (Integer) --
  • :max_size (Integer) --
  • :desired_capacity (Integer) --
  • :group (Group, String) --

Parameters:
  • options (Hash) --
  • name (String) --
def create name, options = {}
  
  scheduled_action = ScheduledAction.new(name, 
    :auto_scaling_group_name => auto_scaling_group_name_opt(options),
    :config => config)
  scheduled_action.update(options)
  scheduled_action
end

def filter filters = {}

Returns:
  • (ScheduledActionCollection) - Returns a scheduled action

Options Hash: (**filters)
  • :end_time (Time, String) --
  • :start_time (Time, String) -- The earliest scheduled
  • :scheduled_actions (Array) --
  • :group (Group, String) --

Parameters:
  • filters (Hash) --
def filter filters = {}
  init_opts = {}
  init_opts[:config] = config
  init_opts[:filters] = @filters
  init_opts[:filters].merge!(filter_opts(filters))
  ScheduledActionCollection.new(init_opts)
end

def filter_opts options

def filter_opts options
  opts = {}
  if g = options[:group]
    opts[:auto_scaling_group_name] = g.is_a?(Group) ? g.name : g
  end
  if actions = options[:scheduled_actions]
    opts[:scheduled_action_names] = actions
  end
  [:end_time, :start_time].each do |opt|
    if options[opt].is_a?(Time)
      opts[opt] = options[opt].iso8601
    end
  end
  opts
end

def initialize options = {}

Other tags:
    Private: -
def initialize options = {}
  @filters = options[:filters] || {}
  super
end