tags
Creates, updates, deletes, gets or lists a tags
resource.
Overview
Name | tags |
Type | Resource |
Id | google.datacatalog.tags |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_entry_groups_entries_tags_list
- projects_locations_entry_groups_tags_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the tag in URL format where tag ID is a system-generated identifier. Note: The tag itself might not be stored in the location specified in its name. |
column | string | Resources like entry can have schemas associated with them. This scope allows you to attach tags to an individual column based on that schema. To attach a tag to a nested column, separate column names with a dot (. ). Example: column.nested_column . |
dataplexTransferStatus | string | Output only. Denotes the transfer status of the Tag Template. |
fields | object | Required. Maps the ID of a tag field to its value and additional information about that field. Tag template defines valid field IDs. A tag must have at least 1 field and at most 500 fields. |
template | string | Required. The resource name of the tag template this tag uses. Example: projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID} This field cannot be modified after creation. |
templateDisplayName | string | Output only. The display name of the tag template. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the tag in URL format where tag ID is a system-generated identifier. Note: The tag itself might not be stored in the location specified in its name. |
column | string | Resources like entry can have schemas associated with them. This scope allows you to attach tags to an individual column based on that schema. To attach a tag to a nested column, separate column names with a dot (. ). Example: column.nested_column . |
dataplexTransferStatus | string | Output only. Denotes the transfer status of the Tag Template. |
fields | object | Required. Maps the ID of a tag field to its value and additional information about that field. Tag template defines valid field IDs. A tag must have at least 1 field and at most 500 fields. |
template | string | Required. The resource name of the tag template this tag uses. Example: projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID} This field cannot be modified after creation. |
templateDisplayName | string | Output only. The display name of the tag template. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_entry_groups_entries_tags_list | select | projectsId , locationsId , entryGroupsId , entriesId | pageSize , pageToken | Lists tags assigned to an Entry. The columns in the response are lowercased. |
projects_locations_entry_groups_tags_list | select | projectsId , locationsId , entryGroupsId | pageSize , pageToken | Lists tags assigned to an Entry. The columns in the response are lowercased. |
projects_locations_entry_groups_entries_tags_create | insert | projectsId , locationsId , entryGroupsId , entriesId | Creates a tag and assigns it to: * An Entry if the method name is projects.locations.entryGroups.entries.tags.create . * Or EntryGroupif the method name is projects.locations.entryGroups.tags.create . Note: The project identified by the parent parameter for the [tag] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be in the same organization. | |
projects_locations_entry_groups_tags_create | insert | projectsId , locationsId , entryGroupsId | Creates a tag and assigns it to: * An Entry if the method name is projects.locations.entryGroups.entries.tags.create . * Or EntryGroupif the method name is projects.locations.entryGroups.tags.create . Note: The project identified by the parent parameter for the [tag] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be in the same organization. | |
projects_locations_entry_groups_entries_tags_patch | update | projectsId , locationsId , entryGroupsId , entriesId , tagsId | updateMask | Updates an existing tag. |
projects_locations_entry_groups_tags_patch | update | projectsId , locationsId , entryGroupsId , tagsId | updateMask | Updates an existing tag. |
projects_locations_entry_groups_entries_tags_delete | delete | projectsId , locationsId , entryGroupsId , entriesId , tagsId | Deletes a tag. | |
projects_locations_entry_groups_tags_delete | delete | projectsId , locationsId , entryGroupsId , tagsId | Deletes a tag. | |
projects_locations_entry_groups_entries_tags_reconcile | exec | projectsId , locationsId , entryGroupsId , entriesId | ReconcileTags creates or updates a list of tags on the entry. If the ReconcileTagsRequest.force_delete_missing parameter is set, the operation deletes tags not included in the input tag list. ReconcileTags returns a long-running operation resource that can be queried with Operations.GetOperation to return ReconcileTagsMetadata and a ReconcileTagsResponse message. Note: SearchCatalog might return stale search results for up to 24 hours after the ReconcileTags operation completes. |
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 |
---|---|---|
entriesId | string | |
entryGroupsId | string | |
locationsId | string | |
projectsId | string | |
tagsId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_entry_groups_entries_tags_list
- projects_locations_entry_groups_tags_list
Lists tags assigned to an Entry. The columns in the response are lowercased.
SELECT
name,
column,
dataplexTransferStatus,
fields,
template,
templateDisplayName
FROM google.datacatalog.tags
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND entryGroupsId = '{{ entryGroupsId }}' -- required
AND entriesId = '{{ entriesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
Lists tags assigned to an Entry. The columns in the response are lowercased.
SELECT
name,
column,
dataplexTransferStatus,
fields,
template,
templateDisplayName
FROM google.datacatalog.tags
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND entryGroupsId = '{{ entryGroupsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- projects_locations_entry_groups_entries_tags_create
- projects_locations_entry_groups_tags_create
- Manifest
Creates a tag and assigns it to: * An Entry if the method name is projects.locations.entryGroups.entries.tags.create
. * Or EntryGroupif the method name is projects.locations.entryGroups.tags.create
. Note: The project identified by the parent
parameter for the [tag] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be in the same organization.
INSERT INTO google.datacatalog.tags (
data__name,
data__template,
data__column,
data__fields,
projectsId,
locationsId,
entryGroupsId,
entriesId
)
SELECT
'{{ name }}',
'{{ template }}',
'{{ column }}',
'{{ fields }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ entryGroupsId }}',
'{{ entriesId }}'
RETURNING
name,
column,
dataplexTransferStatus,
fields,
template,
templateDisplayName
;
Creates a tag and assigns it to: * An Entry if the method name is projects.locations.entryGroups.entries.tags.create
. * Or EntryGroupif the method name is projects.locations.entryGroups.tags.create
. Note: The project identified by the parent
parameter for the [tag] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be in the same organization.
INSERT INTO google.datacatalog.tags (
data__name,
data__template,
data__column,
data__fields,
projectsId,
locationsId,
entryGroupsId
)
SELECT
'{{ name }}',
'{{ template }}',
'{{ column }}',
'{{ fields }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ entryGroupsId }}'
RETURNING
name,
column,
dataplexTransferStatus,
fields,
template,
templateDisplayName
;
# Description fields are for documentation purposes
- name: tags
props:
- name: projectsId
value: string
description: Required parameter for the tags resource.
- name: locationsId
value: string
description: Required parameter for the tags resource.
- name: entryGroupsId
value: string
description: Required parameter for the tags resource.
- name: entriesId
value: string
description: Required parameter for the tags resource.
- name: name
value: string
description: >
Identifier. The resource name of the tag in URL format where tag ID is a system-generated identifier. Note: The tag itself might not be stored in the location specified in its name.
- name: template
value: string
description: >
Required. The resource name of the tag template this tag uses. Example: `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID}` This field cannot be modified after creation.
- name: column
value: string
description: >
Resources like entry can have schemas associated with them. This scope allows you to attach tags to an individual column based on that schema. To attach a tag to a nested column, separate column names with a dot (`.`). Example: `column.nested_column`.
- name: fields
value: object
description: >
Required. Maps the ID of a tag field to its value and additional information about that field. Tag template defines valid field IDs. A tag must have at least 1 field and at most 500 fields.
UPDATE
examples
- projects_locations_entry_groups_entries_tags_patch
- projects_locations_entry_groups_tags_patch
Updates an existing tag.
UPDATE google.datacatalog.tags
SET
data__name = '{{ name }}',
data__template = '{{ template }}',
data__column = '{{ column }}',
data__fields = '{{ fields }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND entryGroupsId = '{{ entryGroupsId }}' --required
AND entriesId = '{{ entriesId }}' --required
AND tagsId = '{{ tagsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
column,
dataplexTransferStatus,
fields,
template,
templateDisplayName;
Updates an existing tag.
UPDATE google.datacatalog.tags
SET
data__name = '{{ name }}',
data__template = '{{ template }}',
data__column = '{{ column }}',
data__fields = '{{ fields }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND entryGroupsId = '{{ entryGroupsId }}' --required
AND tagsId = '{{ tagsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
column,
dataplexTransferStatus,
fields,
template,
templateDisplayName;
DELETE
examples
- projects_locations_entry_groups_entries_tags_delete
- projects_locations_entry_groups_tags_delete
Deletes a tag.
DELETE FROM google.datacatalog.tags
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND entryGroupsId = '{{ entryGroupsId }}' --required
AND entriesId = '{{ entriesId }}' --required
AND tagsId = '{{ tagsId }}' --required;
Deletes a tag.
DELETE FROM google.datacatalog.tags
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND entryGroupsId = '{{ entryGroupsId }}' --required
AND tagsId = '{{ tagsId }}' --required;
Lifecycle Methods
- projects_locations_entry_groups_entries_tags_reconcile
ReconcileTags
creates or updates a list of tags on the entry. If the ReconcileTagsRequest.force_delete_missing parameter is set, the operation deletes tags not included in the input tag list. ReconcileTags
returns a long-running operation resource that can be queried with Operations.GetOperation to return ReconcileTagsMetadata and a ReconcileTagsResponse message. Note: SearchCatalog might return stale search results for up to 24 hours after the ReconcileTags
operation completes.
EXEC google.datacatalog.tags.projects_locations_entry_groups_entries_tags_reconcile
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@entryGroupsId='{{ entryGroupsId }}' --required,
@entriesId='{{ entriesId }}' --required
@@json=
'{
"tagTemplate": "{{ tagTemplate }}",
"forceDeleteMissing": {{ forceDeleteMissing }},
"tags": "{{ tags }}"
}';