Skip to content

list_scheduled_queries

list_scheduled_queries(
    *,
    config_overrides: Optional[TimestreamQueryClientConfig] = None,
    max_results: Optional[MaxScheduledQueriesResults] = None,
    next_token: Optional[NextScheduledQueriesResultsToken] = None,
) -> ListScheduledQueriesResponse

Gets a list of all scheduled queries in the caller's Amazon account and Region. ListScheduledQueries is eventually consistent.

Parameters:

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

    The maximum number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as the argument to the subsequent call to ListScheduledQueriesRequest.

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

    A pagination token to resume pagination.

Raises:

Source code in docs_src/capo_timestream_query/_services/timestream_query.py
def list_scheduled_queries(
    self,
    *,
    config_overrides: Optional[TimestreamQueryClientConfig] = None,
    max_results: Optional[
        "capo_timestream_query.types.max_scheduled_queries_results.MaxScheduledQueriesResults"
    ] = None,
    next_token: Optional[
        "capo_timestream_query.types.next_scheduled_queries_results_token.NextScheduledQueriesResultsToken"
    ] = None,
) -> "capo_timestream_query.types.list_scheduled_queries_response.ListScheduledQueriesResponse":
    """<p>Gets a list of all scheduled queries in the caller's Amazon account and Region. <code>ListScheduledQueries</code> is eventually consistent. </p>

    Args:
        max_results: <p>The maximum number of items to return in the output. If the total number of items available is more than the value specified, a <code>NextToken</code> is provided in the output. To resume pagination, provide the <code>NextToken</code> value as the argument to the subsequent call to <code>ListScheduledQueriesRequest</code>.</p>
        next_token: <p> A pagination token to resume pagination.</p>

    Raises:
        capo_timestream_query.errors.access_denied_exception.AccessDeniedException: <p>You do not have the necessary permissions to access the account settings.</p>
        capo_timestream_query.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred while processing the request.</p>
        capo_timestream_query.errors.invalid_endpoint_exception.InvalidEndpointException: <p>The requested endpoint is invalid.</p>
        capo_timestream_query.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to excessive requests.</p>
        capo_timestream_query.errors.validation_exception.ValidationException: <p> Invalid or malformed request. </p>
        capo_timestream_query.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_timestream_query.types.list_scheduled_queries_request.ListScheduledQueriesRequest]",
    ) -> OperationResponse[
        "capo_timestream_query.types.list_scheduled_queries_response.ListScheduledQueriesResponse"
    ]:
        import capo_timestream_query._operations.timestream_20181101.list_scheduled_queries

        output, http_response = (
            capo_timestream_query._operations.timestream_20181101.list_scheduled_queries.list_scheduled_queries(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListScheduledQueries")
    )
    input_: capo_timestream_query.types.list_scheduled_queries_request.ListScheduledQueriesRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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