Skip to content

This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions

Description

This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions. You can retrieve query definitions from the current account or from a source account that is linked to the current account.

You can use the queryDefinitionNamePrefix parameter to limit the results to only the query definitions that have names that start with a certain string.

Usage

cloudwatchlogs_describe_query_definitions(queryLanguage,
  queryDefinitionNamePrefix, maxResults, nextToken)

Arguments

  • queryLanguage

    The query language used for this query. For more information about the query languages that CloudWatch Logs supports, see Supported query languages.

  • queryDefinitionNamePrefix

    Use this parameter to filter your results to only the query definitions that have names that start with the prefix you specify.

  • maxResults

    Limits the number of returned query definitions to the specified number.

  • nextToken

    The token for the next set of items to return. The token expires after 24 hours.

Value

A list with the following syntax:

list(
  queryDefinitions = list(
    list(
      queryLanguage = "CWLI"|"SQL"|"PPL",
      queryDefinitionId = "string",
      name = "string",
      queryString = "string",
      lastModified = 123,
      logGroupNames = list(
        "string"
      ),
      parameters = list(
        list(
          name = "string",
          defaultValue = "string",
          description = "string"
        )
      )
    )
  ),
  nextToken = "string"
)

Request syntax

svc$describe_query_definitions(
  queryLanguage = "CWLI"|"SQL"|"PPL",
  queryDefinitionNamePrefix = "string",
  maxResults = 123,
  nextToken = "string"
)