Use DescribeRepositories with an AWS SDK or command line tool - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use DescribeRepositories with an AWS SDK or command line tool

The following code examples show how to use DescribeRepositories.

CLI
AWS CLI

To describe the repositories in a registry

This example describes the repositories in the default registry for an account.

Command:

aws ecr describe-repositories

Output:

{ "repositories": [ { "registryId": "012345678910", "repositoryName": "ubuntu", "repositoryArn": "arn:aws:ecr:us-west-2:012345678910:repository/ubuntu" }, { "registryId": "012345678910", "repositoryName": "test", "repositoryArn": "arn:aws:ecr:us-west-2:012345678910:repository/test" } ] }
Rust
SDK for Rust
Note

There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository.

async fn show_repos(client: &aws_sdk_ecr::Client) -> Result<(), aws_sdk_ecr::Error> { let rsp = client.describe_repositories().send().await?; let repos = rsp.repositories(); println!("Found {} repositories:", repos.len()); for repo in repos { println!(" ARN: {}", repo.repository_arn().unwrap()); println!(" Name: {}", repo.repository_name().unwrap()); } Ok(()) }