Sha256: 87e74687fed01eac6a88d099a9f0db610fd9114e5fb4c77f65067f91502a7a4f

Contents?: true

Size: 796 Bytes

Versions: 4

Compression:

Stored size: 796 Bytes

Contents

module Awspec::Type
  class RdsDbParameterGroup < Base
    attr_reader :parameters

    def initialize(name)
      super
      @parameters = {}
      res = @rds_client.describe_db_parameters({
                                                 db_parameter_group_name: name
                                               })

      loop do
        res.parameters.each do |param|
          @parameters[param.parameter_name] = param.parameter_value
        end
        (res.next_page? && res = res.next_page) || break
      end

      @id = name unless @parameters.empty?
      @resource = @parameters
    end

    def method_missing(name)
      param_name = name.to_s
      if @parameters.include?(param_name)
        @parameters[param_name].to_s
      else
        super
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
awspec-0.13.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.12.1 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.12.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.11.0 lib/awspec/type/rds_db_parameter_group.rb