ภาพรวมป้ายกำกับ
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ป้ายกำกับคือข้อมูลเมตาที่คุณกำหนดเพื่อช่วยผู้ใช้จัดระเบียบ ค้นหา และใช้นโยบายกับไฟล์ใน Google ไดรฟ์ Drive API ช่วยให้นักพัฒนาซอฟต์แวร์
ใช้ป้ายกำกับกับไฟล์และโฟลเดอร์ ตั้งค่าฟิลด์ป้ายกำกับ อ่านป้ายกำกับและค่าในช่อง
ในไฟล์ และค้นหาไฟล์โดยใช้คำศัพท์ข้อมูลเมตาที่กำหนดโดยการจัดหมวดหมู่ป้ายกำกับที่กำหนดเองได้
ป้ายกำกับไดรฟ์รองรับกระบวนการทางธุรกิจได้โดยการแนบข้อมูลเมตา
กับไฟล์และโฟลเดอร์ การใช้งานทั่วไปสำหรับป้ายกำกับมีดังนี้
จัดประเภทเนื้อหาตามกลยุทธ์การกำกับดูแลข้อมูล - สร้างป้ายกำกับเพื่อระบุเนื้อหาหรือข้อมูลที่ละเอียดอ่อนซึ่งต้องมีการจัดการพิเศษ
ตัวอย่างเช่น คุณอาจสร้างป้ายกำกับที่มีป้าย (ป้ายกำกับที่มีค่าตัวเลือกที่กำหนดรหัสสี)
ชื่อ "ความละเอียดอ่อน" โดยมีค่าเป็น "ลับสุดยอด"
"เป็นความลับ" และ "สาธารณะ"
ใช้นโยบายกับรายการในไดรฟ์ - สร้างป้ายกำกับเพื่อจัดการเนื้อหาในไดรฟ์ตลอดอายุการใช้งานและตรวจสอบว่าเนื้อหาเป็นไปตามแนวทางปฏิบัติในการเก็บบันทึกระเบียนขององค์กร เช่น ใช้ป้ายกำกับเพื่อ
จัดการนโยบายการป้องกันข้อมูลรั่วไหล (DLP) ซึ่งผู้ใช้จะดาวน์โหลดไฟล์ที่มีป้ายกำกับ
"ระดับความละเอียดอ่อน" ที่ตั้งค่าเป็น "ลับสุดยอด" ไม่ได้
ดูแลจัดการและค้นหาไฟล์ - สร้างป้ายกำกับเพื่อเพิ่มความสามารถในการค้นหาเนื้อหาของบริษัทโดยอนุญาตให้ผู้ใช้ในองค์กรค้นหารายการตามป้ายกำกับและฟิลด์ของป้ายกำกับ เช่น ใช้ชุดป้ายกำกับ "สถานะลายเซ็น" ที่มีค่าเป็น "กำลังรอลายเซ็น" กับสัญญาทั้งหมดที่กำลังรอลายเซ็นภายในวันที่ที่ระบุ
จากนั้นการค้นหาในไดรฟ์จะแสดงสัญญาเหล่านี้เมื่อมีคนค้นหาคำว่า "รอการลงนาม"
ด้านล่างนี้คือรายการคำศัพท์ที่ใช้กันโดยทั่วไปในป้ายกำกับไดรฟ์
- ป้ายกำกับ
ข้อมูลเมตาที่มีโครงสร้างซึ่งวางไว้ในไฟล์ไดรฟ์
ผู้ใช้ไดรฟ์สามารถกำหนดป้ายกำกับและตั้งค่าฟิลด์ป้ายกำกับ
สำหรับไฟล์ได้ ป้ายกำกับประกอบด้วยข้อมูลต่อไปนี้
- ชื่อป้ายกำกับ
- ชื่อทรัพยากรของป้ายกำกับ รหัสป้ายกำกับเป็นส่วนหนึ่งของ
ชื่อป้ายกำกับ ชื่อจะอยู่ในรูปแบบใดรูปแบบหนึ่งต่อไปนี้ ทั้งนี้ขึ้นอยู่กับคำขอ
labels/{id}
หรือ labels/{id}@{revisionId}
ดูข้อมูลเพิ่มเติมได้ที่การแก้ไขป้ายกำกับด้านล่าง
- รหัสป้ายกำกับ
- ตัวระบุที่ไม่ซ้ำกันทั่วโลกสำหรับป้ายกำกับ โดยรหัสนี้เป็นส่วนหนึ่งของ
ชื่อป้ายกำกับ แต่จะแตกต่างจากชื่อตรงที่จะสอดคล้องกันระหว่างการแก้ไข
- ฟิลด์
คอมโพเนนต์แต่ละรายการของป้ายกำกับที่พิมพ์ได้และตั้งค่าได้ ป้ายกำกับอาจมีหรือไม่มีฟิลด์ที่เชื่อมโยงอยู่ก็ได้ ตั้งค่าฟิลด์การเลือกและฟิลด์ผู้ใช้ด้วย
ค่าหลายค่าได้หากกำหนดค่าฟิลด์ด้วย
ListOptions
ใน
Google Drive Labels API
- ประเภทฟิลด์
- ประเภทข้อมูลของค่าที่เชื่อมโยงกับฟิลด์ กำหนดค่าเป็น
integer, dateString, text, user หรือ selection ได้ ประเภทที่เลือกจะส่งผลต่อทั้งค่าที่ถูกต้องซึ่งใช้ได้กับรายการในไดรฟ์และตัวเลือกคำค้นหาที่ใช้ได้
- การจัดหมวดหมู่ป้ายกำกับ
ฟิลด์ป้ายกำกับที่กำหนดค่าไว้ซึ่งผู้ใช้ใช้ได้กับไฟล์ในไดรฟ์ อ่านและเขียนได้ผ่าน
Drive Labels API หรือที่เรียกว่าสคีมาป้ายกำกับ
- การแก้ไขป้ายกำกับ
อินสแตนซ์ของป้ายกำกับ ทุกครั้งที่มีการสร้าง อัปเดต เผยแพร่ หรือเลิกใช้งานป้ายกำกับ ระบบจะเพิ่มการแก้ไขป้ายกำกับ
- การแก้ไขฉบับร่าง
- หมายเลขการแก้ไขของอินสแตนซ์ฉบับร่างปัจจุบันของป้ายกำกับ คุณสามารถ
อัปเดตป้ายกำกับหลายครั้ง โดยแต่ละครั้งจะเพิ่มหมายเลขการแก้ไขแบบร่าง
โดยไม่ส่งผลต่อการแก้ไขที่เผยแพร่ ความสามารถในการมี
ป้ายกำกับฉบับร่างช่วยให้คุณทดสอบการอัปเดตป้ายกำกับก่อนเผยแพร่ได้
- การแก้ไขที่เผยแพร่แล้ว
- หมายเลขการแก้ไขของเวอร์ชันที่เผยแพร่ของป้ายกำกับ ป้ายกำกับที่เผยแพร่แล้ว
คืออินสแตนซ์ของป้ายกำกับที่ผู้ใช้ใช้งานได้
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-04 UTC
[null,null,["อัปเดตล่าสุด 2025-08-04 UTC"],[],[],null,["# Labels overview\n\n*Labels* are metadata that you define to help users organize, find, and apply\npolicy to files in Google Drive. The Drive API allows developers to\napply labels to files and folders, set label field values, read labels and field\nvalues on files, and search for files using metadata terms defined by the custom\nlabel taxonomy.\n\nDrive labels can support business processes by attaching metadata\nto files and folders. Common uses for labels are:\n\n- **Classify content to follow an information governance strategy**---Create a\n label to identify sensitive content or data that requires special handling.\n For example, you might create a badged label (a label with color-coded\n option values) titled \"Sensitivity\" with the values of \"Top Secret,\"\n \"Confidential,\" and \"Public.\"\n\n- **Apply policy to items in Drive**---Create labels to manage\n Drive content throughout its lifecycle and ensure it adheres\n to your organization's record keeping practices. For example, use labels to\n manage a data loss policy (DLP) whereby users can't download files with a\n \"Sensitivity\" label set to \"Top Secret\".\n\n- **Curate and find files**---Create labels to increase searchability of your\n company's content by letting people in your organization find items based on\n labels and their fields. For example, apply a \"Signature Status\" label set\n to \"Awaiting Signature\" to all contracts awaiting signature by a specific\n date. Drive search can then return these contracts when\n someone searches \"awaiting signature\".\n\nBelow is a list of common terms used by Drive labels:\n\n*Label*\n\n: Structured metadata placed on a Drive file.\n Drive users can assign labels and set label field values\n for files. Labels are composed of:\n\n *Label name*\n : The resource name of the label. The *label ID* is part of the\n Label name. Depending on the request, the name is in the form of either:\n `labels/{id}` or `labels/{id}@{revisionId}`. For more information, see\n [Label revision](#revision) below.\n\n *Label ID*\n : A globally unique identifier for the label. The ID is part of the\n label name, but unlike the name, it's consistent between revisions.\n\n*Field*\n\n: An individual typed, settable component of a label. A label can have zero or\n more fields associated with it. Selection and user fields can be set with\n multiple values if the field is configured with\n [`ListOptions`](/workspace/drive/labels/reference/rest/v2/labels#listoptions) in the\n [Google Drive Labels API](/workspace/drive/labels/guides/overview).\n\n *Field type*\n : The data type of the value associated with the *field*. Configurable as\n integer, dateString, text, user, or selection. The type chosen impacts\n both the valid values applicable to Drive items and the\n search query options available.\n\n*Label taxonomy*\n\n: The configured label fields available to users for application to\n Drive files. Readable and writable through the\n Drive Labels API. Also known as the label schema.\n\n*Label revision*\n\n: An instance of the label. Anytime a label is created, updated, published, or\n deprecated, the label revision increments.\n\n *Draft revision*\n : The revision number of the current draft instance of the label. You can\n make several updates to a label, each incrementing its draft revision\n number, without affecting the published revision. The ability to have\n draft labels lets you test label updates before publishing.\n\n *Published revision*\n : The revision number of the published version of a label. The published\n label is the instance of the label available to users.\n\nRelated topics\n--------------\n\n- To learn about using labels in Drive, see [Set a label field\n on a file](/workspace/drive/api/guides/set-label).\n- Learn more about the [Drive Labels API](/workspace/drive/labels/guides/overview)."]]