deactivateUser method

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

Deactivates the specified user, which revokes the user's access to Amazon WorkDocs.

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. Not required when using Amazon Web Services administrator credentials to access the API.

Implementation

Future<void> deactivateUser({
  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)}/activation',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}