CloudWatchLogs / Paginator / DescribeQueries

DescribeQueries#

class CloudWatchLogs.Paginator.DescribeQueries#
paginator = client.get_paginator('describe_queries')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from CloudWatchLogs.Client.describe_queries().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    logGroupName='string',
    status='Scheduled'|'Running'|'Complete'|'Failed'|'Cancelled'|'Timeout'|'Unknown',
    queryLanguage='CWLI'|'SQL'|'PPL',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • logGroupName (string) – Limits the returned queries to only those for the specified log group.

  • status (string) – Limits the returned queries to only those that have the specified status. Valid values are Cancelled, Complete, Failed, Running, and Scheduled.

  • queryLanguage (string) – Limits the returned queries to only the queries that use the specified query language.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'queries': [
        {
            'queryLanguage': 'CWLI'|'SQL'|'PPL',
            'queryId': 'string',
            'queryString': 'string',
            'status': 'Scheduled'|'Running'|'Complete'|'Failed'|'Cancelled'|'Timeout'|'Unknown',
            'createTime': 123,
            'logGroupName': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • queries (list) –

      The list of queries that match the request.

      • (dict) –

        Information about one CloudWatch Logs Insights query that matches the request in a DescribeQueries operation.

        • queryLanguage (string) –

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

        • queryId (string) –

          The unique ID number of this query.

        • queryString (string) –

          The query string used in this query.

        • status (string) –

          The status of this query. Possible values are Cancelled, Complete, Failed, Running, Scheduled, and Unknown.

        • createTime (integer) –

          The date and time that this query was created.

        • logGroupName (string) –

          The name of the log group scanned by this query.

    • NextToken (string) –

      A token to resume pagination.