listSipRules method

Future<ListSipRulesResponse> listSipRules({
  1. int? maxResults,
  2. String? nextToken,
  3. String? sipMediaApplicationId,
})

Lists the SIP rules under the administrator's AWS account.

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

Parameter maxResults : The maximum number of results to return in a single call. Defaults to 100.

Parameter nextToken : The token used to return the next page of results.

Parameter sipMediaApplicationId : The SIP media application ID.

Implementation

Future<ListSipRulesResponse> listSipRules({
  int? maxResults,
  String? nextToken,
  String? sipMediaApplicationId,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'max-results': [maxResults.toString()],
    if (nextToken != null) 'next-token': [nextToken],
    if (sipMediaApplicationId != null)
      'sip-media-application': [sipMediaApplicationId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/sip-rules',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListSipRulesResponse.fromJson(response);
}