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.25.3 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.25.2 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.25.1 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.25.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.24.2 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.24.1 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.24.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.23.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.22.1 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.22.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.21.6 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.21.5 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.21.4 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.21.3 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.21.2 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.21.1 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.21.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.20.2 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.20.1 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.20.0 lib/awspec/type/rds_db_parameter_group.rb