This document describes how to grant the Data Catalog tagTemplateUser role to principals. You can do this after you create a Data Catalog tag template in your resource project. This enables them to create metadata, that is, use your template to tag data resources. For more information, see Attaching tags to Google Cloud resources.
The next section shows how to grant the tagTemplateUser
role.
Grant the tagTemplateUser
role
Console
To grant the Data Catalog Go to IAM in the Google Cloud console and click the edit
( ) button at the right of the
principal's listing. In the Edit permissions dialog, click
In the Console
tagTemplateUser
role to a principal
on a project, do the following:
Data Catalog TagTemplate User
to display this role, then select it and
click SAVE.
Java
Before trying this sample, follow the Java setup instructions in the
Data Catalog quickstart using
client libraries.
For more information, see the
Data Catalog Java API
reference documentation.
To authenticate to Data Catalog, set up Application Default Credentials.
For more information, see
Set up authentication for a local development environment.
Node.js
Before trying this sample, follow the Node.js setup instructions in the
Data Catalog quickstart using
client libraries.
For more information, see the
Data Catalog Node.js API
reference documentation.
To authenticate to Data Catalog, set up Application Default Credentials.
For more information, see
Set up authentication for a local development environment.
Python
Before trying this sample, follow the Python setup instructions in the
Data Catalog quickstart using
client libraries.
For more information, see the
Data Catalog Python API
reference documentation.
To authenticate to Data Catalog, set up Application Default Credentials.
For more information, see
Set up authentication for a local development environment.
REST & CMD LINE
If you do not have access to Cloud Client libraries for your language or
want to test the API using REST requests, see the following examples
and refer to the
Data Catalog REST API
documentation.
Before using any of the request data,
make the following replacements:
HTTP method and URL:
Request JSON body:
To send your request, expand one of these options: You should receive a JSON response similar to the following:REST
POST https://datacatalog.googleapis.com/v1/projects/project-id/locations/region/tagTemplates/template-id:setIamPolicy
{
"policy":{
"bindings":[
{
"role":"roles/datacatalog.tagTemplateUser",
"members":[
"user:username@gmail.com"
]
}
]
}
}
{
"version":1,
"etag":"xxxxx.....",
"bindings":[
{
"role":"roles/datacatalog.tagTemplateUser",
"members":[
"user:username@gmail.com"
]
}
]
}