deleteServerlessCache method
Deletes a specified existing serverless cache.
May throw InvalidCredentialsException.
May throw InvalidParameterCombinationException.
May throw InvalidParameterValueException.
May throw InvalidServerlessCacheStateFault.
May throw ServerlessCacheNotFoundFault.
May throw ServerlessCacheSnapshotAlreadyExistsFault.
May throw ServiceLinkedRoleNotFoundFault.
Parameter serverlessCacheName :
The identifier of the serverless cache to be deleted.
Parameter finalSnapshotName :
Name of the final snapshot to be taken before the serverless cache is
deleted. Available for Valkey, Redis OSS and Serverless Memcached only.
Default: NULL, i.e. a final snapshot is not taken.
Implementation
Future<DeleteServerlessCacheResponse> deleteServerlessCache({
required String serverlessCacheName,
String? finalSnapshotName,
}) async {
final $request = <String, String>{
'ServerlessCacheName': serverlessCacheName,
if (finalSnapshotName != null) 'FinalSnapshotName': finalSnapshotName,
};
final $result = await _protocol.send(
$request,
action: 'DeleteServerlessCache',
version: '2015-02-02',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'DeleteServerlessCacheResult',
);
return DeleteServerlessCacheResponse.fromXml($result);
}