To get the permissions that
you need to view and set tags on Dataproc Metastore resources,
ask your administrator to grant you the
following IAM roles on your project:
Dataproc Metastore Editor (roles/metastore.editor):
assign to set and view tags
Dataproc Metastore Viewer (roles/metastore.viewer):
assign to view tags
After you've created and
defined a tag
using Resource Manager, you can start using tags with
Dataproc Metastore service and federation resources. For more
information about the Google Cloud CLI commands to use tag bindings, see gcloud
resource-manager tags
bindings.
For all of the commands on this page, replace the following:
PARENT_PATH: The complete path to the service or federation resource—for example, //metastore.googleapis.com/projects/my-project/locations/us-central1/services/my-service.
TAG_VALUE: The tag value that you want to attach to your resource—for example, the tag value set as 815471563813/environment/development includes the following components:
815471563813 is the organization ID or your project ID.
environment is the tag key.
development is the tag value.
LOCATION: The region where your service or federation is located—for example, us-central1.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis guide provides instructions on how to manage tags on Dataproc Metastore resources, including attaching, detaching, and listing them.\u003c/p\u003e\n"],["\u003cp\u003eTo interact with tags, users need either the Dataproc Metastore Editor role (\u003ccode\u003eroles/metastore.editor\u003c/code\u003e) to set and view tags or the Dataproc Metastore Viewer role (\u003ccode\u003eroles/metastore.viewer\u003c/code\u003e) to view them.\u003c/p\u003e\n"],["\u003cp\u003eYou can attach tags to Dataproc Metastore resources using the command \u003ccode\u003egcloud resource-manager tags bindings create\u003c/code\u003e, specifying the resource path, tag value, and location.\u003c/p\u003e\n"],["\u003cp\u003eYou can detach tags from Dataproc Metastore resources using the command \u003ccode\u003egcloud resource-manager tags bindings delete\u003c/code\u003e, providing the same resource information as with attaching.\u003c/p\u003e\n"],["\u003cp\u003eTo view the tags currently attached to a Dataproc Metastore resource, use the command \u003ccode\u003egcloud resource-manager tags bindings list\u003c/code\u003e, including the parent resource path and location.\u003c/p\u003e\n"]]],[],null,["# Attach and manage tags on Dataproc Metastore resources\n\nThis page describes how to attach, detach, and list tags on Dataproc Metastore\nresources. For an overview of tags on Dataproc Metastore, see\n[Organize Dataproc Metastore resources using tags](/dataproc-metastore/docs/tags).\n\nBefore you begin\n----------------\n\n\nTo get the permissions that\nyou need to view and set tags on Dataproc Metastore resources,\n\nask your administrator to grant you the\nfollowing IAM roles on your project:\n\n- Dataproc Metastore Editor (`roles/metastore.editor`): assign to set and view tags\n- Dataproc Metastore Viewer (`roles/metastore.viewer`): assign to view tags\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\nWork with tags\n--------------\n\nAfter you've [created and\ndefined](/resource-manager/docs/tags/tags-creating-and-managing#creating) a tag\nusing Resource Manager, you can start using tags with\nDataproc Metastore service and federation resources. For more\ninformation about the Google Cloud CLI commands to use tag bindings, see [gcloud\nresource-manager tags\nbindings](/sdk/gcloud/reference/resource-manager/tags/bindings).\n\nFor all of the commands on this page, replace the following:\n\n- \u003cvar translate=\"no\"\u003ePARENT_PATH\u003c/var\u003e: The complete path to the service or federation resource---for example, `//metastore.googleapis.com/projects/my-project/locations/us-central1/services/my-service`.\n- \u003cvar translate=\"no\"\u003eTAG_VALUE\u003c/var\u003e: The tag value that you want to attach to your resource---for example, the tag value set as `815471563813/environment/development` includes the following components:\n\n - `815471563813` is the organization ID or your project ID.\n\n - `environment` is the tag key.\n\n - `development` is the tag value.\n\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: The region where your service or federation is located---for example, `us-central1`.\n\n### Attach tags to Dataproc Metastore resources\n\n```\ngcloud resource-manager tags bindings create \\\n--parent=PARENT_PATH \\\n--tag-value=TAG_VALUE \\\n--location=LOCATION\n```\n\n### Detach tags from Dataproc Metastore resources\n\n```\ngcloud resource-manager tags bindings delete \\\n--parent=PARENT_PATH \\\n--tag-value=TAG_VALUE \\\n--location=LOCATION\n```\n\n### List tags on Dataproc Metastore resources\n\n```\ngcloud resource-manager tags bindings list \\\n--parent=PARENT_PATH \\\n--location=LOCATION\n```\n\nWhat's next\n-----------\n\n- [Learn more about attaching tags to resources](/resource-manager/docs/tags/tags-creating-and-managing#attaching)."]]