Sha256: 84d0c36c7d5832cf60e8125f49fddea5a62861c81c8686d119713998fbb7b0b2

Contents?: true

Size: 1.6 KB

Versions: 98

Compression:

Stored size: 1.6 KB

Contents

module Fog
  module AWS
    class Elasticache
      class Real
        require 'fog/aws/parsers/elasticache/describe_parameter_groups'

        # Returns a list of CacheParameterGroup descriptions
        #
        # === Parameters (optional)
        # * name <~String> - The name of an existing cache parameter group
        # * options <~Hash> (optional):
        # *  :marker <~String> - marker provided in the previous request
        # *  :max_records <~Integer> - the maximum number of records to include
        def describe_cache_parameter_groups(name = nil, options = {})
          request({
            'Action'                  => 'DescribeCacheParameterGroups',
            'CacheParameterGroupName' => name,
            'Marker'                  => options[:marker],
            'MaxRecords'              => options[:max_records],
            :parser => Fog::Parsers::AWS::Elasticache::DescribeParameterGroups.new
          }.merge(options))
        end
      end

      class Mock
        def describe_cache_parameter_groups(name = nil, options = {})
          response = Excon::Response.new
          parameter_set = []
          if name
            if server = self.data[:parameter_groups][name]
              parameter_set << server
            else
              raise Fog::AWS::Elasticache::NotFound.new("CacheParameterGroup #{name} not found")
            end
          else
            parameter_set = self.data[:parameter_groups].values
          end

          response.status = 200

          response.body = { "CacheParameterGroups" => parameter_set }
          response
        end
      end
    end
  end
end

Version data entries

98 entries across 96 versions & 6 rubygems

Version Path
fog-aws-3.30.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.29.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.28.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.27.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.26.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.25.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.24.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.23.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.22.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.21.1 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.21.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.20.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.19.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.18.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.17.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.16.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.15.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.14.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.13.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb
fog-aws-3.12.0 lib/fog/aws/requests/elasticache/describe_cache_parameter_groups.rb