createUser method
Creates a user under the specified Amazon Chime account.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw NotFoundException.
May throw ServiceFailureException.
May throw ServiceUnavailableException.
May throw ThrottledClientException.
May throw UnauthorizedClientException.
Parameter accountId :
The Amazon Chime account ID.
Parameter email :
The user's email address.
Parameter userType :
The user type.
Parameter username :
The user name.
Implementation
Future<CreateUserResponse> createUser({
required String accountId,
String? email,
UserType? userType,
String? username,
}) async {
final $payload = <String, dynamic>{
if (email != null) 'Email': email,
if (userType != null) 'UserType': userType.value,
if (username != null) 'Username': username,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/accounts/${Uri.encodeComponent(accountId)}/users?operation=create',
exceptionFnMap: _exceptionFns,
);
return CreateUserResponse.fromJson(response);
}