Sha256: eab0a78f681efe50e779c7479121036dbeecc01e5be9f6bd5f6caf7ffa537e54

Contents?: true

Size: 766 Bytes

Versions: 12

Compression:

Stored size: 766 Bytes

Contents

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

    def initialize(name)
      super
      @parameters = {}

      marker = nil
      while @parameters.empty? || !marker.nil?
        res = @rds_client.describe_db_parameters(
          db_parameter_group_name: name,
          marker: marker)
        marker = res.marker
        break if res.parameters.empty?
        res.parameters.each do |param|
          @parameters[param.parameter_name] = param.parameter_value
        end
      end
      @id = name unless @parameters.empty?
    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

12 entries across 12 versions & 1 rubygems

Version Path
awspec-0.8.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.7.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.6.4 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.6.3 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.6.2 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.6.1 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.6.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.5.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.4.1 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.4.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.3.0 lib/awspec/type/rds_db_parameter_group.rb
awspec-0.2.3 lib/awspec/type/rds_db_parameter_group.rb