delete_file_cache

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 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

Request Syntax

response = client.delete_file_cache(
    FileCacheId='string',
    ClientRequestToken='string'
)
Parameters
  • FileCacheId (string) --

    [REQUIRED]

    The ID of the cache that's being deleted.

  • ClientRequestToken (string) --

    (Optional) An idempotency token for resource creation, in a string of up to 64 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.

Return type

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

  • FSx.Client.exceptions.BadRequest
  • FSx.Client.exceptions.IncompatibleParameterError
  • FSx.Client.exceptions.FileCacheNotFound
  • FSx.Client.exceptions.ServiceLimitExceeded
  • FSx.Client.exceptions.InternalServerError