Method: labels.revisions.permissions.batchUpdate
更新標籤權限。如果指定的主體沒有權限,系統會建立新的標籤權限;否則,系統會更新現有權限。權限會影響標籤整體資源、未經修訂,且不需要發布。
HTTP 要求
POST https://drivelabels.googleapis.com/v2beta/{parent=labels/*/revisions/*}/permissions:batchUpdate
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
parent |
string
必要欄位。要更新的所有權限共用的父項標籤資源名稱。Format: labels/{label} 如果設定這個項目,UpdateLabelPermissionRequest 訊息中的上層欄位必須為空白或符合這個欄位。
|
要求主體
要求主體的資料會採用以下結構:
JSON 表示法 |
{
"requests": [
{
object (UpdateLabelPermissionRequest )
}
],
"useAdminAccess": boolean
} |
欄位 |
requests[] |
object (UpdateLabelPermissionRequest )
必要欄位。用於指定要更新資源的要求訊息。
|
useAdminAccess |
boolean
如要使用使用者的管理員憑證,請設為 true 。伺服器會在授予存取權前,確認使用者是否為標籤的管理員。如果設定了這項設定,UpdateLabelPermissionRequest 訊息中的 useAdminAccess 欄位就必須為空白或符合這個欄位。
|
授權範圍
需要下列其中一種 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 (世界標準時間)。"],[[["Updates permissions for a Drive Label, creating new ones if they don't exist and updating existing ones otherwise."],["Permissions apply to the entire Label resource, are not versioned, and do not need publishing."],["The API request requires specifying the parent Label resource and providing an array of update requests."],["You can use admin credentials for the update by setting the `useAdminAccess` field to true."],["Successful responses return a `BatchUpdateLabelPermissionsResponse` object."]]],["This outlines the process for updating Label permissions via a `POST` request to `https://drivelabels.googleapis.com/v2beta/{parent=labels/*/revisions/*}/permissions:batchUpdate`. The request requires a `parent` path parameter specifying the Label resource. The request body uses JSON, containing an array of `UpdateLabelPermissionRequest` objects and an optional `useAdminAccess` boolean. Successful requests return a `BatchUpdateLabelPermissionsResponse`. The operation requires specific OAuth scopes and admin privileges if the `useAdminAccess` field is true.\n"]]