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

*********************************************************
get_query_results_workload_insights_top_contributors_data
*********************************************************



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

  

  Return the data for a query with the Network Flow Monitor query interface. Specify the query that you want to return results for by providing a query ID and a scope ID.

   

  This query returns the data for top contributors for workload insights for a specific scope. Workload insights provide a high level view of network flow performance data collected by agents for a scope. To return just the top contributors, see ``GetQueryResultsWorkloadInsightsTopContributors``.

   

  Create a query ID for this call by calling the corresponding API call to start the query, ``StartQueryWorkloadInsightsTopContributorsData``. Use the scope ID that was returned for your account by ``CreateScope``.

   

  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 call for the top contributors that you want to be returned.

   

  The top contributor network flows overall are for a specific metric type, for example, the number of retransmissions.

  

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


  **Request Syntax**
  ::

    response = client.get_query_results_workload_insights_top_contributors_data(
        scopeId='string',
        queryId='string',
        nextToken='string',
        maxResults=123
    )
    
  :type scopeId: string
  :param scopeId: **[REQUIRED]** 

    The identifier for the scope that includes the resources you want to get data results for. A scope ID is an internally-generated identifier that includes all the resources for a specific root account.

    

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

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

    

  
  :type nextToken: string
  :param nextToken: 

    The token for the next set of results. You receive this token from a previous call.

    

  
  :type maxResults: integer
  :param maxResults: 

    The number of query results that you want to return with this call.

    

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

    
    ::

      {
          'unit': 'Seconds'|'Microseconds'|'Milliseconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None',
          'datapoints': [
              {
                  'timestamps': [
                      datetime(2015, 1, 1),
                  ],
                  'values': [
                      123.0,
                  ],
                  'label': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **unit** *(string) --* 

        The units for a metric returned by the query.

        
      

      - **datapoints** *(list) --* 

        The datapoints returned by the query.

        
        

        - *(dict) --* 

          A data point for a top contributor network flow in a scope. Network Flow Monitor returns information about the network flows with the top values for each metric type, which are called top contributors.

          
          

          - **timestamps** *(list) --* 

            An array of the timestamps for the data point.

            
            

            - *(datetime) --* 
        
          

          - **values** *(list) --* 

            The values for the data point.

            
            

            - *(float) --* 
        
          

          - **label** *(string) --* 

            The label identifying the data point.

            
      
    
      

      - **nextToken** *(string) --* 

        The token for the next set of results. You receive this token from a previous call.

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

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

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

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

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

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

  