Method: labels.permissions.create
อัปเดตสิทธิ์ของป้ายกํากับ หากไม่มีสิทธิ์สำหรับผู้ใช้หลักที่ระบุไว้ ระบบจะสร้างสิทธิ์ของป้ายกํากับใหม่ มิฉะนั้นสิทธิ์ที่มีอยู่จะได้รับการอัปเดต สิทธิ์มีผลต่อทรัพยากรของป้ายกำกับโดยรวม ไม่มีการแก้ไข และไม่จำเป็นต้องเผยแพร่
คำขอ HTTP
POST https://drivelabels.googleapis.com/v2/{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-04 UTC
[null,null,["อัปเดตล่าสุด 2024-09-04 UTC"],[[["This method 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 versioned, and do not need publishing."],["You can use admin credentials by setting `useAdminAccess` to `true`, which requires admin verification."],["The request should contain a `LabelPermission` object, and a successful response will return the updated or created `LabelPermission`."],["Authorization requires either `https://www.googleapis.com/auth/drive.labels` or `https://www.googleapis.com/auth/drive.admin.labels` scope."]]],["This document details updating a Label's permissions via a POST request to `https://drivelabels.googleapis.com/v2/{parent=labels/*}/permissions`. It uses gRPC Transcoding. The `parent` path parameter is required, specifying the Label. An optional `useAdminAccess` query parameter allows admin access verification. The request body contains a `LabelPermission` instance; a successful response returns a new `LabelPermission` instance. Authorization requires either the `drive.labels` or `drive.admin.labels` OAuth scope.\n"]]