deleteWatchlist method
Deletes the specified watchlist from Voice ID. This API throws an exception when there are fraudsters in the watchlist that you are trying to delete. You must delete the fraudsters, and then delete the watchlist. Every domain has a default watchlist which cannot be deleted.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domainId :
The identifier of the domain that contains the watchlist.
Parameter watchlistId :
The identifier of the watchlist to be deleted.
Implementation
Future<void> deleteWatchlist({
required String domainId,
required String watchlistId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'VoiceID.DeleteWatchlist'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DomainId': domainId,
'WatchlistId': watchlistId,
},
);
}