createVoiceConnector method

Future<CreateVoiceConnectorResponse> createVoiceConnector({
  1. required String name,
  2. required bool requireEncryption,
  3. VoiceConnectorAwsRegion? awsRegion,
})

Creates an Amazon Chime Voice Connector under the administrator's AWS account. You can choose to create an Amazon Chime Voice Connector in a specific AWS Region.

Enabling CreateVoiceConnectorRequest$RequireEncryption configures your Amazon Chime Voice Connector to use TLS transport for SIP signaling and Secure RTP (SRTP) for media. Inbound calls use TLS transport, and unencrypted outbound calls are blocked.

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

Parameter name : The name of the Amazon Chime Voice Connector.

Parameter requireEncryption : When enabled, requires encryption for the Amazon Chime Voice Connector.

Parameter awsRegion : The AWS Region in which the Amazon Chime Voice Connector is created. Default value: us-east-1.

Implementation

Future<CreateVoiceConnectorResponse> createVoiceConnector({
  required String name,
  required bool requireEncryption,
  VoiceConnectorAwsRegion? awsRegion,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    256,
    isRequired: true,
  );
  ArgumentError.checkNotNull(requireEncryption, 'requireEncryption');
  final $payload = <String, dynamic>{
    'Name': name,
    'RequireEncryption': requireEncryption,
    if (awsRegion != null) 'AwsRegion': awsRegion.toValue(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/voice-connectors',
    exceptionFnMap: _exceptionFns,
  );
  return CreateVoiceConnectorResponse.fromJson(response);
}