Skip to content

list_resolver_query_log_configs

list_resolver_query_log_configs(
    *,
    config_overrides: Optional[Route53ResolverClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    filters: Optional[Filters] = None,
    sort_by: Optional[SortByKey] = None,
    sort_order: Optional[SortOrder] = None,
) -> ListResolverQueryLogConfigsResponse

Lists information about the specified query logging configurations. Each configuration defines where you want Resolver to save DNS query logs and specifies the VPCs that you want to log queries for.

Parameters:

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

    The maximum number of query logging configurations that you want to return in the response to a ListResolverQueryLogConfigs request. If you don't specify a value for MaxResults, Resolver returns up to 100 query logging configurations.

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

    For the first ListResolverQueryLogConfigs request, omit this value.

    If there are more than MaxResults query logging configurations that match the values that you specify for Filters, you can submit another ListResolverQueryLogConfigs request to get the next group of configurations. In the next request, specify the value of NextToken from the previous response.

  • filters (Optional[Filters], default: None ) –

    An optional specification to return a subset of query logging configurations.

    If you submit a second or subsequent ListResolverQueryLogConfigs request and specify the NextToken parameter, you must use the same values for Filters, if any, as in the previous request.

  • sort_by (Optional[SortByKey], default: None ) –

    The element that you want Resolver to sort query logging configurations by.

    If you submit a second or subsequent ListResolverQueryLogConfigs request and specify the NextToken parameter, you must use the same value for SortBy, if any, as in the previous request.

    Valid values include the following elements:

    • Arn: The ARN of the query logging configuration

    • AssociationCount: The number of VPCs that are associated with the specified configuration

    • CreationTime: The date and time that Resolver returned when the configuration was created

    • CreatorRequestId: The value that was specified for CreatorRequestId when the configuration was created

    • DestinationArn: The location that logs are sent to

    • Id: The ID of the configuration

    • Name: The name of the configuration

    • OwnerId: The Amazon Web Services account number of the account that created the configuration

    • ShareStatus: Whether the configuration is shared with other Amazon Web Services accounts or shared with the current account by another Amazon Web Services account. Sharing is configured through Resource Access Manager (RAM).

    • Status: The current status of the configuration. Valid values include the following:

      • CREATING: Resolver is creating the query logging configuration.

      • CREATED: The query logging configuration was successfully created. Resolver is logging queries that originate in the specified VPC.

      • DELETING: Resolver is deleting this query logging configuration.

      • FAILED: Resolver either couldn't create or couldn't delete the query logging configuration. Here are two common causes:

        • The specified destination (for example, an Amazon S3 bucket) was deleted.

        • Permissions don't allow sending logs to the destination.

  • sort_order (Optional[SortOrder], default: None ) –

    If you specified a value for SortBy, the order that you want query logging configurations to be listed in, ASCENDING or DESCENDING.

    If you submit a second or subsequent ListResolverQueryLogConfigs request and specify the NextToken parameter, you must use the same value for SortOrder, if any, as in the previous request.

Raises:

Source code in docs_src/capo_route53resolver/_services/route53_resolver.py
def list_resolver_query_log_configs(
    self,
    *,
    config_overrides: Optional[Route53ResolverClientConfig] = None,
    max_results: Optional[
        "capo_route53resolver.types.max_results.MaxResults"
    ] = None,
    next_token: Optional["capo_route53resolver.types.next_token.NextToken"] = None,
    filters: Optional["capo_route53resolver.types.filters.Filters"] = None,
    sort_by: Optional["capo_route53resolver.types.sort_by_key.SortByKey"] = None,
    sort_order: Optional["capo_route53resolver.types.sort_order.SortOrder"] = None,
) -> "capo_route53resolver.types.list_resolver_query_log_configs_response.ListResolverQueryLogConfigsResponse":
    """<p>Lists information about the specified query logging configurations. Each configuration defines where you want Resolver to save DNS query logs and specifies the VPCs that you want to log queries for.</p>

    Args:
        max_results: <p>The maximum number of query logging configurations that you want to return in the response to a <code>ListResolverQueryLogConfigs</code> request. If you don't specify a value for <code>MaxResults</code>, Resolver returns up to 100 query logging configurations. </p>
        next_token: <p>For the first <code>ListResolverQueryLogConfigs</code> request, omit this value.</p> <p>If there are more than <code>MaxResults</code> query logging configurations that match the values that you specify for <code>Filters</code>, you can submit another <code>ListResolverQueryLogConfigs</code> request to get the next group of configurations. In the next request, specify the value of <code>NextToken</code> from the previous response. </p>
        filters: <p>An optional specification to return a subset of query logging configurations.</p> <note> <p>If you submit a second or subsequent <code>ListResolverQueryLogConfigs</code> request and specify the <code>NextToken</code> parameter, you must use the same values for <code>Filters</code>, if any, as in the previous request.</p> </note>
        sort_by: <p>The element that you want Resolver to sort query logging configurations by. </p> <note> <p>If you submit a second or subsequent <code>ListResolverQueryLogConfigs</code> request and specify the <code>NextToken</code> parameter, you must use the same value for <code>SortBy</code>, if any, as in the previous request.</p> </note> <p>Valid values include the following elements:</p> <ul> <li> <p> <code>Arn</code>: The ARN of the query logging configuration</p> </li> <li> <p> <code>AssociationCount</code>: The number of VPCs that are associated with the specified configuration </p> </li> <li> <p> <code>CreationTime</code>: The date and time that Resolver returned when the configuration was created</p> </li> <li> <p> <code>CreatorRequestId</code>: The value that was specified for <code>CreatorRequestId</code> when the configuration was created</p> </li> <li> <p> <code>DestinationArn</code>: The location that logs are sent to</p> </li> <li> <p> <code>Id</code>: The ID of the configuration</p> </li> <li> <p> <code>Name</code>: The name of the configuration</p> </li> <li> <p> <code>OwnerId</code>: The Amazon Web Services account number of the account that created the configuration</p> </li> <li> <p> <code>ShareStatus</code>: Whether the configuration is shared with other Amazon Web Services accounts or shared with the current account by another Amazon Web Services account. Sharing is configured through Resource Access Manager (RAM).</p> </li> <li> <p> <code>Status</code>: The current status of the configuration. Valid values include the following:</p> <ul> <li> <p> <code>CREATING</code>: Resolver is creating the query logging configuration.</p> </li> <li> <p> <code>CREATED</code>: The query logging configuration was successfully created. Resolver is logging queries that originate in the specified VPC.</p> </li> <li> <p> <code>DELETING</code>: Resolver is deleting this query logging configuration.</p> </li> <li> <p> <code>FAILED</code>: Resolver either couldn't create or couldn't delete the query logging configuration. Here are two common causes:</p> <ul> <li> <p>The specified destination (for example, an Amazon S3 bucket) was deleted.</p> </li> <li> <p>Permissions don't allow sending logs to the destination.</p> </li> </ul> </li> </ul> </li> </ul>
        sort_order: <p>If you specified a value for <code>SortBy</code>, the order that you want query logging configurations to be listed in, <code>ASCENDING</code> or <code>DESCENDING</code>.</p> <note> <p>If you submit a second or subsequent <code>ListResolverQueryLogConfigs</code> request and specify the <code>NextToken</code> parameter, you must use the same value for <code>SortOrder</code>, if any, as in the previous request.</p> </note>

    Raises:
        capo_route53resolver.errors.access_denied_exception.AccessDeniedException: <p>The current account doesn't have the IAM permissions required to perform the specified Resolver operation.</p> <p>This error can also be thrown when a customer has reached the 5120 character limit for a resource policy for CloudWatch Logs.</p>
        capo_route53resolver.errors.internal_service_error_exception.InternalServiceErrorException: <p>We encountered an unknown error. Try again in a few minutes.</p>
        capo_route53resolver.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The value that you specified for <code>NextToken</code> in a <code>List</code> request isn't valid.</p>
        capo_route53resolver.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters in this request are not valid.</p>
        capo_route53resolver.errors.invalid_request_exception.InvalidRequestException: <p>The request is invalid.</p>
        capo_route53resolver.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Try again in a few minutes.</p>
        capo_route53resolver.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_route53resolver.types.list_resolver_query_log_configs_request.ListResolverQueryLogConfigsRequest]",
    ) -> OperationResponse[
        "capo_route53resolver.types.list_resolver_query_log_configs_response.ListResolverQueryLogConfigsResponse"
    ]:
        import capo_route53resolver._operations.route53_resolver.list_resolver_query_log_configs

        output, http_response = (
            capo_route53resolver._operations.route53_resolver.list_resolver_query_log_configs.list_resolver_query_log_configs(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListResolverQueryLogConfigs")
    )
    input_: capo_route53resolver.types.list_resolver_query_log_configs_request.ListResolverQueryLogConfigsRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if filters is not None:
        input_["filters"] = filters
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if sort_order is not None:
        input_["sort_order"] = sort_order

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output