Menampilkan izin yang dimiliki pemanggil pada resource yang ditentukan. Jika resource tidak ada, tindakan ini akan menampilkan kumpulan izin kosong, bukan error NOT_FOUND.
Catatan: Operasi ini dirancang untuk digunakan dalam membuat UI yang mengetahui izin dan alat command line, bukan untuk pemeriksaan otorisasi. Operasi ini dapat "gagal terbuka" tanpa peringatan.
Permintaan HTTP
POST https://cloudaicompanion.googleapis.com/v1/{resource=projects/*/locations/*/codeRepositoryIndexes/*/repositoryGroups/*}:testIamPermissions
WAJIB: Resource yang detail kebijakannya diminta. Lihat Nama resource untuk mengetahui nilai yang sesuai untuk kolom ini.
Isi permintaan
Isi permintaan berisi data dengan struktur berikut:
Representasi JSON
{"permissions": [string]}
Kolom
permissions[]
string
Kumpulan izin untuk memeriksa resource. Izin dengan karakter pengganti (seperti * atau storage.*) tidak diizinkan. Untuk informasi selengkapnya, lihat Ringkasan IAM.
Isi respons
Pesan respons untuk metode repositoryGroups.testIamPermissions.
Jika berhasil, isi respons memuat data dengan struktur berikut:
Representasi JSON
{"permissions": [string]}
Kolom
permissions[]
string
Subkumpulan TestPermissionsRequest.permissions yang diizinkan pemanggil.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-02-01 UTC."],[[["This endpoint (`testIamPermissions`) retrieves the permissions a caller has on a specified resource, returning an empty set if the resource doesn't exist."],["The HTTP request is a `POST` method to a URL with the format `https://cloudaicompanion.googleapis.com/v1/{resource=projects/*/locations/*/codeRepositoryIndexes/*/repositoryGroups/*}:testIamPermissions` and utilizes gRPC Transcoding syntax."],["The request body includes a list of `permissions` (strings) to check for the specified `resource`, excluding those with wildcards."],["The response body contains a list of `permissions` (strings) that the caller is allowed, which is a subset of the permissions in the request."],["Authorization for this operation requires the `https://www.googleapis.com/auth/cloud-platform` OAuth scope."]]],[]]