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 BadRequestException.
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 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 {
final $payload = <String, dynamic>{
'UserEmailList': userEmailList,
if (userType != null) 'UserType': userType.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/accounts/${Uri.encodeComponent(accountId)}/users?operation=add',
exceptionFnMap: _exceptionFns,
);
return InviteUsersResponse.fromJson(response);
}