Sha256: d4e305d598960c95a8cc40b28c441fbe3358aa4b5714b246168455af8d615fec

Contents?: true

Size: 866 Bytes

Versions: 30

Compression:

Stored size: 866 Bytes

Contents

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

    def initialize(name)
      super
      @parameters = {}
      res = @elasticache_client.describe_cache_parameters({
                                                            cache_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
      @id
    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/elasticache_cache_parameter_group.rb
awspec-0.25.2 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.25.1 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.25.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.24.2 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.24.1 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.24.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.23.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.22.1 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.22.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.21.6 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.21.5 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.21.4 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.21.3 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.21.2 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.21.1 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.21.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.20.2 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.20.1 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.20.0 lib/awspec/type/elasticache_cache_parameter_group.rb