listDNSViews method

Future<ListDNSViewsOutput> listDNSViews({
  1. required String globalResolverId,
  2. int? maxResults,
  3. String? nextToken,
})

Lists all DNS views for a Route 53 Global Resolver with pagination support.

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

Parameter globalResolverId : The Global Resolver ID.

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<ListDNSViewsOutput> listDNSViews({
  required String globalResolverId,
  int? maxResults,
  String? nextToken,
}) async {
  final $query = <String, List<String>>{
    if (maxResults != null) 'max_results': [maxResults.toString()],
    if (nextToken != null) 'next_token': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/dns-views/resolver/${Uri.encodeComponent(globalResolverId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListDNSViewsOutput.fromJson(response);
}