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/async_timestream_query.py
| async def list_scheduled_queries(
self,
*,
config_overrides: Optional[AsyncTimestreamQueryClientConfig] = 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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_timestream_query.types.list_scheduled_queries_request.ListScheduledQueriesRequest]",
) -> AsyncOperationResponse[
"capo_timestream_query.types.list_scheduled_queries_response.ListScheduledQueriesResponse"
]:
import capo_timestream_query._operations.timestream_20181101.list_scheduled_queries
(
output,
http_response,
) = await capo_timestream_query._operations.timestream_20181101.list_scheduled_queries.async_list_scheduled_queries(
req.options, req.input
)
return AsyncOperationResponse(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 = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|