deleteUser method

Future<void> deleteUser({
  1. required String userId,
  2. String? authenticationToken,
})

Deletes the specified user from a Simple AD or Microsoft AD directory.

May throw EntityNotExistsException. May throw FailedDependencyException. May throw ServiceUnavailableException. May throw UnauthorizedOperationException. May throw UnauthorizedResourceAccessException.

Parameter userId : The ID of the user.

Parameter authenticationToken : Amazon WorkDocs authentication token. Do not set this field when using administrative API actions, as in accessing the API using Amazon Web Services credentials.

Implementation

Future<void> deleteUser({
  required String userId,
  String? authenticationToken,
}) async {
  final headers = <String, String>{
    if (authenticationToken != null)
      'Authentication': authenticationToken.toString(),
  };
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/api/v1/users/${Uri.encodeComponent(userId)}',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}