lib/as/right_as_interface.rb
# Creates a new Launch Configuration. Please note that the launch configuration name used must
# be unique, within the scope of your Amazon Web Services AWS account, and the maximum limit of
# launch configurations must not yet have been met, or else the call will fail.
#
# Once created, the new launch configuration is available for immediate use.
#
# Options: +:security_groups+, +:block_device_mappings+, +:key_name+,
# +:user_data+, +:kernel_id+, +:ramdisk_id+
#
#  as.create_launch_configuration('kd: CentOS.5.1-c.1', 'ami-08f41161', 'c1.medium',
#    :key_name        => 'tim',
#    :security_groups => ['default'],
#    :user_data       => "Woohoo: CentOS.5.1-c",
#    :block_device_mappings => [ { :device_name     => '/dev/sdk',
#                                  :ebs_snapshot_id => 'snap-145cbc7d',
#          :ebs_delete_on_termination => true,
#          :ebs_volume_size => 3,
#          :virtual_name => 'ephemeral2'
#                                } ]
#    ) #=> true
#
Creates a new Launch Configuration. Please note that the launch configuration name used must
be unique, within the scope of your Amazon Web Services AWS account, and the maximum limit of
launch configurations must not yet have been met, or else the call will fail.

Once created, the new launch configuration is available for immediate use.




Creates a new Launch Configuration . Please note that the launch configuration name used must be unique within the scope of your Amazon Web Services AWS account and the maximum limit of launch configurations must not yet have been met or else the call will fail . Once created the new launch configuration is available for immediate use .
def create_launch_configuration(launch_configuration_name, image_id, instance_type, options={})
      request_hash = { 'LaunchConfigurationName' => launch_configuration_name,
                       'ImageId'                 => image_id,
                       'InstanceType'            => instance_type }
      request_hash.merge!(amazonize_list('SecurityGroups.member',      options[:security_groups]))       unless options[:security_groups].right_blank?
      request_hash.merge!(amazonize_block_device_mappings(options[:block_device_mappings], 'BlockDeviceMappings.member'))
      request_hash['KeyName']   = options[:key_name]   if options[:key_name]
      request_hash['UserData']  = Base64.encode64(options[:user_data]).delete("\n") unless options[:user_data].right_blank? if options[:user_data]
      request_hash['KernelId']  = options[:kernel_id]  if options[:kernel_id]
      request_hash['RamdiskId'] = options[:ramdisk_id] if options[:ramdisk_id]
      link = generate_request("CreateLaunchConfiguration", request_hash)
      request_info(link, RightHttp2xxParser.new(:logger => @logger))
    end
def create_launch_configuration ( launch_configuration_name , image_id , instance_type , options = { } ) request_hash = { 'LaunchConfigurationName' => launch_configuration_name , 'ImageId' => image_id , 'InstanceType' => instance_type } request_hash . merge! ( amazonize_list ( 'SecurityGroups.member' , options [ :security_groups ] ) ) unless options [ :security_groups ] . right_blank? request_hash . merge! ( amazonize_block_device_mappings ( options [ :block_device_mappings ] , 'BlockDeviceMappings.member' ) ) request_hash [ 'KeyName' ] = options [ :key_name ] if options [ :key_name ] request_hash [ 'UserData' ] = Base64 . encode64 ( options [ :user_data ] ) . delete ( "\n" ) unless options [ :user_data ] . right_blank? if options [ :user_data ] request_hash [ 'KernelId' ] = options [ :kernel_id ] if options [ :kernel_id ] request_hash [ 'RamdiskId' ] = options [ :ramdisk_id ] if options [ :ramdisk_id ] link = generate_request ( "CreateLaunchConfiguration" , request_hash ) request_info ( link , RightHttp2xxParser . new ( :logger => @logger ) ) end
Creates a new Launch Configuration.
Creates a new Launch Configuration .
launch_configuration_name
<not_specific>
image_id
<not_specific>
instance_type
<not_specific>
options
<not_specific>