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 )
บทบาทที่ผู้ใช้หลักควรมี
|
ฟิลด์ Union principal หลักการที่สิทธิ์นี้ใช้ ต้องเป็นอีเมล ผู้ใช้ กลุ่ม หรือกลุ่มเป้าหมาย ตัวอย่างเช่น * people/12345 * groups/45678 * audiences/default principal ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น |
person |
string
ชื่อทรัพยากรบุคคล
|
group |
string
ชื่อทรัพยากรของกลุ่ม
|
audience |
string
กลุ่มเป้าหมายที่จะมอบบทบาทให้ ค่าพิเศษ audiences/default อาจใช้เพื่อมอบบทบาทให้กับกลุ่มเป้าหมายเริ่มต้นในบริบทขององค์กรที่เป็นเจ้าของป้ายกำกับ
|
LabelRole
บทบาทจะซ้อนกันกับบทบาทถัดไป
Enum |
LABEL_ROLE_UNSPECIFIED |
บทบาทที่ไม่รู้จัก |
READER |
ผู้อ่านจะอ่านป้ายกำกับและข้อมูลเมตาที่เชื่อมโยงซึ่งใช้กับรายการในไดรฟ์ได้ |
APPLIER |
ผู้สมัครสามารถเขียนข้อมูลเมตาที่เชื่อมโยงในรายการในไดรฟ์ซึ่งตนเองมีสิทธิ์เข้าถึงแบบเขียนได้ด้วย หมายถึง READER |
ORGANIZER |
ผู้จัดการจะปักหมุดป้ายกำกับนี้ในไดรฟ์ที่แชร์ที่ตนจัดการและเพิ่มผู้ใช้ใหม่ที่ใช้ป้ายกำกับได้ |
EDITOR |
โดยผู้แก้ไขสามารถทำการอัปเดตใดก็ได้ รวมถึงการลบป้ายกำกับ ซึ่งจะลบข้อมูลเมตาของรายการในไดรฟ์ที่เชื่อมโยงด้วย หมายถึง APPLIER |
เมธอด |
|
ลบสิทธิ์ของป้ายกำกับ |
|
อัปเดตสิทธิ์ป้ายกำกับ |
|
อัปเดตสิทธิ์ของป้ายกำกับ |
|
ลบสิทธิ์ของป้ายกำกับ |
|
แสดงรายการสิทธิ์ของป้ายกำกับ |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-05 UTC
[null,null,["อัปเดตล่าสุด 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. |"]]