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 AccessDeniedException. 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 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 {
  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,
  );
}