listQueryLoggingConfigs method

Future<ListQueryLoggingConfigsResponse> listQueryLoggingConfigs({
  1. String? hostedZoneId,
  2. String? maxResults,
  3. String? nextToken,
})

Lists the configurations for DNS query logging that are associated with the current AWS account or the configuration that is associated with a specified hosted zone.

For more information about DNS query logs, see CreateQueryLoggingConfig. Additional information, including the format of DNS query logs, appears in Logging DNS Queries in the Amazon Route 53 Developer Guide.

May throw InvalidInput. May throw InvalidPaginationToken. May throw NoSuchHostedZone.

Parameter hostedZoneId : (Optional) If you want to list the query logging configuration that is associated with a hosted zone, specify the ID in HostedZoneId.

If you don't specify a hosted zone ID, ListQueryLoggingConfigs returns all of the configurations that are associated with the current AWS account.

Parameter maxResults : (Optional) The maximum number of query logging configurations that you want Amazon Route 53 to return in response to the current request. If the current AWS account has more than MaxResults configurations, use the value of NextToken in the response to get the next page of results.

If you don't specify a value for MaxResults, Route 53 returns up to 100 configurations.

Parameter nextToken : (Optional) If the current AWS account has more than MaxResults query logging configurations, use NextToken to get the second and subsequent pages of results.

For the first ListQueryLoggingConfigs 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<ListQueryLoggingConfigsResponse> listQueryLoggingConfigs({
  String? hostedZoneId,
  String? maxResults,
  String? nextToken,
}) async {
  _s.validateStringLength(
    'hostedZoneId',
    hostedZoneId,
    0,
    32,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    1024,
  );
  final $query = <String, List<String>>{
    if (hostedZoneId != null) 'hostedzoneid': [hostedZoneId],
    if (maxResults != null) 'maxresults': [maxResults],
    if (nextToken != null) 'nexttoken': [nextToken],
  };
  final $result = await _protocol.send(
    method: 'GET',
    requestUri: '/2013-04-01/queryloggingconfig',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListQueryLoggingConfigsResponse.fromXml($result.body);
}