Sha256: ba2b1ffec4f320b01fe8531a325f19107b4f15e957ff7afc3bc9d035bf589b8b

Contents?: true

Size: 1.14 KB

Versions: 97

Compression:

Stored size: 1.14 KB

Contents

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

        # Deletes a Cache Cluster
        #
        # === Parameter (required):
        # *  id <~String> - The ID of the cache cluster to delete
        # === Returns
        # * response <~Excon::Response>:
        #   * body <~Hash>
        def delete_cache_cluster(cluster_id)
          request(
            'Action'          => 'DeleteCacheCluster',
            'CacheClusterId'  => cluster_id,
            :parser => Fog::Parsers::AWS::Elasticache::DescribeCacheClusters.new
          )
        end
      end

      class Mock
        def delete_cache_cluster(cluster_id)
          response        = Excon::Response.new
          cluster         = self.data[:clusters][cluster_id]
          cluster['CacheClusterStatus'] = 'deleting'
          response.body = {
            'CacheClusters'     => self.data[:clusters].values,
            'ResponseMetadata'  => { 'RequestId' => Fog::AWS::Mock.request_id }
          }
          self.data[:clusters].delete(cluster_id)
          response
        end
      end
    end
  end
end

Version data entries

97 entries across 95 versions & 6 rubygems

Version Path
fog-aws-0.8.0 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-aws-0.7.5/lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.7.6 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.7.5 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.7.4 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.7.3 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.7.2 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.6.0 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.5.0 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.4.1 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.4.0 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.3.0 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.2.2 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.2.0 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.1.2 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.1.1 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.1.0 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.0.8 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb
fog-aws-0.0.7 lib/fog/aws/requests/elasticache/delete_cache_cluster.rb