inviteUsers method
Sends email to a maximum of 50 users, inviting them to the specified
Amazon Chime Team
account. Only Team
account
types are currently supported for this action.
May throw UnauthorizedClientException. May throw NotFoundException. May throw ForbiddenException. May throw BadRequestException. May throw ThrottledClientException. May throw ServiceUnavailableException. May throw ServiceFailureException.
Parameter accountId
:
The Amazon Chime account ID.
Parameter userEmailList
:
The user email addresses to which to send the email invitation.
Parameter userType
:
The user type.
Implementation
Future<InviteUsersResponse> inviteUsers({
required String accountId,
required List<String> userEmailList,
UserType? userType,
}) async {
ArgumentError.checkNotNull(accountId, 'accountId');
ArgumentError.checkNotNull(userEmailList, 'userEmailList');
final $payload = <String, dynamic>{
'UserEmailList': userEmailList,
if (userType != null) 'UserType': userType.toValue(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/accounts/${Uri.encodeComponent(accountId)}/users?operation=add',
exceptionFnMap: _exceptionFns,
);
return InviteUsersResponse.fromJson(response);
}