Method: labels.revisions.permissions.create
更新標籤的權限。如果指定主體沒有權限,系統會建立新的標籤權限;如果指定主體沒有權限,系統會更新現有權限。權限會影響標籤整體的資源、無須修訂,也不需要發布。
HTTP 要求
POST https://drivelabels.googleapis.com/v2beta/{parent=labels/*/revisions/*}/permissions
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
parent |
string
必要欄位。已建立標籤權限的父項標籤資源名稱。格式:label/{label}
|
查詢參數
參數 |
useAdminAccess |
boolean
如要使用使用者的管理員憑證,請設為 true 。伺服器會先驗證使用者是否是該標籤的管理員,再授予存取權。
|
要求主體
要求主體包含 LabelPermission
的例項。
回應主體
如果成功,回應主體會包含新建立的 LabelPermission
例項。
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/drive.labels
https://www.googleapis.com/auth/drive.admin.labels
詳情請參閱授權指南。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-09-04 (世界標準時間)。
[null,null,["上次更新時間:2024-09-04 (世界標準時間)。"],[[["This API updates a Label's permissions, creating a new Label Permission if one doesn't exist for the specified principal or updating the existing permission."],["Permissions applied through this API affect the entire Label resource, are not revisioned, and do not require publishing."],["The request should be sent as a POST request to the provided URL with necessary path and query parameters, including a request body containing a LabelPermission instance."],["Successful requests will receive a response body containing the newly created or updated LabelPermission instance."],["To use this API, you'll need authorization with specific OAuth scopes related to Drive Labels."]]],[]]