NetworkFlowMonitor / Client / get_query_results_monitor_top_contributors

get_query_results_monitor_top_contributors

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, related to a scope (for workload insights) or a monitor.

See also: AWS API Documentation

Request Syntax

response = client.get_query_results_monitor_top_contributors(
    monitorName='string',
    queryId='string',
    nextToken='string',
    maxResults=123
)
Parameters:
  • monitorName (string) –

    [REQUIRED]

    The name of the monitor.

  • queryId (string) –

    [REQUIRED]

    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.

  • nextToken (string) – The token for the next set of results. You receive this token from a previous call.

  • maxResults (integer) – The number of query results that you want to return with this call.

Return type:

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',
            '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_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 tranversed 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