imagebuilder / Client / list_image_scan_finding_aggregations

list_image_scan_finding_aggregations#

imagebuilder.Client.list_image_scan_finding_aggregations(**kwargs)#

Returns a list of image scan aggregations for your account. You can filter by the type of key that Image Builder uses to group results. For example, if you want to get a list of findings by severity level for one of your pipelines, you might specify your pipeline with the imagePipelineArn filter. If you don’t specify a filter, Image Builder returns an aggregation for your account.

To streamline results, you can use the following filters in your request:

  • accountId

  • imageBuildVersionArn

  • imagePipelineArn

  • vulnerabilityId

See also: AWS API Documentation

Request Syntax

response = client.list_image_scan_finding_aggregations(
    filter={
        'name': 'string',
        'values': [
            'string',
        ]
    },
    nextToken='string'
)
Parameters:
  • filter (dict) –

    A filter name and value pair that is used to return a more specific list of results from a list operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

    • name (string) –

      The name of the filter. Filter names are case-sensitive.

    • values (list) –

      The filter values. Filter values are case-sensitive.

      • (string) –

  • nextToken (string) – A token to specify where to start paginating. This is the nextToken from a previously truncated response.

Return type:

dict

Returns:

Response Syntax

{
    'requestId': 'string',
    'aggregationType': 'string',
    'responses': [
        {
            'accountAggregation': {
                'accountId': 'string',
                'severityCounts': {
                    'all': 123,
                    'critical': 123,
                    'high': 123,
                    'medium': 123
                }
            },
            'imageAggregation': {
                'imageBuildVersionArn': 'string',
                'severityCounts': {
                    'all': 123,
                    'critical': 123,
                    'high': 123,
                    'medium': 123
                }
            },
            'imagePipelineAggregation': {
                'imagePipelineArn': 'string',
                'severityCounts': {
                    'all': 123,
                    'critical': 123,
                    'high': 123,
                    'medium': 123
                }
            },
            'vulnerabilityIdAggregation': {
                'vulnerabilityId': 'string',
                'severityCounts': {
                    'all': 123,
                    'critical': 123,
                    'high': 123,
                    'medium': 123
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • requestId (string) –

      The request ID that uniquely identifies this request.

    • aggregationType (string) –

      The aggregation type specifies what type of key is used to group the image scan findings. Image Builder returns results based on the request filter. If you didn’t specify a filter in the request, the type defaults to accountId.

      Aggregation types

      • accountId

      • imageBuildVersionArn

      • imagePipelineArn

      • vulnerabilityId

      Each aggregation includes counts by severity level for medium severity and higher level findings, plus a total for all of the findings for each key value.

    • responses (list) –

      An array of image scan finding aggregations that match the filter criteria.

      • (dict) –

        This returns exactly one type of aggregation, based on the filter that Image Builder applies in its API action.

        • accountAggregation (dict) –

          Returns an object that contains severity counts based on an account ID.

          • accountId (string) –

            Identifies the account that owns the aggregated resource findings.

          • severityCounts (dict) –

            Counts by severity level for medium severity and higher level findings, plus a total for all of the findings.

            • all (integer) –

              The total number of findings across all severity levels for the specified filter.

            • critical (integer) –

              The number of critical severity findings for the specified filter.

            • high (integer) –

              The number of high severity findings for the specified filter.

            • medium (integer) –

              The number of medium severity findings for the specified filter.

        • imageAggregation (dict) –

          Returns an object that contains severity counts based on the Amazon Resource Name (ARN) for a specific image.

          • imageBuildVersionArn (string) –

            The Amazon Resource Name (ARN) that identifies the image for this aggregation.

          • severityCounts (dict) –

            Counts by severity level for medium severity and higher level findings, plus a total for all of the findings for the specified image.

            • all (integer) –

              The total number of findings across all severity levels for the specified filter.

            • critical (integer) –

              The number of critical severity findings for the specified filter.

            • high (integer) –

              The number of high severity findings for the specified filter.

            • medium (integer) –

              The number of medium severity findings for the specified filter.

        • imagePipelineAggregation (dict) –

          Returns an object that contains severity counts based on an image pipeline ARN.

          • imagePipelineArn (string) –

            The Amazon Resource Name (ARN) that identifies the image pipeline for this aggregation.

          • severityCounts (dict) –

            Counts by severity level for medium severity and higher level findings, plus a total for all of the findings for the specified image pipeline.

            • all (integer) –

              The total number of findings across all severity levels for the specified filter.

            • critical (integer) –

              The number of critical severity findings for the specified filter.

            • high (integer) –

              The number of high severity findings for the specified filter.

            • medium (integer) –

              The number of medium severity findings for the specified filter.

        • vulnerabilityIdAggregation (dict) –

          Returns an object that contains severity counts based on vulnerability ID.

          • vulnerabilityId (string) –

            The vulnerability Id for this set of counts.

          • severityCounts (dict) –

            Counts by severity level for medium severity and higher level findings, plus a total for all of the findings for the specified vulnerability.

            • all (integer) –

              The total number of findings across all severity levels for the specified filter.

            • critical (integer) –

              The number of critical severity findings for the specified filter.

            • high (integer) –

              The number of high severity findings for the specified filter.

            • medium (integer) –

              The number of medium severity findings for the specified filter.

    • nextToken (string) –

      The next token used for paginated responses. When this field isn’t empty, there are additional elements that the service hasn’t included in this request. Use this token with the next request to retrieve additional objects.

Exceptions