class AwsInstanceList::RDS

Public Class Methods

new(region: 'eu-west-1') click to toggle source
Calls superclass method AwsInstanceList::Base::new
# File lib/aws_instance_list/rds.rb, line 7
def initialize region: 'eu-west-1'

  super region: region

  @client=Aws::RDS::Client.new region: region

end

Public Instance Methods

db_list(options: {}) click to toggle source
# File lib/aws_instance_list/rds.rb, line 23
def db_list options: {}, fields: nil

  fields||=load_db_fields

  instances(options).map do |i|
    fields.map { |f| i.send(f) } << free_storage_space(i.db_instance_identifier) << region
  end
end
descriptions(options={}) click to toggle source
# File lib/aws_instance_list/rds.rb, line 19
def descriptions options={}
  client.describe_db_instances(options)
end
free_storage_space(db_instance_identifier) click to toggle source
# File lib/aws_instance_list/rds.rb, line 36
def free_storage_space db_instance_identifier
  metric.free_storage_space db_instance_identifier
end
list_method() click to toggle source
# File lib/aws_instance_list/rds.rb, line 15
def list_method
  :db_instances
end
load_db_fields() click to toggle source
# File lib/aws_instance_list/rds.rb, line 32
def load_db_fields
  yaml['db']['fields']
end