Ada lebih banyak contoh AWS SDK yang tersedia di repo Contoh SDK AWS Doc
Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.
Gunakan ListRepositories
dengan CLI
Contoh kode berikut menunjukkan cara menggunakanListRepositories
.
- CLI
-
- AWS CLI
-
Untuk melihat daftar repositori
Contoh ini mencantumkan semua AWS CodeCommit repositori yang terkait dengan akun pengguna. AWS
Perintah:
aws codecommit list-repositories
Output:
{ "repositories": [ { "repositoryName": "MyDemoRepo" "repositoryId": "f7579e13-b83e-4027-aaef-650c0EXAMPLE", }, { "repositoryName": "MyOtherDemoRepo" "repositoryId": "cfc29ac4-b0cb-44dc-9990-f6f51EXAMPLE" } ] }
-
Untuk detail API, lihat ListRepositories
di Referensi AWS CLI Perintah.
-
- PowerShell
-
- Alat untuk PowerShell V4
-
Contoh 1: Contoh ini mencantumkan semua repositori dalam urutan menaik berdasarkan nama repositori.
Get-CCRepositoryList -Order Ascending -SortBy RepositoryName
Output:
RepositoryId RepositoryName ------------ -------------- c7d0d2b0-ce40-4303-b4c3-38529EXAMPLE MyDemoRepo 05f30c66-e3e3-4f91-a0cd-1c84aEXAMPLE MyNewRepo
-
Untuk detail API, lihat ListRepositoriesdi Referensi Alat AWS untuk PowerShell Cmdlet (V4).
-
- Alat untuk PowerShell V5
-
Contoh 1: Contoh ini mencantumkan semua repositori dalam urutan menaik berdasarkan nama repositori.
Get-CCRepositoryList -Order Ascending -SortBy RepositoryName
Output:
RepositoryId RepositoryName ------------ -------------- c7d0d2b0-ce40-4303-b4c3-38529EXAMPLE MyDemoRepo 05f30c66-e3e3-4f91-a0cd-1c84aEXAMPLE MyNewRepo
-
Untuk detail API, lihat ListRepositoriesdi Referensi Alat AWS untuk PowerShell Cmdlet (V5).
-