list_query_logging_configs
(**kwargs)¶Lists the configurations for DNS query logging that are associated with the current Amazon Web Services 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 .
See also: AWS API Documentation
Request Syntax
response = client.list_query_logging_configs(
HostedZoneId='string',
NextToken='string',
MaxResults='string'
)
(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 Amazon Web Services account.
(Optional) If the current Amazon Web Services 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.
(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 Amazon Web Services 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.
dict
Response Syntax
{
'QueryLoggingConfigs': [
{
'Id': 'string',
'HostedZoneId': 'string',
'CloudWatchLogsLogGroupArn': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
QueryLoggingConfigs (list) --
An array that contains one QueryLoggingConfig element for each configuration for DNS query logging that is associated with the current Amazon Web Services account.
(dict) --
A complex type that contains information about a configuration for DNS query logging.
Id (string) --
The ID for a configuration for DNS query logging.
HostedZoneId (string) --
The ID of the hosted zone that CloudWatch Logs is logging queries for.
CloudWatchLogsLogGroupArn (string) --
The Amazon Resource Name (ARN) of the CloudWatch Logs log group that Amazon Route 53 is publishing logs to.
NextToken (string) --
If a response includes the last of the query logging configurations that are associated with the current Amazon Web Services account, NextToken
doesn't appear in the response.
If a response doesn't include the last of the configurations, you can get more configurations by submitting another ListQueryLoggingConfigs request. Get the value of NextToken
that Amazon Route 53 returned in the previous response and include it in NextToken
in the next request.
Exceptions
Route53.Client.exceptions.InvalidInput
Route53.Client.exceptions.InvalidPaginationToken
Route53.Client.exceptions.NoSuchHostedZone