Is the "maxResults" property in AWS ECR API 'DescribeImageScanFindings' broken?

0

Hello, I'm using postman to call AWS ECR API 'DescribeImageScanFindings' but when I tried to use the maxResults property in DescribeImageScanFindings When I set value of maxResults over 100, it always use the default value 100 and give me "nextToken" for nextpage

Followings are the request info in my Postman:

POST: https://ecr.us-east-1.amazonaws.com/?Action=DescribeImageScanFindings
Body:
{
   "imageId": { 
      "imageDigest": "sha256:xxx"
   },
   "maxResults": 999,
   "repositoryName": "xxx"
}
Header:
Content-Type application/x-amz-json-1.1
User-Agent Postman-Collection
X-Amz-Target AmazonEC2ContainerRegistry_V20150921.DescribeImageScanFindings
AWS Signature
AccessKey xxx
SecretKey xxx
AWS Region us-east-1
Service Name ecr

I wonder if this is a known issue? Any update or answer would be appericated, thank you!

profile picture
YCW
asked a year ago270 views
1 Answer
0
Accepted Answer

I found that the issue will happen when we enable "enhanced scanning" and use ECR API 'DescribeImageScanFindings' to query the results. It will use the Maximum value of 100 from InspectorV2 "maxResults" property: https://docs.aws.amazon.com/inspector/v2/APIReference/API_ListFindings.html

The ECR API 'DescribeImageScanFindings' document should mention this problem. This is weird and misunderstanding.

profile picture
YCW
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions