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 的 magic 值将角色应用于拥有标签的组织的默认受众群体。
|
LabelRole
枚举 |
LABEL_ROLE_UNSPECIFIED |
未知角色。 |
READER |
读取者可以读取应用于云端硬盘内容的标签和关联的元数据。 |
APPLIER |
应用者可以向其具有写入权限的云端硬盘项目写入关联的元数据。表示 READER 。 |
ORGANIZER |
组织者可以在其管理的共享云端硬盘中固定此标签,并向此标签添加新的应用者。 |
EDITOR |
编辑者可以进行任何更新,包括删除标签,这也会删除关联的云端硬盘项目元数据。表示 APPLIER 。 |
方法 |
|
删除标签权限。 |
|
更新标签权限。 |
|
更新标签的权限。 |
|
删除标签的权限。 |
|
列出标签的权限。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-05。
[null,null,["最后更新时间 (UTC):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. |"]]