Class: Tsudura::Aws::LaunchConfig
- Inherits:
-
Object
- Object
- Tsudura::Aws::LaunchConfig
- Includes:
- Utils
- Defined in:
- lib/tsudura/aws/launch_config.rb
Instance Method Summary collapse
- #create ⇒ Object
- #delete ⇒ Object
-
#initialize(image_id, config, timestamp) ⇒ LaunchConfig
constructor
A new instance of LaunchConfig.
- #options ⇒ Object
Methods included from Utils
Constructor Details
#initialize(image_id, config, timestamp) ⇒ LaunchConfig
Returns a new instance of LaunchConfig.
5 6 7 8 9 |
# File 'lib/tsudura/aws/launch_config.rb', line 5 def initialize(image_id, config, ) @image_id = image_id @config = config @timestamp = end |
Instance Method Details
#create ⇒ Object
17 18 19 |
# File 'lib/tsudura/aws/launch_config.rb', line 17 def create @new_launch_config = autoscaling.create_launch_configuration() end |
#delete ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/tsudura/aws/launch_config.rb', line 21 def delete unless unavailable_launch_configurations.empty? unavailable_launch_configurations.each do |launch_configuration_name| autoscaling.delete_launch_configuration(launch_configuration_name: launch_configuration_name) end end end |
#options ⇒ Object
11 12 13 14 15 |
# File 'lib/tsudura/aws/launch_config.rb', line 11 def option = base_option option[:iam_instance_profile] = @config[:iam_instance_profile] if @config[:iam_instance_profile] option end |