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

***************************
delete_cache_security_group
***************************



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

  

  Deletes a cache security group.

   

  .. note::

    

    You cannot delete a cache security group if it is associated with any clusters.

    

  

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


  **Request Syntax**
  ::

    response = client.delete_cache_security_group(
        CacheSecurityGroupName='string'
    )
    
  :type CacheSecurityGroupName: string
  :param CacheSecurityGroupName: **[REQUIRED]** 

    The name of the cache security group to delete.

     

    .. note::

      

      You cannot delete the default security group.

      

    

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

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

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

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

  

  **Examples**

  Deletes a cache security group.
  ::

    response = client.delete_cache_security_group(
        CacheSecurityGroupName='my-sec-group',
    )
    
    print(response)

  
  Expected Output:
  ::

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

  