You are viewing documentation for version 1 of the AWS SDK for Ruby. Version 2 documentation can be found here.
Class: AWS::AutoScaling::ScheduledAction
- Inherits:
-
Core::Resource
- Object
- Core::Resource
- AWS::AutoScaling::ScheduledAction
- Defined in:
- lib/aws/auto_scaling/scheduled_action.rb
Instance Attribute Summary collapse
-
#arn ⇒ String
readonly
The current value of arn.
-
#desired_capacity ⇒ Integer
readonly
The current value of desired_capacity.
-
#end_time ⇒ Time
readonly
The current value of end_time.
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#max_size ⇒ Integer
readonly
The current value of max_size.
-
#min_size ⇒ Integer
readonly
The current value of min_size.
-
#name ⇒ String
readonly
-
#recurrence ⇒ String
readonly
The current value of recurrence.
-
#start_time ⇒ Time
readonly
The current value of start_time.
Instance Method Summary collapse
-
#auto_scaling_group_name ⇒ String
-
#delete ⇒ nil
Deletes the current scheduled action.
-
#exists? ⇒ Boolean
-
#update(options = {}) ⇒ nil
(also: #put)
Updates the scheduled action.
Instance Attribute Details
#arn ⇒ String (readonly)
Returns the current value of arn
33 34 35 |
# File 'lib/aws/auto_scaling/scheduled_action.rb', line 33 def arn @arn end |
#desired_capacity ⇒ Integer (readonly)
Returns the current value of desired_capacity
33 34 35 |
# File 'lib/aws/auto_scaling/scheduled_action.rb', line 33 def desired_capacity @desired_capacity end |
#end_time ⇒ Time (readonly)
Returns the current value of end_time
33 34 35 |
# File 'lib/aws/auto_scaling/scheduled_action.rb', line 33 def end_time @end_time end |
#group ⇒ Object (readonly)
Returns the value of attribute group
45 46 47 |
# File 'lib/aws/auto_scaling/scheduled_action.rb', line 45 def group @group end |
#max_size ⇒ Integer (readonly)
Returns the current value of max_size
33 34 35 |
# File 'lib/aws/auto_scaling/scheduled_action.rb', line 33 def max_size @max_size end |
#min_size ⇒ Integer (readonly)
Returns the current value of min_size
33 34 35 |
# File 'lib/aws/auto_scaling/scheduled_action.rb', line 33 def min_size @min_size end |
#name ⇒ String (readonly)
43 44 45 |
# File 'lib/aws/auto_scaling/scheduled_action.rb', line 43 def name @name end |
#recurrence ⇒ String (readonly)
Returns the current value of recurrence
33 34 35 |
# File 'lib/aws/auto_scaling/scheduled_action.rb', line 33 def recurrence @recurrence end |
#start_time ⇒ Time (readonly)
Returns the current value of start_time
33 34 35 |
# File 'lib/aws/auto_scaling/scheduled_action.rb', line 33 def start_time @start_time end |
Instance Method Details
#auto_scaling_group_name ⇒ String
48 49 50 |
# File 'lib/aws/auto_scaling/scheduled_action.rb', line 48 def auto_scaling_group_name group.name end |
#delete ⇒ nil
Deletes the current scheduled action.
118 119 120 121 |
# File 'lib/aws/auto_scaling/scheduled_action.rb', line 118 def delete client.delete_scheduled_action() nil end |
#exists? ⇒ Boolean
106 107 108 109 110 111 112 113 114 |
# File 'lib/aws/auto_scaling/scheduled_action.rb', line 106 def exists? client_opts = {} client_opts[:scheduled_action_names] = [name] client_opts[:auto_scaling_group_name] = auto_scaling_group_name resp = client.describe_scheduled_actions(client_opts) !resp.scheduled_update_group_actions.empty? rescue Errors::ValidationError false end |
#update(options = {}) ⇒ nil Also known as: put
Updates the scheduled action. If you omit an option, the corresponding value remains unchanged in the Auto Scaling group.
92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/aws/auto_scaling/scheduled_action.rb', line 92 def update = {} .update() # convert times to formatted strings [:start_time, :end_time].each do |opt| if [opt].is_a?(Time) [opt] = [opt].iso8601 end end client.put_scheduled_update_group_action() nil end |