Class: Chef::Knife::RdsPgList

Inherits:
Chef::Knife show all
Includes:
RdsBase
Defined in:
lib/chef/knife/rds_pg_list.rb

Constant Summary collapse

PARAMETER_GROUP_INFO =
{
  db_parameter_group_name: 'Name',
  description: 'Description',
  db_parameter_group_family: 'Family',
}

Constants included from RdsBase

Chef::Knife::RdsBase::APPLY_METHODS

Instance Method Summary collapse

Methods included from RdsBase

#assert_name_args_at_least!, #assert_valid_apply_method!, #authenticate!, #connect!, included, #rds

Instance Method Details

#present_parameter_group(group) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/chef/knife/rds_pg_list.rb', line 29

def present_parameter_group(group)
  ui.info '---'
  PARAMETER_GROUP_INFO.each do |k, v|
    ui.info("#{v} - #{group[k]}")
  end
  ui.info '---'
end

#runObject



21
22
23
24
25
26
27
# File 'lib/chef/knife/rds_pg_list.rb', line 21

def run
  authenticate!
  rds.client.describe_db_parameter_groups[:db_parameter_groups].each do |group|
    present_parameter_group(group)
  end
  exit 1
end