Menu
Amazon ElastiCache
API Reference (API Version 2015-02-02)

DeleteCacheCluster

Deletes a previously provisioned cluster. DeleteCacheCluster deletes all associated cache nodes, node endpoints and the cluster itself. When you receive a successful response from this operation, Amazon ElastiCache immediately begins deleting the cluster; you cannot cancel or revert this operation.

This operation cannot be used to delete a cluster that is the last read replica of a replication group or node group (shard) that has Multi-AZ mode enabled or a cluster from a Redis (cluster mode enabled) replication group.

This operation is not valid for Redis (cluster mode enabled) clusters.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

CacheClusterId

The cluster identifier for the cluster to be deleted. This parameter is not case sensitive.

Type: String

Required: Yes

FinalSnapshotIdentifier

The user-supplied name of a final cluster snapshot. This is the unique name that identifies the snapshot. ElastiCache creates the snapshot, and then deletes the cluster immediately afterward.

Type: String

Required: No

Response Elements

The following element is returned by the service.

CacheCluster

Contains all of the attributes of a specific cluster.

Type: CacheCluster object

Errors

For information about the errors that are common to all actions, see Common Errors.

CacheClusterNotFound

The requested cluster ID does not refer to an existing cluster.

HTTP Status Code: 404

InvalidCacheClusterState

The requested cluster is not in the available state.

HTTP Status Code: 400

InvalidParameterCombination

Two or more incompatible parameters were specified.

HTTP Status Code: 400

InvalidParameterValue

The value for a parameter is invalid.

HTTP Status Code: 400

SnapshotAlreadyExistsFault

You already have a snapshot with the given name.

HTTP Status Code: 400

SnapshotFeatureNotSupportedFault

You attempted one of the following operations:

  • Creating a snapshot of a Redis cluster running on a cache.t1.micro cache node.

  • Creating a snapshot of a cluster that is running Memcached rather than Redis.

Neither of these are supported by ElastiCache.

HTTP Status Code: 400

SnapshotQuotaExceededFault

The request cannot be processed because it would exceed the maximum number of snapshots.

HTTP Status Code: 400

Example

DeleteCacheCluster

Sample Request

https://elasticache.us-west-2.amazonaws.com/
   ?Action=DeleteCacheCluster
   &CacheClusterId=simcoprod43
   &Version=2015-02-02
   &SignatureVersion=4
   &SignatureMethod=HmacSHA256
   &Timestamp=20150202T192317Z
   &X-Amz-Credential=<credential>

Sample Response


<DeleteCacheClusterResponse xmlns="http://elasticache.amazonaws.com/doc/2015-02-02/">
   <DeleteCacheClusterResult>
      <CacheCluster>
         <CacheParameterGroup>
            <ParameterApplyStatus>in-sync</ParameterApplyStatus>
            <CacheParameterGroupName>default.memcached1.4</CacheParameterGroupName>
            <CacheNodeIdsToReboot/>
         </CacheParameterGroup>
         <CacheClusterId>simcoprod43</CacheClusterId>
         <CacheClusterStatus>deleting</CacheClusterStatus>
         <ConfigurationEndpoint>
            <Port>11211</Port>
            <Address>simcoprod43.m2st2p.cfg.cache.amazonaws.com</Address>
         </ConfigurationEndpoint>
         <CacheNodeType>cache.m1.large</CacheNodeType>
         <Engine>memcached</Engine>
         <PendingModifiedValues/>
         <PreferredAvailabilityZone>us-west-2b</PreferredAvailabilityZone>
         <CacheClusterCreateTime>2015-02-02T02:18:26.497Z</CacheClusterCreateTime>
         <EngineVersion>1.4.5</EngineVersion>
         <AutoMinorVersionUpgrade>true</AutoMinorVersionUpgrade>
         <PreferredMaintenanceWindow>mon:05:00-mon:06:00</PreferredMaintenanceWindow>
         <CacheSecurityGroups>
            <CacheSecurityGroup>
               <CacheSecurityGroupName>default</CacheSecurityGroupName>
               <Status>active</Status>
            </CacheSecurityGroup>
         </CacheSecurityGroups>
         <NumCacheNodes>3</NumCacheNodes>
      </CacheCluster>
   </DeleteCacheClusterResult>
   <ResponseMetadata>
      <RequestId>ab84aa7e-b7fa-11e0-9b0b-a9261be2b354</RequestId>
   </ResponseMetadata>
</DeleteCacheClusterResponse>
            

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: