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 。 |
方法 |
|
删除标签权限。 |
|
更新了标签权限。 |
|
更新标签的权限。 |
|
删除标签的权限。 |
|
列出标签的权限。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],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/v2beta/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 pricinpal. Not populated for audience principals. User and Group permissions may only be inserted using email address. On update requests, if email address is specified, no principal should be specified. |\n| `role` | `enum (`[LabelRole](/workspace/drive/labels/reference/rest/v2beta/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/v2beta/labels.permissions/batchDelete) | Deletes Label permissions. |\n| ### [batchUpdate](/workspace/drive/labels/reference/rest/v2beta/labels.permissions/batchUpdate) | Updates Label permissions. |\n| ### [create](/workspace/drive/labels/reference/rest/v2beta/labels.permissions/create) | Updates a Label's permissions. |\n| ### [delete](/workspace/drive/labels/reference/rest/v2beta/labels.permissions/delete) | Deletes a Label's permission. |\n| ### [list](/workspace/drive/labels/reference/rest/v2beta/labels.permissions/list) | Lists a Label's permissions. |"]]