activateUser method

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

Activates the specified user. Only active users can access 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<ActivateUserResponse> activateUser({
  required String userId,
  String? authenticationToken,
}) async {
  final headers = <String, String>{
    if (authenticationToken != null)
      'Authentication': authenticationToken.toString(),
  };
  final response = await _protocol.send(
    payload: null,
    method: 'POST',
    requestUri: '/api/v1/users/${Uri.encodeComponent(userId)}/activation',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return ActivateUserResponse.fromJson(response);
}