Skip to main content

taxonomies

Creates, updates, deletes, gets or lists a taxonomies resource.

Overview​

Nametaxonomies
TypeResource
Idgoogle.datacatalog.taxonomies

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. Resource name of this taxonomy in URL format. Note: Policy tag manager generates unique taxonomy IDs.
activatedPolicyTypesarrayOptional. A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list.
descriptionstringOptional. Description of this taxonomy. If not set, defaults to empty. The description must contain only Unicode characters, tabs, newlines, carriage returns, and page breaks, and be at most 2000 bytes long when encoded in UTF-8.
displayNamestringRequired. User-defined name of this taxonomy. The name can't start or end with spaces, must contain only Unicode letters, numbers, underscores, dashes, and spaces, and be at most 200 bytes long when encoded in UTF-8. The taxonomy display name must be unique within an organization.
policyTagCountinteger (int32)Output only. Number of policy tags in this taxonomy.
serviceobjectOutput only. Identity of the service which owns the Taxonomy. This field is only populated when the taxonomy is created by a Google Cloud service. Currently only 'DATAPLEX' is supported. (id: GoogleCloudDatacatalogV1TaxonomyService)
taxonomyTimestampsobjectOutput only. Creation and modification timestamps of this taxonomy. (id: GoogleCloudDatacatalogV1SystemTimestamps)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_taxonomies_getselectprojectsId, locationsId, taxonomiesIdGets a taxonomy.
projects_locations_taxonomies_listselectprojectsId, locationsIdfilter, pageSize, pageTokenLists all taxonomies in a project in a particular location that you have a permission to view.
projects_locations_taxonomies_createinsertprojectsId, locationsIdCreates a taxonomy in a specified project. The taxonomy is initially empty, that is, it doesn't contain policy tags.
projects_locations_taxonomies_patchupdateprojectsId, locationsId, taxonomiesIdupdateMaskUpdates a taxonomy, including its display name, description, and activated policy types.
projects_locations_taxonomies_replacereplaceprojectsId, locationsId, taxonomiesIdReplaces (updates) a taxonomy and all its policy tags. The taxonomy and its entire hierarchy of policy tags must be represented literally by SerializedTaxonomy and the nested SerializedPolicyTag messages. This operation automatically does the following: - Deletes the existing policy tags that are missing from the SerializedPolicyTag. - Creates policy tags that don't have resource names. They are considered new. - Updates policy tags with valid resources names accordingly.
projects_locations_taxonomies_deletedeleteprojectsId, locationsId, taxonomiesIdDeletes a taxonomy, including all policy tags in this taxonomy, their associated policies, and the policy tags references from BigQuery columns.
projects_locations_taxonomies_exportexecprojectsId, locationsIdserializedTaxonomies, taxonomiesExports taxonomies in the requested type and returns them, including their policy tags. The requested taxonomies must belong to the same project. This method generates SerializedTaxonomy protocol buffers with nested policy tags that can be used as input for ImportTaxonomies calls.
projects_locations_taxonomies_importexecprojectsId, locationsIdCreates new taxonomies (including their policy tags) in a given project by importing from inlined or cross-regional sources. For a cross-regional source, new taxonomies are created by copying from a source in another region. For an inlined source, taxonomies and policy tags are created in bulk using nested protocol buffer structures.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationsIdstring
projectsIdstring
taxonomiesIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring
serializedTaxonomiesboolean
taxonomiesstring
updateMaskstring (google-fieldmask)

SELECT examples​

Gets a taxonomy.

SELECT
name,
activatedPolicyTypes,
description,
displayName,
policyTagCount,
service,
taxonomyTimestamps
FROM google.datacatalog.taxonomies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND taxonomiesId = '{{ taxonomiesId }}' -- required
;

INSERT examples​

Creates a taxonomy in a specified project. The taxonomy is initially empty, that is, it doesn't contain policy tags.

INSERT INTO google.datacatalog.taxonomies (
data__activatedPolicyTypes,
data__description,
data__displayName,
data__name,
projectsId,
locationsId
)
SELECT
'{{ activatedPolicyTypes }}',
'{{ description }}',
'{{ displayName }}',
'{{ name }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
activatedPolicyTypes,
description,
displayName,
policyTagCount,
service,
taxonomyTimestamps
;

UPDATE examples​

Updates a taxonomy, including its display name, description, and activated policy types.

UPDATE google.datacatalog.taxonomies
SET
data__activatedPolicyTypes = '{{ activatedPolicyTypes }}',
data__description = '{{ description }}',
data__displayName = '{{ displayName }}',
data__name = '{{ name }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND taxonomiesId = '{{ taxonomiesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
activatedPolicyTypes,
description,
displayName,
policyTagCount,
service,
taxonomyTimestamps;

REPLACE examples​

Replaces (updates) a taxonomy and all its policy tags. The taxonomy and its entire hierarchy of policy tags must be represented literally by SerializedTaxonomy and the nested SerializedPolicyTag messages. This operation automatically does the following: - Deletes the existing policy tags that are missing from the SerializedPolicyTag. - Creates policy tags that don't have resource names. They are considered new. - Updates policy tags with valid resources names accordingly.

REPLACE google.datacatalog.taxonomies
SET
data__serializedTaxonomy = '{{ serializedTaxonomy }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND taxonomiesId = '{{ taxonomiesId }}' --required
RETURNING
name,
activatedPolicyTypes,
description,
displayName,
policyTagCount,
service,
taxonomyTimestamps;

DELETE examples​

Deletes a taxonomy, including all policy tags in this taxonomy, their associated policies, and the policy tags references from BigQuery columns.

DELETE FROM google.datacatalog.taxonomies
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND taxonomiesId = '{{ taxonomiesId }}' --required
;

Lifecycle Methods​

Exports taxonomies in the requested type and returns them, including their policy tags. The requested taxonomies must belong to the same project. This method generates SerializedTaxonomy protocol buffers with nested policy tags that can be used as input for ImportTaxonomies calls.

EXEC google.datacatalog.taxonomies.projects_locations_taxonomies_export
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@serializedTaxonomies={{ serializedTaxonomies }},
@taxonomies='{{ taxonomies }}'
;