Skip to content

list_query_logging_configs async

list_query_logging_configs(
    *,
    config_overrides: Optional[AsyncRoute53ClientConfig] = None,
    hosted_zone_id: Optional[ResourceId] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[int] = None,
) -> ListQueryLoggingConfigsResponse

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.

Parameters:

  • hosted_zone_id (Optional[ResourceId], default: None ) –

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

  • next_token (Optional[PaginationToken], default: None ) –

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

  • max_results (Optional[int], default: None ) –

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

Raises:

Source code in docs_src/capo_route_53/_services/async_route53.py
async def list_query_logging_configs(
    self,
    *,
    config_overrides: Optional[AsyncRoute53ClientConfig] = None,
    hosted_zone_id: Optional["capo_route_53.types.resource_id.ResourceId"] = None,
    next_token: Optional[
        "capo_route_53.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional[int] = None,
) -> "capo_route_53.types.list_query_logging_configs_response.ListQueryLoggingConfigsResponse":
    """<p>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.</p> <p>For more information about DNS query logs, see <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateQueryLoggingConfig.html">CreateQueryLoggingConfig</a>. Additional information, including the format of DNS query logs, appears in <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html">Logging DNS Queries</a> in the <i>Amazon Route 53 Developer Guide</i>.</p>

    Args:
        hosted_zone_id: <p>(Optional) If you want to list the query logging configuration that is associated with a hosted zone, specify the ID in <code>HostedZoneId</code>. </p> <p>If you don't specify a hosted zone ID, <code>ListQueryLoggingConfigs</code> returns all of the configurations that are associated with the current Amazon Web Services account.</p>
        next_token: <p>(Optional) If the current Amazon Web Services account has more than <code>MaxResults</code> query logging configurations, use <code>NextToken</code> to get the second and subsequent pages of results.</p> <p>For the first <code>ListQueryLoggingConfigs</code> request, omit this value.</p> <p>For the second and subsequent requests, get the value of <code>NextToken</code> from the previous response and specify that value for <code>NextToken</code> in the request.</p>
        max_results: <p>(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 <code>MaxResults</code> configurations, use the value of <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListQueryLoggingConfigs.html#API_ListQueryLoggingConfigs_RequestSyntax">NextToken</a> in the response to get the next page of results.</p> <p>If you don't specify a value for <code>MaxResults</code>, Route 53 returns up to 100 configurations.</p>

    Raises:
        capo_route_53.errors.invalid_input.InvalidInput: <p>The input is not valid.</p>
        capo_route_53.errors.invalid_pagination_token.InvalidPaginationToken: <p>The value that you specified to get the second or subsequent page of results is invalid.</p>
        capo_route_53.errors.no_such_hosted_zone.NoSuchHostedZone: <p>No hosted zone exists with the ID that you specified.</p>
        capo_route_53.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_route_53.types.list_query_logging_configs_request.ListQueryLoggingConfigsRequest]",
    ) -> AsyncOperationResponse[
        "capo_route_53.types.list_query_logging_configs_response.ListQueryLoggingConfigsResponse"
    ]:
        import capo_route_53._operations.aws_dns_v20130401.list_query_logging_configs

        (
            output,
            http_response,
        ) = await capo_route_53._operations.aws_dns_v20130401.list_query_logging_configs.async_list_query_logging_configs(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListQueryLoggingConfigs")
    )
    input_: capo_route_53.types.list_query_logging_configs_request.ListQueryLoggingConfigsRequest = {}
    if hosted_zone_id is not None:
        input_["hosted_zone_id"] = hosted_zone_id
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output