Method: labels.permissions.create
อัปเดตสิทธิ์ของป้ายกํากับ หากไม่มีสิทธิ์สำหรับผู้ใช้หลักที่ระบุไว้ ระบบจะสร้างสิทธิ์ของป้ายกํากับใหม่ มิฉะนั้นสิทธิ์ที่มีอยู่จะได้รับการอัปเดต สิทธิ์มีผลต่อทรัพยากรของป้ายกำกับโดยรวม ไม่มีการแก้ไข และไม่จำเป็นต้องเผยแพร่
คำขอ HTTP
POST https://drivelabels.googleapis.com/v2beta/{parent=labels/*}/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 API endpoint updates a Label's permissions, creating new ones if they don't exist and updating existing ones otherwise."],["Permissions apply to the entire Label resource, are not version-controlled, and don't need publishing."],["The request should be a `POST` to the provided URL, including the parent Label resource name as a path parameter."],["You can use query parameters to utilize admin credentials if the user has admin privileges for the Label."],["Authorization requires specific OAuth scopes related to Drive labels and potentially admin access."]]],["This document details updating a Label's permissions via a POST request to `https://drivelabels.googleapis.com/v2beta/{parent=labels/*}/permissions`. The `parent` path parameter specifies the Label, and `useAdminAccess` is a query parameter for admin credentials. The request body contains a `LabelPermission` instance; if successful, the response also contains a `LabelPermission` instance. Requires either `https://www.googleapis.com/auth/drive.labels` or `https://www.googleapis.com/auth/drive.admin.labels` OAuth scopes.\n"]]