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

****************************************************
get_query_results_workload_insights_top_contributors
****************************************************



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

  

  Return the data for a query with the Network Flow Monitor query interface. You specify the query that you want to return results for by providing a query ID and a monitor name.

   

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

   

  Create a query ID for this call by calling the corresponding API call to start the query, ``StartQueryWorkloadInsightsTopContributors``. 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.

  

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


  **Request Syntax**
  ::

    response = client.get_query_results_workload_insights_top_contributors(
        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**

    
    ::

      {
          'topContributors': [
              {
                  'accountId': 'string',
                  'localSubnetId': 'string',
                  'localAz': 'string',
                  'localVpcId': 'string',
                  'localRegion': 'string',
                  'remoteIdentifier': 'string',
                  'value': 123,
                  'localSubnetArn': 'string',
                  'localVpcArn': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **topContributors** *(list) --* 

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

        
        

        - *(dict) --* 

          A row for a top contributor for a scope.

          
          

          - **accountId** *(string) --* 

            The account ID for a specific row of data.

            
          

          - **localSubnetId** *(string) --* 

            The subnet identifier for the local resource.

            
          

          - **localAz** *(string) --* 

            The identifier for the Availability Zone where the local resource is located.

            
          

          - **localVpcId** *(string) --* 

            The identifier for the VPC for the local resource.

            
          

          - **localRegion** *(string) --* 

            The Amazon Web Services Region where the local resource is located.

            
          

          - **remoteIdentifier** *(string) --* 

            The identifier of a remote resource. For a VPC or subnet, this identifier is the VPC Amazon Resource Name (ARN) or subnet ARN. For an Availability Zone, this identifier is the AZ name, for example, us-west-2b. For an Amazon Web Services Region , this identifier is the Region name, for example, us-west-2.

            
          

          - **value** *(integer) --* 

            The value for a metric.

            
          

          - **localSubnetArn** *(string) --* 

            The Amazon Resource Name (ARN) of a local subnet.

            
          

          - **localVpcArn** *(string) --* 

            The Amazon Resource Name (ARN) of a local VPC.

            
      
    
      

      - **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`

  