CloudWatchLogs.Client.
describe_query_definitions
(**kwargs)¶This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions.
You can use the queryDefinitionNamePrefix
parameter to limit the results to only the query definitions that have names that start with a certain string.
See also: AWS API Documentation
Request Syntax
response = client.describe_query_definitions(
queryDefinitionNamePrefix='string',
maxResults=123,
nextToken='string'
)
dict
Response Syntax
{
'queryDefinitions': [
{
'queryDefinitionId': 'string',
'name': 'string',
'queryString': 'string',
'lastModified': 123,
'logGroupNames': [
'string',
]
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
queryDefinitions (list) --
The list of query definitions that match your request.
(dict) --
This structure contains details about a saved CloudWatch Logs Insights query definition.
queryDefinitionId (string) --
The unique ID of the query definition.
name (string) --
The name of the query definition.
queryString (string) --
The query string to use for this definition. For more information, see CloudWatch Logs Insights Query Syntax.
lastModified (integer) --
The date that the query definition was most recently modified.
logGroupNames (list) --
If this query definition contains a list of log groups that it is limited to, that list appears here.
nextToken (string) --
The token for the next set of items to return. The token expires after 24 hours.
Exceptions
CloudWatchLogs.Client.exceptions.InvalidParameterException
CloudWatchLogs.Client.exceptions.ServiceUnavailableException