@attr_reader [String] auto_scaling_group_name
@attr_reader [Integer] desired_capacity
@attr_reader [String] recurrence
@attr_reader [Time] start_time
@attr_reader [Time] end_time
@attr_reader [Integer] min_size
@attr_reader [Integer] max_size
@attr_reader [String] arn
@return [String]
@api private
# File lib/aws/auto_scaling/scheduled_action.rb, line 38 def initialize name, options = {} @name = name super end
Deletes the current scheduled action. @return [nil]
# File lib/aws/auto_scaling/scheduled_action.rb, line 123 def delete client_opts = {} client_opts[:scheduled_action_name] = name client_opts[:auto_scaling_group_name] = auto_scaling_group_name client.delete_scheduled_action(client_opts) nil end
@return [Boolean]
# File lib/aws/auto_scaling/scheduled_action.rb, line 114 def exists? client_opts = {} client_opts[:scheduled_action_names] = [name] resp = client.describe_scheduled_actions(client_opts) !resp.scheduled_update_group_actions.empty? end
@return [Group]
# File lib/aws/auto_scaling/scheduled_action.rb, line 69 def group Group.new(auto_scaling_group_name, :config => config) end
Updates the scheduled action. If you omit an option, the corresponding value remains unchanged in the Auto Scaling group.
@param [Hash] options
@option options [Integer] :desired_capacity
@option options [String] :recurrence
@option options [Time,String] :start_time
@option options [Time,String] :end_time
@option options [Integer] :min_size
@option options [Integer] :max_size
@return [nil]
# File lib/aws/auto_scaling/scheduled_action.rb, line 93 def update options = {} client_opts = options.dup client_opts[:scheduled_action_name] = name client_opts[:auto_scaling_group_name] = auto_scaling_group_name # convert these options to timestamps [:start_time, :end_time].each do |opt| if client_opts[opt].is_a?(Time) client_opts[opt] = client_opts[opt].iso8601 end end client.put_scheduled_update_group_action(client_opts) nil end
# File lib/aws/auto_scaling/scheduled_action.rb, line 137 def get_resource attr_name = nil client_opts = {} client_opts[:scheduled_action_names] = [name] client.describe_scheduled_actions(client_opts) end
# File lib/aws/auto_scaling/scheduled_action.rb, line 133 def resource_identifiers [[:name, name]] end