REST Resource: labels.permissions
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
資源:LabelPermission
適用於標籤上主體 (使用者、群組、目標對象) 的權限。
JSON 表示法 |
{
"name": string,
"email": string,
"role": enum (LabelRole ),
// Union field principal can be only one of the following:
"person": string,
"group": string,
"audience": string
// End of list of possible types for union field principal .
} |
欄位 |
name |
string
這項權限的資源名稱。
|
email |
string
指定使用者或群組主體的電子郵件地址。不會為目標對象主體填入資料。使用者和群組權限只能透過電子郵件地址插入。在更新要求中,如果指定電子郵件地址,則不應指定主體。
|
role |
enum (LabelRole )
主體應具備的角色。
|
聯集欄位 principal 。這項權限適用的主體。必須是電子郵件、使用者、群組或目標對象。範例:* people/12345 * groups/45678 * audiences/default principal 只能是下列其中一項: |
person |
string
人員資源名稱。
|
group |
string
群組資源名稱。
|
audience |
string
要授予角色的對象。您可以使用 audiences/default 的魔法值,將角色套用至擁有標籤的機構預設目標對象。
|
LabelRole
列舉 |
LABEL_ROLE_UNSPECIFIED |
不明角色。 |
READER |
讀取者可以讀取套用至雲端硬碟項目的標籤和相關聯的中繼資料。 |
APPLIER |
如果應用程式具有寫入權限,就能在雲端硬碟項目中寫入相關中繼資料。這表示 READER 。 |
ORGANIZER |
主辦人可以在自己管理的共用雲端硬碟中釘選這個標籤,並為標籤新增套用者。 |
EDITOR |
編輯者可以進行任何更新,包括刪除標籤,這也會刪除相關聯的雲端硬碟項目中繼資料。這表示 APPLIER 。 |
方法 |
|
刪除標籤權限。 |
|
更新標籤權限。 |
|
更新標籤的權限。 |
|
刪除標籤的權限。 |
|
列出標籤的權限。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-05 (世界標準時間)。
[null,null,["上次更新時間:2025-08-05 (世界標準時間)。"],[],[],null,["# REST Resource: labels.permissions\n\n- [Resource: LabelPermission](#LabelPermission)\n - [JSON representation](#LabelPermission.SCHEMA_REPRESENTATION)\n - [LabelRole](#LabelPermission.LabelRole)\n- [Methods](#METHODS_SUMMARY)\n\nResource: LabelPermission\n-------------------------\n\nThe permission that applies to a principal (user, group, audience) on a label.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"email\": string, \"role\": enum (/workspace/drive/labels/reference/rest/v2/labels.permissions#LabelPermission.LabelRole), // Union field `principal` can be only one of the following: \"person\": string, \"group\": string, \"audience\": string // End of list of possible types for union field `principal`. } ``` |\n\n| Fields ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Resource name of this permission. |\n| `email` | `string` Specifies the email address for a user or group principal. Not populated for audience principals. User and group permissions may only be inserted using an email address. On update requests, if email address is specified, no principal should be specified. |\n| `role` | `enum (`[LabelRole](/workspace/drive/labels/reference/rest/v2/labels.permissions#LabelPermission.LabelRole)`)` The role the principal should have. |\n| Union field `principal`. The principal this permission applies to. Must be either an email, user, group, or audience. Example: \\* `people/12345` \\* `groups/45678` \\* `audiences/default` `principal` can be only one of the following: ||\n| `person` | `string` Person resource name. |\n| `group` | `string` Group resource name. |\n| `audience` | `string` Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the label. |\n\n### LabelRole\n\nRoles are concentric with subsequent role.\n\n| Enums ||\n|--------------------------|------------------------------------------------------------------------------------------------------------------------------------|\n| `LABEL_ROLE_UNSPECIFIED` | Unknown role. |\n| `READER` | A reader can read the label and associated metadata applied to Drive items. |\n| `APPLIER` | An applier can write associated metadata on Drive items in which they also have write access to. Implies `READER`. |\n| `ORGANIZER` | An organizer can pin this label in shared drives they manage and add new appliers to the label. |\n| `EDITOR` | Editors can make any update including deleting the label which also deletes the associated Drive item metadata. Implies `APPLIER`. |\n\n| Methods ------- ||\n|---------------------------------------------------------------------------------------------|--------------------------------|\n| ### [batchDelete](/workspace/drive/labels/reference/rest/v2/labels.permissions/batchDelete) | Deletes label permissions. |\n| ### [batchUpdate](/workspace/drive/labels/reference/rest/v2/labels.permissions/batchUpdate) | Updates label permissions. |\n| ### [create](/workspace/drive/labels/reference/rest/v2/labels.permissions/create) | Updates a label's permissions. |\n| ### [delete](/workspace/drive/labels/reference/rest/v2/labels.permissions/delete) | Deletes a label's permission. |\n| ### [list](/workspace/drive/labels/reference/rest/v2/labels.permissions/list) | Lists a label's permissions. |"]]