putVoiceConnectorProxy method

Future<PutVoiceConnectorProxyResponse> putVoiceConnectorProxy({
  1. required int defaultSessionExpiryMinutes,
  2. required List<String> phoneNumberPoolCountries,
  3. required String voiceConnectorId,
  4. bool? disabled,
  5. String? fallBackPhoneNumber,
})

Puts the specified proxy configuration to the specified Amazon Chime SDK Voice Connector.

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 defaultSessionExpiryMinutes : The default number of minutes allowed for proxy session.

Parameter phoneNumberPoolCountries : The countries for proxy phone numbers to be selected from.

Parameter voiceConnectorId : The Voice Connector ID.

Parameter disabled : When true, stops proxy sessions from being created on the specified Amazon Chime SDK Voice Connector.

Parameter fallBackPhoneNumber : The phone number to route calls to after a proxy session expires.

Implementation

Future<PutVoiceConnectorProxyResponse> putVoiceConnectorProxy({
  required int defaultSessionExpiryMinutes,
  required List<String> phoneNumberPoolCountries,
  required String voiceConnectorId,
  bool? disabled,
  String? fallBackPhoneNumber,
}) async {
  final $payload = <String, dynamic>{
    'DefaultSessionExpiryMinutes': defaultSessionExpiryMinutes,
    'PhoneNumberPoolCountries': phoneNumberPoolCountries,
    if (disabled != null) 'Disabled': disabled,
    if (fallBackPhoneNumber != null)
      'FallBackPhoneNumber': fallBackPhoneNumber,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/voice-connectors/${Uri.encodeComponent(voiceConnectorId)}/programmable-numbers/proxy',
    exceptionFnMap: _exceptionFns,
  );
  return PutVoiceConnectorProxyResponse.fromJson(response);
}