createUser method
Creates a universally unique identifier (UUID) mapped to a list of local user ids within an application.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter applicationId :
The identifier of the application for which the user mapping will be
created.
Parameter userId :
The user emails attached to a user mapping.
Parameter clientToken :
A token that you provide to identify the request to create your Amazon Q
Business user mapping.
Parameter userAliases :
The list of user aliases in the mapping.
Implementation
Future<void> createUser({
required String applicationId,
required String userId,
String? clientToken,
List<UserAlias>? userAliases,
}) async {
final $payload = <String, dynamic>{
'userId': userId,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (userAliases != null) 'userAliases': userAliases,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/applications/${Uri.encodeComponent(applicationId)}/users',
exceptionFnMap: _exceptionFns,
);
}