Module: Tapjoy::TassLib::AWS::Autoscaling::LaunchConfig
- Defined in:
- lib/tapjoy/tass-lib/Autoscaling/launch_config.rb
Overview
This module includes autoscaling launch config calls to AWS
Class Method Summary collapse
- .client ⇒ Object
- .create(image_id:, instance_type:, security_groups:, user_data:, keypair:, iam_instance_profile:, classic_link_vpc_id: nil, classic_link_sg_ids: nil, **unused_values) ⇒ Object
- .delete ⇒ Object
- .describe(config_name) ⇒ Object
Class Method Details
.client ⇒ Object
8 9 10 |
# File 'lib/tapjoy/tass-lib/Autoscaling/launch_config.rb', line 8 def client @client ||= Tapjoy::TassLib::AWS::Autoscaling.client end |
.create(image_id:, instance_type:, security_groups:, user_data:, keypair:, iam_instance_profile:, classic_link_vpc_id: nil, classic_link_sg_ids: nil, **unused_values) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/tapjoy/tass-lib/Autoscaling/launch_config.rb', line 17 def create(image_id:, instance_type:, security_groups:, user_data:, keypair:, iam_instance_profile:, classic_link_vpc_id: nil, classic_link_sg_ids: nil, **unused_values) self.client.create_launch_configuration( launch_configuration_name: Tapjoy::TassLib.config_name, image_id: image_id, iam_instance_profile: iam_instance_profile, instance_type: instance_type, security_groups: security_groups, user_data: "#{Tapjoy::TassLib::Autoscaling::Group.new.encode_user_data(user_data)}", key_name: keypair, classic_link_vpc_id: classic_link_vpc_id, classic_link_vpc_security_groups: classic_link_sg_ids, ) end |
.delete ⇒ Object
12 13 14 15 |
# File 'lib/tapjoy/tass-lib/Autoscaling/launch_config.rb', line 12 def delete self.client.delete_launch_configuration( launch_configuration_name: Tapjoy::TassLib.config_name) end |
.describe(config_name) ⇒ Object
34 35 36 37 38 39 |
# File 'lib/tapjoy/tass-lib/Autoscaling/launch_config.rb', line 34 def describe(config_name) # config_name is scoped locally, since we can't always be sure # that we are using the default launch_configuration name self.client.describe_launch_configurations( launch_configuration_names:[config_name])[0][0] end |