CLI로 ListRepositories 사용 - AWS SDK 코드 예제

AWS SDK 예제 GitHub 리포지토리에 더 많은 AWS문서 SDK 예제가 있습니다.

CLI로 ListRepositories 사용

다음 코드 예시는 ListRepositories의 사용 방법을 보여 줍니다.

CLI
AWS CLI

리포지토리의 목록 보기

이 예시에서는 사용자의 AWS 계정과 연결된 모든 AWS CodeCommit 리포지토리를 나열합니다.

명령:

aws codecommit list-repositories

출력:

{ "repositories": [ { "repositoryName": "MyDemoRepo" "repositoryId": "f7579e13-b83e-4027-aaef-650c0EXAMPLE", }, { "repositoryName": "MyOtherDemoRepo" "repositoryId": "cfc29ac4-b0cb-44dc-9990-f6f51EXAMPLE" } ] }
  • API 세부 정보는 AWS CLI 명령 참조ListRepositories 섹션을 참조하세요.

PowerShell
Tools for PowerShell V4

예제 1: 이 예제에서는 모든 리포지토리를 이름을 기준으로 오름차순으로 나열합니다.

Get-CCRepositoryList -Order Ascending -SortBy RepositoryName

출력:

RepositoryId RepositoryName ------------ -------------- c7d0d2b0-ce40-4303-b4c3-38529EXAMPLE MyDemoRepo 05f30c66-e3e3-4f91-a0cd-1c84aEXAMPLE MyNewRepo
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V4)ListRepositories를 참조하세요.

Tools for PowerShell V5

예제 1: 이 예제에서는 모든 리포지토리를 이름을 기준으로 오름차순으로 나열합니다.

Get-CCRepositoryList -Order Ascending -SortBy RepositoryName

출력:

RepositoryId RepositoryName ------------ -------------- c7d0d2b0-ce40-4303-b4c3-38529EXAMPLE MyDemoRepo 05f30c66-e3e3-4f91-a0cd-1c84aEXAMPLE MyNewRepo
  • API 세부 정보는 AWS Tools for PowerShell Cmdlet 참조(V5)ListRepositories를 참조하세요.