ListQueryLoggingConfigs - Amazon Route 53
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

ListQueryLoggingConfigs

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.

Request Syntax

GET /2013-04-01/queryloggingconfig?hostedzoneid=HostedZoneId&maxresults=MaxResults&nexttoken=NextToken HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

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 Amazon Web Services account.

Length Constraints: Maximum length of 32.

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 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.

nexttoken

(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.

Length Constraints: Maximum length of 1024.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 <?xml version="1.0" encoding="UTF-8"?> <ListQueryLoggingConfigsResponse> <NextToken>string</NextToken> <QueryLoggingConfigs> <QueryLoggingConfig> <CloudWatchLogsLogGroupArn>string</CloudWatchLogsLogGroupArn> <HostedZoneId>string</HostedZoneId> <Id>string</Id> </QueryLoggingConfig> </QueryLoggingConfigs> </ListQueryLoggingConfigsResponse>

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.

ListQueryLoggingConfigsResponse

Root level tag for the ListQueryLoggingConfigsResponse parameters.

Required: Yes

NextToken

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.

Type: String

Length Constraints: Maximum length of 1024.

QueryLoggingConfigs

An array that contains one QueryLoggingConfig element for each configuration for DNS query logging that is associated with the current Amazon Web Services account.

Type: Array of QueryLoggingConfig objects

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidInput

The input is not valid.

HTTP Status Code: 400

InvalidPaginationToken

The value that you specified to get the second or subsequent page of results is invalid.

HTTP Status Code: 400

NoSuchHostedZone

No hosted zone exists with the ID that you specified.

HTTP Status Code: 404

Examples

Example Request

The following request gets the configuration that is associated with the hosted zone Z1D633PJN98FT9.

GET /2013-04-01/queryloggingconfig HTTP/1.1 <?xml version="1.0" encoding="UTF-8"?> <ListQueryLoggingConfigsRequest xmlns="https://route53.amazonaws.com/doc/2013-04-01/"> <HostedZoneId>Z1D633PJN98FT9</HostedZoneId> <MaxResults>1</MaxResults> </ListQueryLoggingConfigsRequest>

Example Response

This example illustrates one usage of ListQueryLoggingConfigs.

HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?> <ListQueryLoggingConfigsResponse xmlns="https://route53.amazonaws.com/doc/2013-04-01/"> <NextToken>87654321-dcba-1234-abcd-1a2b3c4d5e70</NextToken> <QueryLoggingConfigs> <QueryLoggingConfig> <Id>87654321-dcba-1234-abcd-1a2b3c4d5e6f</Id> <HostedZoneId>Z1D633PJN98FT9</HostedZoneId> <CloudWatchLogsLogGroupArn>arn:aws:logs:us-east-1:111111111111:log-group:example.com:*</CloudWatchLogsLogGroupArn> </QueryLoggingConfig> </QueryLoggingConfigs> </ListQueryLoggingConfigsResponse>

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: