taxonomies
Creates, updates, deletes, gets or lists a taxonomies
resource.
Overview
Name | taxonomies |
Type | Resource |
Id | google.datacatalog.taxonomies |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_taxonomies_get
- projects_locations_taxonomies_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Resource name of this taxonomy in URL format. Note: Policy tag manager generates unique taxonomy IDs. |
activatedPolicyTypes | array | Optional. A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. |
description | string | Optional. 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. |
displayName | string | Required. 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. |
policyTagCount | integer (int32) | Output only. Number of policy tags in this taxonomy. |
service | object | Output 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) |
taxonomyTimestamps | object | Output only. Creation and modification timestamps of this taxonomy. (id: GoogleCloudDatacatalogV1SystemTimestamps) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Resource name of this taxonomy in URL format. Note: Policy tag manager generates unique taxonomy IDs. |
activatedPolicyTypes | array | Optional. A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list. |
description | string | Optional. 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. |
displayName | string | Required. 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. |
policyTagCount | integer (int32) | Output only. Number of policy tags in this taxonomy. |
service | object | Output 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) |
taxonomyTimestamps | object | Output only. Creation and modification timestamps of this taxonomy. (id: GoogleCloudDatacatalogV1SystemTimestamps) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_taxonomies_get | select | projectsId , locationsId , taxonomiesId | Gets a taxonomy. | |
projects_locations_taxonomies_list | select | projectsId , locationsId | pageSize , pageToken , filter | Lists all taxonomies in a project in a particular location that you have a permission to view. |
projects_locations_taxonomies_create | insert | projectsId , locationsId | Creates a taxonomy in a specified project. The taxonomy is initially empty, that is, it doesn't contain policy tags. | |
projects_locations_taxonomies_patch | update | projectsId , locationsId , taxonomiesId | updateMask | Updates a taxonomy, including its display name, description, and activated policy types. |
projects_locations_taxonomies_replace | replace | projectsId , locationsId , taxonomiesId | 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. | |
projects_locations_taxonomies_delete | delete | projectsId , locationsId , taxonomiesId | Deletes a taxonomy, including all policy tags in this taxonomy, their associated policies, and the policy tags references from BigQuery columns. | |
projects_locations_taxonomies_import | exec | projectsId , locationsId | Creates 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. | |
projects_locations_taxonomies_export | exec | projectsId , locationsId | taxonomies , serializedTaxonomies | 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. |
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.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
taxonomiesId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
serializedTaxonomies | boolean | |
taxonomies | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_taxonomies_get
- projects_locations_taxonomies_list
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;
Lists all taxonomies in a project in a particular location that you have a permission to view.
SELECT
name,
activatedPolicyTypes,
description,
displayName,
policyTagCount,
service,
taxonomyTimestamps
FROM google.datacatalog.taxonomies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';
INSERT
examples
- projects_locations_taxonomies_create
- Manifest
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__name,
data__displayName,
data__description,
data__activatedPolicyTypes,
projectsId,
locationsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ activatedPolicyTypes }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
activatedPolicyTypes,
description,
displayName,
policyTagCount,
service,
taxonomyTimestamps
;
# Description fields are for documentation purposes
- name: taxonomies
props:
- name: projectsId
value: string
description: Required parameter for the taxonomies resource.
- name: locationsId
value: string
description: Required parameter for the taxonomies resource.
- name: name
value: string
description: >
Identifier. Resource name of this taxonomy in URL format. Note: Policy tag manager generates unique taxonomy IDs.
- name: displayName
value: string
description: >
Required. 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.
- name: description
value: string
description: >
Optional. 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.
- name: activatedPolicyTypes
value: array
description: >
Optional. A list of policy types that are activated for this taxonomy. If not set, defaults to an empty list.
UPDATE
examples
- projects_locations_taxonomies_patch
Updates a taxonomy, including its display name, description, and activated policy types.
UPDATE google.datacatalog.taxonomies
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__activatedPolicyTypes = '{{ activatedPolicyTypes }}'
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
- projects_locations_taxonomies_replace
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
- projects_locations_taxonomies_delete
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
- projects_locations_taxonomies_import
- projects_locations_taxonomies_export
Creates 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.
EXEC google.datacatalog.taxonomies.projects_locations_taxonomies_import
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"inlineSource": "{{ inlineSource }}",
"crossRegionalSource": "{{ crossRegionalSource }}"
}';
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,
@taxonomies='{{ taxonomies }}',
@serializedTaxonomies={{ serializedTaxonomies }};