1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. datacatalog
  5. Taxonomy
Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi

gcp.datacatalog.Taxonomy

Explore with Pulumi AI

A collection of policy tags that classify data along a common axis.

To get more information about Taxonomy, see:

Example Usage

Data Catalog Taxonomy Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const basicTaxonomy = new gcp.datacatalog.Taxonomy("basic_taxonomy", {
    displayName: "my_taxonomy",
    description: "A collection of policy tags",
    activatedPolicyTypes: ["FINE_GRAINED_ACCESS_CONTROL"],
});
Copy
import pulumi
import pulumi_gcp as gcp

basic_taxonomy = gcp.datacatalog.Taxonomy("basic_taxonomy",
    display_name="my_taxonomy",
    description="A collection of policy tags",
    activated_policy_types=["FINE_GRAINED_ACCESS_CONTROL"])
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/datacatalog"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datacatalog.NewTaxonomy(ctx, "basic_taxonomy", &datacatalog.TaxonomyArgs{
			DisplayName: pulumi.String("my_taxonomy"),
			Description: pulumi.String("A collection of policy tags"),
			ActivatedPolicyTypes: pulumi.StringArray{
				pulumi.String("FINE_GRAINED_ACCESS_CONTROL"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var basicTaxonomy = new Gcp.DataCatalog.Taxonomy("basic_taxonomy", new()
    {
        DisplayName = "my_taxonomy",
        Description = "A collection of policy tags",
        ActivatedPolicyTypes = new[]
        {
            "FINE_GRAINED_ACCESS_CONTROL",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.datacatalog.Taxonomy;
import com.pulumi.gcp.datacatalog.TaxonomyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var basicTaxonomy = new Taxonomy("basicTaxonomy", TaxonomyArgs.builder()
            .displayName("my_taxonomy")
            .description("A collection of policy tags")
            .activatedPolicyTypes("FINE_GRAINED_ACCESS_CONTROL")
            .build());

    }
}
Copy
resources:
  basicTaxonomy:
    type: gcp:datacatalog:Taxonomy
    name: basic_taxonomy
    properties:
      displayName: my_taxonomy
      description: A collection of policy tags
      activatedPolicyTypes:
        - FINE_GRAINED_ACCESS_CONTROL
Copy

Create Taxonomy Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Taxonomy(name: string, args: TaxonomyArgs, opts?: CustomResourceOptions);
@overload
def Taxonomy(resource_name: str,
             args: TaxonomyArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def Taxonomy(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             display_name: Optional[str] = None,
             activated_policy_types: Optional[Sequence[str]] = None,
             description: Optional[str] = None,
             project: Optional[str] = None,
             region: Optional[str] = None)
func NewTaxonomy(ctx *Context, name string, args TaxonomyArgs, opts ...ResourceOption) (*Taxonomy, error)
public Taxonomy(string name, TaxonomyArgs args, CustomResourceOptions? opts = null)
public Taxonomy(String name, TaxonomyArgs args)
public Taxonomy(String name, TaxonomyArgs args, CustomResourceOptions options)
type: gcp:datacatalog:Taxonomy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TaxonomyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TaxonomyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TaxonomyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TaxonomyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TaxonomyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var taxonomyResource = new Gcp.DataCatalog.Taxonomy("taxonomyResource", new()
{
    DisplayName = "string",
    ActivatedPolicyTypes = new[]
    {
        "string",
    },
    Description = "string",
    Project = "string",
    Region = "string",
});
Copy
example, err := datacatalog.NewTaxonomy(ctx, "taxonomyResource", &datacatalog.TaxonomyArgs{
	DisplayName: pulumi.String("string"),
	ActivatedPolicyTypes: pulumi.StringArray{
		pulumi.String("string"),
	},
	Description: pulumi.String("string"),
	Project:     pulumi.String("string"),
	Region:      pulumi.String("string"),
})
Copy
var taxonomyResource = new Taxonomy("taxonomyResource", TaxonomyArgs.builder()
    .displayName("string")
    .activatedPolicyTypes("string")
    .description("string")
    .project("string")
    .region("string")
    .build());
Copy
taxonomy_resource = gcp.datacatalog.Taxonomy("taxonomyResource",
    display_name="string",
    activated_policy_types=["string"],
    description="string",
    project="string",
    region="string")
Copy
const taxonomyResource = new gcp.datacatalog.Taxonomy("taxonomyResource", {
    displayName: "string",
    activatedPolicyTypes: ["string"],
    description: "string",
    project: "string",
    region: "string",
});
Copy
type: gcp:datacatalog:Taxonomy
properties:
    activatedPolicyTypes:
        - string
    description: string
    displayName: string
    project: string
    region: string
Copy

Taxonomy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Taxonomy resource accepts the following input properties:

DisplayName This property is required. string
User defined name of this taxonomy. The taxonomy display name must be unique within an organization. It must: contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.


ActivatedPolicyTypes List<string>
A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL.
Description string
Description of this taxonomy. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Region Changes to this property will trigger replacement. string
Taxonomy location region.
DisplayName This property is required. string
User defined name of this taxonomy. The taxonomy display name must be unique within an organization. It must: contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.


ActivatedPolicyTypes []string
A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL.
Description string
Description of this taxonomy. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Region Changes to this property will trigger replacement. string
Taxonomy location region.
displayName This property is required. String
User defined name of this taxonomy. The taxonomy display name must be unique within an organization. It must: contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.


activatedPolicyTypes List<String>
A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL.
description String
Description of this taxonomy. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. String
Taxonomy location region.
displayName This property is required. string
User defined name of this taxonomy. The taxonomy display name must be unique within an organization. It must: contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.


activatedPolicyTypes string[]
A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL.
description string
Description of this taxonomy. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description.
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. string
Taxonomy location region.
display_name This property is required. str
User defined name of this taxonomy. The taxonomy display name must be unique within an organization. It must: contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.


activated_policy_types Sequence[str]
A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL.
description str
Description of this taxonomy. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description.
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. str
Taxonomy location region.
displayName This property is required. String
User defined name of this taxonomy. The taxonomy display name must be unique within an organization. It must: contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.


activatedPolicyTypes List<String>
A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL.
description String
Description of this taxonomy. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. String
Taxonomy location region.

Outputs

All input properties are implicitly available as output properties. Additionally, the Taxonomy resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name of this taxonomy, whose format is: "projects/{project}/locations/{region}/taxonomies/{taxonomy}".
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name of this taxonomy, whose format is: "projects/{project}/locations/{region}/taxonomies/{taxonomy}".
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name of this taxonomy, whose format is: "projects/{project}/locations/{region}/taxonomies/{taxonomy}".
id string
The provider-assigned unique ID for this managed resource.
name string
Resource name of this taxonomy, whose format is: "projects/{project}/locations/{region}/taxonomies/{taxonomy}".
id str
The provider-assigned unique ID for this managed resource.
name str
Resource name of this taxonomy, whose format is: "projects/{project}/locations/{region}/taxonomies/{taxonomy}".
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name of this taxonomy, whose format is: "projects/{project}/locations/{region}/taxonomies/{taxonomy}".

Look up Existing Taxonomy Resource

Get an existing Taxonomy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: TaxonomyState, opts?: CustomResourceOptions): Taxonomy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        activated_policy_types: Optional[Sequence[str]] = None,
        description: Optional[str] = None,
        display_name: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        region: Optional[str] = None) -> Taxonomy
func GetTaxonomy(ctx *Context, name string, id IDInput, state *TaxonomyState, opts ...ResourceOption) (*Taxonomy, error)
public static Taxonomy Get(string name, Input<string> id, TaxonomyState? state, CustomResourceOptions? opts = null)
public static Taxonomy get(String name, Output<String> id, TaxonomyState state, CustomResourceOptions options)
resources:  _:    type: gcp:datacatalog:Taxonomy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ActivatedPolicyTypes List<string>
A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL.
Description string
Description of this taxonomy. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description.
DisplayName string
User defined name of this taxonomy. The taxonomy display name must be unique within an organization. It must: contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.


Name string
Resource name of this taxonomy, whose format is: "projects/{project}/locations/{region}/taxonomies/{taxonomy}".
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Region Changes to this property will trigger replacement. string
Taxonomy location region.
ActivatedPolicyTypes []string
A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL.
Description string
Description of this taxonomy. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description.
DisplayName string
User defined name of this taxonomy. The taxonomy display name must be unique within an organization. It must: contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.


Name string
Resource name of this taxonomy, whose format is: "projects/{project}/locations/{region}/taxonomies/{taxonomy}".
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Region Changes to this property will trigger replacement. string
Taxonomy location region.
activatedPolicyTypes List<String>
A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL.
description String
Description of this taxonomy. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description.
displayName String
User defined name of this taxonomy. The taxonomy display name must be unique within an organization. It must: contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.


name String
Resource name of this taxonomy, whose format is: "projects/{project}/locations/{region}/taxonomies/{taxonomy}".
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. String
Taxonomy location region.
activatedPolicyTypes string[]
A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL.
description string
Description of this taxonomy. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description.
displayName string
User defined name of this taxonomy. The taxonomy display name must be unique within an organization. It must: contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.


name string
Resource name of this taxonomy, whose format is: "projects/{project}/locations/{region}/taxonomies/{taxonomy}".
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. string
Taxonomy location region.
activated_policy_types Sequence[str]
A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL.
description str
Description of this taxonomy. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description.
display_name str
User defined name of this taxonomy. The taxonomy display name must be unique within an organization. It must: contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.


name str
Resource name of this taxonomy, whose format is: "projects/{project}/locations/{region}/taxonomies/{taxonomy}".
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. str
Taxonomy location region.
activatedPolicyTypes List<String>
A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. Each value may be one of: POLICY_TYPE_UNSPECIFIED, FINE_GRAINED_ACCESS_CONTROL.
description String
Description of this taxonomy. It must: contain only unicode characters, tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes long when encoded in UTF-8. If not set, defaults to an empty description.
displayName String
User defined name of this taxonomy. The taxonomy display name must be unique within an organization. It must: contain only unicode letters, numbers, underscores, dashes and spaces; not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.


name String
Resource name of this taxonomy, whose format is: "projects/{project}/locations/{region}/taxonomies/{taxonomy}".
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. String
Taxonomy location region.

Import

Taxonomy can be imported using any of these accepted formats:

  • {{name}}

When using the pulumi import command, Taxonomy can be imported using one of the formats above. For example:

$ pulumi import gcp:datacatalog/taxonomy:Taxonomy default {{name}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.