list_queries¶
Operation¶
list_queries
¶
list_queries(request: ListQueriesInput | ListQueriesInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ListQueriesInputDict]) -> ListQueriesOutput
Warning
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. Optionally, to
shorten the list of results, you can specify a time range, formatted as
timestamps, by adding StartTime and EndTime parameters, and a
QueryStatus value. Valid values for QueryStatus include QUEUED,
RUNNING, FINISHED, FAILED, TIMED_OUT, or CANCELLED.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ListQueriesInput | ListQueriesInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[ListQueriesInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
ListQueriesOutput
|
An instance of |
list_queries
async
¶
list_queries(request: ListQueriesInput | ListQueriesInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ListQueriesInputDict]) -> ListQueriesOutput
Warning
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. Optionally, to
shorten the list of results, you can specify a time range, formatted as
timestamps, by adding StartTime and EndTime parameters, and a
QueryStatus value. Valid values for QueryStatus include QUEUED,
RUNNING, FINISHED, FAILED, TIMED_OUT, or CANCELLED.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ListQueriesInput | ListQueriesInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[ListQueriesInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
ListQueriesOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
ListQueriesInputDict
¶
Bases: TypedDict
Dictionary form of ListQueriesInput.
Attributes¶
end_time
instance-attribute
¶
end_time: datetime | None
Use with StartTime to bound a ListQueries request, and limit its
results to only those queries run within a specified time period.
event_data_store
instance-attribute
¶
The ARN (or the ID suffix of the ARN) of an event data store on which queries were run.
max_results
instance-attribute
¶
max_results: int | None
The maximum number of queries to show on a page.
next_token
instance-attribute
¶
next_token: str | None
A token you can use to get the next page of results.
ListQueriesInput
dataclass
¶
Bases: _SerdeShape
Dataclass for ListQueriesInput structure.
Attributes¶
end_time
class-attribute
instance-attribute
¶
end_time: datetime | None = ...
Use with StartTime to bound a ListQueries request, and limit its
results to only those queries run within a specified time period.
event_data_store
class-attribute
instance-attribute
¶
event_data_store: str | None = ...
The ARN (or the ID suffix of the ARN) of an event data store on which queries were run.
max_results
class-attribute
instance-attribute
¶
max_results: int | None = ...
The maximum number of queries to show on a page.
next_token
class-attribute
instance-attribute
¶
next_token: str | None = ...
A token you can use to get the next page of results.
Output¶
ListQueriesOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for ListQueriesOutput structure.
Attributes¶
next_token
class-attribute
instance-attribute
¶
next_token: str | None = ...
A token you can use to get the next page of results.
queries
class-attribute
instance-attribute
¶
Lists matching query results, and shows query ID, status, and creation time of each query.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.