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.55.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.54.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.52.4 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.52.3 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.52.2 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.52.1 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.52.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.51.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.50.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.49.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.48.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.47.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.46.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.45.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.44.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.43.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.42.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.41.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.40.0 lib/awspec/type/elasticache_cache_parameter_group.rb
awspec-0.39.0 lib/awspec/type/elasticache_cache_parameter_group.rb