w.entity_tag_assignments: Entity Tag Assignments¶
- class databricks.sdk.service.catalog.EntityTagAssignmentsAPI¶
Tags are attributes that include keys and optional values that you can use to organize and categorize entities in Unity Catalog. Entity tagging is supported on catalogs, schemas, tables (including views), columns, and volumes. With these APIs, you can create, update, delete, and list tag assignments across Unity Catalog entities.
- create(tag_assignment: EntityTagAssignment) EntityTagAssignment¶
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.
- Parameters:
tag_assignment –
EntityTagAssignment- Returns:
- delete(entity_type: str, entity_name: str, tag_key: str)¶
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.
- Parameters:
entity_type – str The type of the entity to which the tag is assigned.
entity_name – str The fully qualified name of the entity to which the tag is assigned
tag_key – str Required. The key of the tag to delete
- get(entity_type: str, entity_name: str, tag_key: str) EntityTagAssignment¶
Gets a tag assignment for an Unity Catalog entity by tag key.
- Parameters:
entity_type – str The type of the entity to which the tag is assigned.
entity_name – str The fully qualified name of the entity to which the tag is assigned
tag_key – str Required. The key of the tag
- Returns:
- list(entity_type: str, entity_name: str [, max_results: Optional[int], page_token: Optional[str]]) Iterator[EntityTagAssignment]¶
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.
- Parameters:
entity_type – str The type of the entity to which the tag is assigned.
entity_name – str The fully qualified name of the entity to which the tag is assigned
max_results – int (optional) Optional. Maximum number of tag assignments to return in a single page
page_token – str (optional) Optional. Pagination token to retrieve the next page of results
- Returns:
Iterator over
EntityTagAssignment
- update(entity_type: str, entity_name: str, tag_key: str, tag_assignment: EntityTagAssignment, update_mask: str) EntityTagAssignment¶
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.
- Parameters:
entity_type – str The type of the entity to which the tag is assigned.
entity_name – str The fully qualified name of the entity to which the tag is assigned
tag_key – str The key of the tag
tag_assignment –
EntityTagAssignmentupdate_mask –
str The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (
.) to navigate sub-fields (e.g.,author.given_name). Specification of elements in sequence or map fields is not allowed, as only the entire collection field can be specified. Field names must exactly match the resource field names.A field mask of
*indicates full replacement. It’s recommended to always explicitly list the fields being updated and avoid using*wildcards, as it can lead to unintended results if the API changes in the future.
- Returns: