:doc:`XRay <../../xray>` / Client / get_time_series_service_statistics

**********************************
get_time_series_service_statistics
**********************************



.. py:method:: XRay.Client.get_time_series_service_statistics(**kwargs)

  

  Get an aggregation of service statistics defined by a specific time range.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTimeSeriesServiceStatistics>`_  


  **Request Syntax**
  ::

    response = client.get_time_series_service_statistics(
        StartTime=datetime(2015, 1, 1),
        EndTime=datetime(2015, 1, 1),
        GroupName='string',
        GroupARN='string',
        EntitySelectorExpression='string',
        Period=123,
        ForecastStatistics=True|False,
        NextToken='string'
    )
    
  :type StartTime: datetime
  :param StartTime: **[REQUIRED]** 

    The start of the time frame for which to aggregate statistics.

    

  
  :type EndTime: datetime
  :param EndTime: **[REQUIRED]** 

    The end of the time frame for which to aggregate statistics.

    

  
  :type GroupName: string
  :param GroupName: 

    The case-sensitive name of the group for which to pull statistics from.

    

  
  :type GroupARN: string
  :param GroupARN: 

    The Amazon Resource Name (ARN) of the group for which to pull statistics from.

    

  
  :type EntitySelectorExpression: string
  :param EntitySelectorExpression: 

    A filter expression defining entities that will be aggregated for statistics. Supports ID, service, and edge functions. If no selector expression is specified, edge statistics are returned.

    

  
  :type Period: integer
  :param Period: 

    Aggregation period in seconds.

    

  
  :type ForecastStatistics: boolean
  :param ForecastStatistics: 

    The forecasted high and low fault count values. Forecast enabled requests require the EntitySelectorExpression ID be provided.

    

  
  :type NextToken: string
  :param NextToken: 

    Pagination token.

    

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

    
    ::

      {
          'TimeSeriesServiceStatistics': [
              {
                  'Timestamp': datetime(2015, 1, 1),
                  'EdgeSummaryStatistics': {
                      'OkCount': 123,
                      'ErrorStatistics': {
                          'ThrottleCount': 123,
                          'OtherCount': 123,
                          'TotalCount': 123
                      },
                      'FaultStatistics': {
                          'OtherCount': 123,
                          'TotalCount': 123
                      },
                      'TotalCount': 123,
                      'TotalResponseTime': 123.0
                  },
                  'ServiceSummaryStatistics': {
                      'OkCount': 123,
                      'ErrorStatistics': {
                          'ThrottleCount': 123,
                          'OtherCount': 123,
                          'TotalCount': 123
                      },
                      'FaultStatistics': {
                          'OtherCount': 123,
                          'TotalCount': 123
                      },
                      'TotalCount': 123,
                      'TotalResponseTime': 123.0
                  },
                  'ServiceForecastStatistics': {
                      'FaultCountHigh': 123,
                      'FaultCountLow': 123
                  },
                  'ResponseTimeHistogram': [
                      {
                          'Value': 123.0,
                          'Count': 123
                      },
                  ]
              },
          ],
          'ContainsOldGroupVersions': True|False,
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **TimeSeriesServiceStatistics** *(list) --* 

        The collection of statistics.

        
        

        - *(dict) --* 

          A list of TimeSeriesStatistic structures.

          
          

          - **Timestamp** *(datetime) --* 

            Timestamp of the window for which statistics are aggregated.

            
          

          - **EdgeSummaryStatistics** *(dict) --* 

            Response statistics for an edge.

            
            

            - **OkCount** *(integer) --* 

              The number of requests that completed with a 2xx Success status code.

              
            

            - **ErrorStatistics** *(dict) --* 

              Information about requests that failed with a 4xx Client Error status code.

              
              

              - **ThrottleCount** *(integer) --* 

                The number of requests that failed with a 429 throttling status code.

                
              

              - **OtherCount** *(integer) --* 

                The number of requests that failed with untracked 4xx Client Error status codes.

                
              

              - **TotalCount** *(integer) --* 

                The total number of requests that failed with a 4xx Client Error status code.

                
          
            

            - **FaultStatistics** *(dict) --* 

              Information about requests that failed with a 5xx Server Error status code.

              
              

              - **OtherCount** *(integer) --* 

                The number of requests that failed with untracked 5xx Server Error status codes.

                
              

              - **TotalCount** *(integer) --* 

                The total number of requests that failed with a 5xx Server Error status code.

                
          
            

            - **TotalCount** *(integer) --* 

              The total number of completed requests.

              
            

            - **TotalResponseTime** *(float) --* 

              The aggregate response time of completed requests.

              
        
          

          - **ServiceSummaryStatistics** *(dict) --* 

            Response statistics for a service.

            
            

            - **OkCount** *(integer) --* 

              The number of requests that completed with a 2xx Success status code.

              
            

            - **ErrorStatistics** *(dict) --* 

              Information about requests that failed with a 4xx Client Error status code.

              
              

              - **ThrottleCount** *(integer) --* 

                The number of requests that failed with a 429 throttling status code.

                
              

              - **OtherCount** *(integer) --* 

                The number of requests that failed with untracked 4xx Client Error status codes.

                
              

              - **TotalCount** *(integer) --* 

                The total number of requests that failed with a 4xx Client Error status code.

                
          
            

            - **FaultStatistics** *(dict) --* 

              Information about requests that failed with a 5xx Server Error status code.

              
              

              - **OtherCount** *(integer) --* 

                The number of requests that failed with untracked 5xx Server Error status codes.

                
              

              - **TotalCount** *(integer) --* 

                The total number of requests that failed with a 5xx Server Error status code.

                
          
            

            - **TotalCount** *(integer) --* 

              The total number of completed requests.

              
            

            - **TotalResponseTime** *(float) --* 

              The aggregate response time of completed requests.

              
        
          

          - **ServiceForecastStatistics** *(dict) --* 

            The forecasted high and low fault count values.

            
            

            - **FaultCountHigh** *(integer) --* 

              The upper limit of fault counts for a service.

              
            

            - **FaultCountLow** *(integer) --* 

              The lower limit of fault counts for a service.

              
        
          

          - **ResponseTimeHistogram** *(list) --* 

            The response time histogram for the selected entities.

            
            

            - *(dict) --* 

              An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.

              
              

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

                The value of the entry.

                
              

              - **Count** *(integer) --* 

                The prevalence of the entry.

                
          
        
      
    
      

      - **ContainsOldGroupVersions** *(boolean) --* 

        A flag indicating whether or not a group's filter expression has been consistent, or if a returned aggregation might show statistics from an older version of the group's filter expression.

        
      

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

        Pagination token.

        
  
  **Exceptions**
  
  *   :py:class:`XRay.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`XRay.Client.exceptions.ThrottledException`

  