aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

"ecr describe-images" unable to retrieve more than one repository

Open iconeb opened this issue 8 years ago • 3 comments

In the aws cli help, --repository-name flag described below :

--repository-name (string)
 A  list  of  repositories to describe. If this parameter is omitted,
then all repositories in a registry are described.

Nevertheless, command not accept multiple values or omission. Slightly different documentation appears in the API doc (https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_DescribeImages.html), where parameter is mandatory but accept a list.

repositoryName
A list of repositories to describe.
Type: String
Length Constraints: Minimum length of 2. Maximum length of 256.
Pattern: (?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*
Required: Yes

Again in the Java SDK documentation (https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/ecr/model/DescribeImagesRequest.html#withRepositoryName-java.lang.String), parameter is not claimed as mandatory (although it is) and accepts a list (although it doesnt')

DescribeImagesRequest withRepositoryName(String repositoryName)
A list of repositories to describe.
public DescribeImagesRequest withRepositoryName(String repositoryName)
A list of repositories to describe. If this parameter is omitted, then all repositories in a registry are described.
Parameters:
repositoryName - A list of repositories to describe. If this parameter is omitted, then all repositories in a registry are described.
Returns:
Returns a reference to this object so that method calls can be chained together.

Could you kindly provide guidance on correct documentation and how to retrieve images from multiple repositories in a single shot?

iconeb avatar Oct 11 '18 07:10 iconeb

@iconeb - Thanks for reaching out. It appears you have found an inconsistency with our documentation. I have labeled this issue as such and will look into providing additional guidance. Please provide the version of the CLI in use. Thanks.

justnance avatar Oct 21 '18 06:10 justnance

Notified ECR team.

jschwarzwalder avatar Dec 17 '18 20:12 jschwarzwalder

@jschwarzwalder - Thanks for the update. I'm closing this issue for now.

justnance avatar Dec 18 '18 00:12 justnance