Method: labels.revisions.permissions.create
อัปเดตสิทธิ์ของป้ายกํากับ หากไม่มีสิทธิ์สำหรับผู้ใช้หลักที่ระบุไว้ ระบบจะสร้างสิทธิ์ของป้ายกํากับใหม่ มิฉะนั้นสิทธิ์ที่มีอยู่จะได้รับการอัปเดต สิทธิ์มีผลต่อทรัพยากรของป้ายกำกับโดยรวม ไม่มีการแก้ไข และไม่จำเป็นต้องเผยแพร่
คำขอ HTTP
POST https://drivelabels.googleapis.com/v2/{parent=labels/*/revisions/*}/permissions
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
parent |
string
ต้องระบุ ระบบจะสร้างชื่อทรัพยากรป้ายกํากับระดับบนในสิทธิ์ของป้ายกํากับแล้ว รูปแบบ: ป้ายกำกับ/{label}
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
useAdminAccess |
boolean
ตั้งค่าเป็น true เพื่อใช้ข้อมูลเข้าสู่ระบบของผู้ดูแลระบบของผู้ใช้ จากนั้นเซิร์ฟเวอร์จะยืนยันว่าผู้ใช้เป็นผู้ดูแลระบบสำหรับป้ายกํากับก่อนอนุญาตให้เข้าถึง
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ LabelPermission
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ LabelPermission
ที่สร้างขึ้นใหม่
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth อย่างใดอย่างหนึ่งต่อไปนี้
https://www.googleapis.com/auth/drive.labels
https://www.googleapis.com/auth/drive.admin.labels
โปรดดูข้อมูลเพิ่มเติมที่คู่มือการให้สิทธิ์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-09-03 UTC
[null,null,["อัปเดตล่าสุด 2024-09-03 UTC"],[[["This operation updates a Label's permissions, creating new permissions or updating existing ones for the specified principal."],["Permissions apply to the entire Label resource, are not version-controlled, and do not need publishing."],["The request requires specifying the parent Label resource name and can use admin credentials with `useAdminAccess`."],["A successful request returns the updated or newly created LabelPermission resource."],["Authorization requires specific OAuth scopes related to Drive Labels."]]],["This document outlines the process for updating a Label's permissions. It uses a `POST` request to the specified URL, including the parent Label's resource name within the path. The request requires a `LabelPermission` instance in the body. Optional `useAdminAccess` query parameter allows the use of admin credentials. Successful execution returns a newly created `LabelPermission` instance. Authorization mandates either the `https://www.googleapis.com/auth/drive.labels` or `https://www.googleapis.com/auth/drive.admin.labels` OAuth scope.\n"]]