Sha256: 5b25a3b35551dbe9302e702fd6447b52b60de082f1250ad5c3c4127cbe04ddb4

Contents?: true

Size: 809 Bytes

Versions: 30

Compression:

Stored size: 809 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.tr('_', '-')
      if @parameters.include?(param_name)
        @parameters[param_name].to_s
      else
        super
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
awspec-0.19.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.18.2 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.18.1 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.18.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.17.1 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.17.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.16.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.15.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.14.1 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.14.0 lib/awspec/type/rds_db_parameter_group.rb