Sha256: cd01990824d215d948f17cd6298c8d21c0a918676c01f14f342ffe92d8741397

Contents?: true

Size: 778 Bytes

Versions: 1

Compression:

Stored size: 778 Bytes

Contents

require 'chef/knife/rds_base'

class Chef
  class Knife
    class RdsPgList < Knife

      '''
      List parameter groups.
      '''

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

      include Knife::RdsBase

      banner 'knife rds pg list (args)'

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

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

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
knife-rds-0.0.1 lib/chef/knife/rds_pg_list.rb