Skip to main content

taxonomies

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

Overview

Nametaxonomies
TypeResource
Idgoogle.datacatalog.taxonomies

Fields

NameDatatypeDescription
namestringIdentifier. Resource name of this taxonomy in URL format. Note: Policy tag manager generates unique taxonomy IDs.
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.
activatedPolicyTypesarrayOptional. A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list.
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.
policyTagCountintegerOutput only. Number of policy tags in this taxonomy.
serviceobjectThe source system of the Taxonomy.
taxonomyTimestampsobjectTimestamps associated with this resource in a particular system.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_taxonomies_getSELECTlocationsId, projectsId, taxonomiesIdGets a taxonomy.
projects_locations_taxonomies_listSELECTlocationsId, projectsIdLists all taxonomies in a project in a particular location that you have a permission to view.
projects_locations_taxonomies_createINSERTlocationsId, projectsIdCreates a taxonomy in a specified project. The taxonomy is initially empty, that is, it doesn't contain policy tags.
projects_locations_taxonomies_deleteDELETElocationsId, projectsId, taxonomiesIdDeletes a taxonomy, including all policy tags in this taxonomy, their associated policies, and the policy tags references from BigQuery columns.
projects_locations_taxonomies_patchUPDATElocationsId, projectsId, taxonomiesIdUpdates a taxonomy, including its display name, description, and activated policy types.
projects_locations_taxonomies_replaceREPLACElocationsId, projectsId, 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_exportEXEClocationsId, projectsIdExports 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_importEXEClocationsId, projectsIdCreates 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.

SELECT examples

Lists all taxonomies in a project in a particular location that you have a permission to view.

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

INSERT example

Use the following StackQL query and manifest file to create a new taxonomies resource.

/*+ create */
INSERT INTO google.datacatalog.taxonomies (
locationsId,
projectsId,
name,
displayName,
description,
activatedPolicyTypes
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ activatedPolicyTypes }}'
;

UPDATE example

Updates a taxonomies resource.

/*+ update */
UPDATE google.datacatalog.taxonomies
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
description = '{{ description }}',
activatedPolicyTypes = '{{ activatedPolicyTypes }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND taxonomiesId = '{{ taxonomiesId }}';

REPLACE example

Replaces all fields in the specified taxonomies resource.

/*+ update */
REPLACE google.datacatalog.taxonomies
SET
serializedTaxonomy = '{{ serializedTaxonomy }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND taxonomiesId = '{{ taxonomiesId }}';

DELETE example

Deletes the specified taxonomies resource.

/*+ delete */
DELETE FROM google.datacatalog.taxonomies
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND taxonomiesId = '{{ taxonomiesId }}';