:doc:`NetworkFlowMonitor <../../networkflowmonitor>` / Client / start_query_monitor_top_contributors

************************************
start_query_monitor_top_contributors
************************************



.. py:method:: NetworkFlowMonitor.Client.start_query_monitor_top_contributors(**kwargs)

  

  Create a query that you can use with the Network Flow Monitor query interface to return the top contributors for a monitor. Specify the monitor that you want to create the query for.

   

  The call returns a query ID that you can use with `GetQueryResultsMonitorTopContributors <https://docs.aws.amazon.com/networkflowmonitor/2.0/APIReference/API_GetQueryResultsMonitorTopContributors.html>`__ to run the query and return the top contributors for a specific monitor.

   

  Top contributors in Network Flow Monitor are network flows with the highest values for a specific metric type. Top contributors can be across all workload insights, for a given scope, or for a specific monitor. Use the applicable APIs for the top contributors that you want to be returned.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/networkflowmonitor-2023-04-19/StartQueryMonitorTopContributors>`_  


  **Request Syntax**
  ::

    response = client.start_query_monitor_top_contributors(
        monitorName='string',
        startTime=datetime(2015, 1, 1),
        endTime=datetime(2015, 1, 1),
        metricName='ROUND_TRIP_TIME'|'TIMEOUTS'|'RETRANSMISSIONS'|'DATA_TRANSFERRED',
        destinationCategory='INTRA_AZ'|'INTER_AZ'|'INTER_VPC'|'UNCLASSIFIED'|'AMAZON_S3'|'AMAZON_DYNAMODB'|'INTER_REGION',
        limit=123
    )
    
  :type monitorName: string
  :param monitorName: **[REQUIRED]** 

    The name of the monitor.

    

  
  :type startTime: datetime
  :param startTime: **[REQUIRED]** 

    The timestamp that is the date and time that is the beginning of the period that you want to retrieve results for with your query.

    

  
  :type endTime: datetime
  :param endTime: **[REQUIRED]** 

    The timestamp that is the date and time end of the period that you want to retrieve results for with your query.

    

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

    The metric that you want to query top contributors for. That is, you can specify a metric with this call and return the top contributor network flows, for that type of metric, for a monitor and (optionally) within a specific category, such as network flows between Availability Zones.

    

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

    The category that you want to query top contributors for, for a specific monitor. Destination categories can be one of the following:

     

    
    * ``INTRA_AZ``: Top contributor network flows within a single Availability Zone
     
    * ``INTER_AZ``: Top contributor network flows between Availability Zones
     
    * ``INTER_REGION``: Top contributor network flows between Regions (to the edge of another Region)
     
    * ``INTER_VPC``: Top contributor network flows between VPCs
     
    * ``AMAZON_S3``: Top contributor network flows to or from Amazon S3
     
    * ``AMAZON_DYNAMODB``: Top contributor network flows to or from Amazon Dynamo DB
     
    * ``UNCLASSIFIED``: Top contributor network flows that do not have a bucket classification
    

    

  
  :type limit: integer
  :param limit: 

    The maximum number of top contributors to return.

    

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

    
    ::

      {
          'queryId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **queryId** *(string) --* 

        The identifier for the query. A query ID is an internally-generated identifier for a specific query returned from an API call to start a query.

        
  
  **Exceptions**
  
  *   :py:class:`NetworkFlowMonitor.Client.exceptions.ServiceQuotaExceededException`

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

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

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

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

  