lib/as/right_as_interface.rb
# Incrementally describe Launch Configurations.
# Returns a full description of the launch configurations given the specified names. If no names
# are specified, then the full details of all launch configurations are returned.
# 
# Optional params: +:max_records+, +:next_token+.
#
#  # get max 100 first configurations
#  as.incrementally_describe_launch_configurations #=>
#      {:launch_configurations=>
#        [{:created_time=>Thu May 28 09:31:20 UTC 2009,
#          :kernel_id=>"",
#          :launch_configuration_name=>"CentOS.5.1-c",
#          :ramdisk_id=>"",
#          :security_groups=>["default"],
#          :key_name=>"kd-moo-test",
#          :user_data=>"Woohoo: CentOS.5.1-c-array",
#          :image_id=>"ami-08f41161",
#          :block_device_mappings=>[],
#          :instance_type=>"m1.small"}, ... ]}
#
#  # list by 5 records
#  incrementally_describe_launch_configurations(:max_records => 5) do |response|
#    puts response.inspect
#    true
#  end
#
Incrementally describe Launch Configurations.
Returns a full description of the launch configurations given the specified names. If no names
are specified, then the full details of all launch configurations are returned.





list by 5 records
incrementally_describe_launch_configurations(:max_records => 5) do |response|
puts response.inspect
true
end
Incrementally describe Launch Configurations . Returns a full description of the launch configurations given the specified names . If no names are specified then the full details of all launch configurations are returned . list by 5 records incrementally_describe_launch_configurations ( : max_records = > 5 ) do |response| puts response . inspect true end
def incrementally_describe_launch_configurations(*launch_configuration_names, &block)
      launch_configuration_names = launch_configuration_names.flatten.compact
      params = launch_configuration_names.last.kind_of?(Hash) ? launch_configuration_names.pop : {}
      request_hash = amazonize_list('LaunchConfigurationNames.member', launch_configuration_names)
      request_hash['MaxRecords'] = params[:max_records] if params[:max_records]
      request_hash['NextToken']  = params[:next_token]  if params[:next_token]
      last_response = nil
      loop do
        link = generate_request("DescribeLaunchConfigurations", request_hash)
        last_response = request_info( link, DescribeLaunchConfigurationsParser.new(:logger => @logger) )
        request_hash['NextToken'] = last_response[:next_token]
        break unless block && block.call(last_response) && !last_response[:next_token].right_blank?
      end
      last_response
    end
def incrementally_describe_launch_configurations ( * launch_configuration_names , & block ) launch_configuration_names = launch_configuration_names . flatten . compact params = launch_configuration_names . last . kind_of? ( Hash ) ? launch_configuration_names . pop : { } request_hash = amazonize_list ( 'LaunchConfigurationNames.member' , launch_configuration_names ) request_hash [ 'MaxRecords' ] = params [ :max_records ] if params [ :max_records ] request_hash [ 'NextToken' ] = params [ :next_token ] if params [ :next_token ] last_response = nil loop do link = generate_request ( "DescribeLaunchConfigurations" , request_hash ) last_response = request_info ( link , DescribeLaunchConfigurationsParser . new ( :logger => @logger ) ) request_hash [ 'NextToken' ] = last_response [ :next_token ] break unless block && block . call ( last_response ) && ! last_response [ :next_token ] . right_blank? end last_response end
Incrementally describe Launch Configurations.
Incrementally describe Launch Configurations .
launch_configuration_names
<not_specific>
block
<not_specific>