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

******************************************
get_query_results_monitor_top_contributors
******************************************



.. py:method:: NetworkFlowMonitor.Client.get_query_results_monitor_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 specific monitor.

   

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


  **Request Syntax**
  ::

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

    The name of the monitor.

    

  
  :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',
          'topContributors': [
              {
                  'localIp': 'string',
                  'snatIp': 'string',
                  'localInstanceId': 'string',
                  'localVpcId': 'string',
                  'localRegion': 'string',
                  'localAz': 'string',
                  'localSubnetId': 'string',
                  'targetPort': 123,
                  'destinationCategory': 'INTRA_AZ'|'INTER_AZ'|'INTER_VPC'|'UNCLASSIFIED'|'AMAZON_S3'|'AMAZON_DYNAMODB'|'INTER_REGION',
                  'remoteVpcId': 'string',
                  'remoteRegion': 'string',
                  'remoteAz': 'string',
                  'remoteSubnetId': 'string',
                  'remoteInstanceId': 'string',
                  'remoteIp': 'string',
                  'dnatIp': 'string',
                  'value': 123,
                  'traversedConstructs': [
                      {
                          'componentId': 'string',
                          'componentType': 'string',
                          'componentArn': 'string',
                          'serviceName': 'string'
                      },
                  ],
                  'kubernetesMetadata': {
                      'localServiceName': 'string',
                      'localPodName': 'string',
                      'localPodNamespace': 'string',
                      'remoteServiceName': 'string',
                      'remotePodName': 'string',
                      'remotePodNamespace': 'string'
                  },
                  'localInstanceArn': 'string',
                  'localSubnetArn': 'string',
                  'localVpcArn': 'string',
                  'remoteInstanceArn': 'string',
                  'remoteSubnetArn': 'string',
                  'remoteVpcArn': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The units for a metric returned by the query.

        
      

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

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

        
        

        - *(dict) --* 

          A set of information for a top contributor network flow in a monitor. In a monitor, Network Flow Monitor returns information about the network flows for top contributors for each metric. Top contributors are network flows with the top values for each metric type.

          
          

          - **localIp** *(string) --* 

            The IP address of the local resource for a top contributor network flow.

            
          

          - **snatIp** *(string) --* 

            The secure network address translation (SNAT) IP address for a top contributor network flow.

            
          

          - **localInstanceId** *(string) --* 

            The instance identifier for the local resource for a top contributor network flow.

            
          

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

            The VPC ID for a top contributor network flow for the local resource.

            
          

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

            The Amazon Web Services Region for the local resource for a top contributor network flow.

            
          

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

            The Availability Zone for the local resource for a top contributor network flow.

            
          

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

            The subnet ID for the local resource for a top contributor network flow.

            
          

          - **targetPort** *(integer) --* 

            The target port.

            
          

          - **destinationCategory** *(string) --* 

            The destination category for a top contributors row. 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
             
            * ``AWS_SERVICES``: Top contributor network flows to or from Amazon Web Services services
             
            * ``UNCLASSIFIED``: Top contributor network flows that do not have a bucket classification
            

            
          

          - **remoteVpcId** *(string) --* 

            The VPC ID for a top contributor network flow for the remote resource.

            
          

          - **remoteRegion** *(string) --* 

            The Amazon Web Services Region for the remote resource for a top contributor network flow.

            
          

          - **remoteAz** *(string) --* 

            The Availability Zone for the remote resource for a top contributor network flow.

            
          

          - **remoteSubnetId** *(string) --* 

            The subnet ID for the remote resource for a top contributor network flow.

            
          

          - **remoteInstanceId** *(string) --* 

            The instance identifier for the remote resource for a top contributor network flow.

            
          

          - **remoteIp** *(string) --* 

            The IP address of the remote resource for a top contributor network flow.

            
          

          - **dnatIp** *(string) --* 

            The destination network address translation (DNAT) IP address for a top contributor network flow.

            
          

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

            The value of the metric for a top contributor network flow.

            
          

          - **traversedConstructs** *(list) --* 

            The constructs traversed by a network flow.

            
            

            - *(dict) --* 

              A section of the network that a network flow has traveled through.

              
              

              - **componentId** *(string) --* 

                The identifier for the traversed component.

                
              

              - **componentType** *(string) --* 

                The type of component that was traversed.

                
              

              - **componentArn** *(string) --* 

                The Amazon Resource Name (ARN) of a traversed component.

                
              

              - **serviceName** *(string) --* 

                The service name for the traversed component.

                
          
        
          

          - **kubernetesMetadata** *(dict) --* 

            Meta data about Kubernetes resources.

            
            

            - **localServiceName** *(string) --* 

              The service name for a local resource.

              
            

            - **localPodName** *(string) --* 

              The name of the pod for a local resource.

              
            

            - **localPodNamespace** *(string) --* 

              The namespace of the pod for a local resource.

              
            

            - **remoteServiceName** *(string) --* 

              The service name for a remote resource.

              
            

            - **remotePodName** *(string) --* 

              The name of the pod for a remote resource.

              
            

            - **remotePodNamespace** *(string) --* 

              The namespace of the pod for a remote resource.

              
        
          

          - **localInstanceArn** *(string) --* 

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

            
          

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

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

            
          

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

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

            
          

          - **remoteInstanceArn** *(string) --* 

            The Amazon Resource Name (ARN) of a remote resource.

            
          

          - **remoteSubnetArn** *(string) --* 

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

            
          

          - **remoteVpcArn** *(string) --* 

            The Amazon Resource Name (ARN) of a remote 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`

  