:doc:`CloudWatchInternetMonitor <../../internetmonitor>` / Client / get_query_status

****************
get_query_status
****************



.. py:method:: CloudWatchInternetMonitor.Client.get_query_status(**kwargs)

  

  Returns the current status of a query for the Amazon CloudWatch Internet Monitor query interface, for a specified query ID and monitor. When you run a query, check the status to make sure that the query has ``SUCCEEDED`` before you review the results.

   

  
  * ``QUEUED``: The query is scheduled to run.
   
  * ``RUNNING``: The query is in progress but not complete.
   
  * ``SUCCEEDED``: The query completed sucessfully.
   
  * ``FAILED``: The query failed due to an error.
   
  * ``CANCELED``: The query was canceled.
  

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/internetmonitor-2021-06-03/GetQueryStatus>`_  


  **Request Syntax**
  ::

    response = client.get_query_status(
        MonitorName='string',
        QueryId='string'
    )
    
  :type MonitorName: string
  :param MonitorName: **[REQUIRED]** 

    The name of the monitor.

    

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

    The ID of the query that you want to return the status for. A ``QueryId`` is an internally-generated dentifier for a specific query.

    

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

    
    ::

      {
          'Status': 'QUEUED'|'RUNNING'|'SUCCEEDED'|'FAILED'|'CANCELED'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Status** *(string) --* 

        The current status for a query.

        
  
  **Exceptions**
  
  *   :py:class:`CloudWatchInternetMonitor.Client.exceptions.InternalServerException`

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

  
  *   :py:class:`CloudWatchInternetMonitor.Client.exceptions.ThrottlingException`

  
  *   :py:class:`CloudWatchInternetMonitor.Client.exceptions.LimitExceededException`

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

  