:doc:`CodeGuruSecurity <../../codeguru-security>` / Client / list_findings_metrics

*********************
list_findings_metrics
*********************



.. py:method:: CodeGuruSecurity.Client.list_findings_metrics(**kwargs)

  

  Returns metrics about all findings in an account within a specified time range.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/ListFindingsMetrics>`_  


  **Request Syntax**
  ::

    response = client.list_findings_metrics(
        nextToken='string',
        maxResults=123,
        startDate=datetime(2015, 1, 1),
        endDate=datetime(2015, 1, 1)
    )
    
  :type nextToken: string
  :param nextToken: 

    A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the ``nextToken`` value returned from the previous request to continue listing results after the first page.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return in the response. Use this parameter when paginating results. If additional results exist beyond the number you specify, the ``nextToken`` element is returned in the response. Use ``nextToken`` in a subsequent request to retrieve additional results. If not specified, returns 1000 results.

    

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

    The start date of the interval which you want to retrieve metrics from. Rounds to the nearest day.

    

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

    The end date of the interval which you want to retrieve metrics from. Round to the nearest day.

    

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

    
    ::

      {
          'findingsMetrics': [
              {
                  'date': datetime(2015, 1, 1),
                  'newFindings': {
                      'info': 123.0,
                      'low': 123.0,
                      'medium': 123.0,
                      'high': 123.0,
                      'critical': 123.0
                  },
                  'closedFindings': {
                      'info': 123.0,
                      'low': 123.0,
                      'medium': 123.0,
                      'high': 123.0,
                      'critical': 123.0
                  },
                  'openFindings': {
                      'info': 123.0,
                      'low': 123.0,
                      'medium': 123.0,
                      'high': 123.0,
                      'critical': 123.0
                  },
                  'meanTimeToClose': {
                      'info': 123.0,
                      'low': 123.0,
                      'medium': 123.0,
                      'high': 123.0,
                      'critical': 123.0
                  }
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **findingsMetrics** *(list) --* 

        A list of ``AccountFindingsMetric`` objects retrieved from the specified time interval.

        
        

        - *(dict) --* 

          A summary of findings metrics for an account on a specified date.

          
          

          - **date** *(datetime) --* 

            The date from which the findings metrics were retrieved.

            
          

          - **newFindings** *(dict) --* 

            The number of new findings of each severity on the specified date.

            
            

            - **info** *(float) --* 

              A numeric value corresponding to an informational finding.

              
            

            - **low** *(float) --* 

              A numeric value corresponding to a low severity finding.

              
            

            - **medium** *(float) --* 

              A numeric value corresponding to a medium severity finding.

              
            

            - **high** *(float) --* 

              A numeric value corresponding to a high severity finding.

              
            

            - **critical** *(float) --* 

              A numeric value corresponding to a critical finding.

              
        
          

          - **closedFindings** *(dict) --* 

            The number of closed findings of each severity on the specified date.

            
            

            - **info** *(float) --* 

              A numeric value corresponding to an informational finding.

              
            

            - **low** *(float) --* 

              A numeric value corresponding to a low severity finding.

              
            

            - **medium** *(float) --* 

              A numeric value corresponding to a medium severity finding.

              
            

            - **high** *(float) --* 

              A numeric value corresponding to a high severity finding.

              
            

            - **critical** *(float) --* 

              A numeric value corresponding to a critical finding.

              
        
          

          - **openFindings** *(dict) --* 

            The number of open findings of each severity as of the specified date.

            
            

            - **info** *(float) --* 

              A numeric value corresponding to an informational finding.

              
            

            - **low** *(float) --* 

              A numeric value corresponding to a low severity finding.

              
            

            - **medium** *(float) --* 

              A numeric value corresponding to a medium severity finding.

              
            

            - **high** *(float) --* 

              A numeric value corresponding to a high severity finding.

              
            

            - **critical** *(float) --* 

              A numeric value corresponding to a critical finding.

              
        
          

          - **meanTimeToClose** *(dict) --* 

            The average time in days it takes to close findings of each severity as of a specified date.

            
            

            - **info** *(float) --* 

              A numeric value corresponding to an informational finding.

              
            

            - **low** *(float) --* 

              A numeric value corresponding to a low severity finding.

              
            

            - **medium** *(float) --* 

              A numeric value corresponding to a medium severity finding.

              
            

            - **high** *(float) --* 

              A numeric value corresponding to a high severity finding.

              
            

            - **critical** *(float) --* 

              A numeric value corresponding to a critical finding.

              
        
      
    
      

      - **nextToken** *(string) --* 

        A pagination token. You can use this in future calls to ``ListFindingMetrics`` to continue listing results after the current page.

        
  
  **Exceptions**
  
  *   :py:class:`CodeGuruSecurity.Client.exceptions.InternalServerException`

  
  *   :py:class:`CodeGuruSecurity.Client.exceptions.ThrottlingException`

  
  *   :py:class:`CodeGuruSecurity.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`CodeGuruSecurity.Client.exceptions.ValidationException`

  