CloudTrailClient.list_queries
rboto-cloudtrail==0.4.0 · Service index · Types
Model summary (excerpt): CloudTrail Lake will no longer be open to new customers starting May 31, 2026. If you would like to use CloudTrail Lake, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see CloudTrail Lake availability change . Returns a list of queries and query statuses for the past seven days. You must specify an ARN value for EventDataStore ....
Install and imports
from rboto import CloudTrailClient
from rboto_cloudtrail.types import (
ListQueriesOutput,
QueryStatus,
)
Signature
async def list_queries(
*,
event_data_store: str,
next_token: str | None = None,
max_results: int | None = None,
start_time: str | None = None,
end_time: str | None = None,
query_status: QueryStatus | None = None,
) -> ListQueriesOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
event_data_store |
Yes | The ARN (or the ID suffix of the ARN) of an event data store on which queries were run. |
next_token |
No | A token you can use to get the next page of results. |
max_results |
No | The maximum number of queries to show on a page. |
start_time |
No | Use with EndTime to bound a ListQueries request, and limit its results to only those queries run within a specified time period. |
end_time |
No | Use with StartTime to bound a ListQueries request, and limit its results to only those queries run within a specified time period. |
query_status |
No | The status of queries that you want to return in results. Valid values for QueryStatus include QUEUED , RUNNING , FINISHED , FAILED , TIMED_OUT , or CANCELLED . |
Output
ListQueriesOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
queries |
list[QueryOutput] | None |
Always present | QueryOutput |
next_token |
str | None |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
ListQueriesOutput, QueryStatus
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
client.paginators.list_queries(...) accepts the same arguments and returns AsyncIterator[ListQueriesOutput]. Direct calls return one page. Pages preserve the Output representation above.
Input cursors: next_token. Page-size argument: max_results.
No output stream.
Errors
Import from rboto_cloudtrail.exceptions:
EventDataStoreARNInvalidError, EventDataStoreNotFoundError, InactiveEventDataStoreError, InvalidDateRangeError, InvalidMaxResultsError, InvalidNextTokenError, InvalidParameterError, InvalidQueryStatusError, NoManagementAccountSLRExistsError, OperationNotPermittedError, UnsupportedOperationError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.