Memerlukan salah satu izin IAM berikut pada resource resource, bergantung pada jenis resource:
cloudaicompanion.repositoryGroups.getIamPolicy
cloudaicompanion.topics.getIamPolicy
Untuk mengetahui informasi selengkapnya, lihat dokumentasi IAM.
GetPolicyOptions
mengenkapsulasi setelan yang diberikan ke repositoryGroups.getIamPolicy.
Representasi JSON
{"requestedPolicyVersion": integer}
Kolom
requestedPolicyVersion
integer
Opsional. Versi kebijakan maksimum yang akan digunakan untuk memformat kebijakan.
Nilai yang valid adalah 0, 1, dan 3. Permintaan yang menentukan nilai yang tidak valid akan ditolak.
Permintaan untuk kebijakan dengan binding peran bersyarat harus menentukan versi 3. Kebijakan tanpa binding peran kondisional dapat menentukan nilai yang valid atau membiarkan kolom tidak ditetapkan.
Kebijakan dalam respons mungkin menggunakan versi kebijakan yang Anda tentukan, atau mungkin menggunakan versi kebijakan yang lebih rendah. Misalnya, jika Anda menentukan versi 3, tetapi kebijakan tidak memiliki binding peran bersyarat, respons akan menggunakan versi 1.
Untuk mempelajari resource mana yang mendukung kondisi dalam kebijakan IAM-nya, lihat dokumentasi IAM.
[[["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-07-30 UTC."],[[["\u003cp\u003eThis webpage details how to retrieve the access control policy for a specified resource using the \u003ccode\u003egetIamPolicy\u003c/code\u003e method, which returns an empty policy if no policy is currently set.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request for this operation uses \u003ccode\u003eGET\u003c/code\u003e with a URL structure that includes a placeholder for the resource and the method, along with parameters to define what is being requested.\u003c/p\u003e\n"],["\u003cp\u003eThe required resource for this operation is determined via a path parameter denoted as \u003ccode\u003eresource\u003c/code\u003e, that specifies a resource for which the policy is being requested, according to Google's Resource Naming guidelines.\u003c/p\u003e\n"],["\u003cp\u003eAn optional \u003ccode\u003eoptions\u003c/code\u003e query parameter allows for the specification of a \u003ccode\u003eGetPolicyOptions\u003c/code\u003e object, and the request body must remain empty.\u003c/p\u003e\n"],["\u003cp\u003eThe operation needs \u003ccode\u003ecloudaicompanion.repositoryGroups.getIamPolicy\u003c/code\u003e permissions, and requires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope for authorization, and returns an instance of \u003ccode\u003ePolicy\u003c/code\u003e in the response body if the request is successful.\u003c/p\u003e\n"]]],[],null,[]]