:doc:`FSx <../../fsx>` / Client / delete_file_cache

*****************
delete_file_cache
*****************



.. py:method:: FSx.Client.delete_file_cache(**kwargs)

  

  Deletes an Amazon File Cache resource. After deletion, the cache no longer exists, and its data is gone.

   

  The ``DeleteFileCache`` operation returns while the cache has the ``DELETING`` status. You can check the cache deletion status by calling the `DescribeFileCaches <https://docs.aws.amazon.com/fsx/latest/APIReference/API_DescribeFileCaches.html>`__ operation, which returns a list of caches in your account. If you pass the cache ID for a deleted cache, the ``DescribeFileCaches`` operation returns a ``FileCacheNotFound`` error.

   

  .. warning::

     

    The data in a deleted cache is also deleted and can't be recovered by any means.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DeleteFileCache>`_  


  **Request Syntax**
  ::

    response = client.delete_file_cache(
        FileCacheId='string',
        ClientRequestToken='string'
    )
    
  :type FileCacheId: string
  :param FileCacheId: **[REQUIRED]** 

    The ID of the cache that's being deleted.

    

  
  :type ClientRequestToken: string
  :param ClientRequestToken: 

    (Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.

    This field is autopopulated if not provided.

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'FileCacheId': 'string',
          'Lifecycle': 'AVAILABLE'|'CREATING'|'DELETING'|'UPDATING'|'FAILED'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **FileCacheId** *(string) --* 

        The ID of the cache that's being deleted.

        
      

      - **Lifecycle** *(string) --* 

        The cache lifecycle for the deletion request. If the ``DeleteFileCache`` operation is successful, this status is ``DELETING``.

        
  
  **Exceptions**
  
  *   :py:class:`FSx.Client.exceptions.BadRequest`

  
  *   :py:class:`FSx.Client.exceptions.IncompatibleParameterError`

  
  *   :py:class:`FSx.Client.exceptions.FileCacheNotFound`

  
  *   :py:class:`FSx.Client.exceptions.ServiceLimitExceeded`

  
  *   :py:class:`FSx.Client.exceptions.InternalServerError`

  