:doc:`EC2 <../../ec2>` / Client / get_aws_network_performance_data

********************************
get_aws_network_performance_data
********************************



.. py:method:: EC2.Client.get_aws_network_performance_data(**kwargs)

  

  Gets network performance data.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetAwsNetworkPerformanceData>`_  


  **Request Syntax**
  ::

    response = client.get_aws_network_performance_data(
        DataQueries=[
            {
                'Id': 'string',
                'Source': 'string',
                'Destination': 'string',
                'Metric': 'aggregate-latency',
                'Statistic': 'p50',
                'Period': 'five-minutes'|'fifteen-minutes'|'one-hour'|'three-hours'|'one-day'|'one-week'
            },
        ],
        StartTime=datetime(2015, 1, 1),
        EndTime=datetime(2015, 1, 1),
        MaxResults=123,
        NextToken='string',
        DryRun=True|False
    )
    
  :type DataQueries: list
  :param DataQueries: 

    A list of network performance data queries.

    

  
    - *(dict) --* 

      A query used for retrieving network health data.

      

    
      - **Id** *(string) --* 

        A user-defined ID associated with a data query that's returned in the ``dataResponse`` identifying the query. For example, if you set the Id to ``MyQuery01``in the query, the ``dataResponse`` identifies the query as ``MyQuery01``.

        

      
      - **Source** *(string) --* 

        The Region or Availability Zone that's the source for the data query. For example, ``us-east-1``.

        

      
      - **Destination** *(string) --* 

        The Region or Availability Zone that's the target for the data query. For example, ``eu-north-1``.

        

      
      - **Metric** *(string) --* 

        The metric used for the network performance request.

        

      
      - **Statistic** *(string) --* 

        The metric data aggregation period, ``p50``, between the specified ``startDate`` and ``endDate``. For example, a metric of ``five_minutes`` is the median of all the data points gathered within those five minutes. ``p50`` is the only supported metric.

        

      
      - **Period** *(string) --* 

        The aggregation period used for the data query.

        

      
    

  :type StartTime: datetime
  :param StartTime: 

    The starting time for the performance data request. The starting time must be formatted as ``yyyy-mm-ddThh:mm:ss``. For example, ``2022-06-10T12:00:00.000Z``.

    

  
  :type EndTime: datetime
  :param EndTime: 

    The ending time for the performance data request. The end time must be formatted as ``yyyy-mm-ddThh:mm:ss``. For example, ``2022-06-12T12:00:00.000Z``.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned ``nextToken`` value.

    

  
  :type NextToken: string
  :param NextToken: 

    The token for the next page of results.

    

  
  :type DryRun: boolean
  :param DryRun: 

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation``. Otherwise, it is ``UnauthorizedOperation``.

    

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

    
    ::

      {
          'DataResponses': [
              {
                  'Id': 'string',
                  'Source': 'string',
                  'Destination': 'string',
                  'Metric': 'aggregate-latency',
                  'Statistic': 'p50',
                  'Period': 'five-minutes'|'fifteen-minutes'|'one-hour'|'three-hours'|'one-day'|'one-week',
                  'MetricPoints': [
                      {
                          'StartDate': datetime(2015, 1, 1),
                          'EndDate': datetime(2015, 1, 1),
                          'Value': ...,
                          'Status': 'string'
                      },
                  ]
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **DataResponses** *(list) --* 

        The list of data responses.

        
        

        - *(dict) --* 

          The response to a ``DataQuery``.

          
          

          - **Id** *(string) --* 

            The ID passed in the ``DataQuery``.

            
          

          - **Source** *(string) --* 

            The Region or Availability Zone that's the source for the data query. For example, ``us-east-1``.

            
          

          - **Destination** *(string) --* 

            The Region or Availability Zone that's the destination for the data query. For example, ``eu-west-1``.

            
          

          - **Metric** *(string) --* 

            The metric used for the network performance request.

            
          

          - **Statistic** *(string) --* 

            The statistic used for the network performance request.

            
          

          - **Period** *(string) --* 

            The period used for the network performance request.

            
          

          - **MetricPoints** *(list) --* 

            A list of ``MetricPoint`` objects.

            
            

            - *(dict) --* 

              Indicates whether the network was healthy or degraded at a particular point. The value is aggregated from the ``startDate`` to the ``endDate``. Currently only ``five_minutes`` is supported.

              
              

              - **StartDate** *(datetime) --* 

                The start date for the metric point. The starting date for the metric point. The starting time must be formatted as ``yyyy-mm-ddThh:mm:ss``. For example, ``2022-06-10T12:00:00.000Z``.

                
              

              - **EndDate** *(datetime) --* 

                The end date for the metric point. The ending time must be formatted as ``yyyy-mm-ddThh:mm:ss``. For example, ``2022-06-12T12:00:00.000Z``.

                
              

              - **Value** *(float) --* 
              

              - **Status** *(string) --* 

                The status of the metric point.

                
          
        
      
    
      

      - **NextToken** *(string) --* 

        The token to use to retrieve the next page of results. This value is ``null`` when there are no more results to return.

        
  