listResolverConfigs method

Future<ListResolverConfigsResponse> listResolverConfigs({
  1. int? maxResults,
  2. String? nextToken,
})

Retrieves the Resolver configurations that you have defined. Route 53 Resolver uses the configurations to manage DNS resolution behavior for your VPCs.

May throw AccessDeniedException. May throw InternalServiceErrorException. May throw InvalidNextTokenException. May throw InvalidParameterException. May throw InvalidRequestException. May throw ThrottlingException. May throw ValidationException.

Parameter maxResults : The maximum number of Resolver configurations that you want to return in the response to a ListResolverConfigs request. If you don't specify a value for MaxResults, up to 100 Resolver configurations are returned.

Parameter nextToken : (Optional) If the current Amazon Web Services account has more than MaxResults Resolver configurations, use NextToken to get the second and subsequent pages of results.

For the first ListResolverConfigs request, omit this value.

For the second and subsequent requests, get the value of NextToken from the previous response and specify that value for NextToken in the request.

Implementation

Future<ListResolverConfigsResponse> listResolverConfigs({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    5,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53Resolver.ListResolverConfigs'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListResolverConfigsResponse.fromJson(jsonResponse.body);
}