NeptuneData / Client / list_gremlin_queries

list_gremlin_queries#

NeptuneData.Client.list_gremlin_queries(**kwargs)#

Lists active Gremlin queries. See Gremlin query status API for details about the output.

When invoking this operation in a Neptune cluster that has IAM authentication enabled, the IAM user or role making the request must have a policy attached that allows the neptune-db:GetQueryStatus IAM action in that cluster.

Note that the neptune-db:QueryLanguage:Gremlin IAM condition key can be used in the policy document to restrict the use of Gremlin queries (see Condition keys available in Neptune IAM data-access policy statements).

See also: AWS API Documentation

Request Syntax

response = client.list_gremlin_queries(
    includeWaiting=True|False
)
Parameters:

includeWaiting (boolean) – If set to TRUE, the list returned includes waiting queries. The default is FALSE;

Return type:

dict

Returns:

Response Syntax

{
    'acceptedQueryCount': 123,
    'runningQueryCount': 123,
    'queries': [
        {
            'queryId': 'string',
            'queryString': 'string',
            'queryEvalStats': {
                'waited': 123,
                'elapsed': 123,
                'cancelled': True|False,
                'subqueries': {...}|[...]|123|123.4|'string'|True|None
            }
        },
    ]
}

Response Structure

  • (dict) –

    • acceptedQueryCount (integer) –

      The number of queries that have been accepted but not yet completed, including queries in the queue.

    • runningQueryCount (integer) –

      The number of Gremlin queries currently running.

    • queries (list) –

      A list of the current queries.

      • (dict) –

        Captures the status of a Gremlin query (see the Gremlin query status API page).

        • queryId (string) –

          The ID of the Gremlin query.

        • queryString (string) –

          The query string of the Gremlin query.

        • queryEvalStats (dict) –

          The query statistics of the Gremlin query.

          • waited (integer) –

            Indicates how long the query waited, in milliseconds.

          • elapsed (integer) –

            The number of milliseconds the query has been running so far.

          • cancelled (boolean) –

            Set to TRUE if the query was cancelled, or FALSE otherwise.

          • subqueries (document) –

            The number of subqueries in this query.

Exceptions