- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListImageScanFindingAggregationsCommand
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
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ImagebuilderClient, ListImageScanFindingAggregationsCommand } from "@aws-sdk/client-imagebuilder"; // ES Modules import
// const { ImagebuilderClient, ListImageScanFindingAggregationsCommand } = require("@aws-sdk/client-imagebuilder"); // CommonJS import
const client = new ImagebuilderClient(config);
const input = { // ListImageScanFindingAggregationsRequest
filter: { // Filter
name: "STRING_VALUE",
values: [ // FilterValues
"STRING_VALUE",
],
},
nextToken: "STRING_VALUE",
};
const command = new ListImageScanFindingAggregationsCommand(input);
const response = await client.send(command);
// { // ListImageScanFindingAggregationsResponse
// requestId: "STRING_VALUE",
// aggregationType: "STRING_VALUE",
// responses: [ // ImageScanFindingAggregationsList
// { // ImageScanFindingAggregation
// accountAggregation: { // AccountAggregation
// accountId: "STRING_VALUE",
// severityCounts: { // SeverityCounts
// all: Number("long"),
// critical: Number("long"),
// high: Number("long"),
// medium: Number("long"),
// },
// },
// imageAggregation: { // ImageAggregation
// imageBuildVersionArn: "STRING_VALUE",
// severityCounts: {
// all: Number("long"),
// critical: Number("long"),
// high: Number("long"),
// medium: Number("long"),
// },
// },
// imagePipelineAggregation: { // ImagePipelineAggregation
// imagePipelineArn: "STRING_VALUE",
// severityCounts: {
// all: Number("long"),
// critical: Number("long"),
// high: Number("long"),
// medium: Number("long"),
// },
// },
// vulnerabilityIdAggregation: { // VulnerabilityIdAggregation
// vulnerabilityId: "STRING_VALUE",
// severityCounts: {
// all: Number("long"),
// critical: Number("long"),
// high: Number("long"),
// medium: Number("long"),
// },
// },
// },
// ],
// nextToken: "STRING_VALUE",
// };
ListImageScanFindingAggregationsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
filter | Filter | undefined | 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. |
nextToken | string | undefined | A token to specify where to start paginating. This is the nextToken from a previously truncated response. |
ListImageScanFindingAggregationsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
aggregationType | string | undefined | 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 Aggregation types
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. |
nextToken | string | undefined | 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. |
requestId | string | undefined | The request ID that uniquely identifies this request. |
responses | ImageScanFindingAggregation[] | undefined | An array of image scan finding aggregations that match the filter criteria. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
CallRateLimitExceededException | client | You have exceeded the permitted request rate for the specific operation. |
ClientException | client | These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an invalid resource identifier. |
ForbiddenException | client | You are not authorized to perform the requested operation. |
InvalidPaginationTokenException | client | You have provided an invalid pagination token in your request. |
InvalidRequestException | client | You have requested an action that that the service doesn't support. |
ServiceException | server | This exception is thrown when the service encounters an unrecoverable exception. |
ServiceUnavailableException | server | The service is unable to process your request at this time. |
ImagebuilderServiceException | Base exception class for all service exceptions from Imagebuilder service. |