lib/rds/right_rds_interface.rb
# List DB instances.
#
# Optional params: +:aws_id+, +:max_records+, +:marker+
#
#  # Get a list of DB instances. The response is an +Array+ of instances.
#  rds.describe_db_instances #=>
#    [{:instance_class=>"db.m1.small",
#      :status=>"creating",
#      :backup_retention_period=>1,
#      :read_replica_db_instance_identifiers=>["kd-delete-me-01-replica-01"],
#      :master_username=>"username",
#      :preferred_maintenance_window=>"sun:05:00-sun:09:00",
#      :db_parameter_group=>{:status=>"in-sync", :name=>"default.mysql5.1"},
#      :multi_az=>true,
#      :engine=>"mysql",
#      :auto_minor_version_upgrade=>false,
#      :allocated_storage=>25,
#      :availability_zone=>"us-east-1d",
#      :aws_id=>"kd-delete-me-01",
#      :preferred_backup_window=>"03:00-05:00",
#      :engine_version=>"5.1.50",
#      :pending_modified_values=>{:master_user_password=>"****"},
#      :db_security_groups=>[{:status=>"active", :name=>"default"}]}]
#
#  # Retrieve a custom DB instance.
#  # The response is an +Array+ with a single instance record.
#  rds.describe_db_instances("kd-test-n3")
#
#  # Incrementally a list DB instances. Every response part is a +Hash+.
#  rds.describe_db_instances(:max_records => 30) do |x|
#    puts x.inspect #=>
#      {:db_instances=>
#        [{:instance_class=>"db.m1.small",
#          :status=>"creating",
#          :backup_retention_period=>1,
#          :read_replica_db_instance_identifiers=>["kd-delete-me-01-replica-01"],
#          :master_username=>"username",
#          :preferred_maintenance_window=>"sun:05:00-sun:09:00",
#          :db_parameter_group=>{:status=>"in-sync", :name=>"default.mysql5.1"},
#          :multi_az=>true,
#          :engine=>"mysql",
#          :auto_minor_version_upgrade=>false,
#          :allocated_storage=>25,
#          :availability_zone=>"us-east-1d",
#          :aws_id=>"kd-delete-me-01",
#          :preferred_backup_window=>"03:00-05:00",
#          :engine_version=>"5.1.50",
#          :pending_modified_values=>{:master_user_password=>"****"},
#          :db_security_groups=>[{:status=>"active", :name=>"default"}]}]}
#    true
#  end
#
List DB instances.

Get a list of DB instances. The response is an +Array+ of instances.

Retrieve a custom DB instance.
The response is an +Array+ with a single instance record.

Incrementally a list DB instances. Every response part is a +Hash+.
List DB instances . Get a list of DB instances . The response is an + Array + of instances . Retrieve a custom DB instance . The response is an + Array + with a single instance record . Incrementally a list DB instances . Every response part is a + Hash + .
def describe_db_instances(*params, &block)
      item, params = AwsUtils::split_items_and_params(params)
      params = params.dup
      params['DBInstanceIdentifier'] = item.first unless item.right_blank?
      result = []
      incrementally_list_items('DescribeDBInstances', DescribeDbInstancesParser, params) do |response|
        result += response[:db_instances]
        block ? block.call(response) : true
      end
      result
    end
def describe_db_instances ( * params , & block ) item , params = AwsUtils :: split_items_and_params ( params ) params = params . dup params [ 'DBInstanceIdentifier' ] = item . first unless item . right_blank? result = [ ] incrementally_list_items ( 'DescribeDBInstances' , DescribeDbInstancesParser , params ) do | response | result += response [ :db_instances ] block ? block . call ( response ) : true end result end
List DB instances.
List DB instances .
params
<not_specific>
block
<not_specific>