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
feita há 2 anos280 visualizações
1 Resposta
0
Resposta aceita

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
respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas