Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Nesta página, mostramos como usar rótulos com as instâncias do
Filestore. Os rótulos permitem agrupar instâncias relacionadas e armazenar metadados
sobre uma instância.
Como adicionar ou atualizar os rótulos de uma instância
É possível adicionar rótulos a uma instância do Filestore ao criar a instância.
Após a criação de uma instância, é possível adicionar mais rótulos, bem como atualizar ou excluir rótulos existentes.
Console
No console Google Cloud , acesse a página "Instâncias do Filestore".
Marque a caixa de seleção ao lado de cada instância que contenha os rótulos você quer modificar.
Clique em Mostrar painel de informações.
Adicione e atualize os rótulos conforme necessário:
Operação
Instruções
Adicione um marcador
Clique em Adicionar rótulo e digite a chave e o valor do rótulo.
Atualizar um rótulo
Atualize o campo Valor. Não é possível atualizar a Chave de um rótulo existente.
Excluir um rótulo
Clique em Excluir itemdelete ao lado do rótulo.
Clique em Salvar para salvar as alterações quando terminar de atualizar suas
atualizações.
gcloud
Para editar os rótulos de uma instância do Filestore, execute o comando
instances update.
Para adicionar novos rótulos ou alterar os valores dos rótulos atuais, use a
flag --update-labels. Para excluir um ou mais rótulos, use a flag
--remove-labels. A flag --clear-labels remove todos os rótulos de uma instância.
instance-id é o ID da instância que você quer editar.
project-id é o ID do projeto Google Cloud que
contém a instância do Filestore. É possível ignorar essa
flag se a instância do Filestore estiver no projeto
padrão gcloud. Para definir o projeto padrão, execute:
gcloud config set project project-id
zone é a zona em que a instância do Filestore
reside. Execute o comando gcloud filestore zones list
para conferir uma lista de zonas compatíveis. Pule essa flag
se a instância do Filestore estiver na zona
padrão gcloud. Para definir a zona padrão, execute:
gcloud config set filestore/zone zone
key é um novo rótulo ou um rótulo atual que você quer alterar ou remover.
value é o valor de um rótulo.
Exemplo
O exemplo a seguir atualiza a instância do nfs-server adicionando o rótulo de status,
atualizando o valor do rótulo de dept e removendo o rótulo de administrador.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 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)."]]