CodeGuruSecurity / Client / list_findings_metrics

list_findings_metrics#

CodeGuruSecurity.Client.list_findings_metrics(**kwargs)#

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

See also: AWS API Documentation

Request Syntax

response = client.list_findings_metrics(
    endDate=datetime(2015, 1, 1),
    maxResults=123,
    nextToken='string',
    startDate=datetime(2015, 1, 1)
)
Parameters:
  • endDate (datetime) –

    [REQUIRED]

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

  • maxResults (integer) – 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.

  • nextToken (string) – 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.

  • startDate (datetime) –

    [REQUIRED]

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

Return type:

dict

Returns:

Response Syntax

{
    'findingsMetrics': [
        {
            'closedFindings': {
                'critical': 123.0,
                'high': 123.0,
                'info': 123.0,
                'low': 123.0,
                'medium': 123.0
            },
            'date': datetime(2015, 1, 1),
            'meanTimeToClose': {
                'critical': 123.0,
                'high': 123.0,
                'info': 123.0,
                'low': 123.0,
                'medium': 123.0
            },
            'newFindings': {
                'critical': 123.0,
                'high': 123.0,
                'info': 123.0,
                'low': 123.0,
                'medium': 123.0
            },
            'openFindings': {
                'critical': 123.0,
                'high': 123.0,
                'info': 123.0,
                'low': 123.0,
                'medium': 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 in an account.

        • closedFindings (dict) –

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

          • critical (float) –

            The severity of the finding is critical and should be addressed immediately.

          • high (float) –

            The severity of the finding is high and should be addressed as a near-term priority.

          • info (float) –

            The finding is related to quality or readability improvements and not considered actionable.

          • low (float) –

            The severity of the finding is low and does require action on its own.

          • medium (float) –

            The severity of the finding is medium and should be addressed as a mid-term priority.

        • date (datetime) –

          The date from which the finding metrics were retrieved.

        • meanTimeToClose (dict) –

          The average time it takes to close findings of each severity in days.

          • critical (float) –

            The severity of the finding is critical and should be addressed immediately.

          • high (float) –

            The severity of the finding is high and should be addressed as a near-term priority.

          • info (float) –

            The finding is related to quality or readability improvements and not considered actionable.

          • low (float) –

            The severity of the finding is low and does require action on its own.

          • medium (float) –

            The severity of the finding is medium and should be addressed as a mid-term priority.

        • newFindings (dict) –

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

          • critical (float) –

            The severity of the finding is critical and should be addressed immediately.

          • high (float) –

            The severity of the finding is high and should be addressed as a near-term priority.

          • info (float) –

            The finding is related to quality or readability improvements and not considered actionable.

          • low (float) –

            The severity of the finding is low and does require action on its own.

          • medium (float) –

            The severity of the finding is medium and should be addressed as a mid-term priority.

        • openFindings (dict) –

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

          • critical (float) –

            The severity of the finding is critical and should be addressed immediately.

          • high (float) –

            The severity of the finding is high and should be addressed as a near-term priority.

          • info (float) –

            The finding is related to quality or readability improvements and not considered actionable.

          • low (float) –

            The severity of the finding is low and does require action on its own.

          • medium (float) –

            The severity of the finding is medium and should be addressed as a mid-term priority.

    • nextToken (string) –

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

Exceptions

  • CodeGuruSecurity.Client.exceptions.InternalServerException

  • CodeGuruSecurity.Client.exceptions.ThrottlingException

  • CodeGuruSecurity.Client.exceptions.ValidationException

  • CodeGuruSecurity.Client.exceptions.AccessDeniedException