Use ListRepositories with a CLI - AWS SDK Code Examples

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

Use ListRepositories with a CLI

The following code examples show how to use ListRepositories.

CLI
AWS CLI

To view a list of repositories

This example lists all AWS CodeCommit repositories associated with the user's AWS account.

Command:

aws codecommit list-repositories

Output:

{ "repositories": [ { "repositoryName": "MyDemoRepo" "repositoryId": "f7579e13-b83e-4027-aaef-650c0EXAMPLE", }, { "repositoryName": "MyOtherDemoRepo" "repositoryId": "cfc29ac4-b0cb-44dc-9990-f6f51EXAMPLE" } ] }
PowerShell
Tools for PowerShell

Example 1: This example lists all repositories in ascending order by repository name.

Get-CCRepositoryList -Order Ascending -SortBy RepositoryName

Output:

RepositoryId RepositoryName ------------ -------------- c7d0d2b0-ce40-4303-b4c3-38529EXAMPLE MyDemoRepo 05f30c66-e3e3-4f91-a0cd-1c84aEXAMPLE MyNewRepo
  • For API details, see ListRepositories in AWS Tools for PowerShell Cmdlet Reference.