putVoiceConnectorEmergencyCallingConfiguration method

Future<PutVoiceConnectorEmergencyCallingConfigurationResponse> putVoiceConnectorEmergencyCallingConfiguration({
  1. required EmergencyCallingConfiguration emergencyCallingConfiguration,
  2. required String voiceConnectorId,
})

Puts emergency calling configuration details to the specified Amazon Chime Voice Connector, such as emergency phone numbers and calling countries. Origination and termination settings must be enabled for the Amazon Chime Voice Connector before emergency calling can be configured.

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

Parameter emergencyCallingConfiguration : The emergency calling configuration details.

Parameter voiceConnectorId : The Amazon Chime Voice Connector ID.

Implementation

Future<PutVoiceConnectorEmergencyCallingConfigurationResponse>
    putVoiceConnectorEmergencyCallingConfiguration({
  required EmergencyCallingConfiguration emergencyCallingConfiguration,
  required String voiceConnectorId,
}) async {
  ArgumentError.checkNotNull(
      emergencyCallingConfiguration, 'emergencyCallingConfiguration');
  ArgumentError.checkNotNull(voiceConnectorId, 'voiceConnectorId');
  final $payload = <String, dynamic>{
    'EmergencyCallingConfiguration': emergencyCallingConfiguration,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/voice-connectors/${Uri.encodeComponent(voiceConnectorId)}/emergency-calling-configuration',
    exceptionFnMap: _exceptionFns,
  );
  return PutVoiceConnectorEmergencyCallingConfigurationResponse.fromJson(
      response);
}