describe_queries
¶
describe_queries(
*,
config_overrides: Optional[CloudWatchLogsClientConfig] = None,
log_group_name: Optional[LogGroupName] = None,
status: Optional[QueryStatus] = None,
max_results: Optional[DescribeQueriesMaxResults] = None,
next_token: Optional[NextToken] = None,
query_language: Optional[QueryLanguage] = None,
) -> DescribeQueriesResponse
Returns a list of CloudWatch Logs Insights queries that are scheduled, running, or have been run recently in this account. You can request all queries or limit it to queries of a specific log group or queries with a certain status.
This operation includes both interactive queries started directly by users and automated queries executed by scheduled query configurations. Scheduled query executions appear in the results alongside manually initiated queries, providing visibility into all query activity in your account.
Parameters:
-
log_group_name(Optional[LogGroupName], default:None) –Limits the returned queries to only those for the specified log group.
-
status(Optional[QueryStatus], default:None) –Limits the returned queries to only those that have the specified status. Valid values are
Cancelled,Complete,Failed,Running, andScheduled. -
max_results(Optional[DescribeQueriesMaxResults], default:None) –Limits the number of returned queries to the specified number.
-
query_language(Optional[QueryLanguage], default:None) –Limits the returned queries to only the queries that use the specified query language.
Raises:
-
InvalidParameterException–A parameter is specified incorrectly.
-
ResourceNotFoundException–The specified resource does not exist.
-
ServiceUnavailableException–The service cannot complete the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cloudwatch_logs/_services/cloud_watch_logs.py
3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 | |