CloudWatchLogs / Client / list_log_groups_for_query
list_log_groups_for_query#
- CloudWatchLogs.Client.list_log_groups_for_query(**kwargs)#
Returns a list of the log groups that were analyzed during a single CloudWatch Logs Insights query. This can be useful for queries that use log group name prefixes or the
filterIndex
command, because the log groups are dynamically selected in these cases.For more information about field indexes, see Create field indexes to improve query performance and reduce costs.
See also: AWS API Documentation
Request Syntax
response = client.list_log_groups_for_query( queryId='string', nextToken='string', maxResults=123 )
- Parameters:
queryId (string) –
[REQUIRED]
The ID of the query to use. This query ID is from the response to your StartQuery operation.
nextToken (string) – The token for the next set of items to return. The token expires after 24 hours.
maxResults (integer) – Limits the number of returned log groups to the specified number.
- Return type:
dict
- Returns:
Response Syntax
{ 'logGroupIdentifiers': [ 'string', ], 'nextToken': 'string' }
Response Structure
(dict) –
logGroupIdentifiers (list) –
An array of the names and ARNs of the log groups that were processed in the query.
(string) –
nextToken (string) –
The token for the next set of items to return. The token expires after 24 hours.
Exceptions