describe_image_scan_findings
¶
describe_image_scan_findings(
repository_name: RepositoryName,
image_id: ImageIdentifier,
*,
config_overrides: Optional[ECRPUBLICClientConfig] = None,
registry_id: Optional[RegistryId] = None,
repository_type: Optional[RepositoryType] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[HundredMaxResults] = None,
) -> DescribeImageScanFindingsResponse
Returns the scan status and vulnerability findings for an image in a premium repository. Images in premium repositories are scanned automatically when they're pushed, and are rescanned as new vulnerabilities are published. Image scanning isn't currently supported for free repositories.
Parameters:
-
registry_id(Optional[RegistryId], default:None) –The Amazon Web Services account ID that's associated with the public registry that contains the repository where the image is. If you do not specify a registry, the default public registry is assumed. You can specify only your own account ID. Cross-account access through a repository policy isn't supported for this operation.
-
repository_name(RepositoryName) –The repository that contains the image to describe scan findings for.
-
repository_type(Optional[RepositoryType], default:None) –The type of the repository. Currently, image scanning is supported only for premium repositories, so you must specify
PREMIUM. If you don't specify a type, Amazon ECR usesFREE, and the request fails withValidationException. -
image_id(ImageIdentifier) –The image ID of the image to describe scan findings for.
-
next_token(Optional[NextToken], default:None) –The
nextTokenvalue that's returned from a previous paginatedDescribeImageScanFindingsrequest where you usedmaxResultsand the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextTokenvalue. If there are no more results to return, this value isnull.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
-
max_results(Optional[HundredMaxResults], default:None) –The maximum number of results that
DescribeImageScanFindingsreturns in paginated output. When you use this parameter,DescribeImageScanFindingsreturns onlymaxResultsresults in a single page along with anextTokenresponse element. To see the remaining results, send anotherDescribeImageScanFindingsrequest with the returnednextTokenvalue. You can specify a value between 1 and 100. If you don't use this parameter,DescribeImageScanFindingsreturns up to 100 results and anextTokenvalue, if applicable.
Raises:
-
ImageNotFoundException–The image requested doesn't exist in the specified repository. Check the image tag or digest. To list the images in a repository, use
DescribeImagesorDescribeImageTags, or for a premium repository that you're entitled to,DescribeEntitledImagesorDescribeEntitledImageTags. -
InvalidParameterException–The specified parameter is invalid. Review the available parameters for the API request.
-
RepositoryNotFoundException–The specified repository can't be found. Check the spelling of the specified repository and ensure that you're performing operations on the correct registry.
-
ScanNotFoundException–The specified image scan can't be found. Make sure that the image has been scanned.
-
ServerException–These errors are usually caused by a server-side issue. Retry the request. If it continues to fail, contact Amazon Web Services Support.
-
ValidationException–There was an error validating the request. Check the request parameters and try again.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To describe the scan findings for an image in a premium repository This example describes the vulnerability scan findings for an image in the premium repository my-premium-repository.
>>> client.describe_image_scan_findings(repository_name='my-premium-repository', repository_type='PREMIUM', image_id={'imageDigest': 'sha256:f5c12bd3e4b8b1a2a3a5d5d0e6c4b3a2f1e0d9c8b7a6f5e4d3c2b1a0f9e8d7c6'})
Source code in docs_src/capo_ecr_public/_services/ecrpublic.py
1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 | |