updateSipMediaApplication method

Future<UpdateSipMediaApplicationResponse> updateSipMediaApplication({
  1. required String sipMediaApplicationId,
  2. List<SipMediaApplicationEndpoint>? endpoints,
  3. String? name,
})

Updates the details for the specified SIP media application.

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

Parameter sipMediaApplicationId : The SIP media application ID.

Parameter endpoints : The new set of endpoints for the specified SIP media application.

Parameter name : The new name for the specified SIP media application.

Implementation

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