There are more AWS SDK examples available in the AWS Doc SDK Examples
Use ListRepositories with a CLI
The following code examples show how to use ListRepositories.
- CLI
-
- AWS CLI
-
To view a list of repositories
The following
list-repositoriesexample lists all AWS CodeCommit repositories associated with the user's AWS account.aws codecommit list-repositoriesOutput:
{ "repositories": [ { "repositoryName": "MyDemoRepo", "repositoryId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }, { "repositoryName": "MyOtherDemoRepo", "repositoryId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222" } ] }For more information, see View CodeCommit repository details in the AWS CodeCommit User Guide.
-
For API details, see ListRepositories
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell V4
-
Example 1: This example lists all repositories in ascending order by repository name.
Get-CCRepositoryList -Order Ascending -SortBy RepositoryNameOutput:
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 (V4).
-
- Tools for PowerShell V5
-
Example 1: This example lists all repositories in ascending order by repository name.
Get-CCRepositoryList -Order Ascending -SortBy RepositoryNameOutput:
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 (V5).
-