associatePhoneNumberWithUser method

Future<void> associatePhoneNumberWithUser({
  1. required String accountId,
  2. required String e164PhoneNumber,
  3. required String userId,
})

Associates a phone number with the specified Amazon Chime user.

May throw UnauthorizedClientException. May throw NotFoundException. May throw ForbiddenException. May throw BadRequestException. May throw AccessDeniedException. May throw ThrottledClientException. May throw ServiceUnavailableException. May throw ServiceFailureException.

Parameter accountId : The Amazon Chime account ID.

Parameter e164PhoneNumber : The phone number, in E.164 format.

Parameter userId : The user ID.

Implementation

Future<void> associatePhoneNumberWithUser({
  required String accountId,
  required String e164PhoneNumber,
  required String userId,
}) async {
  ArgumentError.checkNotNull(accountId, 'accountId');
  ArgumentError.checkNotNull(e164PhoneNumber, 'e164PhoneNumber');
  ArgumentError.checkNotNull(userId, 'userId');
  final $payload = <String, dynamic>{
    'E164PhoneNumber': e164PhoneNumber,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/accounts/${Uri.encodeComponent(accountId)}/users/${Uri.encodeComponent(userId)}?operation=associate-phone-number',
    exceptionFnMap: _exceptionFns,
  );
}