Đóng gói các chế độ cài đặt được cung cấp cho repositoryGroups.getIamPolicy.
Biểu diễn dưới dạng JSON
{"requestedPolicyVersion": integer}
Các trường
requestedPolicyVersion
integer
Không bắt buộc. Phiên bản chính sách tối đa sẽ được dùng để định dạng chính sách.
Các giá trị hợp lệ là 0, 1 và 3. Các yêu cầu chỉ định giá trị không hợp lệ sẽ bị từ chối.
Yêu cầu về chính sách có bất kỳ liên kết vai trò có điều kiện nào phải chỉ định phiên bản 3. Các chính sách không có liên kết vai trò có điều kiện có thể chỉ định bất kỳ giá trị hợp lệ nào hoặc không đặt trường này.
Chính sách trong phản hồi có thể sử dụng phiên bản chính sách mà bạn chỉ định hoặc có thể sử dụng phiên bản chính sách thấp hơn. Ví dụ: nếu bạn chỉ định phiên bản 3 nhưng chính sách không có liên kết vai trò có điều kiện, thì phản hồi sẽ sử dụng phiên bản 1.
Để tìm hiểu những tài nguyên nào hỗ trợ các điều kiện trong chính sách IAM, hãy xem tài liệu về IAM.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Khó hiểu","hardToUnderstand","thumb-down"],["Thông tin hoặc mã mẫu không chính xác","incorrectInformationOrSampleCode","thumb-down"],["Thiếu thông tin/mẫu tôi cần","missingTheInformationSamplesINeed","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-06-09 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,[]]