:doc:`NeptuneGraph <../../neptune-graph>` / Client / get_query

*********
get_query
*********



.. py:method:: NeptuneGraph.Client.get_query(**kwargs)

  

  Retrieves the status of a specified query.

   

  .. note::

    

    When invoking this operation in a Neptune Analytics cluster, the IAM user or role making the request must have the ``neptune-graph:GetQueryStatus`` IAM action attached.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptune-graph-2023-11-29/GetQuery>`_  


  **Request Syntax**
  ::

    response = client.get_query(
        graphIdentifier='string',
        queryId='string'
    )
    
  :type graphIdentifier: string
  :param graphIdentifier: **[REQUIRED]** 

    The unique identifier of the Neptune Analytics graph.

    

  
  :type queryId: string
  :param queryId: **[REQUIRED]** 

    The ID of the query in question.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'id': 'string',
          'queryString': 'string',
          'waited': 123,
          'elapsed': 123,
          'state': 'RUNNING'|'WAITING'|'CANCELLING'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **id** *(string) --* 

        The ID of the query in question.

        
      

      - **queryString** *(string) --* 

        The query in question.

        
      

      - **waited** *(integer) --* 

        Indicates how long the query waited, in milliseconds.

        
      

      - **elapsed** *(integer) --* 

        The number of milliseconds the query has been running.

        
      

      - **state** *(string) --* 

        State of the query.

        
  
  **Exceptions**
  
  *   :py:class:`NeptuneGraph.Client.exceptions.ThrottlingException`

  
  *   :py:class:`NeptuneGraph.Client.exceptions.ValidationException`

  
  *   :py:class:`NeptuneGraph.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`NeptuneGraph.Client.exceptions.InternalServerException`

  
  *   :py:class:`NeptuneGraph.Client.exceptions.ResourceNotFoundException`

  