:doc:`ElastiCache <../../elasticache>` / Client / delete_cache_subnet_group

*************************
delete_cache_subnet_group
*************************



.. py:method:: ElastiCache.Client.delete_cache_subnet_group(**kwargs)

  

  Deletes a cache subnet group.

   

  .. note::

    

    You cannot delete a default cache subnet group or one that is associated with any clusters.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DeleteCacheSubnetGroup>`_  


  **Request Syntax**
  ::

    response = client.delete_cache_subnet_group(
        CacheSubnetGroupName='string'
    )
    
  :type CacheSubnetGroupName: string
  :param CacheSubnetGroupName: **[REQUIRED]** 

    The name of the cache subnet group to delete.

     

    Constraints: Must contain no more than 255 alphanumeric characters or hyphens.

    

  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`ElastiCache.Client.exceptions.CacheSubnetGroupInUse`

  
  *   :py:class:`ElastiCache.Client.exceptions.CacheSubnetGroupNotFoundFault`

  

  **Examples**

  Deletes the Amazon ElastiCache subnet group my-subnet-group.
  ::

    response = client.delete_cache_subnet_group(
        CacheSubnetGroupName='my-subnet-group',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ResponseMetadata': {
            '...': '...',
        },
    }

  