[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[[["\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)."]]