Sha256: 3a2b0b26636173bbfadf19bf9022aa142e4e3100ed82d3fcdab2d2873ff7dcc3

Contents?: true

Size: 845 Bytes

Versions: 44

Compression:

Stored size: 845 Bytes

Contents

module Awspec::Type
  class ElasticacheCacheParameterGroup < Base
    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_via_client = @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

44 entries across 44 versions & 1 rubygems

Version Path
awspec-0.38.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.37.8 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.37.7 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.37.6 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.37.5 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.37.4 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.37.3 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.37.2 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.37.1 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.37.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.36.1 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.36.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.35.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.34.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.33.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.32.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.31.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.30.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.29.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.28.1 lib/awspec/type/elasticache_cache_parameter_group.rb