deleteFileCache method
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.
May throw BadRequest.
May throw FileCacheNotFound.
May throw IncompatibleParameterError.
May throw InternalServerError.
May throw ServiceLimitExceeded.
Parameter fileCacheId :
The ID of the cache that's being deleted.
Implementation
Future<DeleteFileCacheResponse> deleteFileCache({
required String fileCacheId,
String? clientRequestToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSSimbaAPIService_v20180301.DeleteFileCache'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FileCacheId': fileCacheId,
'ClientRequestToken':
clientRequestToken ?? _s.generateIdempotencyToken(),
},
);
return DeleteFileCacheResponse.fromJson(jsonResponse.body);
}