w.workspace_entity_tag_assignments: Tag Assignments

class databricks.sdk.service.tags.WorkspaceEntityTagAssignmentsAPI

Manage tag assignments on workspace-scoped objects.

create_tag_assignment(tag_assignment: TagAssignment) TagAssignment

Create a tag assignment

Parameters:

tag_assignmentTagAssignment

Returns:

TagAssignment

delete_tag_assignment(entity_type: str, entity_id: str, tag_key: str)

Delete a tag assignment

Parameters:
  • entity_type – str The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks

  • entity_id – str The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name

  • tag_key – str The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed

get_tag_assignment(entity_type: str, entity_id: str, tag_key: str) TagAssignment

Get a tag assignment

Parameters:
  • entity_type – str The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks

  • entity_id – str The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name

  • tag_key – str The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed

Returns:

TagAssignment

list_tag_assignments(entity_type: str, entity_id: str [, page_size: Optional[int], page_token: Optional[str]]) Iterator[TagAssignment]

List the tag assignments for an entity

Parameters:
  • entity_type – str The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks

  • entity_id – str The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name

  • page_size – int (optional) Optional. Maximum number of tag assignments to return in a single page

  • page_token – str (optional) Pagination token to go to the next page of tag assignments. Requests first page if absent.

Returns:

Iterator over TagAssignment

update_tag_assignment(entity_type: str, entity_id: str, tag_key: str, tag_assignment: TagAssignment, update_mask: str) TagAssignment

Update a tag assignment

Parameters:
  • entity_type – str The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks

  • entity_id – str The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name

  • tag_key – str The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed

  • tag_assignmentTagAssignment

  • update_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:

TagAssignment