Skip to main content

Entity Tag Assignment

View as Markdown

EntityTagAssignment object

Represents a tag assignment to an entity

entity_namestring

The fully qualified name of the entity to which the tag is assigned

tag_keystring

The key of the tag

tag_valuestring

The value of the tag

entity_typestring

The type of the entity to which the tag is assigned.

update_timestring

The timestamp when the tag assignment was last updated

updated_bystring

The user or principal who updated the tag assignment

source_typestring

The source type of the tag assignment, e.g., user-assigned or system-assigned

Values: TAG_ASSIGNMENT_SOURCE_TYPE_UNSPECIFIED, TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION

Get

GET /api/2.1/unity-catalog/entity-tag-assignments/{entity_type}/{entity_name}/tags/{tag_key}

Gets a tag assignment for an Unity Catalog entity by tag key.

API scopes: unity-catalog

Parameters

entity_namestringpath

The fully qualified name of the entity to which the tag is assigned

tag_keystringpath

Required. The key of the tag

entity_typestringpath

The type of the entity to which the tag is assigned.

Response

Returns the EntityTagAssignment object.

List

GET /api/2.1/unity-catalog/entity-tag-assignments/{entity_type}/{entity_name}/tags

List tag assignments for an Unity Catalog entity

PAGINATION BEHAVIOR: The API is by default paginated, a page may contain zero results while still providing a next_page_token. Clients must continue reading pages until next_page_token is absent, which is the only indication that the end of results has been reached.

API scopes: unity-catalog

Parameters

entity_namestringpath

The fully qualified name of the entity to which the tag is assigned

entity_typestringpath

The type of the entity to which the tag is assigned.

max_resultsint32query

Optional. Maximum number of tag assignments to return in a single page

page_tokenstringquery

Optional. Pagination token to retrieve the next page of results

Response

Returns a list of EntityTagAssignment objects.

Create

POST /api/2.1/unity-catalog/entity-tag-assignments

Creates a tag assignment for an Unity Catalog entity.

To add tags to Unity Catalog entities, you must own the entity or have the following privileges:

  • APPLY TAG on the entity
  • USE SCHEMA on the entity's parent schema
  • USE CATALOG on the entity's parent catalog

To add a governed tag to Unity Catalog entities, you must also have the ASSIGN or MANAGE permission on the tag policy. See Manage tag policy permissions.

API scopes: unity-catalog

Request body

tag_assignmentobject
Show child attributesHide child attributes
entity_namestring

The fully qualified name of the entity to which the tag is assigned

tag_keystring

The key of the tag

tag_valuestring

The value of the tag

entity_typestring

The type of the entity to which the tag is assigned.

update_timestring

The timestamp when the tag assignment was last updated

updated_bystring

The user or principal who updated the tag assignment

source_typestring

The source type of the tag assignment, e.g., user-assigned or system-assigned

Values: TAG_ASSIGNMENT_SOURCE_TYPE_UNSPECIFIED, TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION

Response

Returns the EntityTagAssignment object.

Update

PATCH /api/2.1/unity-catalog/entity-tag-assignments/{tag_assignment.entity_type}/{tag_assignment.entity_name}/tags/{tag_assignment.tag_key}

Updates an existing tag assignment for an Unity Catalog entity.

To update tags to Unity Catalog entities, you must own the entity or have the following privileges:

  • APPLY TAG on the entity
  • USE SCHEMA on the entity's parent schema
  • USE CATALOG on the entity's parent catalog

To update a governed tag to Unity Catalog entities, you must also have the ASSIGN or MANAGE permission on the tag policy. See Manage tag policy permissions.

API scopes: unity-catalog

Parameters

tag_assignmentobjectpath
Show child attributesHide child attributes
entity_namestring

The fully qualified name of the entity to which the tag is assigned

tag_keystring

The key of the tag

tag_valuestring

The value of the tag

entity_typestring

The type of the entity to which the tag is assigned.

update_timestring

The timestamp when the tag assignment was last updated

updated_bystring

The user or principal who updated the tag assignment

source_typestring

The source type of the tag assignment, e.g., user-assigned or system-assigned

Values: TAG_ASSIGNMENT_SOURCE_TYPE_UNSPECIFIED, TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION

update_maskstringquery

Response

Returns the EntityTagAssignment object.

Delete

DELETE /api/2.1/unity-catalog/entity-tag-assignments/{entity_type}/{entity_name}/tags/{tag_key}

Deletes a tag assignment for an Unity Catalog entity by its key.

To delete tags from Unity Catalog entities, you must own the entity or have the following privileges:

  • APPLY TAG on the entity
  • USE_SCHEMA on the entity's parent schema
  • USE_CATALOG on the entity's parent catalog

To delete a governed tag from Unity Catalog entities, you must also have the ASSIGN or MANAGE permission on the tag policy. See Manage tag policy permissions.

API scopes: unity-catalog

Parameters

entity_namestringpath

The fully qualified name of the entity to which the tag is assigned

tag_keystringpath

Required. The key of the tag to delete

entity_typestringpath

The type of the entity to which the tag is assigned.