public sealed class TagTemplate : IMessage<TagTemplate>, IEquatable<TagTemplate>, IDeepCloneable<TagTemplate>, IBufferMessage, IMessage
Reference documentation and code samples for the Data Catalog v1 API class TagTemplate.
A tag template defines a tag that can have one or more typed fields.
The template is used to create tags that are attached to Google Cloud
resources. Tag template roles
provide permissions to create, edit, and use the template. For example,
see the TagTemplate User role
that includes a permission to use the tag template to tag resources.
Display name for this template. Defaults to an empty string.
The name must contain only Unicode letters, numbers (0-9), underscores (_),
dashes (-), spaces ( ), and can't start or end with spaces.
The maximum length is 200 characters.
public MapField<string, TagTemplateField> Fields { get; }
Required. Map of tag template field IDs to the settings for the field.
This map is an exhaustive list of the allowed fields. The map must contain
at least one field and at most 500 fields.
The keys to this map are tag template field IDs. The IDs have the
following limitations:
Can contain uppercase and lowercase letters, numbers (0-9) and
underscores (_).
Must be at least 1 character and at most 64 characters long.
Indicates whether tags created with this template are public. Public tags
do not require tag template access to appear in
[ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags] API response.
Additionally, you can search for a public tag by value with a
simple search query in addition to using a tag: predicate.
[[["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-08-28 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eTagTemplate\u003c/code\u003e class in the Google.Cloud.DataCatalog.V1 namespace defines a template for creating tags with typed fields, which can be attached to Google Cloud resources.\u003c/p\u003e\n"],["\u003cp\u003eThis API provides various versions for the \u003ccode\u003eTagTemplate\u003c/code\u003e class, ranging from version 1.2.0 to the latest version, 2.14.0, allowing for backward compatibility and updates.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTagTemplate\u003c/code\u003e class can be instantiated through two available constructors, including a copy constructor that allows for cloning existing \u003ccode\u003eTagTemplate\u003c/code\u003e instances.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes properties such as \u003ccode\u003eDataplexTransferStatus\u003c/code\u003e, \u003ccode\u003eDisplayName\u003c/code\u003e, \u003ccode\u003eFields\u003c/code\u003e, \u003ccode\u003eIsPubliclyReadable\u003c/code\u003e, \u003ccode\u003eName\u003c/code\u003e, and \u003ccode\u003eTagTemplateName\u003c/code\u003e which allows for the modification and reading of TagTemplate properties.\u003c/p\u003e\n"],["\u003cp\u003eTag templates have associated roles that control permissions for creating, editing, and using them, including a specific "TagTemplate User" role that allows for tagging resources.\u003c/p\u003e\n"]]],[],null,["# Data Catalog v1 API - Class TagTemplate (2.16.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.16.0 (latest)](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/latest/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.15.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.14.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.14.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.13.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.12.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.11.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.10.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.9.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.8.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.7.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.6.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.5.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.4.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.3.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.2.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.1.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/2.0.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/1.8.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/1.7.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/1.6.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/1.5.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/1.4.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/1.3.0/Google.Cloud.DataCatalog.V1.TagTemplate)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/1.2.0/Google.Cloud.DataCatalog.V1.TagTemplate) \n\n public sealed class TagTemplate : IMessage\u003cTagTemplate\u003e, IEquatable\u003cTagTemplate\u003e, IDeepCloneable\u003cTagTemplate\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Data Catalog v1 API class TagTemplate.\n\nA tag template defines a tag that can have one or more typed fields.\n\nThe template is used to create tags that are attached to Google Cloud\nresources. [Tag template roles](https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles)\nprovide permissions to create, edit, and use the template. For example,\nsee the [TagTemplate User](https://cloud.google.com/data-catalog/docs/how-to/template-user) role\nthat includes a permission to use the tag template to tag resources. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e TagTemplate \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[TagTemplate](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/latest/Google.Cloud.DataCatalog.V1.TagTemplate), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[TagTemplate](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/latest/Google.Cloud.DataCatalog.V1.TagTemplate), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[TagTemplate](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/latest/Google.Cloud.DataCatalog.V1.TagTemplate), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.DataCatalog.V1](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/latest/Google.Cloud.DataCatalog.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.DataCatalog.V1.dll\n\nConstructors\n------------\n\n### TagTemplate()\n\n public TagTemplate()\n\n### TagTemplate(TagTemplate)\n\n public TagTemplate(TagTemplate other)\n\nProperties\n----------\n\n### DataplexTransferStatus\n\n public TagTemplate.Types.DataplexTransferStatus DataplexTransferStatus { get; set; }\n\nOptional. Transfer status of the TagTemplate\n\n### DisplayName\n\n public string DisplayName { get; set; }\n\nDisplay name for this template. Defaults to an empty string.\n\nThe name must contain only Unicode letters, numbers (0-9), underscores (_),\ndashes (-), spaces ( ), and can't start or end with spaces.\nThe maximum length is 200 characters.\n\n### Fields\n\n public MapField\u003cstring, TagTemplateField\u003e Fields { get; }\n\nRequired. Map of tag template field IDs to the settings for the field.\nThis map is an exhaustive list of the allowed fields. The map must contain\nat least one field and at most 500 fields.\n\nThe keys to this map are tag template field IDs. The IDs have the\nfollowing limitations:\n\n- Can contain uppercase and lowercase letters, numbers (0-9) and underscores (_).\n- Must be at least 1 character and at most 64 characters long.\n- Must start with a letter or underscore.\n\n### IsPubliclyReadable\n\n public bool IsPubliclyReadable { get; set; }\n\nIndicates whether tags created with this template are public. Public tags\ndo not require tag template access to appear in\n\\[ListTags\\]\\[google.cloud.datacatalog.v1.DataCatalog.ListTags\\] API response.\n\nAdditionally, you can search for a public tag by value with a\nsimple search query in addition to using a `tag:` predicate.\n\n### Name\n\n public string Name { get; set; }\n\nIdentifier. The resource name of the tag template in URL format.\n\nNote: The tag template itself and its child resources might not be\nstored in the location specified in its name.\n\n### TagTemplateName\n\n public TagTemplateName TagTemplateName { get; set; }\n\n[TagTemplateName](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/latest/Google.Cloud.DataCatalog.V1.TagTemplateName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.DataCatalog.V1/latest/Google.Cloud.DataCatalog.V1.TagTemplate#Google_Cloud_DataCatalog_V1_TagTemplate_Name) resource name property."]]