disassociateFraudster method

Future<DisassociateFraudsterResponse> disassociateFraudster({
  1. required String domainId,
  2. required String fraudsterId,
  3. required String watchlistId,
})

Disassociates the fraudsters from the watchlist specified. Voice ID always expects a fraudster to be a part of at least one watchlist. If you try to disassociate a fraudster from its only watchlist, a ValidationException is thrown.

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

Parameter fraudsterId : The identifier of the fraudster to be disassociated from the watchlist.

Parameter watchlistId : The identifier of the watchlist that you want to disassociate from the fraudster.

Implementation

Future<DisassociateFraudsterResponse> disassociateFraudster({
  required String domainId,
  required String fraudsterId,
  required String watchlistId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'VoiceID.DisassociateFraudster'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DomainId': domainId,
      'FraudsterId': fraudsterId,
      'WatchlistId': watchlistId,
    },
  );

  return DisassociateFraudsterResponse.fromJson(jsonResponse.body);
}