createSipMediaApplication method

Future<CreateSipMediaApplicationResponse> createSipMediaApplication({
  1. required String awsRegion,
  2. required List<SipMediaApplicationEndpoint> endpoints,
  3. String? name,
})

Creates a SIP media application.

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

Parameter awsRegion : AWS Region assigned to the SIP media application.

Parameter endpoints : List of endpoints (Lambda Amazon Resource Names) specified for the SIP media application. Currently, only one endpoint is supported.

Parameter name : The SIP media application name.

Implementation

Future<CreateSipMediaApplicationResponse> createSipMediaApplication({
  required String awsRegion,
  required List<SipMediaApplicationEndpoint> endpoints,
  String? name,
}) async {
  ArgumentError.checkNotNull(awsRegion, 'awsRegion');
  ArgumentError.checkNotNull(endpoints, 'endpoints');
  _s.validateStringLength(
    'name',
    name,
    1,
    256,
  );
  final $payload = <String, dynamic>{
    'AwsRegion': awsRegion,
    'Endpoints': endpoints,
    if (name != null) 'Name': name,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/sip-media-applications',
    exceptionFnMap: _exceptionFns,
  );
  return CreateSipMediaApplicationResponse.fromJson(response);
}