REST Resource: labels.permissions
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tài nguyên: LabelPermission
Quyền áp dụng cho một chủ thể (người dùng, nhóm, đối tượng) trên một nhãn.
Biểu diễn dưới dạng 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 .
} |
Trường |
name |
string
Tên tài nguyên của quyền này.
|
email |
string
Chỉ định địa chỉ email cho một người dùng hoặc nhóm chính. Không được điền sẵn cho các đối tượng chính. Bạn chỉ có thể chèn quyền của người dùng và nhóm bằng địa chỉ email. Trong các yêu cầu cập nhật, nếu bạn chỉ định địa chỉ email, thì bạn không nên chỉ định người uỷ quyền.
|
role |
enum (LabelRole )
Vai trò mà đối tượng chính cần có.
|
Trường nhóm principal . Chủ thể mà quyền này áp dụng. Phải là email, người dùng, nhóm hoặc đối tượng. Ví dụ: * people/12345 * groups/45678 * audiences/default principal chỉ có thể là một trong những giá trị sau: |
person |
string
Tên tài nguyên của người dùng.
|
group |
string
Tên tài nguyên nhóm.
|
audience |
string
Đối tượng cần cấp vai trò. Bạn có thể dùng giá trị đặc biệt audiences/default để áp dụng vai trò cho đối tượng mặc định trong bối cảnh của tổ chức sở hữu nhãn.
|
LabelRole
Các vai trò được sắp xếp theo thứ tự từ thấp đến cao.
Enum |
LABEL_ROLE_UNSPECIFIED |
Vai trò không xác định. |
READER |
Người đọc có thể đọc nhãn và siêu dữ liệu liên kết được áp dụng cho các mục trên Drive. |
APPLIER |
Người áp dụng có thể ghi siêu dữ liệu liên kết trên các mục trong Drive mà họ cũng có quyền ghi. Kéo theo READER . |
ORGANIZER |
Người tổ chức có thể ghim nhãn này trong bộ nhớ dùng chung mà họ quản lý và thêm người áp dụng mới vào nhãn. |
EDITOR |
Người chỉnh sửa có thể thực hiện mọi thao tác cập nhật, kể cả xoá nhãn. Thao tác này cũng sẽ xoá siêu dữ liệu của mục trên Drive được liên kết. Kéo theo APPLIER . |
Phương thức |
|
Xoá các quyền đối với nhãn. |
|
Cập nhật quyền đối với nhãn. |
|
Cập nhật quyền của nhãn. |
|
Xoá quyền đối với nhãn. |
|
Liệt kê các quyền đối với nhãn. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-05 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-05 UTC."],[],[],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. |"]]