listFirewallRules method

Future<ListFirewallRulesOutput> listFirewallRules({
  1. required String dnsViewId,
  2. Map<String, List<String>>? filters,
  3. int? maxResults,
  4. String? nextToken,
})

Lists all DNS firewall rules for a DNS view with pagination support.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter dnsViewId : ID of the DNS view.

Parameter filters : Values to filter the results.

Parameter maxResults : The maximum number of results to retrieve in a single call.

Parameter nextToken : A pagination token used for large sets of results that can't be returned in a single response.

Implementation

Future<ListFirewallRulesOutput> listFirewallRules({
  required String dnsViewId,
  Map<String, List<String>>? filters,
  int? maxResults,
  String? nextToken,
}) async {
  final $query = <String, List<String>>{
    'dnsview_id': [dnsViewId],
    if (maxResults != null) 'max_results': [maxResults.toString()],
    if (nextToken != null) 'next_token': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/firewall-rules',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListFirewallRulesOutput.fromJson(response);
}