From a132abb0bfa0579cbd21d726fadbac698b12754b Mon Sep 17 00:00:00 2001 From: "databricks-ci-ghec-2[bot]" <184307802+databricks-ci-ghec-2[bot]@users.noreply.github.com> Date: Fri, 25 Sep 2026 03:19:00 +0000 Subject: [PATCH] Release databricks-sdk-py --- .codegen/_last_sha | 2 +- CHANGELOG.md | 5 + databricks/sdk/service/apps.py | 3 +- databricks/sdk/service/catalog.py | 382 ++++++++++++++++++ databricks/sdk/service/iamv2.py | 12 + databricks/sdk/service/jobs.py | 15 +- databricks/sdk/service/mason.py | 7 +- databricks/sdk/service/ml.py | 5 +- databricks/sdk/service/tags.py | 18 +- databricks/sdk/version.py | 2 +- docs/account/iamv2/iam_v2.rst | 12 + docs/dbdataclasses/catalog.rst | 8 + docs/workspace/apps/apps.rst | 3 +- docs/workspace/catalog/ai_gateway.rst | 127 ++++++ docs/workspace/mason/mason.rst | 7 +- docs/workspace/ml/feature_engineering.rst | 5 +- .../tags/workspace_entity_tag_assignments.rst | 16 +- 17 files changed, 586 insertions(+), 43 deletions(-) mode change 100755 => 100644 docs/workspace/apps/apps.rst diff --git a/.codegen/_last_sha b/.codegen/_last_sha index 2bcd27342..ee0e1fa45 100644 --- a/.codegen/_last_sha +++ b/.codegen/_last_sha @@ -1 +1 @@ -d83d919e266fa322e65e08d5312d5c4a4b6e465c \ No newline at end of file +c765e364f87ce050e4077db80b8ec800c9ec1ed9 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index bd6473598..14470bcd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Version changelog +## Release v0.142.0 (2026-09-25) + +### API Changes +* Add `create_skill()`, `delete_skill()`, `finalize_skill()`, `get_skill()`, `list_skills()` and `update_skill()` methods for [w.ai_gateway](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/catalog/ai_gateway.html) workspace-level service. + ## Release v0.141.0 (2026-09-23) ### API Changes diff --git a/databricks/sdk/service/apps.py b/databricks/sdk/service/apps.py index 5bf07fb60..bc0f6ff6b 100644 --- a/databricks/sdk/service/apps.py +++ b/databricks/sdk/service/apps.py @@ -3564,7 +3564,8 @@ def stop_and_wait(self, name: str, timeout=timedelta(minutes=20)) -> App: return self.stop(name=name).result(timeout=timeout) def update(self, name: str, app: App) -> App: - """Updates the app with the supplied name. + """Updates the app with the supplied name. This is a full replacement: fields omitted from the request + are cleared, so send the complete app. :param name: str The name of the app. The name must contain only lowercase alphanumeric characters and hyphens. It diff --git a/databricks/sdk/service/catalog.py b/databricks/sdk/service/catalog.py index 6e94550cc..c13e4421b 100644 --- a/databricks/sdk/service/catalog.py +++ b/databricks/sdk/service/catalog.py @@ -6630,6 +6630,40 @@ def from_dict(cls, d: Dict[str, Any]) -> ListSecretsResponse: return cls(next_page_token=d.get("next_page_token", None), secrets=_repeated_dict(d, "secrets", Secret)) +@dataclass +class ListSkillsResponse: + """Response for listing skills.""" + + next_page_token: Optional[str] = None + """Pagination token for retrieving the next page of results.""" + + skills: Optional[List[Skill]] = None + """The list of skills.""" + + def as_dict(self) -> dict: + """Serializes the ListSkillsResponse into a dictionary suitable for use as a JSON request body.""" + body = {} + if self.next_page_token is not None: + body["next_page_token"] = self.next_page_token + if self.skills: + body["skills"] = [v.as_dict() for v in self.skills] + return body + + def as_shallow_dict(self) -> dict: + """Serializes the ListSkillsResponse into a shallow dictionary of its immediate attributes.""" + body = {} + if self.next_page_token is not None: + body["next_page_token"] = self.next_page_token + if self.skills: + body["skills"] = self.skills + return body + + @classmethod + def from_dict(cls, d: Dict[str, Any]) -> ListSkillsResponse: + """Deserializes the ListSkillsResponse from a dictionary.""" + return cls(next_page_token=d.get("next_page_token", None), skills=_repeated_dict(d, "skills", Skill)) + + @dataclass class ListStorageCredentialsResponse: next_page_token: Optional[str] = None @@ -11875,6 +11909,136 @@ class SecurableType(Enum): VOLUME = "VOLUME" +@dataclass +class Skill: + """A Skill is an agentskills.io bundle registered in Unity Catalog. Clients transfer bundle bytes + through the Files API. FinalizeSkill reads the uploaded SKILL.md and projects its frontmatter + onto the Skill metadata.""" + + bundle_name: Optional[str] = None + """Name from the most recently successfully finalized SKILL.md. It may differ from the final + component of the Skill resource name. Unset until FinalizeSkill succeeds.""" + + comment: Optional[str] = None + """User-provided comment for the skill. Free-text, user-editable via UpdateSkill (listed in its + ``update_mask``). DISTINCT from ``description``, which is the server-parsed, OUTPUT_ONLY + SKILL.md frontmatter value: ``comment`` is the customer's own annotation and is preserved across + bundle re-uploads. When ``comment`` is in the update mask, omitting it clears the field, while + an explicitly empty string is retained.""" + + create_time: Optional[Timestamp] = None + """Time the skill was created.""" + + created_by: Optional[str] = None + """Creator identity.""" + + description: Optional[str] = None + """Description from the most recently successfully finalized SKILL.md. Unset until FinalizeSkill + succeeds.""" + + effective_owner: Optional[str] = None + """Owner of the skill.""" + + etag: Optional[str] = None + """Optimistic concurrency token returned on every read. To make an Update or Delete conditional, + pass the last-read value in that request's ``etag`` field. In REST responses, this value is a + base64 string; URL-encode it when setting the ``etag`` query parameter.""" + + finalize_time: Optional[Timestamp] = None + """Time of the most recent successful FinalizeSkill. Unset until one succeeds.""" + + metastore_id: Optional[str] = None + """Metastore hosting the skill.""" + + name: Optional[str] = None + """Resource name of the skill. Format: ``skills/{catalog}.{schema}.{skill}``. Each ``{...}`` + component is capped at 255 characters individually. Server-derived on Create from ``parent`` + + ``skill_id``; required and immutable on Update/Get/Delete.""" + + update_time: Optional[Timestamp] = None + """Time of the most recent Skill metadata mutation. Uploading bundle files alone does not change + this value.""" + + updated_by: Optional[str] = None + """Identity of the last updater.""" + + def as_dict(self) -> dict: + """Serializes the Skill into a dictionary suitable for use as a JSON request body.""" + body = {} + if self.bundle_name is not None: + body["bundle_name"] = self.bundle_name + if self.comment is not None: + body["comment"] = self.comment + if self.create_time is not None: + body["create_time"] = self.create_time.ToJsonString() + if self.created_by is not None: + body["created_by"] = self.created_by + if self.description is not None: + body["description"] = self.description + if self.effective_owner is not None: + body["effective_owner"] = self.effective_owner + if self.etag is not None: + body["etag"] = self.etag + if self.finalize_time is not None: + body["finalize_time"] = self.finalize_time.ToJsonString() + if self.metastore_id is not None: + body["metastore_id"] = self.metastore_id + if self.name is not None: + body["name"] = self.name + if self.update_time is not None: + body["update_time"] = self.update_time.ToJsonString() + if self.updated_by is not None: + body["updated_by"] = self.updated_by + return body + + def as_shallow_dict(self) -> dict: + """Serializes the Skill into a shallow dictionary of its immediate attributes.""" + body = {} + if self.bundle_name is not None: + body["bundle_name"] = self.bundle_name + if self.comment is not None: + body["comment"] = self.comment + if self.create_time is not None: + body["create_time"] = self.create_time + if self.created_by is not None: + body["created_by"] = self.created_by + if self.description is not None: + body["description"] = self.description + if self.effective_owner is not None: + body["effective_owner"] = self.effective_owner + if self.etag is not None: + body["etag"] = self.etag + if self.finalize_time is not None: + body["finalize_time"] = self.finalize_time + if self.metastore_id is not None: + body["metastore_id"] = self.metastore_id + if self.name is not None: + body["name"] = self.name + if self.update_time is not None: + body["update_time"] = self.update_time + if self.updated_by is not None: + body["updated_by"] = self.updated_by + return body + + @classmethod + def from_dict(cls, d: Dict[str, Any]) -> Skill: + """Deserializes the Skill from a dictionary.""" + return cls( + bundle_name=d.get("bundle_name", None), + comment=d.get("comment", None), + create_time=_timestamp(d, "create_time"), + created_by=d.get("created_by", None), + description=d.get("description", None), + effective_owner=d.get("effective_owner", None), + etag=d.get("etag", None), + finalize_time=_timestamp(d, "finalize_time"), + metastore_id=d.get("metastore_id", None), + name=d.get("name", None), + update_time=_timestamp(d, "update_time"), + updated_by=d.get("updated_by", None), + ) + + class SpecialDestination(Enum): SPECIAL_DESTINATION_CATALOG_OWNER = "SPECIAL_DESTINATION_CATALOG_OWNER" SPECIAL_DESTINATION_CONNECTION_OWNER = "SPECIAL_DESTINATION_CONNECTION_OWNER" @@ -14181,6 +14345,45 @@ def create_model_service(self, model_service: ModelService, parent: str, model_s res = self._api.do("POST", "/api/2.1/unity-catalog/model-services", query=query, body=body, headers=headers) return ModelService.from_dict(res) + def create_skill(self, skill: Skill, parent: str, skill_id: str) -> Skill: + """Creates a skill in a Unity Catalog schema and provisions its managed bundle storage. Specify its name + in ``skill_id``. The request contains an optional comment but no bundle bytes. Upload bundle files + through the Files API, then call FinalizeSkill. + + You must be the owner of the parent schema or have ``CREATE_VOLUME`` and ``USE_SCHEMA`` on it, plus + ``USE_CATALOG`` on the parent catalog. + + :param skill: :class:`Skill` + The skill to create. ``comment`` is the only accepted client input and may be omitted. Do not set + ``name``; the server derives it from ``parent`` and ``skill_id``. + :param parent: str + Name of the parent schema. Format: ``schemas/{catalog}.{schema}``. Each ``{...}`` component is + capped at 255 characters individually. + :param skill_id: str + Name for the skill, e.g. "basic-math". The server normalizes this identifier to lowercase. It is + independent of the bundle name read from SKILL.md. + + :returns: :class:`Skill` + """ + + body = skill.as_dict() + query = {} + if parent is not None: + query["parent"] = parent + if skill_id is not None: + query["skill_id"] = skill_id + headers = { + "Accept": "application/json", + "Content-Type": "application/json", + } + + cfg = self._api._cfg + if cfg.workspace_id: + headers["X-Databricks-Workspace-Id"] = cfg.workspace_id + + res = self._api.do("POST", "/api/2.1/unity-catalog/skills", query=query, body=body, headers=headers) + return Skill.from_dict(res) + def delete_mcp_service(self, name: str, *, etag: Optional[str] = None): """Deletes the MCP service identified by its resource name. Optionally supply an ``etag`` to make the delete conditional on the MCP service not having changed since it was read. @@ -14298,6 +14501,67 @@ def delete_model_service(self, name: str, *, etag: Optional[str] = None): self._api.do("DELETE", f"/api/2.1/unity-catalog/{name}", query=query, headers=headers) + def delete_skill(self, name: str, *, etag: Optional[str] = None): + """Deletes the skill identified by its resource name and makes its managed bundle path unavailable. + Managed bundle data is deleted asynchronously. Optionally supply an ``etag`` to make the delete + conditional on the skill not having changed since it was read. + + You must be the owner of the skill or have ``MANAGE`` on it, plus ``USE_CATALOG`` on the parent + catalog and ``USE_SCHEMA`` on the parent schema. + + :param name: str + Full resource name of the skill. Format: ``skills/{catalog}.{schema}.{skill}``. Each ``{...}`` + component is capped at 255 characters individually. + :param etag: str (optional) + Optimistic concurrency token from the most recent read. When set, the delete succeeds only if the + resource has not changed. Leave unset for an unconditional delete. For REST requests, URL-encode the + base64 string returned by the API when setting the ``etag`` query parameter. + + + """ + + query = {} + if etag is not None: + query["etag"] = etag + headers = { + "Accept": "application/json", + } + + cfg = self._api._cfg + if cfg.workspace_id: + headers["X-Databricks-Workspace-Id"] = cfg.workspace_id + + self._api.do("DELETE", f"/api/2.1/unity-catalog/{name}", query=query, headers=headers) + + def finalize_skill(self, name: str) -> Skill: + """Finalizes a skill after its bundle is uploaded. This method reads SKILL.md through the Files API using + the caller's authorization. Its YAML frontmatter must contain an agentskills.io-compliant ``name`` and + a nonblank ``description`` within the configured UTF-8 byte limit. On success, it replaces + ``bundle_name`` and ``description``; refreshes ``finalize_time``, ``update_time``, and ``updated_by``; + and returns the updated skill. ``comment`` is preserved. Re-finalization uses the latest SKILL.md and + is last-write-wins without an etag precondition. Validation failures do not change metadata. + + You must be the owner of the skill or have ``READ_VOLUME`` on it, plus ``USE_CATALOG`` on the parent + catalog and ``USE_SCHEMA`` on the parent schema. + + :param name: str + Full resource name of the skill. Format: ``skills/{catalog}.{schema}.{skill}``. Each ``{...}`` + component is capped at 255 characters individually. + + :returns: :class:`Skill` + """ + + headers = { + "Accept": "application/json", + } + + cfg = self._api._cfg + if cfg.workspace_id: + headers["X-Databricks-Workspace-Id"] = cfg.workspace_id + + res = self._api.do("POST", f"/api/2.1/unity-catalog/{name}/finalize", headers=headers) + return Skill.from_dict(res) + def get_mcp_service(self, name: str) -> McpService: """Returns the MCP service identified by its resource name. @@ -14397,6 +14661,30 @@ def get_model_service(self, name: str) -> ModelService: res = self._api.do("GET", f"/api/2.1/unity-catalog/{name}", headers=headers) return ModelService.from_dict(res) + def get_skill(self, name: str) -> Skill: + """Returns the skill identified by its resource name. + + You must be the owner of the skill or have ``READ_VOLUME``, ``READ_METADATA``, or ``MANAGE`` on it, + plus ``USE_CATALOG`` on the parent catalog and ``USE_SCHEMA`` on the parent schema. + + :param name: str + Full resource name of the skill. Format: ``skills/{catalog}.{schema}.{skill}``. Each ``{...}`` + component is capped at 255 characters individually. + + :returns: :class:`Skill` + """ + + headers = { + "Accept": "application/json", + } + + cfg = self._api._cfg + if cfg.workspace_id: + headers["X-Databricks-Workspace-Id"] = cfg.workspace_id + + res = self._api.do("GET", f"/api/2.1/unity-catalog/{name}", headers=headers) + return Skill.from_dict(res) + def list_mcp_services( self, *, @@ -14571,6 +14859,55 @@ def list_model_services( return query["page_token"] = json["next_page_token"] + def list_skills( + self, parent: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None + ) -> Iterator[Skill]: + """Lists skills in a Unity Catalog schema. Provide ``parent`` as ``schemas/{catalog}.{schema}``. Results + are paginated; pass the returned ``next_page_token`` to fetch subsequent pages. + + Requires ``USE_CATALOG`` on the parent catalog and ``USE_SCHEMA`` on the parent schema. Only skills + the caller can access as owner or through ``READ_VOLUME``, ``READ_METADATA``, or ``MANAGE`` are + returned. + + :param parent: str + Name of the parent schema. Format: ``schemas/{catalog}.{schema}``. Each ``{...}`` component is + capped at 255 characters individually. + + Required: skill listing is schema-scoped, so ``parent`` must be set; an unset or empty ``parent`` is + rejected with INVALID_PARAMETER_VALUE. + :param page_size: int (optional) + Maximum number of skills to return. Defaults to 100 when unset or 0; the maximum is 100. Use + ``page_token`` to retrieve additional pages. + :param page_token: str (optional) + Opaque pagination token from a previous request. + + :returns: Iterator over :class:`Skill` + """ + + query = {} + if page_size is not None: + query["page_size"] = page_size + if page_token is not None: + query["page_token"] = page_token + if parent is not None: + query["parent"] = parent + headers = { + "Accept": "application/json", + } + + cfg = self._api._cfg + if cfg.workspace_id: + headers["X-Databricks-Workspace-Id"] = cfg.workspace_id + + while True: + json = self._api.do("GET", "/api/2.1/unity-catalog/skills", query=query, headers=headers) + if "skills" in json: + for v in json["skills"]: + yield Skill.from_dict(v) + if "next_page_token" not in json or not json["next_page_token"]: + return + query["page_token"] = json["next_page_token"] + def update_mcp_service( self, name: str, mcp_service: McpService, update_mask: FieldMask, *, etag: Optional[str] = None ) -> McpService: @@ -14736,6 +15073,51 @@ def update_model_service( res = self._api.do("PATCH", f"/api/2.1/unity-catalog/{name}", query=query, body=body, headers=headers) return ModelService.from_dict(res) + def update_skill(self, name: str, skill: Skill, update_mask: FieldMask, *, etag: Optional[str] = None) -> Skill: + """Updates a skill. Only fields named in ``update_mask`` are changed; currently only ``comment`` is + supported. The resource name is immutable. Optionally supply an ``etag`` to make the update + conditional on the skill not having changed since it was read. Bundle files, grants, tags, and + ownership are unchanged. + + You must be the owner of the skill or have ``MANAGE`` on it, plus ``USE_CATALOG`` on the parent + catalog and ``USE_SCHEMA`` on the parent schema. + + :param name: str + Resource name of the skill. Format: ``skills/{catalog}.{schema}.{skill}``. Each ``{...}`` component + is capped at 255 characters individually. Server-derived on Create from ``parent`` + ``skill_id``; + required and immutable on Update/Get/Delete. + :param skill: :class:`Skill` + The skill with the updated field values. ``name`` identifies the resource + (``skills/{catalog}.{schema}.{skill}``); only fields listed in ``update_mask`` are applied. + :param update_mask: FieldMask + Fields to update; validated against ``skill``. REQUIRED, matching the sibling Update RPCs. + ``comment`` is the only mutable field. + :param etag: str (optional) + Optimistic concurrency token from the most recent read. When set, the update succeeds only if the + resource has not changed. Leave unset for an unconditional update. For REST requests, URL-encode the + base64 string returned by the API when setting the ``etag`` query parameter. + + :returns: :class:`Skill` + """ + + body = skill.as_dict() + query = {} + if etag is not None: + query["etag"] = etag + if update_mask is not None: + query["update_mask"] = update_mask.ToJsonString() + headers = { + "Accept": "application/json", + "Content-Type": "application/json", + } + + cfg = self._api._cfg + if cfg.workspace_id: + headers["X-Databricks-Workspace-Id"] = cfg.workspace_id + + res = self._api.do("PATCH", f"/api/2.1/unity-catalog/{name}", query=query, body=body, headers=headers) + return Skill.from_dict(res) + class ArtifactAllowlistsAPI: """In Databricks Runtime 13.3 and above, you can add libraries and init scripts to the ``allowlist`` in UC so diff --git a/databricks/sdk/service/iamv2.py b/databricks/sdk/service/iamv2.py index 8b503394b..071aa957f 100644 --- a/databricks/sdk/service/iamv2.py +++ b/databricks/sdk/service/iamv2.py @@ -1344,6 +1344,9 @@ def __init__(self, api_client): def create_direct_group_member(self, group_id: int, direct_group_member: DirectGroupMember) -> DirectGroupMember: """Creates a group membership (assigns a principal to a group). + Authorization: the caller must be an account admin or a manager of the group (holds the + ``roles/group.manager`` role on it). + :param group_id: int Required. Internal ID of the group in Databricks. :param direct_group_member: :class:`DirectGroupMember` @@ -1510,6 +1513,9 @@ def create_workspace_assignment_detail( def delete_direct_group_member(self, group_id: int, principal_id: int): """Deletes a group membership (unassigns a principal from a group). + Authorization: the caller must be an account admin or a manager of the group (holds the + ``roles/group.manager`` role on it). + :param group_id: int Required. Internal ID of the group in Databricks. :param principal_id: int @@ -1531,6 +1537,9 @@ def delete_direct_group_member(self, group_id: int, principal_id: int): def delete_group(self, group_id: str): """Deletes a group from the Databricks account by its internal ID. + Authorization: the caller must be an account admin or a manager of the group (holds the + ``roles/group.manager`` role on it). + :param group_id: str Required. Internal ID of the group in Databricks. @@ -2215,6 +2224,9 @@ def update_group(self, group_id: str, group: Group, update_mask: str) -> Group: When AIM is enabled and the group is an external identity (its external_id is set), only external_id can be updated; its other fields are sourced from your identity provider. + Authorization: the caller must be an account admin or a manager of the group (holds the + ``roles/group.manager`` role on it). + :param group_id: str Required. Internal ID of the group in Databricks. :param group: :class:`Group` diff --git a/databricks/sdk/service/jobs.py b/databricks/sdk/service/jobs.py index c0ff33aff..e1fba90ad 100644 --- a/databricks/sdk/service/jobs.py +++ b/databricks/sdk/service/jobs.py @@ -2110,17 +2110,16 @@ class DeploymentSpec: Example script contents: - Plain Python: + .. code-block:: bash - python train.py --epochs 10 + # Plain Python: + python train.py --epochs 10 - Multi-GPU via accelerate: + # Multi-GPU via accelerate: + accelerate launch train.py --config config.yaml - accelerate launch train.py --config config.yaml - - Distributed via torchrun: - - torchrun --nproc_per_node=8 train.py""" + # Distributed via torchrun: + torchrun --nproc_per_node=8 train.py""" compute: ComputeSpec """Compute resources allocated to each node in this deployment.""" diff --git a/databricks/sdk/service/mason.py b/databricks/sdk/service/mason.py index 0b8d1b941..0a612f543 100644 --- a/databricks/sdk/service/mason.py +++ b/databricks/sdk/service/mason.py @@ -1350,8 +1350,9 @@ def list_memories( read_mask: Optional[FieldMask] = None, session_id: Optional[str] = None, ) -> Iterator[ManagedMemoryEntry]: - """Lists managed memory entries for one actor. Optional ``session_id`` and ``path_prefix`` further - restrict the actor partition; ``read_mask`` selects fields in each returned entry. + """Lists managed memory entries for one actor. An exact ``path`` filters entries across sessions, + ignoring session metadata. Otherwise, ``session_id`` and ``path_prefix`` restrict the actor partition. + ``read_mask`` selects fields in each returned entry. :param parent: str Managed memory store whose entries are listed, in the form @@ -1371,7 +1372,7 @@ def list_memories( the requested fields. :param session_id: str (optional) Optional session identifier. When set, only entries with this exact ``session_id`` are returned. - Omitted-session (cross-session) entries are not included. + Omitted-session (cross-session) entries are not included. Ignored when path is set. :returns: Iterator over :class:`ManagedMemoryEntry` """ diff --git a/databricks/sdk/service/ml.py b/databricks/sdk/service/ml.py index a46743708..2e1b3c5fb 100644 --- a/databricks/sdk/service/ml.py +++ b/databricks/sdk/service/ml.py @@ -10805,10 +10805,7 @@ def backfill_features( :param feature_full_names: List[str] Full names of the features to backfill. :param backfill_ranges: List[:class:`BackfillRange`] - Output ranges to backfill. TODO[FS-1372]: audit_mode=INCLUDE is intentionally omitted. The - annotation redactor cannot serialize google.protobuf.Timestamp leaves (start_time/end_time), so - annotating this field does not surface the ranges in audit logs. See - FeatureStoreEventDefinitions.BackfillFeatures. + Output ranges to backfill. :param budget_policy_id: str (optional) The budget policy ID, in UUID format, used to attribute the serverless compute cost of this backfill. If not specified, a default budget policy may be applied. diff --git a/databricks/sdk/service/tags.py b/databricks/sdk/service/tags.py index e2fb75bf3..1eb6f3ba4 100644 --- a/databricks/sdk/service/tags.py +++ b/databricks/sdk/service/tags.py @@ -91,7 +91,7 @@ def from_dict(cls, d: Dict[str, Any]) -> ListTagPoliciesResponse: class TagAssignment: entity_type: str """The type of entity to which the tag is assigned. Allowed values are apps, dashboards, - designer-files, geniespaces, notebooks""" + geniespaces, notebooks""" entity_id: str """The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app @@ -419,8 +419,8 @@ def delete_tag_assignment(self, entity_type: str, entity_id: str, tag_key: str): """Delete a tag assignment :param entity_type: str - The type of entity to which the tag is assigned. Allowed values are apps, dashboards, - designer-files, geniespaces, notebooks + The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, + notebooks :param entity_id: str The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name :param tag_key: str @@ -445,8 +445,8 @@ def get_tag_assignment(self, entity_type: str, entity_id: str, tag_key: str) -> """Get a tag assignment :param entity_type: str - The type of entity to which the tag is assigned. Allowed values are apps, dashboards, - designer-files, geniespaces, notebooks + The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, + notebooks :param entity_id: str The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name :param tag_key: str @@ -474,8 +474,8 @@ def list_tag_assignments( """List the tag assignments for an entity :param entity_type: str - The type of entity to which the tag is assigned. Allowed values are apps, dashboards, - designer-files, geniespaces, notebooks + The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, + notebooks :param entity_id: str The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name :param page_size: int (optional) @@ -516,8 +516,8 @@ def update_tag_assignment( """Update a tag assignment :param entity_type: str - The type of entity to which the tag is assigned. Allowed values are apps, dashboards, - designer-files, geniespaces, notebooks + The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, + notebooks :param entity_id: str The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name :param tag_key: str diff --git a/databricks/sdk/version.py b/databricks/sdk/version.py index 873491885..193f98ee8 100644 --- a/databricks/sdk/version.py +++ b/databricks/sdk/version.py @@ -1 +1 @@ -__version__ = "0.141.0" +__version__ = "0.142.0" diff --git a/docs/account/iamv2/iam_v2.rst b/docs/account/iamv2/iam_v2.rst index 83a145c1c..d25816285 100644 --- a/docs/account/iamv2/iam_v2.rst +++ b/docs/account/iamv2/iam_v2.rst @@ -10,6 +10,9 @@ Creates a group membership (assigns a principal to a group). + Authorization: the caller must be an account admin or a manager of the group (holds the + ``roles/group.manager`` role on it). + :param group_id: int Required. Internal ID of the group in Databricks. :param direct_group_member: :class:`DirectGroupMember` @@ -97,6 +100,9 @@ Deletes a group membership (unassigns a principal from a group). + Authorization: the caller must be an account admin or a manager of the group (holds the + ``roles/group.manager`` role on it). + :param group_id: int Required. Internal ID of the group in Databricks. :param principal_id: int @@ -109,6 +115,9 @@ Deletes a group from the Databricks account by its internal ID. + Authorization: the caller must be an account admin or a manager of the group (holds the + ``roles/group.manager`` role on it). + :param group_id: str Required. Internal ID of the group in Databricks. @@ -461,6 +470,9 @@ When AIM is enabled and the group is an external identity (its external_id is set), only external_id can be updated; its other fields are sourced from your identity provider. + Authorization: the caller must be an account admin or a manager of the group (holds the + ``roles/group.manager`` role on it). + :param group_id: str Required. Internal ID of the group in Databricks. :param group: :class:`Group` diff --git a/docs/dbdataclasses/catalog.rst b/docs/dbdataclasses/catalog.rst index b06f291f4..2ff12345a 100644 --- a/docs/dbdataclasses/catalog.rst +++ b/docs/dbdataclasses/catalog.rst @@ -1075,6 +1075,10 @@ These dataclasses are used in the SDK to represent API requests and responses fo :members: :undoc-members: +.. autoclass:: ListSkillsResponse + :members: + :undoc-members: + .. autoclass:: ListStorageCredentialsResponse :members: :undoc-members: @@ -2145,6 +2149,10 @@ These dataclasses are used in the SDK to represent API requests and responses fo .. py:attribute:: VOLUME :value: "VOLUME" +.. autoclass:: Skill + :members: + :undoc-members: + .. py:class:: SpecialDestination .. py:attribute:: SPECIAL_DESTINATION_CATALOG_OWNER diff --git a/docs/workspace/apps/apps.rst b/docs/workspace/apps/apps.rst old mode 100755 new mode 100644 index 915d29574..83ae2ffad --- a/docs/workspace/apps/apps.rst +++ b/docs/workspace/apps/apps.rst @@ -261,7 +261,8 @@ .. py:method:: update(name: str, app: App) -> App - Updates the app with the supplied name. + Updates the app with the supplied name. This is a full replacement: fields omitted from the request + are cleared, so send the complete app. :param name: str The name of the app. The name must contain only lowercase alphanumeric characters and hyphens. It diff --git a/docs/workspace/catalog/ai_gateway.rst b/docs/workspace/catalog/ai_gateway.rst index 79a3863d6..14a8edf78 100644 --- a/docs/workspace/catalog/ai_gateway.rst +++ b/docs/workspace/catalog/ai_gateway.rst @@ -95,6 +95,28 @@ :returns: :class:`ModelService` + .. py:method:: create_skill(skill: Skill, parent: str, skill_id: str) -> Skill + + Creates a skill in a Unity Catalog schema and provisions its managed bundle storage. Specify its name + in ``skill_id``. The request contains an optional comment but no bundle bytes. Upload bundle files + through the Files API, then call FinalizeSkill. + + You must be the owner of the parent schema or have ``CREATE_VOLUME`` and ``USE_SCHEMA`` on it, plus + ``USE_CATALOG`` on the parent catalog. + + :param skill: :class:`Skill` + The skill to create. ``comment`` is the only accepted client input and may be omitted. Do not set + ``name``; the server derives it from ``parent`` and ``skill_id``. + :param parent: str + Name of the parent schema. Format: ``schemas/{catalog}.{schema}``. Each ``{...}`` component is + capped at 255 characters individually. + :param skill_id: str + Name for the skill, e.g. "basic-math". The server normalizes this identifier to lowercase. It is + independent of the bundle name read from SKILL.md. + + :returns: :class:`Skill` + + .. py:method:: delete_mcp_service(name: str [, etag: Optional[str]]) Deletes the MCP service identified by its resource name. Optionally supply an ``etag`` to make the @@ -166,6 +188,45 @@ + .. py:method:: delete_skill(name: str [, etag: Optional[str]]) + + Deletes the skill identified by its resource name and makes its managed bundle path unavailable. + Managed bundle data is deleted asynchronously. Optionally supply an ``etag`` to make the delete + conditional on the skill not having changed since it was read. + + You must be the owner of the skill or have ``MANAGE`` on it, plus ``USE_CATALOG`` on the parent + catalog and ``USE_SCHEMA`` on the parent schema. + + :param name: str + Full resource name of the skill. Format: ``skills/{catalog}.{schema}.{skill}``. Each ``{...}`` + component is capped at 255 characters individually. + :param etag: str (optional) + Optimistic concurrency token from the most recent read. When set, the delete succeeds only if the + resource has not changed. Leave unset for an unconditional delete. For REST requests, URL-encode the + base64 string returned by the API when setting the ``etag`` query parameter. + + + + + .. py:method:: finalize_skill(name: str) -> Skill + + Finalizes a skill after its bundle is uploaded. This method reads SKILL.md through the Files API using + the caller's authorization. Its YAML frontmatter must contain an agentskills.io-compliant ``name`` and + a nonblank ``description`` within the configured UTF-8 byte limit. On success, it replaces + ``bundle_name`` and ``description``; refreshes ``finalize_time``, ``update_time``, and ``updated_by``; + and returns the updated skill. ``comment`` is preserved. Re-finalization uses the latest SKILL.md and + is last-write-wins without an etag precondition. Validation failures do not change metadata. + + You must be the owner of the skill or have ``READ_VOLUME`` on it, plus ``USE_CATALOG`` on the parent + catalog and ``USE_SCHEMA`` on the parent schema. + + :param name: str + Full resource name of the skill. Format: ``skills/{catalog}.{schema}.{skill}``. Each ``{...}`` + component is capped at 255 characters individually. + + :returns: :class:`Skill` + + .. py:method:: get_mcp_service(name: str) -> McpService Returns the MCP service identified by its resource name. @@ -225,6 +286,20 @@ :returns: :class:`ModelService` + .. py:method:: get_skill(name: str) -> Skill + + Returns the skill identified by its resource name. + + You must be the owner of the skill or have ``READ_VOLUME``, ``READ_METADATA``, or ``MANAGE`` on it, + plus ``USE_CATALOG`` on the parent catalog and ``USE_SCHEMA`` on the parent schema. + + :param name: str + Full resource name of the skill. Format: ``skills/{catalog}.{schema}.{skill}``. Each ``{...}`` + component is capped at 255 characters individually. + + :returns: :class:`Skill` + + .. py:method:: list_mcp_services( [, page_size: Optional[int], page_token: Optional[str], parent: Optional[str], view: Optional[ListMcpServicesRequestView]]) -> Iterator[McpService] Lists the MCP services in a Unity Catalog schema. Provide ``parent`` as @@ -303,6 +378,30 @@ :returns: Iterator over :class:`ModelService` + .. py:method:: list_skills(parent: str [, page_size: Optional[int], page_token: Optional[str]]) -> Iterator[Skill] + + Lists skills in a Unity Catalog schema. Provide ``parent`` as ``schemas/{catalog}.{schema}``. Results + are paginated; pass the returned ``next_page_token`` to fetch subsequent pages. + + Requires ``USE_CATALOG`` on the parent catalog and ``USE_SCHEMA`` on the parent schema. Only skills + the caller can access as owner or through ``READ_VOLUME``, ``READ_METADATA``, or ``MANAGE`` are + returned. + + :param parent: str + Name of the parent schema. Format: ``schemas/{catalog}.{schema}``. Each ``{...}`` component is + capped at 255 characters individually. + + Required: skill listing is schema-scoped, so ``parent`` must be set; an unset or empty ``parent`` is + rejected with INVALID_PARAMETER_VALUE. + :param page_size: int (optional) + Maximum number of skills to return. Defaults to 100 when unset or 0; the maximum is 100. Use + ``page_token`` to retrieve additional pages. + :param page_token: str (optional) + Opaque pagination token from a previous request. + + :returns: Iterator over :class:`Skill` + + .. py:method:: update_mcp_service(name: str, mcp_service: McpService, update_mask: FieldMask [, etag: Optional[str]]) -> McpService Updates an MCP service. Only the fields named in ``update_mask`` are changed; the resource name is @@ -404,4 +503,32 @@ base64 string returned by the API when setting the ``etag`` query parameter. :returns: :class:`ModelService` + + + .. py:method:: update_skill(name: str, skill: Skill, update_mask: FieldMask [, etag: Optional[str]]) -> Skill + + Updates a skill. Only fields named in ``update_mask`` are changed; currently only ``comment`` is + supported. The resource name is immutable. Optionally supply an ``etag`` to make the update + conditional on the skill not having changed since it was read. Bundle files, grants, tags, and + ownership are unchanged. + + You must be the owner of the skill or have ``MANAGE`` on it, plus ``USE_CATALOG`` on the parent + catalog and ``USE_SCHEMA`` on the parent schema. + + :param name: str + Resource name of the skill. Format: ``skills/{catalog}.{schema}.{skill}``. Each ``{...}`` component + is capped at 255 characters individually. Server-derived on Create from ``parent`` + ``skill_id``; + required and immutable on Update/Get/Delete. + :param skill: :class:`Skill` + The skill with the updated field values. ``name`` identifies the resource + (``skills/{catalog}.{schema}.{skill}``); only fields listed in ``update_mask`` are applied. + :param update_mask: FieldMask + Fields to update; validated against ``skill``. REQUIRED, matching the sibling Update RPCs. + ``comment`` is the only mutable field. + :param etag: str (optional) + Optimistic concurrency token from the most recent read. When set, the update succeeds only if the + resource has not changed. Leave unset for an unconditional update. For REST requests, URL-encode the + base64 string returned by the API when setting the ``etag`` query parameter. + + :returns: :class:`Skill` \ No newline at end of file diff --git a/docs/workspace/mason/mason.rst b/docs/workspace/mason/mason.rst index 9a5350ef2..63117a173 100644 --- a/docs/workspace/mason/mason.rst +++ b/docs/workspace/mason/mason.rst @@ -230,8 +230,9 @@ .. py:method:: list_memories(parent: str, actor_id: str [, page_size: Optional[int], page_token: Optional[str], path_prefix: Optional[str], read_mask: Optional[FieldMask], session_id: Optional[str]]) -> Iterator[ManagedMemoryEntry] - Lists managed memory entries for one actor. Optional ``session_id`` and ``path_prefix`` further - restrict the actor partition; ``read_mask`` selects fields in each returned entry. + Lists managed memory entries for one actor. An exact ``path`` filters entries across sessions, + ignoring session metadata. Otherwise, ``session_id`` and ``path_prefix`` restrict the actor partition. + ``read_mask`` selects fields in each returned entry. :param parent: str Managed memory store whose entries are listed, in the form @@ -251,7 +252,7 @@ the requested fields. :param session_id: str (optional) Optional session identifier. When set, only entries with this exact ``session_id`` are returned. - Omitted-session (cross-session) entries are not included. + Omitted-session (cross-session) entries are not included. Ignored when path is set. :returns: Iterator over :class:`ManagedMemoryEntry` diff --git a/docs/workspace/ml/feature_engineering.rst b/docs/workspace/ml/feature_engineering.rst index d1b9a58ee..89027f188 100644 --- a/docs/workspace/ml/feature_engineering.rst +++ b/docs/workspace/ml/feature_engineering.rst @@ -13,10 +13,7 @@ :param feature_full_names: List[str] Full names of the features to backfill. :param backfill_ranges: List[:class:`BackfillRange`] - Output ranges to backfill. TODO[FS-1372]: audit_mode=INCLUDE is intentionally omitted. The - annotation redactor cannot serialize google.protobuf.Timestamp leaves (start_time/end_time), so - annotating this field does not surface the ranges in audit logs. See - FeatureStoreEventDefinitions.BackfillFeatures. + Output ranges to backfill. :param budget_policy_id: str (optional) The budget policy ID, in UUID format, used to attribute the serverless compute cost of this backfill. If not specified, a default budget policy may be applied. diff --git a/docs/workspace/tags/workspace_entity_tag_assignments.rst b/docs/workspace/tags/workspace_entity_tag_assignments.rst index cf735ec8b..c8d7d8c85 100644 --- a/docs/workspace/tags/workspace_entity_tag_assignments.rst +++ b/docs/workspace/tags/workspace_entity_tag_assignments.rst @@ -20,8 +20,8 @@ Delete a tag assignment :param entity_type: str - The type of entity to which the tag is assigned. Allowed values are apps, dashboards, - designer-files, geniespaces, notebooks + The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, + notebooks :param entity_id: str The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name :param tag_key: str @@ -35,8 +35,8 @@ Get a tag assignment :param entity_type: str - The type of entity to which the tag is assigned. Allowed values are apps, dashboards, - designer-files, geniespaces, notebooks + The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, + notebooks :param entity_id: str The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name :param tag_key: str @@ -50,8 +50,8 @@ List the tag assignments for an entity :param entity_type: str - The type of entity to which the tag is assigned. Allowed values are apps, dashboards, - designer-files, geniespaces, notebooks + The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, + notebooks :param entity_id: str The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name :param page_size: int (optional) @@ -67,8 +67,8 @@ Update a tag assignment :param entity_type: str - The type of entity to which the tag is assigned. Allowed values are apps, dashboards, - designer-files, geniespaces, notebooks + The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, + notebooks :param entity_id: str The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name :param tag_key: str