import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * > **Warning:** `gcp.datacatalog.TagTemplate` is deprecated and will be removed in a future major release. Use `gcp.dataplex.AspectType` instead. For steps to transition your Data Catalog users, workloads, and content to Dataplex Catalog, see https://cloud.google.com/dataplex/docs/transition-to-dataplex-catalog. * * A tag template defines a tag, which can have one or more typed fields. * The template is used to create and attach the tag to GCP resources. * * To get more information about TagTemplate, see: * * * [API documentation](https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates) * * How-to Guides * * [Official Documentation](https://cloud.google.com/data-catalog/docs) * * ## Example Usage * * ### Data Catalog Tag Template Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const basicTagTemplate = new gcp.datacatalog.TagTemplate("basic_tag_template", { * tagTemplateId: "my_template", * region: "us-central1", * displayName: "Demo Tag Template", * fields: [ * { * fieldId: "source", * displayName: "Source of data asset", * type: { * primitiveType: "STRING", * }, * isRequired: true, * }, * { * fieldId: "num_rows", * displayName: "Number of rows in the data asset", * type: { * primitiveType: "DOUBLE", * }, * }, * { * fieldId: "pii_type", * displayName: "PII type", * type: { * enumType: { * allowedValues: [ * { * displayName: "EMAIL", * }, * { * displayName: "SOCIAL SECURITY NUMBER", * }, * { * displayName: "NONE", * }, * ], * }, * }, * }, * ], * forceDelete: false, * }); * ``` * * ## Import * * TagTemplate can be imported using any of these accepted formats: * * * `{{name}}` * * When using the `pulumi import` command, TagTemplate can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:datacatalog/tagTemplate:TagTemplate default {{name}} * ``` */ export declare class TagTemplate extends pulumi.CustomResource { /** * Get an existing TagTemplate resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: TagTemplateState, opts?: pulumi.CustomResourceOptions): TagTemplate; /** * Returns true if the given object is an instance of TagTemplate. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is TagTemplate; /** * The display name for this template. */ readonly displayName: pulumi.Output; /** * Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. The change of fieldId will be resulting in re-creating of field. The change of primitiveType will be resulting in re-creating of field, however if the field is a required, you cannot update it. * Structure is documented below. */ readonly fields: pulumi.Output; /** * This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template. */ readonly forceDelete: pulumi.Output; /** * The resource name of the tag template in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId} */ readonly name: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * Template location region. */ readonly region: pulumi.Output; /** * The id of the tag template to create. */ readonly tagTemplateId: pulumi.Output; /** * Create a TagTemplate resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: TagTemplateArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TagTemplate resources. */ export interface TagTemplateState { /** * The display name for this template. */ displayName?: pulumi.Input; /** * Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. The change of fieldId will be resulting in re-creating of field. The change of primitiveType will be resulting in re-creating of field, however if the field is a required, you cannot update it. * Structure is documented below. */ fields?: pulumi.Input[]>; /** * This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template. */ forceDelete?: pulumi.Input; /** * The resource name of the tag template in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId} */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Template location region. */ region?: pulumi.Input; /** * The id of the tag template to create. */ tagTemplateId?: pulumi.Input; } /** * The set of arguments for constructing a TagTemplate resource. */ export interface TagTemplateArgs { /** * The display name for this template. */ displayName?: pulumi.Input; /** * Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. The change of fieldId will be resulting in re-creating of field. The change of primitiveType will be resulting in re-creating of field, however if the field is a required, you cannot update it. * Structure is documented below. */ fields: pulumi.Input[]>; /** * This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template. */ forceDelete?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * Template location region. */ region?: pulumi.Input; /** * The id of the tag template to create. */ tagTemplateId: pulumi.Input; }