This page shows you how to use [labels](https://docs.cloud.google.com/filestore/docs/tags-and-labels.md.txt#labels) with your Filestore
instances. Labels let you group related instances and store metadata
about an instance.

## Adding or updating an instance's labels

You can add labels to a Filestore instance when you
[create the instance](https://docs.cloud.google.com/filestore/docs/creating-instances.md.txt).
After an instance is created, you can add more labels to the instance, as well
as update or delete existing labels.

### Console

1. In the Google Cloud console, go to the Filestore Instances page.

   [Go to the Filestore instances page](https://console.cloud.google.com/filestore/instances)
2. Select the checkbox next to each instance whose labels you want to modify.

3. Click **Show info panel**.

4. Add and update labels as needed:

   | Operation | Instructions |
   |---|---|
   | Add a label | Click **Add label** and type the key and value for the label. |
   | Update a label | Update the **Value** field. You cannot update the **Key** of an existing label. |
   | Delete a label | Click **Delete item** next to the label. |

5. Click **Save** to save your changes once you are finished with your
   updates.

### gcloud

You can edit the labels of a Filestore instance's by running the
[`instances update`](https://docs.cloud.google.com/sdk/gcloud/reference/filestore/instances/update.md.txt) command.
To add new labels or change the values of existing labels, use the
`--update-labels` flag. To delete one or more labels, use the `--remove-labels`
flag. The `--clear-labels` flag removes all labels from an instance.

    gcloud filestore instances update instance-id \
        --project=project-id \
        --zone=zone \
        --update-labels key=value,[key=value,...] \
        --remove-labels key,[key,...] \
        --clear-labels

where:

- <var translate="no">instance-id</var> is the instance ID of the instance you want to edit.
- <var translate="no">project-id</var> is the project ID of the Google Cloud project that
  contains the Filestore instance. You can skip this
  flag if the Filestore instance is in the `gcloud` default
  project. You can set the default project by running:

       gcloud config set project project-id

- <var translate="no">zone</var> is the zone where the Filestore
  instance resides. Run the [`gcloud filestore zones list`](https://docs.cloud.google.com/sdk/gcloud/reference/filestore/zones/list)
  command to get a list of supported zones. You can skip this flag
  if the Filestore instance is in the `gcloud` default
  zone. You can set the default zone by running:

       gcloud config set filestore/zone zone

- <var translate="no">key</var> is a new label, or an existing label you want to change or remove.

- <var translate="no">value</var> is the value for a label.

#### Example

The following example updates the nfs-server instance by adding the **status**
label, updating the **dept** label value, and removing the **admin** label.

    gcloud filestore instances update nfs-server \
        --project=myproject \
        --zone=us-central1-c \
        --update-labels status=active \
        --update-labels dept=accounting \
        --remove-labels admin

## What's next

Learn how to [edit other properties of a Filestore
instance](https://docs.cloud.google.com/filestore/docs/editing-instances).