Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menunjukkan cara menggunakan label dengan instance Filestore Anda. Label memungkinkan Anda mengelompokkan instance terkait dan menyimpan metadata tentang instance.
Menambahkan atau memperbarui label instance
Anda dapat menambahkan label ke instance Filestore saat membuat instance.
Setelah instance dibuat, Anda dapat menambahkan lebih banyak label ke instance, serta
memperbarui atau menghapus label yang ada.
Konsol
Di Google Cloud console, buka halaman Filestore Instances.
Centang kotak di samping setiap instance yang labelnya ingin Anda ubah.
Klik Tampilkan panel info.
Tambahkan dan perbarui label sesuai kebutuhan:
Operasi
Petunjuk
Tambahkan label
Klik Tambahkan label, lalu ketik kunci dan nilai untuk label.
Memperbarui label
Perbarui kolom Value. Anda tidak dapat memperbarui Kunci label yang ada.
Menghapus label
Klik Hapus itemdelete di samping label.
Klik Simpan untuk menyimpan perubahan setelah Anda selesai melakukan
update.
gcloud
Anda dapat mengedit label instance Filestore dengan menjalankan perintah instances update.
Untuk menambahkan label baru atau mengubah nilai label yang ada, gunakan
flag --update-labels. Untuk menghapus satu atau beberapa label, gunakan flag --remove-labels. Flag --clear-labels menghapus semua label dari instance.
instance-id adalah ID instance dari instance yang ingin Anda edit.
project-id adalah project ID untuk project Google Cloud yang
berisi instance Filestore. Anda dapat melewati flag ini jika instance Filestore berada dalam project default gcloud. Anda dapat menetapkan project default dengan menjalankan:
gcloud config set project project-id
zone adalah zona tempat instance Filestore
berada. Jalankan perintah gcloud filestore zones list
untuk mendapatkan daftar zona yang didukung. Anda dapat melewati tanda ini jika instance Filestore berada di zona default gcloud. Anda dapat menetapkan zona default dengan menjalankan:
gcloud config set filestore/zone zone
key adalah label baru, atau label lama yang ingin Anda ubah atau hapus.
value adalah nilai untuk label.
Contoh
Contoh berikut memperbarui instance nfs-server dengan menambahkan label status, memperbarui nilai label dept, dan menghapus label admin.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-18 UTC."],[[["\u003cp\u003eLabels in Filestore allow for grouping related instances and storing metadata about them.\u003c/p\u003e\n"],["\u003cp\u003eYou can add labels to a Filestore instance during creation, or add, update, or delete them later.\u003c/p\u003e\n"],["\u003cp\u003eUsing the Google Cloud console, you can modify labels by selecting the instance, accessing the info panel, and then using options to add, update, or delete them.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egcloud\u003c/code\u003e command-line tool offers functionality to manage labels, including adding new ones with \u003ccode\u003e--update-labels\u003c/code\u003e, removing them with \u003ccode\u003e--remove-labels\u003c/code\u003e, or clearing all labels using \u003ccode\u003e--clear-labels\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eTo update labels with \u003ccode\u003egcloud\u003c/code\u003e, you can specify the instance ID, project ID, zone, the label key and the corresponding value, in addition to removing some via key.\u003c/p\u003e\n"]]],[],null,["# Managing labels\n\nThis page shows you how to use [labels](/filestore/docs/tags-and-labels#labels) with your Filestore\ninstances. Labels let you group related instances and store metadata\nabout an instance.\n\nAdding or updating an instance's labels\n---------------------------------------\n\nYou can add labels to a Filestore instance when you\n[create the instance](/filestore/docs/creating-instances).\nAfter an instance is created, you can add more labels to the instance, as well\nas update or delete existing labels. \n\n### Console\n\n1. In the Google Cloud console, go to the Filestore Instances page.\n\n [Go to the Filestore instances page](https://console.cloud.google.com/filestore/instances)\n2. Select the checkbox next to each instance whose labels you want to modify.\n\n3. Click **Show info panel**.\n\n4. Add and update labels as needed:\n\n5. Click **Save** to save your changes once you are finished with your\n updates.\n\n### gcloud\n\nYou can edit the labels of a Filestore instance's by running the\n[`instances update`](/sdk/gcloud/reference/filestore/instances/update) command.\nTo add new labels or change the values of existing labels, use the\n`--update-labels` flag. To delete one or more labels, use the `--remove-labels`\nflag. The `--clear-labels` flag removes all labels from an instance. \n\n gcloud filestore instances update \u003cvar translate=\"no\"\u003einstance-id\u003c/var\u003e \\\n --project=\u003cvar translate=\"no\"\u003eproject-id\u003c/var\u003e \\\n --zone=\u003cvar translate=\"no\"\u003ezone\u003c/var\u003e \\\n --update-labels \u003cvar translate=\"no\"\u003ekey\u003c/var\u003e=\u003cvar translate=\"no\"\u003evalue\u003c/var\u003e,[\u003cvar translate=\"no\"\u003ekey\u003c/var\u003e=\u003cvar translate=\"no\"\u003evalue\u003c/var\u003e,...] \\\n --remove-labels \u003cvar translate=\"no\"\u003ekey\u003c/var\u003e,[\u003cvar translate=\"no\"\u003ekey\u003c/var\u003e,...] \\\n --clear-labels\n\nwhere:\n\n- \u003cvar translate=\"no\"\u003einstance-id\u003c/var\u003e is the instance ID of the instance you want to edit.\n- \u003cvar translate=\"no\"\u003eproject-id\u003c/var\u003e is the project ID of the Google Cloud project that\n contains the Filestore instance. You can skip this\n flag if the Filestore instance is in the `gcloud` default\n project. You can set the default project by running:\n\n gcloud config set project \u003cvar translate=\"no\"\u003eproject-id\u003c/var\u003e\n\n- \u003cvar translate=\"no\"\u003ezone\u003c/var\u003e is the zone where the Filestore\n instance resides. Run the [`gcloud filestore zones list`](/sdk/gcloud/reference/filestore/zones/list)\n command to get a list of supported zones. You can skip this flag\n if the Filestore instance is in the `gcloud` default\n zone. You can set the default zone by running:\n\n gcloud config set filestore/zone \u003cvar translate=\"no\"\u003ezone\u003c/var\u003e\n\n- \u003cvar translate=\"no\"\u003ekey\u003c/var\u003e is a new label, or an existing label you want to change or remove.\n\n- \u003cvar translate=\"no\"\u003evalue\u003c/var\u003e is the value for a label.\n\n#### Example\n\nThe following example updates the nfs-server instance by adding the **status**\nlabel, updating the **dept** label value, and removing the **admin** label. \n\n gcloud filestore instances update nfs-server \\\n --project=myproject \\\n --zone=us-central1-c \\\n --update-labels status=active \\\n --update-labels dept=accounting \\\n --remove-labels admin\n\nWhat's next\n-----------\n\nLearn how to [edit other properties of a Filestore\ninstance](/filestore/docs/editing-instances)."]]