Method: policies.get
รับนโยบายควบคุมการเข้าถึงสําหรับทรัพยากร แสดงนโยบายที่ว่างเปล่าหากมีทรัพยากรอยู่และไม่ได้ตั้งค่านโยบายไว้
คำขอ HTTP
POST https://sasportal.googleapis.com/v1alpha1/policies:get
URL ใช้ไวยากรณ์ gRPC Transcoding
เนื้อหาของคำขอ
เนื้อหาของคําขอมีข้อมูลที่มีโครงสร้างดังต่อไปนี้
การแสดง JSON |
{
"resource": string
} |
ช่อง |
resource |
string
ต้องระบุ ทรัพยากรที่มีการขอนโยบาย
|
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ Policy
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/sasportal
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2022-11-02 UTC
[null,null,["อัปเดตล่าสุด 2022-11-02 UTC"],[[["Retrieves the access control policy for a given resource, returning an empty policy if none is set."],["Utilizes a POST request to the `https://sasportal.googleapis.com/v1alpha1/policies:get` endpoint with a JSON request body specifying the resource."],["The response body will contain the policy details within a `Policy` object if successful."],["Requires the `https://www.googleapis.com/auth/sasportal` OAuth scope for authorization."]]],["The core content describes how to retrieve an access control policy for a resource. A `POST` request is sent to `https://sasportal.googleapis.com/v1alpha1/policies:get`. The request body requires a JSON object with a \"resource\" string field, specifying the target resource. A successful response returns a `Policy` object. The process requires the OAuth scope `https://www.googleapis.com/auth/sasportal` for authorization. An empty policy will be returned if no policy is set.\n"]]