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
preguntada hace 2 años280 visualizaciones
1 Respuesta
0
Respuesta aceptada

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 hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas