diff --git a/.codegen/_last_sha b/.codegen/_last_sha index a9645feac..70df41a27 100644 --- a/.codegen/_last_sha +++ b/.codegen/_last_sha @@ -1 +1 @@ -874d8f1733df5029f169c35ed088d2f081eb6687 \ No newline at end of file +135055fc276ed13622fe66c430bcff841b35d825 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index ec85c1a6a..9cdf9cf50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Version changelog +## Release v0.170.0 (2026-11-23) + +### API Changes +* Add `create_compute_policy()`, `delete_compute_policy()`, `get_compute_policy()` and `update_compute_policy()` methods for [w.serverless_compute_service](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/compute/serverless_compute_service.html) workspace-level service. +* Add `rescan_catalog()` method for [w.data_classification](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/dataclassification/data_classification.html) workspace-level service. +* Add `url_configuration` field for `databricks.sdk.service.catalog.AccessRequestDestinations`. +* Add `streaming` field for `databricks.sdk.service.lakewatch.Rule`. +* Add `lookup` and `secondary_keys` fields for `databricks.sdk.service.ml.Function`. +* Add `compute_policy_id` field for `databricks.sdk.service.postgres.ProjectStatus`. +* Add `network` field for `databricks.sdk.service.sandbox.SandboxSpec`. +* Add `finalizing` enum value for `databricks.sdk.service.aisearch.EndpointScalingInfoPhase`. +* Add `google_ads` enum value for `databricks.sdk.service.catalog.ConnectionType`. +* Add `preemptable` enum value for `databricks.sdk.service.jobs.AiRuntimeTaskPriorityClass`. +* Add `finalizing` enum value for `databricks.sdk.service.vectorsearch.EndpointScalingInfoScalingPhase`. +* Change `schedule` field for `databricks.sdk.service.lakewatch.Rule` to no longer be required. +* [Breaking] Change `schedule` field for `databricks.sdk.service.lakewatch.Rule` to no longer be required. + ## Release v0.169.0 (2026-11-19) ### API Changes diff --git a/databricks/sdk/service/agentkit.py b/databricks/sdk/service/agentkit.py index 41da47272..d1077b90b 100644 --- a/databricks/sdk/service/agentkit.py +++ b/databricks/sdk/service/agentkit.py @@ -1365,7 +1365,10 @@ def create_session_store(self, session_store: SessionStore, session_store_id: st def delete_memory(self, name: str): """Deletes a memory entry by resource name. Returns ``NOT_FOUND`` when the entry does not exist in the - caller's workspace. + caller's workspace. The entry stops appearing in Get, List and Search. In a store that records memory + history, the versions written before the delete, including their content, stay readable through + ``ListMemoryChanges`` and ``GetMemoryChange`` to anyone who can read the store, until the store itself + is deleted. :param name: str Resource name in the form diff --git a/databricks/sdk/service/aifunctions.py b/databricks/sdk/service/aifunctions.py index 921cc0982..11c794c64 100644 --- a/databricks/sdk/service/aifunctions.py +++ b/databricks/sdk/service/aifunctions.py @@ -154,8 +154,7 @@ class AiDecideOptions: """ai_decide""" version: Optional[str] = None - """The function API version to invoke. If unset, the version is inferred per row. Supported - versions: ["1.0"].""" + """The function API version to invoke. If unset, version 1.0 is used. Supported versions: ["1.0"].""" def as_dict(self) -> dict: """Serializes the AiDecideOptions into a dictionary suitable for use as a JSON request body.""" @@ -782,7 +781,12 @@ def from_dict(cls, d: Dict[str, Any]) -> AiParseDocumentResponseMetadata: class Batch: """The AI Functions Asynchronous API lets you process large volumes of requests as a batch in a single call. It is in Beta: a workspace admin must turn on the **AI Functions Asynchronous API** - preview on the workspace Previews page before you can call it.""" + preview on the workspace Previews page before you can call it. + + For examples, see + [``ai_parse_document``](/agents/agent-bricks/document-parsing#asynchronous-api), + [``ai_extract``](/agents/agent-bricks/info-extraction#asynchronous-api), and + [``ai_classify``](/agents/agent-bricks/classification#asynchronous-api).""" endpoint: str """The AI function, for example ``ai_parse_document``.""" @@ -796,13 +800,13 @@ class Batch: """Unity Catalog volume path to write the JSONL output file to. If the path is a directory, the file is ``/_output.jsonl``. Each line is the result of one request, in the form ``{"custom_id": ..., "response": ...}``, or ``{"custom_id": ..., "error": {"type": ..., - "message": ...}}`` for a request that failed.""" + "message": ...}}`` for a request that failed or did not finish.""" create_time: Optional[Timestamp] = None """Output only. The time when the batch was created.""" name: Optional[str] = None - """Output only. Identifier. Resource name of the batch, returned by create. Format: ``batch_``.""" + """Output only. Unique identifier of the batch, returned by create. Format: ``batch_``.""" params: Optional[Dict[str, any]] = None """Parameters of the function other than its input, applied to every request in the batch, for @@ -819,7 +823,10 @@ class Batch: when you list batches.""" status: Optional[BatchStatus] = None - """Output only. The status of the batch.""" + """Output only. The status of the batch. A batch starts as ``PENDING``, runs as ``IN_PROGRESS``, is + ``FINALIZING`` while the output file is written, and ends as ``COMPLETED``. A running batch that + is cancelled is ``CANCELLING``, then ``CANCELLED``. A ``COMPLETED`` batch can include requests + that failed, and a ``FAILED`` batch has no ``output_ref``.""" def as_dict(self) -> dict: """Serializes the Batch into a dictionary suitable for use as a JSON request body.""" @@ -1005,7 +1012,7 @@ def ai_classify( :param labels: any The label set to classify as. Either a JSON array of label strings (e.g. ["spam", "not_spam"]), or a JSON object mapping each label to a description (e.g. {"spam": "unsolicited bulk message", - "not_spam": "a legitimate message"}). Accepts 2 to 500 labels, each 1 to 100 characters. When + "not_spam": "a legitimate message"}). Accepts 2 to 5000 labels, each 1 to 100 characters. When multilabel is true, a single label is also accepted. :param options: :class:`AiClassifyOptions` (optional) Function options. Omitted fields fall back to their documented defaults. @@ -1219,11 +1226,11 @@ def ai_parse_document( return AiParseDocumentResponse.from_dict(res) def cancel_batch(self, name: str) -> CancelBatchResponse: - """Starts the asynchronous cancellation of a batch. Requests in progress are drained first. Cancellation - is best effort, so the batch can still complete. + """Starts the asynchronous cancellation of a batch. Requests in progress are stopped, and the results of + the requests that finished are kept. Cancellation is best effort, so the batch can still complete. :param name: str - Resource name of the batch. Format: ``batch_``. + Unique identifier of the batch. Format: ``batch_``. :returns: :class:`CancelBatchResponse` """ @@ -1269,7 +1276,7 @@ def get_batch(self, name: str) -> Batch: """Gets the latest status and progress of a batch. :param name: str - Resource name of the batch. Format: ``batch_``. + Unique identifier of the batch. Format: ``batch_``. :returns: :class:`Batch` """ diff --git a/databricks/sdk/service/aisearch.py b/databricks/sdk/service/aisearch.py index 6072fae92..891eb1488 100644 --- a/databricks/sdk/service/aisearch.py +++ b/databricks/sdk/service/aisearch.py @@ -624,6 +624,7 @@ class EndpointScalingInfoPhase(Enum): ADJUSTING_CAPACITY = "ADJUSTING_CAPACITY" ESTIMATING = "ESTIMATING" + FINALIZING = "FINALIZING" INITIALIZING_INDEX = "INITIALIZING_INDEX" diff --git a/databricks/sdk/service/apps.py b/databricks/sdk/service/apps.py index 0be61a1d7..0526d0d40 100644 --- a/databricks/sdk/service/apps.py +++ b/databricks/sdk/service/apps.py @@ -497,35 +497,42 @@ def from_dict(cls, d: Dict[str, Any]) -> AppAccessControlResponse: @dataclass class AppDeployment: + """A deployment of an app's source code, taken from a workspace path or a Git reference. When a + deployment succeeds, it becomes the app's active deployment. See + https://docs.databricks.com/aws/en/dev-tools/databricks-apps/deploy.""" + command: Optional[List[str]] = None """The command with which to run the app. This will override the command specified in the app.yaml file.""" create_time: Optional[str] = None - """The creation time of the deployment. Formatted timestamp in ISO 6801.""" + """The creation time of the deployment. Formatted timestamp in ISO 8601.""" creator: Optional[str] = None - """The email of the user creates the deployment.""" + """The email of the user that created the deployment.""" deployment_artifacts: Optional[AppDeploymentArtifacts] = None """The deployment artifacts for an app.""" deployment_id: Optional[str] = None - """The unique id of the deployment.""" + """The unique ID of the deployment. Databricks generates the ID when the deployment is created.""" env_vars: Optional[List[EnvVar]] = None """The environment variables to set in the app runtime environment. This will override the - environment variables specified in the app.yaml file.""" + environment variables specified in the app.yaml file. Responses return only the variable names, + not their values.""" git_source: Optional[GitSource] = None - """Git repository to use as the source for the app deployment.""" + """Git repository to use as the source for the app deployment. The repository itself is configured + on the app, so set only the branch, tag or commit here, and optionally ``source_code_path``.""" health_check: Optional[AppHealthCheck] = None """Deploy-time health check for the app. Verifies the app is responding to HTTP requests before considering the deployment successful.""" mode: Optional[AppDeploymentMode] = None - """The mode of which the deployment will manage the source code.""" + """The mode in which the deployment manages the source code. The mode defaults to ``SNAPSHOT``, + which is the only supported mode.""" scan_omitted_count_is_lower_bound: Optional[bool] = None """Whether ``scan_omitted_findings_count`` is a lower bound rather than an exact count, because the @@ -545,13 +552,14 @@ class AppDeployment: different from ``deployment_artifacts.source_code_path``, which is the path used by the deployed app. The former refers to the original source code location of the app in the workspace during deployment creation, whereas the latter provides a system generated stable snapshotted source - code path used by the deployment.""" + code path used by the deployment. Set either ``source_code_path`` or ``git_source``, not both. + If neither is set, the deployment reuses the source of the app's active deployment.""" status: Optional[AppDeploymentStatus] = None - """Status and status message of the deployment""" + """The current state of the deployment and a message that describes its progress or failure.""" update_time: Optional[str] = None - """The update time of the deployment. Formatted timestamp in ISO 6801.""" + """The update time of the deployment. Formatted timestamp in ISO 8601.""" def as_dict(self) -> dict: """Serializes the AppDeployment into a dictionary suitable for use as a JSON request body.""" @@ -796,7 +804,8 @@ class AppDeploymentStatus: """Message corresponding with the deployment state.""" state: Optional[AppDeploymentState] = None - """State of the deployment.""" + """State of the deployment. A deployment starts in ``IN_PROGRESS`` and ends in ``SUCCEEDED``, + ``FAILED`` or ``CANCELLED``.""" def as_dict(self) -> dict: """Serializes the AppDeploymentStatus into a dictionary suitable for use as a JSON request body.""" @@ -2648,10 +2657,10 @@ def from_dict(cls, d: Dict[str, Any]) -> ListAppDeploymentScanFindingsResponse: @dataclass class ListAppDeploymentsResponse: app_deployments: Optional[List[AppDeployment]] = None - """Deployment history of the app.""" + """Deployment history of the app, most recent deployment first.""" next_page_token: Optional[str] = None - """Pagination token to request the next page of apps.""" + """Pagination token to request the next page of deployments.""" def as_dict(self) -> dict: """Serializes the ListAppDeploymentsResponse into a dictionary suitable for use as a JSON request body.""" @@ -2865,9 +2874,14 @@ class ScanFindingStatus(Enum): @dataclass class Space: + """An app space groups Databricks apps and shares configuration across them. Resources, user API + scopes and the usage policy configured on a space apply to every app in the space. See + https://docs.databricks.com/aws/en/dev-tools/databricks-apps/app-spaces.""" + name: str """The name of the app space. The name must contain only lowercase alphanumeric characters and - hyphens. It must be unique within the workspace.""" + hyphens. It must be unique within the workspace. It can't start or end with a hyphen, and it + can't be changed after the space is created.""" assume_group_id: Optional[str] = None """The group whose permissions users assume via Role Authorization for apps in this space. When @@ -2875,7 +2889,7 @@ class Space: Set only at space creation.""" create_time: Optional[Timestamp] = None - """The creation time of the app space. Formatted timestamp in ISO 6801.""" + """The creation time of the app space. Formatted timestamp in ISO 8601.""" creator: Optional[str] = None """The email of the user that created the app space.""" @@ -2897,19 +2911,19 @@ class Space: in the space.""" service_principal_client_id: Optional[str] = None - """The service principal client ID for the app space.""" + """OAuth client ID of the app space's service principal.""" service_principal_id: Optional[int] = None - """The service principal ID for the app space.""" + """Numeric ID of the app space's service principal.""" service_principal_name: Optional[str] = None - """The service principal name for the app space.""" + """Display name of the app space's service principal.""" status: Optional[SpaceStatus] = None """The status of the app space.""" update_time: Optional[Timestamp] = None - """The update time of the app space. Formatted timestamp in ISO 6801.""" + """The update time of the app space. Formatted timestamp in ISO 8601.""" updater: Optional[str] = None """The email of the user that last updated the app space.""" @@ -2918,7 +2932,8 @@ class Space: """The usage policy ID for managing cost at the space level.""" user_api_scopes: Optional[List[str]] = None - """OAuth scopes for apps in the space.""" + """API scopes that apps in the space can request for user authorization. See + https://docs.databricks.com/aws/en/dev-tools/databricks-apps/auth.""" def as_dict(self) -> dict: """Serializes the Space into a dictionary suitable for use as a JSON request body.""" @@ -3537,7 +3552,9 @@ def delete_space(self, name: str) -> DeleteSpaceOperation: return DeleteSpaceOperation(self, operation) def deploy(self, app_name: str, app_deployment: AppDeployment) -> Wait[AppDeployment]: - """Creates an app deployment for the app with the supplied name. + """Creates an app deployment for the app with the supplied name. The call returns while the deployment is + still ``IN_PROGRESS``; poll the deployment until it reaches a terminal state. The request fails with + RESOURCE_CONFLICT if another deployment of the same app is still pending and has not timed out. :param app_name: str The name of the app. @@ -3815,14 +3832,15 @@ def list_app_deployment_scan_findings( def list_deployments( self, app_name: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None ) -> Iterator[AppDeployment]: - """Lists all app deployments for the app with the supplied name. + """Lists all app deployments for the app with the supplied name. The history holds only the app's most + recent deployments. :param app_name: str The name of the app. :param page_size: int (optional) - Upper bound for items returned. + Upper bound for items returned. The default is 100 and the maximum is 1000. :param page_token: str (optional) - Pagination token to go to the next page of apps. Requests first page if absent. + Pagination token to go to the next page of deployments. Requests first page if absent. :returns: Iterator over :class:`AppDeployment` """ @@ -4081,18 +4099,12 @@ def update_space(self, name: str, space: Space, update_mask: FieldMask) -> Updat :param name: str The name of the app space. The name must contain only lowercase alphanumeric characters and hyphens. - It must be unique within the workspace. + It must be unique within the workspace. It can't start or end with a hyphen, and it can't be changed + after the space is created. :param space: :class:`Space` :param update_mask: FieldMask - 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. + Comma-separated names of the ``space`` fields to update, such as ``description`` or ``resources``. A + field named in the mask but absent from ``space`` is cleared. :returns: :class:`Operation` """ diff --git a/databricks/sdk/service/catalog.py b/databricks/sdk/service/catalog.py index 7e9454a8b..4c109cca1 100644 --- a/databricks/sdk/service/catalog.py +++ b/databricks/sdk/service/catalog.py @@ -62,6 +62,19 @@ class AccessRequestDestinations: securable_type: Optional[str] = None """The type of the securable, repeated from **securable** as a plain string.""" + url_configuration: Optional[UrlConfiguration] = None + """The access request URLs shared by every workspace in the metastore. Only set when the securable + is a metastore. These URLs are used when neither the requested securable nor its parents have an + explicit destination or a default owner email destination, and they take precedence over + metastore destinations. + + A **dynamic_url** and default owner email destinations cannot both be on: saving one turns the + other off. Saving a **dynamic_url** while they are on requires a metastore admin. + + Setting this field removes the metastore destinations in this workspace. The first save also + removes the metastore URL destinations of other workspaces. Once set, the configuration can be + cleared but not removed.""" + def as_dict(self) -> dict: """Serializes the AccessRequestDestinations into a dictionary suitable for use as a JSON request body.""" body = {} @@ -77,6 +90,8 @@ def as_dict(self) -> dict: body["securable"] = self.securable.as_dict() if self.securable_type is not None: body["securable_type"] = self.securable_type + if self.url_configuration: + body["url_configuration"] = self.url_configuration.as_dict() return body def as_shallow_dict(self) -> dict: @@ -94,6 +109,8 @@ def as_shallow_dict(self) -> dict: body["securable"] = self.securable if self.securable_type is not None: body["securable_type"] = self.securable_type + if self.url_configuration: + body["url_configuration"] = self.url_configuration return body @classmethod @@ -106,6 +123,7 @@ def from_dict(cls, d: Dict[str, Any]) -> AccessRequestDestinations: full_name=d.get("full_name", None), securable=_from_dict(d, "securable", Securable), securable_type=d.get("securable_type", None), + url_configuration=_from_dict(d, "url_configuration", UrlConfiguration), ) @@ -1961,6 +1979,7 @@ class ConnectionType(Enum): GA4_RAW_DATA = "GA4_RAW_DATA" GITHUB = "GITHUB" GLUE = "GLUE" + GOOGLE_ADS = "GOOGLE_ADS" HIVE_METASTORE = "HIVE_METASTORE" HTTP = "HTTP" HUBSPOT = "HUBSPOT" @@ -3218,12 +3237,16 @@ class Dependency: **function**, **connection**, **credential**, **volume**, or **secret**.""" connection: Optional[ConnectionDependency] = None + """A dependency on a Unity Catalog connection.""" credential: Optional[CredentialDependency] = None + """A dependency on a Unity Catalog credential.""" function: Optional[FunctionDependency] = None + """A dependency on a Unity Catalog function.""" table: Optional[TableDependency] = None + """A dependency on a Unity Catalog table.""" def as_dict(self) -> dict: """Serializes the Dependency into a dictionary suitable for use as a JSON request body.""" @@ -5680,7 +5703,7 @@ def from_dict(cls, d: Dict[str, Any]) -> GenerateTemporaryVolumeCredentialRespon @dataclass class GetCatalogWorkspaceBindingsResponse: workspaces: Optional[List[int]] = None - """A list of workspace IDs""" + """The IDs of the workspaces that are bound to the catalog.""" def as_dict(self) -> dict: """Serializes the GetCatalogWorkspaceBindingsResponse into a dictionary suitable for use as a JSON request body.""" @@ -9317,6 +9340,10 @@ def from_dict(cls, d: Dict[str, Any]) -> ModelServiceConfigRoutingConfig: @dataclass class ModelVersionInfo: + """A numbered version of a registered model in Unity Catalog. A model version is identified by the + full name of its parent registered model and its version number, or by an alias that points to + it. See https://docs.databricks.com/aws/en/machine-learning/manage-model-lifecycle/.""" + aliases: Optional[List[RegisteredModelAlias]] = None """List of aliases associated with the model version""" @@ -9327,6 +9354,7 @@ class ModelVersionInfo: """The comment attached to the model version""" created_at: Optional[int] = None + """Time at which the model version was created, in epoch milliseconds.""" created_by: Optional[str] = None """The identifier of the user who created the model version""" @@ -9366,6 +9394,7 @@ class ModelVersionInfo: """The storage location on the cloud under which model version data files are stored""" updated_at: Optional[int] = None + """Time at which the model version was last updated, in epoch milliseconds.""" updated_by: Optional[str] = None """The identifier of the user who updated the model version last time""" @@ -10658,8 +10687,7 @@ class PermissionsChange: """The set of privileges to add.""" principal: Optional[str] = None - """The principal whose privileges we are changing. Only one of principal or principal_id should be - specified, never both at the same time.""" + """The principal whose privileges we are changing.""" remove: Optional[List[Privilege]] = None """The set of privileges to remove.""" @@ -11143,8 +11171,7 @@ class Privilege(Enum): @dataclass class PrivilegeAssignment: principal: Optional[str] = None - """The principal (user email address or group name). For deleted principals, ``principal`` is empty - while ``principal_id`` is populated.""" + """The principal (user email address or group name).""" privileges: Optional[List[Privilege]] = None """The privileges assigned to the principal.""" @@ -11909,10 +11936,9 @@ class Secret: """The name of the schema where the secret resides.""" value: str - """The secret value to store. This field is input-only and is not returned in responses — use the - **effective_value** field (via GetSecret with **include_value** set to true) to read the secret - value. The maximum size is 60 KiB (pre-encryption). Accepted content includes passwords, tokens, - keys, and other sensitive credential data.""" + """The secret value to store, such as a password, token, or key. It is never returned in responses. + To read it, call GetSecret with **include_value** set to true and use the **effective_value** + field. The maximum size is 60 KiB before encryption.""" comment: Optional[str] = None """User-provided free-form text description of the secret.""" @@ -11944,8 +11970,8 @@ class Secret: """Unique identifier of the metastore hosting the secret.""" owner: Optional[str] = None - """The owner of the secret. Defaults to the creating principal on creation. Can be updated to - transfer ownership of the secret to another principal.""" + """The owner of the secret. It cannot be set when creating a secret and defaults to the creating + principal. Set it in UpdateSecret to transfer ownership of the secret to another principal.""" update_time: Optional[Timestamp] = None """The time at which this secret was last updated.""" @@ -12299,24 +12325,23 @@ class Skill: 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.""" + """User-provided comment for the skill, which you can change with UpdateSkill. It is separate from + ``description``, which the server reads from the SKILL.md frontmatter, and it is preserved + across bundle re-uploads and FinalizeSkill. 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.""" + """Username or service principal application ID of the principal that created the skill.""" 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.""" + """Username, group name, or service principal application ID of the skill owner.""" etag: Optional[str] = None """Optimistic concurrency token returned on every read. To make an Update or Delete conditional, @@ -12327,19 +12352,19 @@ class Skill: """Time of the most recent successful FinalizeSkill. Unset until one succeeds.""" metastore_id: Optional[str] = None - """Metastore hosting the skill.""" + """Unique identifier of the metastore that contains 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.""" + component is capped at 255 characters individually. The server derives the name on Create from + ``parent`` and ``skill_id``; it is required and immutable on Update, Get, and 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.""" + """Username or service principal application ID of the principal that last updated the skill.""" def as_dict(self) -> dict: """Serializes the Skill into a dictionary suitable for use as a JSON request body.""" @@ -12825,7 +12850,7 @@ class TableInfo: through the BROWSE privilege when include_browse is enabled in the request.""" catalog_name: Optional[str] = None - """Name of parent catalog.""" + """Name of parent catalog. Required for creation using catalog and schema names.""" columns: Optional[List[ColumnInfo]] = None """The array of **ColumnInfo** definitions of the table's columns.""" @@ -12889,7 +12914,8 @@ class TableInfo: https://docs.databricks.com/aws/en/tables/row-and-column-filters for details.""" schema_name: Optional[str] = None - """Name of parent schema relative to its parent catalog.""" + """Name of parent schema relative to its parent catalog. Required for creation using catalog and + schema names.""" securable_kind_manifest: Optional[SecurableKindManifest] = None """SecurableKindManifest of table, including capabilities the table has.""" @@ -13660,7 +13686,7 @@ def from_dict(cls, d: Dict[str, Any]) -> UpdateAssignmentResponse: @dataclass class UpdateCatalogWorkspaceBindingsResponse: workspaces: Optional[List[int]] = None - """A list of workspace IDs""" + """The IDs of the workspaces that are bound to the catalog.""" def as_dict(self) -> dict: """Serializes the UpdateCatalogWorkspaceBindingsResponse into a dictionary suitable for use as a JSON request body.""" @@ -13863,6 +13889,70 @@ def from_dict(cls, d: Dict[str, Any]) -> UpdateWorkspaceBindingsResponse: return cls(bindings=_repeated_dict(d, "bindings", WorkspaceBinding)) +@dataclass +class UrlConfiguration: + """Access request URLs shared by every workspace in a metastore.""" + + dynamic_url: Optional[str] = None + """The URL template for access requests on catalogs and the securables inside them, such as + schemas, tables, volumes, functions, and registered models. Placeholders are replaced with + percent-encoded values from the requested securable: ``{catalog}`` with the catalog name + (``main``), ``{catalog.schema}`` with the catalog and schema names (``main.sales``), + ``{catalog.schema.object}`` with the full name (``main.sales.orders``), ``{securable_type}`` + with the securable type (``TABLE``), and ``{securable_id}`` with the securable ID. Name + placeholders leave out levels the securable does not have, so ``{catalog.schema.object}`` is + ``main.sales`` for a schema. When the deepest name placeholder stops above the requested + securable, such as ``{catalog.schema}`` for a table, ``{securable_type}`` and ``{securable_id}`` + describe that parent. If the filled-in URL is longer than 4,096 characters, the **redirect_url** + is used instead. + + Must start with ``http://`` or ``https://``, contain only printable ASCII characters without + spaces or backslashes, and be at most 2,048 characters. Braces are only allowed around a + placeholder.""" + + redirect_url: Optional[str] = None + """The URL for access requests on the metastore and on securables outside catalogs, such as + external locations, connections, and credentials. Also used for catalogs and the securables + inside them when **dynamic_url** is not set or cannot produce a valid URL. Must start with + ``http://`` or ``https://``, contain only printable ASCII characters without spaces or + backslashes, and be at most 2,048 characters.""" + + syntax_version: Optional[int] = None + """The version of the placeholder syntax used in **dynamic_url**. The only supported version is + ``1``.""" + + def as_dict(self) -> dict: + """Serializes the UrlConfiguration into a dictionary suitable for use as a JSON request body.""" + body = {} + if self.dynamic_url is not None: + body["dynamic_url"] = self.dynamic_url + if self.redirect_url is not None: + body["redirect_url"] = self.redirect_url + if self.syntax_version is not None: + body["syntax_version"] = self.syntax_version + return body + + def as_shallow_dict(self) -> dict: + """Serializes the UrlConfiguration into a shallow dictionary of its immediate attributes.""" + body = {} + if self.dynamic_url is not None: + body["dynamic_url"] = self.dynamic_url + if self.redirect_url is not None: + body["redirect_url"] = self.redirect_url + if self.syntax_version is not None: + body["syntax_version"] = self.syntax_version + return body + + @classmethod + def from_dict(cls, d: Dict[str, Any]) -> UrlConfiguration: + """Deserializes the UrlConfiguration from a dictionary.""" + return cls( + dynamic_url=d.get("dynamic_url", None), + redirect_url=d.get("redirect_url", None), + syntax_version=d.get("syntax_version", None), + ) + + @dataclass class ValidateCredentialResponse: is_dir: Optional[bool] = None @@ -14172,11 +14262,15 @@ class VolumeType(Enum): @dataclass class WorkspaceBinding: + """A binding between a workspace and a securable. When the isolation mode of the securable is + ``ISOLATED``, only bound workspaces can access it.""" + workspace_id: int - """Required""" + """The ID of the workspace that the binding applies to.""" binding_type: Optional[WorkspaceBindingBindingType] = None - """One of READ_WRITE/READ_ONLY. Default is READ_WRITE.""" + """One of READ_WRITE/READ_ONLY. Default is READ_WRITE. Only catalogs support + ``BINDING_TYPE_READ_ONLY``; other securable types accept only ``BINDING_TYPE_READ_WRITE``.""" def as_dict(self) -> dict: """Serializes the WorkspaceBinding into a dictionary suitable for use as a JSON request body.""" @@ -14811,8 +14905,9 @@ def create_skill(self, skill: Skill, parent: str, skill_id: str) -> Skill: 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. + Name of the skill within the parent schema. The name must not contain periods, spaces, forward + slashes, percent signs, or control characters, and it is stored in lowercase. It is independent of + the bundle name read from SKILL.md. :returns: :class:`Skill` """ @@ -15547,14 +15642,14 @@ def update_skill(self, name: str, skill: Skill, update_mask: FieldMask, *, etag: :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. + is capped at 255 characters individually. The server derives the name on Create from ``parent`` and + ``skill_id``; it is required and immutable on Update, Get, and 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. + Comma-separated list of ``skill`` fields to update. ``comment`` is the only field that can be + updated. :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 @@ -17703,9 +17798,11 @@ def get( absent, which is the only indication that the end of results has been reached. :param securable_type: str - Type of securable. + Type of the securable, such as ``catalog``, ``schema``, ``table`` or ``volume``. The value is + case-insensitive. :param full_name: str - Full name of securable. + Full name of the securable. Tables, views, volumes and functions use the three-level name + ``catalog.schema.object``; a metastore uses its metastore ID. :param max_results: int (optional) Specifies the maximum number of privileges to return (page length). Every PrivilegeAssignment present in a single page response is guaranteed to contain all the privileges granted on the @@ -17961,13 +18058,16 @@ def update( """Updates the permissions for a securable. :param securable_type: str - Type of securable. + Type of the securable, such as ``catalog``, ``schema``, ``table`` or ``volume``. The value is + case-insensitive. :param full_name: str - Full name of securable. + Full name of the securable. Tables, views, volumes and functions use the three-level name + ``catalog.schema.object``; a metastore uses its metastore ID. :param changes: List[:class:`PermissionsChange`] (optional) Array of permissions change objects. :param omit_permissions_in_response: bool (optional) - Optional, default false. Specifies whether all the permissions should be returned in the response. + Whether to omit the privilege assignments from the response. When false, the response lists all + direct privilege assignments on the securable after the update. :returns: :class:`UpdatePermissionsResponse` """ @@ -18398,7 +18498,8 @@ def delete(self, full_name: str, version: int): **USE_SCHEMA** privilege on the parent schema. :param full_name: str - The three-level (fully qualified) name of the model version + The three-level (fully qualified) name of the parent registered model, in the form + ``catalog_name.schema_name.model_name``. :param version: int The integer version number of the model version @@ -18428,7 +18529,8 @@ def get( privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema. :param full_name: str - The three-level (fully qualified) name of the model version + The three-level (fully qualified) name of the parent registered model, in the form + ``catalog_name.schema_name.model_name``. :param version: int The integer version number of the model version :param include_aliases: bool (optional) @@ -18593,7 +18695,8 @@ def update( Currently only the comment of the model version can be updated. :param full_name: str - The three-level (fully qualified) name of the model version + The three-level (fully qualified) name of the parent registered model, in the form + ``catalog_name.schema_name.model_name``. :param version: int The integer version number of the model version :param aliases: List[:class:`RegisteredModelAlias`] (optional) @@ -18603,6 +18706,7 @@ def update( :param comment: str (optional) The comment attached to the model version :param created_at: int (optional) + Time at which the model version was created, in epoch milliseconds. :param created_by: str (optional) The identifier of the user who created the model version :param id: str (optional) @@ -18630,6 +18734,7 @@ def update( :param storage_location: str (optional) The storage location on the cloud under which model version data files are stored :param updated_at: int (optional) + Time at which the model version was last updated, in epoch milliseconds. :param updated_by: str (optional) The identifier of the user who updated the model version last time @@ -20112,6 +20217,12 @@ def update_access_request_destinations( The supported securable types are: "metastore", "catalog", "schema", "table", "external_location", "connection", "credential", "function", "registered_model", and "volume". + On a metastore that has a **url_configuration**, its URLs are shared by every workspace, while emails + and webhooks are still saved per workspace. There, a URL destination replaces the configuration's + **redirect_url** and clears its **dynamic_url**, so requests that used the **dynamic_url** go to the + new URL. An update that has no URL destination and does not set **url_configuration** clears both + URLs, in every workspace. + :param access_request_destinations: :class:`AccessRequestDestinations` The access request destinations to assign to the securable. For each destination, a **destination_id** and **destination_type** must be defined. @@ -20456,11 +20567,14 @@ def delete_secret(self, full_name: str): def get_secret(self, full_name: str, *, include_value: Optional[bool] = None) -> Secret: """Gets a secret by its three-level (fully qualified) name. - You must be a metastore admin, the owner of the secret, or have the **MANAGE** privilege on the - secret. + You must be a metastore admin or the owner of the secret, or have the **MANAGE** privilege on the + secret (together with **USE CATALOG** on its catalog and **USE SCHEMA** on its schema), on its schema + (together with **USE CATALOG** on its catalog), or on its catalog. Alternatively, you can have the + **READ_SECRET**, **WRITE_SECRET**, or **REFERENCE_SECRET** privilege on the secret, its schema, or its + catalog, together with **USE CATALOG** on its catalog and **USE SCHEMA** on its schema. - The secret value isn't returned by default. To retrieve it, you must also have the **READ_SECRET** - privilege and set **include_value** to true in the request. + The secret value isn't returned by default. To retrieve it, set **include_value** to true in the + request; this requires ownership of the secret or the **READ_SECRET** privilege. :param full_name: str The three-level (fully qualified) name of the secret (for example, @@ -20494,14 +20608,16 @@ def list_secrets( page_token: Optional[str] = None, schema_name: Optional[str] = None, ) -> Iterator[Secret]: - """Lists secrets in Unity Catalog. + """Lists the secrets in a schema. - You must be a metastore admin, the owner of the secret, or have the **MANAGE** privilege on the - secret. + With **USE CATALOG** on the catalog and **USE SCHEMA** on the schema, the response contains the + secrets that you own or hold a privilege on. Metastore admins, principals with the **MANAGE** + privilege on the catalog, and principals with the **MANAGE** privilege on the schema together with + **USE CATALOG** on the catalog see every secret in the schema. - Both **catalog_name** and **schema_name** must be specified together to filter secrets within a - specific schema. Results are paginated; use the **page_token** field from the response to retrieve - subsequent pages. + Secrets are listed within a single schema, so both **catalog_name** and **schema_name** must be + specified. Results are paginated; pass the **next_page_token** value from the response as + **page_token** to retrieve the next page. :param catalog_name: str (optional) The name of the catalog under which to list secrets. Both **catalog_name** and **schema_name** must @@ -20514,8 +20630,8 @@ def list_secrets( - If set to 0, the page length is set to 1000. - If set to a value less than 0, an invalid parameter error is returned. :param page_token: str (optional) - Opaque pagination token to go to the next page based on previous query. The maximum page length is - determined by a server configured value. + Opaque pagination token for the next page of results. Set it to the **next_page_token** value from + the previous response. :param schema_name: str (optional) The name of the schema under which to list secrets. Both **catalog_name** and **schema_name** must be specified together. @@ -20552,11 +20668,16 @@ def list_secrets( def update_secret(self, full_name: str, secret: Secret, update_mask: FieldMask) -> Secret: """Updates an existing secret in Unity Catalog. - You must be the owner of the secret or a metastore admin. If you are a metastore admin, only the - **owner** field can be changed. + To change **value**, you must be the owner of the secret, or have the **WRITE_SECRET** privilege on it + together with **USE CATALOG** on its catalog and **USE SCHEMA** on its schema. To change **comment** + or **expire_time**, you must be the owner or have the **MANAGE** privilege on the secret (together + with **USE CATALOG** on its catalog and **USE SCHEMA** on its schema), on its schema (together with + **USE CATALOG** on its catalog), or on its catalog. To change **owner**, you must be the owner, a + metastore admin, or have the **MANAGE** privilege on the secret (together with **USE CATALOG** on its + catalog and **USE SCHEMA** on its schema), on its schema (together with **USE CATALOG** on its + catalog), or on its catalog. A metastore admin can change only the **owner** field. - Use the **update_mask** field to specify which fields to update. Supported updatable fields include - **value**, **comment**, **owner**, and **expire_time**. + Use the **update_mask** field to specify which fields to update. :param full_name: str The three-level (fully qualified) name of the secret (for example, @@ -21216,9 +21337,10 @@ def create( :param name: str Name of table, relative to parent schema. :param catalog_name: str - Name of parent catalog. + Name of parent catalog. Required for creation using catalog and schema names. :param schema_name: str - Name of parent schema relative to its parent catalog. + Name of parent schema relative to its parent catalog. Required for creation using catalog and schema + names. :param table_type: :class:`TableType` The type of the table. MANAGED tables store their data in storage that Unity Catalog manages, EXTERNAL tables store it in a registered external location, FOREIGN tables mirror objects of an @@ -22132,9 +22254,9 @@ def update( :param name: str The name of the catalog. :param assign_workspaces: List[int] (optional) - A list of workspace IDs. + The IDs of the workspaces to bind to the catalog. :param unassign_workspaces: List[int] (optional) - A list of workspace IDs. + The IDs of the workspaces to unbind from the catalog. :returns: :class:`UpdateCatalogWorkspaceBindingsResponse` """ diff --git a/databricks/sdk/service/compute.py b/databricks/sdk/service/compute.py index 1852644cf..8ca0e76d7 100644 --- a/databricks/sdk/service/compute.py +++ b/databricks/sdk/service/compute.py @@ -25,6 +25,7 @@ _timestamp, Wait, ) +from databricks.sdk.common.types.fieldmask import FieldMask _LOG = logging.getLogger("databricks.sdk") @@ -7274,8 +7275,8 @@ class NodeType: """Whether the node type is deprecated. Non-deprecated node types offer greater performance.""" is_encrypted_in_transit: Optional[bool] = None - """AWS specific, whether this instance supports encryption in transit, used for hipaa and pci - workloads.""" + """Whether this node type supports encryption in transit, which matters for workloads that need it, + such as hipaa and pci. Always true on GCP; on AWS and Azure it depends on the node type.""" is_graviton: Optional[bool] = None """Whether this is an Arm-based instance.""" @@ -12600,6 +12601,69 @@ class ServerlessComputeServiceAPI: def __init__(self, api_client): self._api = api_client + def create_compute_policy(self, compute_policy: ComputePolicy) -> ComputePolicy: + """Creates a custom compute policy in the workspace. + + :param compute_policy: :class:`ComputePolicy` + The compute policy to create. + + :returns: :class:`ComputePolicy` + """ + + body = compute_policy.as_dict() + query = {} + 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.0/policies/compute", body=body, headers=headers) + return ComputePolicy.from_dict(res) + + def delete_compute_policy(self, compute_policy_id: str): + """Deletes a custom compute policy in the workspace. Default (system-provisioned) policies cannot be + deleted. + + :param compute_policy_id: str + The ID of the compute policy to delete. + + + """ + + 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.0/policies/compute/{compute_policy_id}", headers=headers) + + def get_compute_policy(self, compute_policy_id: str) -> ComputePolicy: + """Retrieves a compute policy by its ID. + + :param compute_policy_id: str + The ID of the compute policy to retrieve. + + :returns: :class:`ComputePolicy` + """ + + 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.0/policies/compute/{compute_policy_id}", headers=headers) + return ComputePolicy.from_dict(res) + def list(self, *, page_size: Optional[int] = None, page_token: Optional[str] = None) -> Iterator[ServerlessCompute]: """Lists Interactive serverless computes that the caller can use or manage. Results are returned in an unspecified order. @@ -12671,3 +12735,44 @@ def list_compute_policies( if "next_page_token" not in json or not json["next_page_token"]: return query["page_token"] = json["next_page_token"] + + def update_compute_policy( + self, compute_policy_id: str, compute_policy: ComputePolicy, update_mask: FieldMask + ) -> ComputePolicy: + """Updates a custom compute policy in the workspace. The display_name and allowed_compute_products are + mutable; use update_mask to control which fields change. Default (system-provisioned) policies cannot + be updated. + + :param compute_policy_id: str + The unique identifier of the compute policy (UUID). Server-assigned on create. + :param compute_policy: :class:`ComputePolicy` + The compute policy to update. ``compute_policy.compute_policy_id`` identifies which policy to + update; only the fields named in ``update_mask`` are applied. + :param update_mask: FieldMask + Fields to update, relative to ``compute_policy``. Must contain at least one path; the supported + paths are ``display_name`` and ``allowed_compute_products``. Supplied product arms replace their + constraints and omitted products remain unchanged. An empty arm clears that product's limits; an + absent or empty products object is invalid. Removing a product requires its delete API. Nested masks + and wildcards are unsupported. ``display_name`` cannot be cleared: if it is in the mask it must be + non-empty. + + :returns: :class:`ComputePolicy` + """ + + body = compute_policy.as_dict() + query = {} + 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.0/policies/compute/{compute_policy_id}", query=query, body=body, headers=headers + ) + return ComputePolicy.from_dict(res) diff --git a/databricks/sdk/service/dataclassification.py b/databricks/sdk/service/dataclassification.py index 7acab6a64..a10269f61 100644 --- a/databricks/sdk/service/dataclassification.py +++ b/databricks/sdk/service/dataclassification.py @@ -165,6 +165,26 @@ def from_dict(cls, d: Dict[str, Any]) -> CatalogConfigSchemaNames: return cls(names=d.get("names", None)) +@dataclass +class RescanCatalogResponse: + """Response for RescanCatalog. Empty for now; a named message lets later versions add fields.""" + + def as_dict(self) -> dict: + """Serializes the RescanCatalogResponse into a dictionary suitable for use as a JSON request body.""" + body = {} + return body + + def as_shallow_dict(self) -> dict: + """Serializes the RescanCatalogResponse into a shallow dictionary of its immediate attributes.""" + body = {} + return body + + @classmethod + def from_dict(cls, d: Dict[str, Any]) -> RescanCatalogResponse: + """Deserializes the RescanCatalogResponse from a dictionary.""" + return cls() + + class DataClassificationAPI: """Manage data classification for Unity Catalog catalogs. Data classification automatically identifies and tags sensitive data (PII) in Unity Catalog tables. Each catalog can have at most one configuration @@ -245,6 +265,37 @@ def get_catalog_config(self, name: str) -> CatalogConfig: res = self._api.do("GET", f"/api/data-classification/v1/{name}", headers=headers) return CatalogConfig.from_dict(res) + def rescan_catalog(self, name: str) -> RescanCatalogResponse: + """Rescan the tables in a catalog's Data Classification scope that changed since their last scan. + + The rescan uses the catalog's current classifiers and follows its config (schema selection) and SKIP + tags. Tables with no commits since their last scan are skipped. Views and tables without a Delta + commit history keep their regular rescan schedule. The call returns once the rescan is scheduled; + scanning runs in the background. If a scan of the catalog is running, the call cancels it and starts a + new run. + + - Data Classification must be enabled for the catalog. + - The call must come from the workspace where Data Classification was enabled. + + :param name: str + Resource name of the catalog, in the format: catalogs/{catalog_name}. + + :returns: :class:`RescanCatalogResponse` + """ + + body = {} + 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", f"/api/data-classification/v1/{name}/rescan", body=body, headers=headers) + return RescanCatalogResponse.from_dict(res) + def update_catalog_config(self, name: str, catalog_config: CatalogConfig, update_mask: FieldMask) -> CatalogConfig: """Update the Data Classification configuration for a catalog. diff --git a/databricks/sdk/service/environments.py b/databricks/sdk/service/environments.py index e2590a005..9265ceb9f 100644 --- a/databricks/sdk/service/environments.py +++ b/databricks/sdk/service/environments.py @@ -90,7 +90,8 @@ def from_dict(cls, d: Dict[str, Any]) -> DatabricksServiceExceptionWithDetailsPr class DefaultWorkspaceBaseEnvironment: """A singleton resource representing the default workspace base environment configuration. This resource contains the workspace base environments that are used as defaults for serverless - notebooks and jobs in the workspace, for both CPU and GPU compute types. + notebooks and jobs in the workspace, for both CPU and GPU compute types. Each default can + reference a Databricks-provided base environment or a base environment created in the workspace. When cpu_workspace_base_environment or gpu_workspace_base_environment is unset, new serverless notebooks for that compute type use the Databricks Standard base environment: the latest stable diff --git a/databricks/sdk/service/genieagents.py b/databricks/sdk/service/genieagents.py index b8fc5348d..755503a36 100644 --- a/databricks/sdk/service/genieagents.py +++ b/databricks/sdk/service/genieagents.py @@ -1493,7 +1493,11 @@ def update_genie_agent( A field named in the mask takes the value from ``genie_agent``, even when it is unset there: an unset ``description`` is cleared; an unset ``display_name``, ``warehouse_id``, or ``definition`` is rejected with INVALID_PARAMETER_VALUE; an unset ``parent_path`` is cleared without moving the Genie - Agent. ``definition`` is replaced as a whole; paths within it are not supported. + Agent. ``definition`` is replaced as a whole. + + The one supported path inside ``definition`` is ``definition.data_sources.sub_agents``, and only + alongside ``definition``. Naming it makes the sub-agent list exact, so an empty list detaches every + sub-agent. Without it, including with ``*``, an empty list keeps them. The special value ``*`` replaces the whole Genie Agent, as if every updatable field were named. It must be the only path in the mask. Prefer naming fields explicitly: with ``*``, any field added to diff --git a/databricks/sdk/service/iamv2.py b/databricks/sdk/service/iamv2.py index dedde2ce6..6b68bce6c 100644 --- a/databricks/sdk/service/iamv2.py +++ b/databricks/sdk/service/iamv2.py @@ -29,8 +29,8 @@ @dataclass class DirectGroupMember: - """A user, service principal, or group that's a direct member of a group. To address a membership, - put its resource name in the URL: ``GET + """A user, service principal, or group in your Databricks account that's a direct member of a + group. To address a membership, put its resource name in the URL: ``GET /api/2.0/identity/accounts/{account_id}/groups/{group_id}/direct-members/{principal_id}`` in account APIs, or ``GET /api/2.0/identity/groups/{group_id}/direct-members/{principal_id}`` in workspace APIs.""" @@ -48,7 +48,8 @@ class DirectGroupMember: """The Databricks ID of the group.""" membership_source: Optional[GroupMembershipSource] = None - """Where the membership comes from.""" + """Where the membership comes from: added in Databricks (in the UI, through the API, or through + SCIM provisioning), or synced from your IdP by automatic identity management.""" name: Optional[str] = None """The resource name of the membership, in one of these formats: @@ -1143,8 +1144,9 @@ class State(Enum): @dataclass class TransitiveParentGroup: - """A group that a principal belongs to, either directly or through another group. To list a - principal's parent groups, put the principal's resource name in the URL: ``GET + """A group in your Databricks account that a principal belongs to, either directly or through + another group. To list a principal's parent groups, put the principal's resource name in the + URL: ``GET /api/2.0/identity/accounts/{account_id}/principals/{principal_id}/transitive-parent-groups`` in account APIs, or ``GET /api/2.0/identity/principals/{principal_id}/transitive-parent-groups`` in workspace APIs.""" @@ -2063,6 +2065,18 @@ def get_external_group(self, name: str) -> ExternalGroup: IdP. If the group isn't in your account yet, it's added. Requires automatic identity management. If your account has group visibility filters, the group must match them. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param name: str The resource name of the external group, in the format ``accounts/{account_id}/external-groups/{external_group_id}``. @@ -2082,6 +2096,18 @@ def get_external_service_principal(self, name: str) -> ExternalServicePrincipal: memberships from your IdP. If the service principal isn't in your account yet, it's added. Requires automatic identity management with Microsoft Entra ID as your IdP. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param name: str The resource name of the external service principal, in the format ``accounts/{account_id}/external-service-principals/{external_service_principal_id}``. @@ -2101,6 +2127,18 @@ def get_external_user(self, name: str) -> ExternalUser: from your IdP. If the user isn't in your account yet, they're added. Requires automatic identity management. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param name: str The resource name of the external user, in the format ``accounts/{account_id}/external-users/{external_user_id}``. @@ -2255,7 +2293,12 @@ def list_direct_group_members( self, parent: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None ) -> Iterator[DirectGroupMember]: """Lists the direct members of a group, sorted by display name, with where each membership comes from. - Members in your identity provider who haven't been added to Databricks aren't included. + Results combine memberships added in Databricks (in the UI, through the API, or through SCIM + provisioning) with, if automatic identity management is on and the group has an ``external_id``, + memberships from your identity provider (IdP). Only members in your Databricks account are returned: + an IdP member of the group appears only if that user, service principal, or group has been added to + Databricks. Nested groups aren't expanded. To get the full membership, list the direct members of each + member group. :param parent: str The resource name of the group, in the format ``accounts/{account_id}/groups/{group_id}``. @@ -2417,8 +2460,11 @@ def list_transitive_parent_groups( self, parent: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None ) -> ListTransitiveParentGroupsResponse: """Lists every group that a user, service principal, or group belongs to, directly or through other - groups, sorted by Databricks ID. If automatic identity management is on, the principal's group - memberships are synced from your identity provider first. + groups, sorted by Databricks ID. Results combine memberships from every source: added in the UI, + through the API, through SCIM provisioning, or synced from your identity provider (IdP) by automatic + identity management. Only groups that exist in your Databricks account are returned, not every group + that the principal belongs to in your IdP. If automatic identity management is on, only the + principal's own group memberships are refreshed from your IdP before the list is read. :param parent: str The user, service principal, or group whose parent groups to list, in the format @@ -2575,6 +2621,18 @@ def resolve_group(self, external_id: str) -> ResolveGroupResponse: IdP. If the group isn't in your account yet, it's added. Requires automatic identity management. If your account has group visibility filters, the group must match them. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param external_id: str The ID of the group in your IdP. @@ -2602,6 +2660,18 @@ def resolve_service_principal(self, external_id: str) -> ResolveServicePrincipal memberships from your IdP. If the service principal isn't in your account yet, it's added. Requires automatic identity management with Microsoft Entra ID as your IdP. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param external_id: str The ID of the service principal in your IdP. @@ -2629,6 +2699,18 @@ def resolve_user(self, external_id: str) -> ResolveUserResponse: from your IdP. If the user isn't in your account yet, they're added. Requires automatic identity management. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param external_id: str The ID of the user in your IdP. @@ -3182,6 +3264,18 @@ def get_external_group_proxy(self, name: str) -> ExternalGroup: automatic identity management. If your account has group visibility filters, the group must match them. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param name: str The resource name of the external group, in the format ``external-groups/{external_group_id}``. @@ -3204,6 +3298,18 @@ def get_external_service_principal_proxy(self, name: str) -> ExternalServicePrin memberships from your IdP. If the service principal isn't in the account that contains this workspace yet, it's added. Requires automatic identity management with Microsoft Entra ID as your IdP. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param name: str The resource name of the external service principal, in the format ``external-service-principals/{external_service_principal_id}``. @@ -3227,6 +3333,18 @@ def get_external_user_proxy(self, name: str) -> ExternalUser: from your IdP. If the user isn't in the account that contains this workspace yet, they're added. Requires automatic identity management. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param name: str The resource name of the external user, in the format ``external-users/{external_user_id}``. @@ -3405,8 +3523,12 @@ def list_direct_group_members_proxy( self, parent: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None ) -> Iterator[DirectGroupMember]: """Lists the direct members of a group in the account that contains this workspace, sorted by display - name, with where each membership comes from. Members in your identity provider who haven't been added - to Databricks aren't included. + name, with where each membership comes from. Results combine memberships added in Databricks (in the + UI, through the API, or through SCIM provisioning) with, if automatic identity management is on and + the group has an ``external_id``, memberships from your identity provider (IdP). Only members in your + Databricks account are returned: an IdP member of the group appears only if that user, service + principal, or group has been added to Databricks. Nested groups aren't expanded. To get the full + membership, list the direct members of each member group. :param parent: str The resource name of the group, in the format ``groups/{group_id}``. @@ -3550,9 +3672,12 @@ def list_transitive_parent_groups_proxy( self, parent: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None ) -> ListTransitiveParentGroupsResponse: """Lists every group that a user, service principal, or group belongs to, directly or through other - groups, in the account that contains this workspace. Results are sorted by Databricks ID. If automatic - identity management is on, the principal's group memberships are synced from your identity provider - first. + groups, in the account that contains this workspace. Results are sorted by Databricks ID and combine + memberships from every source: added in the UI, through the API, through SCIM provisioning, or synced + from your identity provider (IdP) by automatic identity management. Only groups that exist in your + Databricks account are returned, not every group that the principal belongs to in your IdP. If + automatic identity management is on, only the principal's own group memberships are refreshed from + your IdP before the list is read. :param parent: str The user, service principal, or group whose parent groups to list, in the format @@ -3722,6 +3847,18 @@ def resolve_group_proxy(self, external_id: str) -> ResolveGroupResponse: automatic identity management. If your account has group visibility filters, the group must match them. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param external_id: str The ID of the group in your IdP. @@ -3748,6 +3885,18 @@ def resolve_service_principal_proxy(self, external_id: str) -> ResolveServicePri memberships from your IdP. If the service principal isn't in the account that contains this workspace yet, it's added. Requires automatic identity management with Microsoft Entra ID as your IdP. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param external_id: str The ID of the service principal in your IdP. @@ -3776,6 +3925,18 @@ def resolve_user_proxy(self, external_id: str) -> ResolveUserResponse: from your IdP. If the user isn't in the account that contains this workspace yet, they're added. Requires automatic identity management. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param external_id: str The ID of the user in your IdP. diff --git a/databricks/sdk/service/jobs.py b/databricks/sdk/service/jobs.py index ed602a9de..574db3b3a 100644 --- a/databricks/sdk/service/jobs.py +++ b/databricks/sdk/service/jobs.py @@ -634,6 +634,7 @@ class AiRuntimeTaskPriorityClass(Enum): HIGH = "HIGH" NORMAL = "NORMAL" + PREEMPTABLE = "PREEMPTABLE" class AlertEvaluationState(Enum): @@ -6009,7 +6010,7 @@ class PythonOperatorTask: ``my_project.MyOperator``.""" parameters: Optional[List[PythonOperatorTaskParameter]] = None - """An ordered list of task parameters. TODO(JOBS-30885): Add limits for parameters.""" + """An ordered list of task parameters.""" def as_dict(self) -> dict: """Serializes the PythonOperatorTask into a dictionary suitable for use as a JSON request body.""" diff --git a/databricks/sdk/service/lakewatch.py b/databricks/sdk/service/lakewatch.py index a37a334c8..972ebda5f 100644 --- a/databricks/sdk/service/lakewatch.py +++ b/databricks/sdk/service/lakewatch.py @@ -460,7 +460,8 @@ class CloudWatchLogsEnvelope: header_retention: Optional[bool] = None """Whether to keep the envelope's ``owner``, ``logGroup``, and ``logStream`` values in the - ``data.lw_header`` field of each unwrapped row. Must be set explicitly to ``true`` or ``false``.""" + ``data.lw_header`` field of each unwrapped row whose message is a JSON object. A message that is + any other JSON value is kept without the field. Must be set explicitly to ``true`` or ``false``.""" def as_dict(self) -> dict: """Serializes the CloudWatchLogsEnvelope into a dictionary suitable for use as a JSON request body.""" @@ -2068,9 +2069,6 @@ class Rule: fidelity: RuleFidelity """Signal quality for this rule.""" - schedule: RuleSchedule - """When the rule executes.""" - output: RuleOutput """What to record in each signal.""" @@ -2171,9 +2169,17 @@ class Rule: characters. Requests exceeding this limit are rejected. Supports Markdown; analysts and the investigation agent follow it when triaging this rule's alerts.""" + schedule: Optional[RuleSchedule] = None + """When the rule executes. Required for scheduled rules. A streaming rule accepts only ``enabled``, + and an omitted schedule means enabled.""" + status: Optional[ResourceStatus] = None """Read-only lifecycle status.""" + streaming: Optional[RuleInputStreaming] = None + """Native streaming rule input: one source table filtered by one stateless row predicate. Permanent + field number; must not be renumbered.""" + suppress_until_time: Optional[Timestamp] = None """If set, this rule's signals do not open new alerts until the given time.""" @@ -2258,6 +2264,8 @@ def as_dict(self) -> dict: body["severity"] = self.severity if self.status: body["status"] = self.status.as_dict() + if self.streaming: + body["streaming"] = self.streaming.as_dict() if self.suppress_until_time is not None: body["suppress_until_time"] = self.suppress_until_time.ToJsonString() if self.timerange: @@ -2337,6 +2345,8 @@ def as_shallow_dict(self) -> dict: body["severity"] = self.severity if self.status: body["status"] = self.status + if self.streaming: + body["streaming"] = self.streaming if self.suppress_until_time is not None: body["suppress_until_time"] = self.suppress_until_time if self.timerange: @@ -2385,6 +2395,7 @@ def from_dict(cls, d: Dict[str, Any]) -> Rule: schema_name=d.get("schema_name", None), severity=d.get("severity", None), status=_from_dict(d, "status", ResourceStatus), + streaming=_from_dict(d, "streaming", RuleInputStreaming), suppress_until_time=_timestamp(d, "suppress_until_time"), timerange=_from_dict(d, "timerange", RuleTimeRange), update_time=_timestamp(d, "update_time"), @@ -2655,6 +2666,43 @@ def from_dict(cls, d: Dict[str, Any]) -> RuleInputCustomNotebook: return cls(notebook=d.get("notebook", None), options=d.get("options", None)) +@dataclass +class RuleInputStreaming: + """Native V2 streaming input for a detection rule: one Delta table and one stateless row predicate. + The complete source row is preserved as event context.""" + + source: StreamingSource + """Source table whose rows are evaluated.""" + + predicate: StreamingPredicate + """Row predicate that selects matching rows.""" + + def as_dict(self) -> dict: + """Serializes the RuleInputStreaming into a dictionary suitable for use as a JSON request body.""" + body = {} + if self.predicate: + body["predicate"] = self.predicate.as_dict() + if self.source: + body["source"] = self.source.as_dict() + return body + + def as_shallow_dict(self) -> dict: + """Serializes the RuleInputStreaming into a shallow dictionary of its immediate attributes.""" + body = {} + if self.predicate: + body["predicate"] = self.predicate + if self.source: + body["source"] = self.source + return body + + @classmethod + def from_dict(cls, d: Dict[str, Any]) -> RuleInputStreaming: + """Deserializes the RuleInputStreaming from a dictionary.""" + return cls( + predicate=_from_dict(d, "predicate", StreamingPredicate), source=_from_dict(d, "source", StreamingSource) + ) + + @dataclass class RuleMitreMapping: """MITRE ATT&CK mapping for a detection rule.""" @@ -3025,6 +3073,61 @@ def from_dict(cls, d: Dict[str, Any]) -> SlackExportConfig: return cls(bot_token_uc_secret=d.get("bot_token_uc_secret", None), channel=d.get("channel", None)) +@dataclass +class StreamingPredicate: + """Stateless row predicate for a streaming detection rule.""" + + expression: str + """A SQL expression suitable for a WHERE clause, not a SELECT query. Evaluated per input row; only + stateless, row-local expressions are accepted.""" + + def as_dict(self) -> dict: + """Serializes the StreamingPredicate into a dictionary suitable for use as a JSON request body.""" + body = {} + if self.expression is not None: + body["expression"] = self.expression + return body + + def as_shallow_dict(self) -> dict: + """Serializes the StreamingPredicate into a shallow dictionary of its immediate attributes.""" + body = {} + if self.expression is not None: + body["expression"] = self.expression + return body + + @classmethod + def from_dict(cls, d: Dict[str, Any]) -> StreamingPredicate: + """Deserializes the StreamingPredicate from a dictionary.""" + return cls(expression=d.get("expression", None)) + + +@dataclass +class StreamingSource: + """Source Delta table for a streaming detection rule.""" + + table: str + """Fully-qualified Unity Catalog table in ``catalog.schema.table`` form.""" + + def as_dict(self) -> dict: + """Serializes the StreamingSource into a dictionary suitable for use as a JSON request body.""" + body = {} + if self.table is not None: + body["table"] = self.table + return body + + def as_shallow_dict(self) -> dict: + """Serializes the StreamingSource into a shallow dictionary of its immediate attributes.""" + body = {} + if self.table is not None: + body["table"] = self.table + return body + + @classmethod + def from_dict(cls, d: Dict[str, Any]) -> StreamingSource: + """Deserializes the StreamingSource from a dictionary.""" + return cls(table=d.get("table", None)) + + @dataclass class TableName: """A fully-qualified Unity Catalog table reference by catalog / schema / table name.""" diff --git a/databricks/sdk/service/ml.py b/databricks/sdk/service/ml.py index 5f68af959..d2867acc0 100644 --- a/databricks/sdk/service/ml.py +++ b/databricks/sdk/service/ml.py @@ -1973,6 +1973,40 @@ def from_dict(cls, d: Dict[str, Any]) -> DirectSchemas: ) +@dataclass +class EntityBinding: + """Binds one entity column of a Lookup's upstream Feature to the input that supplies its values.""" + + entity: str + """Specifies the entity column of the upstream Feature.""" + + input: InputReference + """Specifies where the column's values come from.""" + + def as_dict(self) -> dict: + """Serializes the EntityBinding into a dictionary suitable for use as a JSON request body.""" + body = {} + if self.entity is not None: + body["entity"] = self.entity + if self.input: + body["input"] = self.input.as_dict() + return body + + def as_shallow_dict(self) -> dict: + """Serializes the EntityBinding into a shallow dictionary of its immediate attributes.""" + body = {} + if self.entity is not None: + body["entity"] = self.entity + if self.input: + body["input"] = self.input + return body + + @classmethod + def from_dict(cls, d: Dict[str, Any]) -> EntityBinding: + """Deserializes the EntityBinding from a dictionary.""" + return cls(entity=d.get("entity", None), input=_from_dict(d, "input", InputReference)) + + @dataclass class EntityColumn: name: str @@ -3443,6 +3477,12 @@ class Function: function_type: Optional[FunctionFunctionType] = None + lookup: Optional[Lookup] = None + """Looks up an upstream Feature using entity values from other Features or the request.""" + + secondary_keys: Optional[SecondaryKeys] = None + """Selects the secondary key values an upstream Feature has stored for the request's entity.""" + def as_dict(self) -> dict: """Serializes the Function into a dictionary suitable for use as a JSON request body.""" body = {} @@ -3456,6 +3496,10 @@ def as_dict(self) -> dict: body["extra_parameters"] = [v.as_dict() for v in self.extra_parameters] if self.function_type is not None: body["function_type"] = self.function_type.value + if self.lookup: + body["lookup"] = self.lookup.as_dict() + if self.secondary_keys: + body["secondary_keys"] = self.secondary_keys.as_dict() return body def as_shallow_dict(self) -> dict: @@ -3471,6 +3515,10 @@ def as_shallow_dict(self) -> dict: body["extra_parameters"] = self.extra_parameters if self.function_type is not None: body["function_type"] = self.function_type + if self.lookup: + body["lookup"] = self.lookup + if self.secondary_keys: + body["secondary_keys"] = self.secondary_keys return body @classmethod @@ -3482,6 +3530,8 @@ def from_dict(cls, d: Dict[str, Any]) -> Function: custom_udf=_from_dict(d, "custom_udf", CustomUdf), extra_parameters=_repeated_dict(d, "extra_parameters", FunctionExtraParameter), function_type=_enum(d, "function_type", FunctionFunctionType), + lookup=_from_dict(d, "lookup", Lookup), + secondary_keys=_from_dict(d, "secondary_keys", SecondaryKeys), ) @@ -4143,6 +4193,34 @@ def from_dict(cls, d: Dict[str, Any]) -> InputBinding: return cls(column=d.get("column", None), parameter=d.get("parameter", None)) +@dataclass +class InputReference: + """The input that supplies a value. A value from the request comes from a Feature whose source is a + RequestSource.""" + + feature: Optional[FeatureReference] = None + """Specifies another Feature whose output supplies the value.""" + + def as_dict(self) -> dict: + """Serializes the InputReference into a dictionary suitable for use as a JSON request body.""" + body = {} + if self.feature: + body["feature"] = self.feature.as_dict() + return body + + def as_shallow_dict(self) -> dict: + """Serializes the InputReference into a shallow dictionary of its immediate attributes.""" + body = {} + if self.feature: + body["feature"] = self.feature + return body + + @classmethod + def from_dict(cls, d: Dict[str, Any]) -> InputReference: + """Deserializes the InputReference from a dictionary.""" + return cls(feature=_from_dict(d, "feature", FeatureReference)) + + @dataclass class InputTag: """Tag for a dataset input.""" @@ -4214,7 +4292,8 @@ class Issue: metadata: Optional[Dict[str, str]] = None """Additional details about the Issue, such as how issue detection observed it. Not a stable contract: keys and values can change without notice, so clients must tolerate unknown and - missing keys. At most 20 entries, with keys of at most 64 UTF-8 bytes.""" + missing keys. At most 20 entries, with keys of at most 64 UTF-8 bytes. Values are at most 256 + UTF-8 bytes, except recent_affected_trace_ids (4 KiB) and suggested_fix (16 KiB).""" name: Optional[str] = None """The Issue's resource name, as ``experiments/{experiment}/issues/{issue}``, where @@ -5784,6 +5863,51 @@ def from_dict(cls, d: Dict[str, Any]) -> LoggedModelTag: return cls(key=d.get("key", None), value=d.get("value", None)) +@dataclass +class Lookup: + """Looks up an upstream Feature using entity values bound from other Features or from the request. + When a binding is an array, such as the output of a SecondaryKeys Feature, returns one value per + position as an array aligned with that binding. The Feature's source must be a FeatureViewSource + that includes ``feature`` and every Feature referenced in ``entities``. Currently, exactly one + entity must be bound to a Feature: a SecondaryKeys Feature whose key has the same name as that + entity. Its target can be ``feature`` or another Feature. Every other entity must be bound to a + request column of the same name. Names are compared without struct prefixes, so ``user_id`` + matches ``value.user_id``. A FeatureSpec can't also look up ``feature`` with all of its entities + supplied.""" + + feature: FeatureReference + """The upstream Feature to look up.""" + + entities: List[EntityBinding] + """One binding per entity column of the upstream Feature. Every entity column must be bound exactly + once.""" + + def as_dict(self) -> dict: + """Serializes the Lookup into a dictionary suitable for use as a JSON request body.""" + body = {} + if self.entities: + body["entities"] = [v.as_dict() for v in self.entities] + if self.feature: + body["feature"] = self.feature.as_dict() + return body + + def as_shallow_dict(self) -> dict: + """Serializes the Lookup into a shallow dictionary of its immediate attributes.""" + body = {} + if self.entities: + body["entities"] = self.entities + if self.feature: + body["feature"] = self.feature + return body + + @classmethod + def from_dict(cls, d: Dict[str, Any]) -> Lookup: + """Deserializes the Lookup from a dictionary.""" + return cls( + entities=_repeated_dict(d, "entities", EntityBinding), feature=_from_dict(d, "feature", FeatureReference) + ) + + @dataclass class MaterializationFailureNotification: """Recipients to notify when a materialization run fails.""" @@ -9535,6 +9659,54 @@ def from_dict(cls, d: Dict[str, Any]) -> SearchRunsResponse: return cls(next_page_token=d.get("next_page_token", None), runs=_repeated_dict(d, "runs", Run)) +@dataclass +class SecondaryKeys: + """Returns the values of one entity column that an upstream Feature has stored for the request's + other entity columns, as an array. For example, given a Feature with entities (user_id, ad_id), + returns the ad_ids stored for the requested user_id. The Feature's source must be a + FeatureViewSource that includes ``feature``.""" + + feature: FeatureReference + """The upstream Feature whose stored keys are selected.""" + + key: str + """The entity column of the upstream Feature to return values for. It is not supplied by the + request.""" + + max_keys: int + """Maximum number of keys to return per entity, in primary key order. Must not exceed the workspace + limit.""" + + def as_dict(self) -> dict: + """Serializes the SecondaryKeys into a dictionary suitable for use as a JSON request body.""" + body = {} + if self.feature: + body["feature"] = self.feature.as_dict() + if self.key is not None: + body["key"] = self.key + if self.max_keys is not None: + body["max_keys"] = self.max_keys + return body + + def as_shallow_dict(self) -> dict: + """Serializes the SecondaryKeys into a shallow dictionary of its immediate attributes.""" + body = {} + if self.feature: + body["feature"] = self.feature + if self.key is not None: + body["key"] = self.key + if self.max_keys is not None: + body["max_keys"] = self.max_keys + return body + + @classmethod + def from_dict(cls, d: Dict[str, Any]) -> SecondaryKeys: + """Deserializes the SecondaryKeys from a dictionary.""" + return cls( + feature=_from_dict(d, "feature", FeatureReference), key=d.get("key", None), max_keys=_int64(d, "max_keys") + ) + + @dataclass class SecretScopeReference: """Reference to an entry in a Databricks secret scope.""" diff --git a/databricks/sdk/service/pipelines.py b/databricks/sdk/service/pipelines.py index b625dbb9d..2048cff0c 100644 --- a/databricks/sdk/service/pipelines.py +++ b/databricks/sdk/service/pipelines.py @@ -4938,7 +4938,7 @@ class SchemaSpec: destination_schema: str """Required. Destination schema to store tables in. Tables with the same name as the source tables - are created in this destination schema. The pipeline fails If a table with the same name already + are created in this destination schema. The pipeline fails if a table with the same name already exists.""" connector_options: Optional[ConnectorOptions] = None @@ -5791,12 +5791,13 @@ class TikTokAdsOptionsTikTokReportType(Enum): @dataclass class Transformer: - """Specifies how to transform binary data into structured data.""" + """One step that transforms a column: either decodes data into structured data (``format``) or + reshapes an already-decoded column (``operation``).""" avro_options: Optional[AvroTransformerOptions] = None format: Optional[TransformerFormat] = None - """Required: the wire format of the data.""" + """The format to decode the input column from.""" input_column: Optional[str] = None """Optional input column to transform. When set, the transformer reads from this column instead of diff --git a/databricks/sdk/service/postgres.py b/databricks/sdk/service/postgres.py index ccb4c746a..6b37d7f0c 100644 --- a/databricks/sdk/service/postgres.py +++ b/databricks/sdk/service/postgres.py @@ -3535,6 +3535,9 @@ class ProjectStatus: compute_last_active_time: Optional[Timestamp] = None """The most recent time when any endpoint of this project was active.""" + compute_policy_id: Optional[str] = None + """The compute policy that is applied to the project.""" + custom_tags: Optional[List[ProjectCustomTag]] = None """The effective custom tags associated with the project.""" @@ -3574,6 +3577,8 @@ def as_dict(self) -> dict: body["budget_policy_id"] = self.budget_policy_id if self.compute_last_active_time is not None: body["compute_last_active_time"] = self.compute_last_active_time.ToJsonString() + if self.compute_policy_id is not None: + body["compute_policy_id"] = self.compute_policy_id if self.custom_tags: body["custom_tags"] = [v.as_dict() for v in self.custom_tags] if self.default_branch is not None: @@ -3605,6 +3610,8 @@ def as_shallow_dict(self) -> dict: body["budget_policy_id"] = self.budget_policy_id if self.compute_last_active_time is not None: body["compute_last_active_time"] = self.compute_last_active_time + if self.compute_policy_id is not None: + body["compute_policy_id"] = self.compute_policy_id if self.custom_tags: body["custom_tags"] = self.custom_tags if self.default_branch is not None: @@ -3634,6 +3641,7 @@ def from_dict(cls, d: Dict[str, Any]) -> ProjectStatus: branch_logical_size_limit_bytes=_int64(d, "branch_logical_size_limit_bytes"), budget_policy_id=d.get("budget_policy_id", None), compute_last_active_time=_timestamp(d, "compute_last_active_time"), + compute_policy_id=d.get("compute_policy_id", None), custom_tags=_repeated_dict(d, "custom_tags", ProjectCustomTag), default_branch=d.get("default_branch", None), default_endpoint_settings=_from_dict(d, "default_endpoint_settings", ProjectDefaultEndpointSettings), diff --git a/databricks/sdk/service/sandbox.py b/databricks/sdk/service/sandbox.py index 6a3c9d962..8ae8a4deb 100644 --- a/databricks/sdk/service/sandbox.py +++ b/databricks/sdk/service/sandbox.py @@ -481,6 +481,34 @@ def from_dict(cls, d: Dict[str, Any]) -> ListSandboxesResponse: return cls(next_page_token=d.get("next_page_token", None), sandboxes=_repeated_dict(d, "sandboxes", Sandbox)) +@dataclass +class NetworkSpec: + """Network configuration for the sandbox.""" + + internet_access: Optional[bool] = None + """Whether the sandbox can reach the public internet. Defaults to true. Control-plane, PrivateLink, + and workspace/UC/Delta-shared storage stay reachable either way.""" + + def as_dict(self) -> dict: + """Serializes the NetworkSpec into a dictionary suitable for use as a JSON request body.""" + body = {} + if self.internet_access is not None: + body["internet_access"] = self.internet_access + return body + + def as_shallow_dict(self) -> dict: + """Serializes the NetworkSpec into a shallow dictionary of its immediate attributes.""" + body = {} + if self.internet_access is not None: + body["internet_access"] = self.internet_access + return body + + @classmethod + def from_dict(cls, d: Dict[str, Any]) -> NetworkSpec: + """Deserializes the NetworkSpec from a dictionary.""" + return cls(internet_access=d.get("internet_access", None)) + + @dataclass class RenamePathResponse: """Confirms that the sandbox path was renamed.""" @@ -720,6 +748,9 @@ class SandboxSpec: environment: Optional[EnvironmentSpec] = None """Software environment for the sandbox, such as the container image it runs.""" + network: Optional[NetworkSpec] = None + """Network configuration requested for the sandbox.""" + def as_dict(self) -> dict: """Serializes the SandboxSpec into a dictionary suitable for use as a JSON request body.""" body = {} @@ -727,6 +758,8 @@ def as_dict(self) -> dict: body["compute"] = self.compute.as_dict() if self.environment: body["environment"] = self.environment.as_dict() + if self.network: + body["network"] = self.network.as_dict() return body def as_shallow_dict(self) -> dict: @@ -736,13 +769,17 @@ def as_shallow_dict(self) -> dict: body["compute"] = self.compute if self.environment: body["environment"] = self.environment + if self.network: + body["network"] = self.network return body @classmethod def from_dict(cls, d: Dict[str, Any]) -> SandboxSpec: """Deserializes the SandboxSpec from a dictionary.""" return cls( - compute=_from_dict(d, "compute", ComputeSpec), environment=_from_dict(d, "environment", EnvironmentSpec) + compute=_from_dict(d, "compute", ComputeSpec), + environment=_from_dict(d, "environment", EnvironmentSpec), + network=_from_dict(d, "network", NetworkSpec), ) diff --git a/databricks/sdk/service/settings.py b/databricks/sdk/service/settings.py index baf7af3b7..d7f49d6ea 100644 --- a/databricks/sdk/service/settings.py +++ b/databricks/sdk/service/settings.py @@ -10243,7 +10243,8 @@ def create_obo_token( :param application_id: str Application ID of the service principal. :param autoscope_enabled: bool (optional) - Whether to enable autoscoping for this token. + Whether to enable autoscoping for this token. ``disable_autoscoping`` supersedes this field and is + the one read when both are set. :param comment: str (optional) Comment that describes the purpose of the token. :param lifetime_seconds: int (optional) @@ -10491,7 +10492,8 @@ def create( :param autoscope_enabled: bool (optional) Whether to enable autoscoping for this token. When true, the token will automatically collect - inferred API path scopes as it is used. + inferred API path scopes as it is used. ``disable_autoscoping`` supersedes this field and is the one + read when both are set. :param comment: str (optional) Optional description to attach to the token. :param lifetime_seconds: int (optional) diff --git a/databricks/sdk/service/sharing.py b/databricks/sdk/service/sharing.py index b072207a9..b92c91c0d 100644 --- a/databricks/sdk/service/sharing.py +++ b/databricks/sdk/service/sharing.py @@ -1065,7 +1065,8 @@ def from_dict(cls, d: Dict[str, Any]) -> OidcFederationPolicy: @dataclass class Partition: values: Optional[List[PartitionValue]] = None - """An array of partition values.""" + """An array of partition values. A row belongs to the partition when it matches every value in the + array, and each ``name`` must appear at most once in the array.""" def as_dict(self) -> dict: """Serializes the Partition into a dictionary suitable for use as a JSON request body.""" @@ -1093,7 +1094,8 @@ class PartitionValue: """The name of the partition column.""" op: Optional[PartitionValueOp] = None - """The operator to apply for the value.""" + """The operator to apply for the value. **EQUAL** matches the partition value exactly; **LIKE** + matches it against a SQL ``LIKE`` pattern.""" recipient_property_key: Optional[str] = None """The key of a Delta Sharing recipient's property. For example "databricks-account-id". When this @@ -1151,8 +1153,7 @@ class PermissionsChange: """The set of privileges to add.""" principal: Optional[str] = None - """The principal whose privileges we are changing. Only one of principal or principal_id should be - specified, never both at the same time.""" + """The principal whose privileges we are changing.""" remove: Optional[List[str]] = None """The set of privileges to remove.""" @@ -1236,8 +1237,7 @@ class Privilege(Enum): @dataclass class PrivilegeAssignment: principal: Optional[str] = None - """The principal (user email address or group name). For deleted principals, ``principal`` is empty - while ``principal_id`` is populated.""" + """The principal (user email address or group name).""" privileges: Optional[List[Privilege]] = None """The privileges assigned to the principal.""" @@ -1876,6 +1876,11 @@ def from_dict(cls, d: Dict[str, Any]) -> Share: @dataclass class ShareInfo: + """A share is a named collection of data and AI assets from a single Unity Catalog metastore that a + provider makes available to recipients through Delta Sharing. A share is created empty; tables, + views, volumes, models, notebook files, or whole schemas are added to it with **update**, and + recipients are granted access to it through share permissions.""" + comment: Optional[str] = None """User-provided free-form text description.""" @@ -1895,10 +1900,11 @@ class ShareInfo: """Username of current owner of share.""" storage_location: Optional[str] = None - """Storage Location URL (full path) for the share.""" + """Full storage path, derived from ``storage_root``, where the share's notebook files are stored.""" storage_root: Optional[str] = None - """Storage root URL for the share.""" + """Cloud storage path, within an external location, under which the share stores the notebook files + added to it. When unset, notebook files are stored under the metastore root storage location.""" updated_at: Optional[int] = None """Time at which this share was updated, in epoch milliseconds.""" @@ -2012,7 +2018,9 @@ def from_dict(cls, d: Dict[str, Any]) -> ShareToPrivilegeAssignment: class SharedDataObject: name: str """A fully qualified name that uniquely identifies a data object. For example, a table's fully - qualified name is in the format of ``..``,""" + qualified name is in the format of ``..
``, a schema's is + ``.``, a volume's, model's, or function's is + ``..``, and a notebook file's is its workspace path.""" added_at: Optional[int] = None """The time when this data object is added to the share, in epoch milliseconds.""" @@ -2021,7 +2029,9 @@ class SharedDataObject: """Username of the sharer.""" cdf_enabled: Optional[bool] = None - """Whether to enable cdf or indicate if cdf is enabled on the shared object.""" + """Whether to share the table's change data feed (CDF) with recipients. Requires change data feed + to be enabled on the source table, and implicitly enables history sharing. Only applies to + tables.""" comment: Optional[str] = None """A user-provided comment when adding the data object to the share.""" @@ -2032,14 +2042,18 @@ class SharedDataObject: types.""" data_object_type: Optional[SharedDataObjectDataObjectType] = None - """The type of the data object.""" + """The type of the data object. One of **TABLE**, **VIEW**, **MATERIALIZED_VIEW**, + **STREAMING_TABLE**, **FOREIGN_TABLE**, **SCHEMA**, **VOLUME**, **MODEL**, **FUNCTION**, + **FEATURE_SPEC**, or **NOTEBOOK_FILE**. Defaults to **TABLE** when omitted.""" history_data_sharing_status: Optional[SharedDataObjectHistoryDataSharingStatus] = None - """Whether to enable or disable sharing of data history. If not specified, the default is - **DISABLED**.""" + """Whether to share the table's history, which lets recipients run time travel queries and + streaming reads against it. When a **TABLE** is added without this field or ``cdf_enabled``, + history sharing is **ENABLED** by default; otherwise the default is **DISABLED**.""" partitions: Optional[List[Partition]] = None - """Array of partitions for the shared data.""" + """Array of partitions for the shared data. Only rows that belong to at least one of the listed + partitions are shared. Only applies to tables.""" shared_as: Optional[str] = None """A user-provided alias name for table-like data objects within the share. @@ -2079,7 +2093,9 @@ class SharedDataObject: NOTE: The start_version should be <= the ``current`` version of the object.""" status: Optional[SharedDataObjectStatus] = None - """One of: **ACTIVE**, **PERMISSION_DENIED**.""" + """Sharing status of the data object. **ACTIVE** means the object is being shared with recipients + without issues; **PERMISSION_DENIED** means the share owner has lost access to the object, so it + is not being shared with recipients.""" string_shared_as: Optional[str] = None """A user-provided alias name for non-table data objects within the share. @@ -2229,11 +2245,11 @@ class SharedDataObjectStatus(Enum): @dataclass class SharedDataObjectUpdate: action: Optional[SharedDataObjectUpdateAction] = None - """One of: **ADD**, **REMOVE**, **UPDATE**.""" + """One of: **ADD**, **REMOVE**, **UPDATE**. **ADD** adds the data object to the share, **REMOVE** + removes it, and **UPDATE** changes the properties of a data object that is already in the share.""" data_object: Optional[SharedDataObject] = None - """The data object that is being added, removed, or updated. The maximum number update data objects - allowed is a 100.""" + """The data object that is being added, removed, or updated.""" def as_dict(self) -> dict: """Serializes the SharedDataObjectUpdate into a dictionary suitable for use as a JSON request body.""" @@ -3437,7 +3453,8 @@ def create(self, name: str, *, comment: Optional[str] = None, storage_root: Opti :param comment: str (optional) User-provided free-form text description. :param storage_root: str (optional) - Storage root URL for the share. + Cloud storage path, within an external location, under which the share stores the notebook files + added to it. When unset, notebook files are stored under the metastore root storage location. :returns: :class:`ShareInfo` """ @@ -3485,7 +3502,8 @@ def get(self, name: str, *, include_shared_data: Optional[bool] = None) -> Share :param name: str The name of the share. :param include_shared_data: bool (optional) - Query for data to include in the share. + Whether to include the share's data objects in the response. When false or omitted, the response + omits ``objects``. :returns: :class:`ShareInfo` """ @@ -3628,9 +3646,11 @@ def update( :param owner: str (optional) Username of current owner of share. :param storage_root: str (optional) - Storage root URL for the share. + Cloud storage path, within an external location, under which the share stores the notebook files + added to it. When unset, notebook files are stored under the metastore root storage location. :param updates: List[:class:`SharedDataObjectUpdate`] (optional) - Array of shared data object updates. + Array of shared data object updates. The server limits how many updates a single request can + contain. :returns: :class:`ShareInfo` """ diff --git a/databricks/sdk/service/sql.py b/databricks/sdk/service/sql.py index fead671c8..019a6b773 100644 --- a/databricks/sdk/service/sql.py +++ b/databricks/sdk/service/sql.py @@ -90,49 +90,62 @@ class Aggregation(Enum): @dataclass class Alert: + """A legacy Databricks SQL alert. An alert runs a saved query, compares a column of the result + against a threshold, and notifies its subscribers when the condition is met. See + https://docs.databricks.com/aws/en/sql/user/alerts/legacy for details.""" + condition: Optional[AlertCondition] = None - """Trigger conditions of the alert.""" + """Condition that triggers the alert: a column of the query result, a comparison operator, and a + threshold value. The value in the first row of the column is evaluated; aggregations are not + supported through this API.""" create_time: Optional[str] = None """The timestamp indicating when the alert was created.""" custom_body: Optional[str] = None - """Custom body of alert notification, if it exists. See `here - `__ for custom templating instructions.""" + """Custom body of the alert notification. It can use the template variables and HTML described at + https://docs.databricks.com/aws/en/sql/user/alerts/legacy. If omitted, the default notification + body is used.""" custom_subject: Optional[str] = None - """Custom subject of alert notification, if it exists. This can include email subject entries and - Slack notification headers, for example. See `here - `__ for custom templating instructions.""" + """Custom subject of the alert notification, used as the email subject or the Slack message header. + It can use the template variables described at + https://docs.databricks.com/aws/en/sql/user/alerts/legacy. If omitted, the default subject is + used.""" display_name: Optional[str] = None - """The display name of the alert.""" + """Display name of the alert, shown in list views and notifications. It must not be empty.""" id: Optional[str] = None """UUID identifying the alert.""" lifecycle_state: Optional[LifecycleState] = None - """The workspace state of the alert. Used for tracking trashed status.""" + """Lifecycle state of the alert: ``ACTIVE``, or ``TRASHED`` after it has been moved to the trash.""" notify_on_ok: Optional[bool] = None - """Whether to notify alert subscribers when alert returns back to normal.""" + """Whether to notify subscribers when the alert state changes from ``TRIGGERED`` back to ``OK``. + Defaults to true.""" owner_user_name: Optional[str] = None """The owner's username. This field is set to "Unavailable" if the user has been deleted.""" parent_path: Optional[str] = None - """The workspace path of the folder containing the alert.""" + """Workspace path of the folder containing the alert. Defaults to the creator's home folder when + omitted on create. It cannot be changed after creation.""" query_id: Optional[str] = None - """UUID of the query attached to the alert.""" + """UUID of the saved query whose result the alert evaluates. The caller must have permission to + view the query.""" seconds_to_retrigger: Optional[int] = None - """Number of seconds an alert must wait after being triggered to rearm itself. After rearming, it - can be triggered again. If 0 or not specified, the alert will not be triggered again.""" + """Number of seconds the alert waits after a notification before it can notify again while its + state stays ``TRIGGERED``. If 0 or not specified, the alert notifies once when its state changes + to ``TRIGGERED`` and does not notify again until its state has changed.""" state: Optional[AlertState] = None - """Current state of the alert's trigger status. This field is set to UNKNOWN if the alert has not - yet been evaluated or ran into an error during the last evaluation.""" + """Current state of the alert's trigger status: ``TRIGGERED`` if the condition was met on the last + evaluation, ``OK`` if it was not, and ``UNKNOWN`` if the alert has not yet been evaluated or ran + into an error during the last evaluation.""" trigger_time: Optional[str] = None """Timestamp when the alert was last triggered, if the alert has been triggered before.""" @@ -235,16 +248,20 @@ def from_dict(cls, d: Dict[str, Any]) -> Alert: @dataclass class AlertCondition: empty_result_state: Optional[AlertState] = None - """Alert state if result is empty.""" + """State the alert takes when the query returns no rows. Defaults to ``UNKNOWN`` when not set.""" op: Optional[AlertOperator] = None - """Operator used for comparison in alert evaluation.""" + """Comparison operator applied between the operand column value and the threshold. The alert is + triggered when the comparison is true. ``IS_NULL`` triggers when the column value is null; a + threshold must still be supplied but its value is ignored.""" operand: Optional[AlertConditionOperand] = None - """Name of the column from the query result to use for comparison in alert evaluation.""" + """Left-hand side of the comparison. Through this API it must be a ``column`` naming a column of + the query result; the value in the first row of that column is compared against the threshold.""" threshold: Optional[AlertConditionThreshold] = None - """Threshold value used for comparison in alert evaluation.""" + """Right-hand side of the comparison. Through this API it must be a fixed ``value`` whose type + matches the operand column.""" def as_dict(self) -> dict: """Serializes the AlertCondition into a dictionary suitable for use as a JSON request body.""" @@ -286,6 +303,7 @@ def from_dict(cls, d: Dict[str, Any]) -> AlertCondition: @dataclass class AlertConditionOperand: column: Optional[AlertOperandColumn] = None + """A column of the query result. Used for the ``operand`` of a condition.""" def as_dict(self) -> dict: """Serializes the AlertConditionOperand into a dictionary suitable for use as a JSON request body.""" @@ -310,6 +328,7 @@ def from_dict(cls, d: Dict[str, Any]) -> AlertConditionOperand: @dataclass class AlertConditionThreshold: value: Optional[AlertOperandValue] = None + """A fixed value. Used for the ``threshold`` of a condition.""" def as_dict(self) -> dict: """Serializes the AlertConditionThreshold into a dictionary suitable for use as a JSON request body.""" @@ -350,6 +369,7 @@ class AlertLifecycleState(Enum): @dataclass class AlertOperandColumn: name: Optional[str] = None + """Name of the column in the query result.""" def as_dict(self) -> dict: """Serializes the AlertOperandColumn into a dictionary suitable for use as a JSON request body.""" @@ -374,10 +394,13 @@ def from_dict(cls, d: Dict[str, Any]) -> AlertOperandColumn: @dataclass class AlertOperandValue: bool_value: Optional[bool] = None + """Boolean threshold, for boolean columns.""" double_value: Optional[float] = None + """Numeric threshold, for numeric columns.""" string_value: Optional[str] = None + """String threshold, for string or timestamp columns.""" def as_dict(self) -> dict: """Serializes the AlertOperandValue into a dictionary suitable for use as a JSON request body.""" @@ -1536,33 +1559,45 @@ class ComparisonOperator(Enum): @dataclass class CreateAlertRequestAlert: + """A legacy Databricks SQL alert. An alert runs a saved query, compares a column of the result + against a threshold, and notifies its subscribers when the condition is met. See + https://docs.databricks.com/aws/en/sql/user/alerts/legacy for details.""" + condition: Optional[AlertCondition] = None - """Trigger conditions of the alert.""" + """Condition that triggers the alert: a column of the query result, a comparison operator, and a + threshold value. The value in the first row of the column is evaluated; aggregations are not + supported through this API.""" custom_body: Optional[str] = None - """Custom body of alert notification, if it exists. See `here - `__ for custom templating instructions.""" + """Custom body of the alert notification. It can use the template variables and HTML described at + https://docs.databricks.com/aws/en/sql/user/alerts/legacy. If omitted, the default notification + body is used.""" custom_subject: Optional[str] = None - """Custom subject of alert notification, if it exists. This can include email subject entries and - Slack notification headers, for example. See `here - `__ for custom templating instructions.""" + """Custom subject of the alert notification, used as the email subject or the Slack message header. + It can use the template variables described at + https://docs.databricks.com/aws/en/sql/user/alerts/legacy. If omitted, the default subject is + used.""" display_name: Optional[str] = None - """The display name of the alert.""" + """Display name of the alert, shown in list views and notifications. It must not be empty.""" notify_on_ok: Optional[bool] = None - """Whether to notify alert subscribers when alert returns back to normal.""" + """Whether to notify subscribers when the alert state changes from ``TRIGGERED`` back to ``OK``. + Defaults to true.""" parent_path: Optional[str] = None - """The workspace path of the folder containing the alert.""" + """Workspace path of the folder containing the alert. Defaults to the creator's home folder when + omitted on create. It cannot be changed after creation.""" query_id: Optional[str] = None - """UUID of the query attached to the alert.""" + """UUID of the saved query whose result the alert evaluates. The caller must have permission to + view the query.""" seconds_to_retrigger: Optional[int] = None - """Number of seconds an alert must wait after being triggered to rearm itself. After rearming, it - can be triggered again. If 0 or not specified, the alert will not be triggered again.""" + """Number of seconds the alert waits after a notification before it can notify again while its + state stays ``TRIGGERED``. If 0 or not specified, the alert notifies once when its state changes + to ``TRIGGERED`` and does not notify again until its state has changed.""" def as_dict(self) -> dict: """Serializes the CreateAlertRequestAlert into a dictionary suitable for use as a JSON request body.""" @@ -4090,8 +4125,10 @@ class LifecycleState(Enum): @dataclass class ListAlertsResponse: next_page_token: Optional[str] = None + """Token to pass as ``page_token`` to fetch the next page. Omitted when there are no more pages.""" results: Optional[List[ListAlertsResponseAlert]] = None + """Alerts on this page.""" def as_dict(self) -> dict: """Serializes the ListAlertsResponse into a dictionary suitable for use as a JSON request body.""" @@ -4122,46 +4159,58 @@ def from_dict(cls, d: Dict[str, Any]) -> ListAlertsResponse: @dataclass class ListAlertsResponseAlert: + """A legacy Databricks SQL alert. An alert runs a saved query, compares a column of the result + against a threshold, and notifies its subscribers when the condition is met. See + https://docs.databricks.com/aws/en/sql/user/alerts/legacy for details.""" + condition: Optional[AlertCondition] = None - """Trigger conditions of the alert.""" + """Condition that triggers the alert: a column of the query result, a comparison operator, and a + threshold value. The value in the first row of the column is evaluated; aggregations are not + supported through this API.""" create_time: Optional[str] = None """The timestamp indicating when the alert was created.""" custom_body: Optional[str] = None - """Custom body of alert notification, if it exists. See `here - `__ for custom templating instructions.""" + """Custom body of the alert notification. It can use the template variables and HTML described at + https://docs.databricks.com/aws/en/sql/user/alerts/legacy. If omitted, the default notification + body is used.""" custom_subject: Optional[str] = None - """Custom subject of alert notification, if it exists. This can include email subject entries and - Slack notification headers, for example. See `here - `__ for custom templating instructions.""" + """Custom subject of the alert notification, used as the email subject or the Slack message header. + It can use the template variables described at + https://docs.databricks.com/aws/en/sql/user/alerts/legacy. If omitted, the default subject is + used.""" display_name: Optional[str] = None - """The display name of the alert.""" + """Display name of the alert, shown in list views and notifications. It must not be empty.""" id: Optional[str] = None """UUID identifying the alert.""" lifecycle_state: Optional[LifecycleState] = None - """The workspace state of the alert. Used for tracking trashed status.""" + """Lifecycle state of the alert: ``ACTIVE``, or ``TRASHED`` after it has been moved to the trash.""" notify_on_ok: Optional[bool] = None - """Whether to notify alert subscribers when alert returns back to normal.""" + """Whether to notify subscribers when the alert state changes from ``TRIGGERED`` back to ``OK``. + Defaults to true.""" owner_user_name: Optional[str] = None """The owner's username. This field is set to "Unavailable" if the user has been deleted.""" query_id: Optional[str] = None - """UUID of the query attached to the alert.""" + """UUID of the saved query whose result the alert evaluates. The caller must have permission to + view the query.""" seconds_to_retrigger: Optional[int] = None - """Number of seconds an alert must wait after being triggered to rearm itself. After rearming, it - can be triggered again. If 0 or not specified, the alert will not be triggered again.""" + """Number of seconds the alert waits after a notification before it can notify again while its + state stays ``TRIGGERED``. If 0 or not specified, the alert notifies once when its state changes + to ``TRIGGERED`` and does not notify again until its state has changed.""" state: Optional[AlertState] = None - """Current state of the alert's trigger status. This field is set to UNKNOWN if the alert has not - yet been evaluated or ran into an error during the last evaluation.""" + """Current state of the alert's trigger status: ``TRIGGERED`` if the condition was met on the last + evaluation, ``OK`` if it was not, and ``UNKNOWN`` if the alert has not yet been evaluated or ran + into an error during the last evaluation.""" trigger_time: Optional[str] = None """Timestamp when the alert was last triggered, if the alert has been triggered before.""" @@ -7011,33 +7060,44 @@ def from_dict(cls, d: Dict[str, Any]) -> TransferOwnershipObjectId: @dataclass class UpdateAlertRequestAlert: + """A legacy Databricks SQL alert. An alert runs a saved query, compares a column of the result + against a threshold, and notifies its subscribers when the condition is met. See + https://docs.databricks.com/aws/en/sql/user/alerts/legacy for details.""" + condition: Optional[AlertCondition] = None - """Trigger conditions of the alert.""" + """Condition that triggers the alert: a column of the query result, a comparison operator, and a + threshold value. The value in the first row of the column is evaluated; aggregations are not + supported through this API.""" custom_body: Optional[str] = None - """Custom body of alert notification, if it exists. See `here - `__ for custom templating instructions.""" + """Custom body of the alert notification. It can use the template variables and HTML described at + https://docs.databricks.com/aws/en/sql/user/alerts/legacy. If omitted, the default notification + body is used.""" custom_subject: Optional[str] = None - """Custom subject of alert notification, if it exists. This can include email subject entries and - Slack notification headers, for example. See `here - `__ for custom templating instructions.""" + """Custom subject of the alert notification, used as the email subject or the Slack message header. + It can use the template variables described at + https://docs.databricks.com/aws/en/sql/user/alerts/legacy. If omitted, the default subject is + used.""" display_name: Optional[str] = None - """The display name of the alert.""" + """Display name of the alert, shown in list views and notifications. It must not be empty.""" notify_on_ok: Optional[bool] = None - """Whether to notify alert subscribers when alert returns back to normal.""" + """Whether to notify subscribers when the alert state changes from ``TRIGGERED`` back to ``OK``. + Defaults to true.""" owner_user_name: Optional[str] = None """The owner's username. This field is set to "Unavailable" if the user has been deleted.""" query_id: Optional[str] = None - """UUID of the query attached to the alert.""" + """UUID of the saved query whose result the alert evaluates. The caller must have permission to + view the query.""" seconds_to_retrigger: Optional[int] = None - """Number of seconds an alert must wait after being triggered to rearm itself. After rearming, it - can be triggered again. If 0 or not specified, the alert will not be triggered again.""" + """Number of seconds the alert waits after a notification before it can notify again while its + state stays ``TRIGGERED``. If 0 or not specified, the alert notifies once when its state changes + to ``TRIGGERED`` and does not notify again until its state has changed.""" def as_dict(self) -> dict: """Serializes the UpdateAlertRequestAlert into a dictionary suitable for use as a JSON request body.""" @@ -7885,6 +7945,7 @@ def create( """Creates an alert. :param alert: :class:`CreateAlertRequestAlert` (optional) + The alert to create. A display name, a ``query_id``, and a ``condition`` are required. :param auto_resolve_display_name: bool (optional) If true, automatically resolve alert display name conflicts. Otherwise, fail the request if the alert's display name conflicts with an existing alert's display name. @@ -7915,6 +7976,7 @@ def delete(self, id: str): deleted after 30 days. :param id: str + UUID of the alert to move to the trash. """ @@ -7933,6 +7995,7 @@ def get(self, id: str) -> Alert: """Gets an alert. :param id: str + UUID of the alert to fetch. :returns: :class:`Alert` """ @@ -7955,7 +8018,9 @@ def list( concurrently 10 or more times could result in throttling, service degradation, or a temporary ban. :param page_size: int (optional) + Maximum number of alerts to return per page. :param page_token: str (optional) + Token from the ``next_page_token`` of a previous response. Omit it to fetch the first page. :returns: Iterator over :class:`ListAlertsResponseAlert` """ @@ -7990,10 +8055,15 @@ def update( alert: Optional[UpdateAlertRequestAlert] = None, auto_resolve_display_name: Optional[bool] = None, ) -> Alert: - """Updates an alert. + """Updates the fields of an alert named in ``update_mask``. Changing ``owner_user_name`` requires + workspace admin privileges; changing any other field requires CAN MANAGE permission on the alert. :param id: str + UUID of the alert to update. :param update_mask: str + Comma-separated list of the alert fields to update, such as ``display_name`` or ``condition``. + Fields not listed keep their current values. + 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 @@ -8004,6 +8074,7 @@ def update( fields being updated and avoid using ``*`` wildcards, as it can lead to unintended results if the API changes in the future. :param alert: :class:`UpdateAlertRequestAlert` (optional) + Alert fields to update. Only the fields named in ``update_mask`` are changed. :param auto_resolve_display_name: bool (optional) If true, automatically resolve alert display name conflicts. Otherwise, fail the request if the alert's display name conflicts with an existing alert's display name. diff --git a/databricks/sdk/service/supervisoragents.py b/databricks/sdk/service/supervisoragents.py index 6191d2ce3..d5ea2efa4 100644 --- a/databricks/sdk/service/supervisoragents.py +++ b/databricks/sdk/service/supervisoragents.py @@ -293,35 +293,47 @@ def from_dict(cls, d: Dict[str, Any]) -> ListToolsResponse: @dataclass class SupervisorAgent: + """A Supervisor Agent coordinates tools and subagents, such as Genie Agents, Knowledge Assistants, + Unity Catalog functions, MCP servers and agent endpoints, to answer requests that span several + domains. It is served through its own serving endpoint. Tools and subagents are managed through + the Tool resource. See + https://docs.databricks.com/aws/en/generative-ai/agent-bricks/multi-agent-supervisor for the + product documentation.""" + display_name: str - """The display name of the Supervisor Agent, unique at workspace level.""" + """The display name of the Supervisor Agent. It must be unique among the agents in the workspace. + Creating an agent with a display name that is already in use fails with ALREADY_EXISTS.""" create_time: Optional[Timestamp] = None - """Creation timestamp.""" + """The time at which the Supervisor Agent was created, as an RFC 3339 timestamp.""" creator: Optional[str] = None - """The creator of the Supervisor Agent.""" + """The email address of the user who created the Supervisor Agent.""" description: Optional[str] = None - """Description of what this agent can do (user-facing).""" + """A summary of what the agent does. It is shown to users of the agent.""" endpoint_name: Optional[str] = None - """The name of the supervisor agent's serving endpoint.""" + """The name of the Model Serving endpoint that serves the Supervisor Agent. Query this endpoint to + chat with the agent.""" experiment_id: Optional[str] = None - """The MLflow experiment ID.""" + """The ID of the MLflow experiment that is created together with the Supervisor Agent.""" id: Optional[str] = None - """Deprecated: Use supervisor_agent_id instead.""" + """Deprecated: Use supervisor_agent_id instead. This field is no longer populated.""" instructions: Optional[str] = None - """Optional natural-language instructions for the supervisor agent.""" + """Natural-language guidelines for how the supervisor should respond and how it should delegate + requests to its tools and subagents.""" name: Optional[str] = None - """The resource name of the SupervisorAgent. Format: supervisor-agents/{supervisor_agent_id}""" + """The resource name of the Supervisor Agent. Format: supervisor-agents/{supervisor_agent_id} The + server assigns the name when the agent is created.""" supervisor_agent_id: Optional[str] = None - """The universally unique identifier (UUID) of the Supervisor Agent.""" + """The universally unique identifier (UUID) of the Supervisor Agent. It is the last segment of + ``name``.""" def as_dict(self) -> dict: """Serializes the SupervisorAgent into a dictionary suitable for use as a JSON request body.""" @@ -833,7 +845,8 @@ def create_example(self, parent: str, example: Example) -> Example: return Example.from_dict(res) def create_supervisor_agent(self, supervisor_agent: SupervisorAgent) -> SupervisorAgent: - """Creates a new Supervisor Agent. + """Creates a Supervisor Agent together with its serving endpoint and MLflow experiment. Tools and + subagents are added to the agent afterwards with the Tool methods. :param supervisor_agent: :class:`SupervisorAgent` The Supervisor Agent to create. @@ -909,7 +922,8 @@ def delete_example(self, name: str): self._api.do("DELETE", f"/api/2.1/{name}", headers=headers) def delete_supervisor_agent(self, name: str): - """Deletes a Supervisor Agent. + """Deletes a Supervisor Agent together with the resources created for it, including its tools, examples, + serving endpoint and MLflow experiment. :param name: str The resource name of the Supervisor Agent. Format: supervisor-agents/{supervisor_agent_id} @@ -1092,7 +1106,7 @@ def list_examples( def list_supervisor_agents( self, *, page_size: Optional[int] = None, page_token: Optional[str] = None ) -> Iterator[SupervisorAgent]: - """Lists Supervisor Agents. + """Lists the Supervisor Agents in the workspace that the caller has permission to view. :param page_size: int (optional) The maximum number of supervisor agents to return. If unspecified, at most 100 supervisor agents @@ -1263,15 +1277,18 @@ def update_permissions( def update_supervisor_agent( self, name: str, supervisor_agent: SupervisorAgent, update_mask: FieldMask ) -> SupervisorAgent: - """Updates a Supervisor Agent. The fields that are required depend on the paths specified in - ``update_mask``. Only fields included in the mask will be updated. + """Updates a Supervisor Agent. Only the fields listed in ``update_mask`` are changed. All other fields + keep their current values. :param name: str - The resource name of the SupervisorAgent. Format: supervisor-agents/{supervisor_agent_id} + The resource name of the Supervisor Agent. Format: supervisor-agents/{supervisor_agent_id} The + server assigns the name when the agent is created. :param supervisor_agent: :class:`SupervisorAgent` - The SupervisorAgent to update. + The Supervisor Agent to update. ``name`` identifies the agent. The other fields carry the new values + for the paths listed in ``update_mask``. :param update_mask: FieldMask - Field mask for fields to be updated. + Comma-separated list of the fields to update. Supported values are ``display_name``, ``description`` + and ``instructions``. The request fails if the mask is empty or names any other field. :returns: :class:`SupervisorAgent` """ diff --git a/databricks/sdk/service/vectorsearch.py b/databricks/sdk/service/vectorsearch.py index 1c7ed8593..199df1bcf 100644 --- a/databricks/sdk/service/vectorsearch.py +++ b/databricks/sdk/service/vectorsearch.py @@ -744,6 +744,7 @@ class EndpointScalingInfoScalingPhase(Enum): ADJUSTING_CAPACITY = "ADJUSTING_CAPACITY" ESTIMATING = "ESTIMATING" + FINALIZING = "FINALIZING" INITIALIZING_INDEX = "INITIALIZING_INDEX" diff --git a/databricks/sdk/service/workspace.py b/databricks/sdk/service/workspace.py index ca3422608..7995b0a41 100644 --- a/databricks/sdk/service/workspace.py +++ b/databricks/sdk/service/workspace.py @@ -2185,8 +2185,10 @@ def list(self, *, next_page_token: Optional[str] = None, path_prefix: Optional[s through additional pages. Deprecated: This operation does not return a complete list of the repos in the workspace, because - repos with the Git CLI enabled are not included in its results. Instead, use the Repos and Workspace - APIs to find repos and their associated metadata in the workspace. + repos with the Git CLI enabled are not included in its results. Instead, find Git folders with ``GET + /api/2.0/workspace/get-status`` (for one path) or ``GET /api/2.0/workspace/list`` (keep objects with + ``object_type == "REPO"`` or ``directory_info.is_git_folder == true``), then call ``GET + /api/2.0/repos/{object_id}`` for Git metadata. :param next_page_token: str (optional) Token used to get the next page of results. If not specified, returns the first page of results as diff --git a/databricks/sdk/version.py b/databricks/sdk/version.py index b2d86a0ca..8c0ec3b86 100644 --- a/databricks/sdk/version.py +++ b/databricks/sdk/version.py @@ -1 +1 @@ -__version__ = "0.169.0" +__version__ = "0.170.0" diff --git a/docs/account/iamv2/iam_v2.rst b/docs/account/iamv2/iam_v2.rst index 5b9dc5bb6..2dea07fed 100644 --- a/docs/account/iamv2/iam_v2.rst +++ b/docs/account/iamv2/iam_v2.rst @@ -227,6 +227,18 @@ IdP. If the group isn't in your account yet, it's added. Requires automatic identity management. If your account has group visibility filters, the group must match them. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param name: str The resource name of the external group, in the format ``accounts/{account_id}/external-groups/{external_group_id}``. @@ -240,6 +252,18 @@ memberships from your IdP. If the service principal isn't in your account yet, it's added. Requires automatic identity management with Microsoft Entra ID as your IdP. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param name: str The resource name of the external service principal, in the format ``accounts/{account_id}/external-service-principals/{external_service_principal_id}``. @@ -253,6 +277,18 @@ from your IdP. If the user isn't in your account yet, they're added. Requires automatic identity management. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param name: str The resource name of the external user, in the format ``accounts/{account_id}/external-users/{external_user_id}``. @@ -348,7 +384,12 @@ .. py:method:: list_direct_group_members(parent: str [, page_size: Optional[int], page_token: Optional[str]]) -> Iterator[DirectGroupMember] Lists the direct members of a group, sorted by display name, with where each membership comes from. - Members in your identity provider who haven't been added to Databricks aren't included. + Results combine memberships added in Databricks (in the UI, through the API, or through SCIM + provisioning) with, if automatic identity management is on and the group has an ``external_id``, + memberships from your identity provider (IdP). Only members in your Databricks account are returned: + an IdP member of the group appears only if that user, service principal, or group has been added to + Databricks. Nested groups aren't expanded. To get the full membership, list the direct members of each + member group. :param parent: str The resource name of the group, in the format ``accounts/{account_id}/groups/{group_id}``. @@ -418,8 +459,11 @@ .. py:method:: list_transitive_parent_groups(parent: str [, page_size: Optional[int], page_token: Optional[str]]) -> ListTransitiveParentGroupsResponse Lists every group that a user, service principal, or group belongs to, directly or through other - groups, sorted by Databricks ID. If automatic identity management is on, the principal's group - memberships are synced from your identity provider first. + groups, sorted by Databricks ID. Results combine memberships from every source: added in the UI, + through the API, through SCIM provisioning, or synced from your identity provider (IdP) by automatic + identity management. Only groups that exist in your Databricks account are returned, not every group + that the principal belongs to in your IdP. If automatic identity management is on, only the + principal's own group memberships are refreshed from your IdP before the list is read. :param parent: str The user, service principal, or group whose parent groups to list, in the format @@ -494,6 +538,18 @@ IdP. If the group isn't in your account yet, it's added. Requires automatic identity management. If your account has group visibility filters, the group must match them. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param external_id: str The ID of the group in your IdP. @@ -506,6 +562,18 @@ memberships from your IdP. If the service principal isn't in your account yet, it's added. Requires automatic identity management with Microsoft Entra ID as your IdP. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param external_id: str The ID of the service principal in your IdP. @@ -518,6 +586,18 @@ from your IdP. If the user isn't in your account yet, they're added. Requires automatic identity management. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param external_id: str The ID of the user in your IdP. diff --git a/docs/dbdataclasses/aisearch.rst b/docs/dbdataclasses/aisearch.rst index a2bac2cd7..6e8a5bafc 100644 --- a/docs/dbdataclasses/aisearch.rst +++ b/docs/dbdataclasses/aisearch.rst @@ -76,6 +76,9 @@ These dataclasses are used in the SDK to represent API requests and responses fo .. py:attribute:: ESTIMATING :value: "ESTIMATING" + .. py:attribute:: FINALIZING + :value: "FINALIZING" + .. py:attribute:: INITIALIZING_INDEX :value: "INITIALIZING_INDEX" diff --git a/docs/dbdataclasses/catalog.rst b/docs/dbdataclasses/catalog.rst index 0cfd318cb..75b71e784 100644 --- a/docs/dbdataclasses/catalog.rst +++ b/docs/dbdataclasses/catalog.rst @@ -314,6 +314,9 @@ These dataclasses are used in the SDK to represent API requests and responses fo .. py:attribute:: GLUE :value: "GLUE" + .. py:attribute:: GOOGLE_ADS + :value: "GOOGLE_ADS" + .. py:attribute:: HIVE_METASTORE :value: "HIVE_METASTORE" @@ -2427,6 +2430,10 @@ These dataclasses are used in the SDK to represent API requests and responses fo :members: :undoc-members: +.. autoclass:: UrlConfiguration + :members: + :undoc-members: + .. autoclass:: ValidateCredentialResponse :members: :undoc-members: diff --git a/docs/dbdataclasses/dataclassification.rst b/docs/dbdataclasses/dataclassification.rst index 11a18014e..a0593395e 100644 --- a/docs/dbdataclasses/dataclassification.rst +++ b/docs/dbdataclasses/dataclassification.rst @@ -25,3 +25,7 @@ These dataclasses are used in the SDK to represent API requests and responses fo .. autoclass:: CatalogConfigSchemaNames :members: :undoc-members: + +.. autoclass:: RescanCatalogResponse + :members: + :undoc-members: diff --git a/docs/dbdataclasses/jobs.rst b/docs/dbdataclasses/jobs.rst index c5d892717..53d992f43 100644 --- a/docs/dbdataclasses/jobs.rst +++ b/docs/dbdataclasses/jobs.rst @@ -67,6 +67,9 @@ These dataclasses are used in the SDK to represent API requests and responses fo .. py:attribute:: NORMAL :value: "NORMAL" + .. py:attribute:: PREEMPTABLE + :value: "PREEMPTABLE" + .. py:class:: AlertEvaluationState Same alert evaluation state as in redash-v2/api/proto/alertsv2/alerts.proto diff --git a/docs/dbdataclasses/lakewatch.rst b/docs/dbdataclasses/lakewatch.rst index 6e2f5b69b..0c0ce246e 100644 --- a/docs/dbdataclasses/lakewatch.rst +++ b/docs/dbdataclasses/lakewatch.rst @@ -245,6 +245,10 @@ These dataclasses are used in the SDK to represent API requests and responses fo :members: :undoc-members: +.. autoclass:: RuleInputStreaming + :members: + :undoc-members: + .. autoclass:: RuleMitreMapping :members: :undoc-members: @@ -283,6 +287,14 @@ These dataclasses are used in the SDK to represent API requests and responses fo :members: :undoc-members: +.. autoclass:: StreamingPredicate + :members: + :undoc-members: + +.. autoclass:: StreamingSource + :members: + :undoc-members: + .. autoclass:: TableName :members: :undoc-members: diff --git a/docs/dbdataclasses/ml.rst b/docs/dbdataclasses/ml.rst index 46bb40953..3818b311b 100644 --- a/docs/dbdataclasses/ml.rst +++ b/docs/dbdataclasses/ml.rst @@ -309,6 +309,10 @@ These dataclasses are used in the SDK to represent API requests and responses fo :members: :undoc-members: +.. autoclass:: EntityBinding + :members: + :undoc-members: + .. autoclass:: EntityColumn :members: :undoc-members: @@ -834,6 +838,10 @@ These dataclasses are used in the SDK to represent API requests and responses fo :members: :undoc-members: +.. autoclass:: InputReference + :members: + :undoc-members: + .. autoclass:: InputTag :members: :undoc-members: @@ -1071,6 +1079,10 @@ These dataclasses are used in the SDK to represent API requests and responses fo :members: :undoc-members: +.. autoclass:: Lookup + :members: + :undoc-members: + .. autoclass:: MaterializationFailureNotification :members: :undoc-members: @@ -1677,6 +1689,10 @@ These dataclasses are used in the SDK to represent API requests and responses fo :members: :undoc-members: +.. autoclass:: SecondaryKeys + :members: + :undoc-members: + .. autoclass:: SecretScopeReference :members: :undoc-members: diff --git a/docs/dbdataclasses/sandbox.rst b/docs/dbdataclasses/sandbox.rst index 0aa768003..c4b534d87 100644 --- a/docs/dbdataclasses/sandbox.rst +++ b/docs/dbdataclasses/sandbox.rst @@ -61,6 +61,10 @@ These dataclasses are used in the SDK to represent API requests and responses fo :members: :undoc-members: +.. autoclass:: NetworkSpec + :members: + :undoc-members: + .. autoclass:: RenamePathResponse :members: :undoc-members: diff --git a/docs/dbdataclasses/vectorsearch.rst b/docs/dbdataclasses/vectorsearch.rst index fb57bf2cc..ed1d3afd9 100644 --- a/docs/dbdataclasses/vectorsearch.rst +++ b/docs/dbdataclasses/vectorsearch.rst @@ -90,6 +90,9 @@ These dataclasses are used in the SDK to represent API requests and responses fo .. py:attribute:: ESTIMATING :value: "ESTIMATING" + .. py:attribute:: FINALIZING + :value: "FINALIZING" + .. py:attribute:: INITIALIZING_INDEX :value: "INITIALIZING_INDEX" diff --git a/docs/workspace/agentkit/agent_kit.rst b/docs/workspace/agentkit/agent_kit.rst index f5924c553..a62b870af 100644 --- a/docs/workspace/agentkit/agent_kit.rst +++ b/docs/workspace/agentkit/agent_kit.rst @@ -98,7 +98,10 @@ .. py:method:: delete_memory(name: str) Deletes a memory entry by resource name. Returns ``NOT_FOUND`` when the entry does not exist in the - caller's workspace. + caller's workspace. The entry stops appearing in Get, List and Search. In a store that records memory + history, the versions written before the delete, including their content, stay readable through + ``ListMemoryChanges`` and ``GetMemoryChange`` to anyone who can read the store, until the store itself + is deleted. :param name: str Resource name in the form diff --git a/docs/workspace/aifunctions/ai_functions.rst b/docs/workspace/aifunctions/ai_functions.rst index d82054560..b199d50e1 100644 --- a/docs/workspace/aifunctions/ai_functions.rst +++ b/docs/workspace/aifunctions/ai_functions.rst @@ -18,7 +18,7 @@ :param labels: any The label set to classify as. Either a JSON array of label strings (e.g. ["spam", "not_spam"]), or a JSON object mapping each label to a description (e.g. {"spam": "unsolicited bulk message", - "not_spam": "a legitimate message"}). Accepts 2 to 500 labels, each 1 to 100 characters. When + "not_spam": "a legitimate message"}). Accepts 2 to 5000 labels, each 1 to 100 characters. When multilabel is true, a single label is also accepted. :param options: :class:`AiClassifyOptions` (optional) Function options. Omitted fields fall back to their documented defaults. @@ -160,11 +160,11 @@ .. py:method:: cancel_batch(name: str) -> CancelBatchResponse - Starts the asynchronous cancellation of a batch. Requests in progress are drained first. Cancellation - is best effort, so the batch can still complete. + Starts the asynchronous cancellation of a batch. Requests in progress are stopped, and the results of + the requests that finished are kept. Cancellation is best effort, so the batch can still complete. :param name: str - Resource name of the batch. Format: ``batch_``. + Unique identifier of the batch. Format: ``batch_``. :returns: :class:`CancelBatchResponse` @@ -185,7 +185,7 @@ Gets the latest status and progress of a batch. :param name: str - Resource name of the batch. Format: ``batch_``. + Unique identifier of the batch. Format: ``batch_``. :returns: :class:`Batch` diff --git a/docs/workspace/apps/apps.rst b/docs/workspace/apps/apps.rst index 705e09928..4de3713e0 100644 --- a/docs/workspace/apps/apps.rst +++ b/docs/workspace/apps/apps.rst @@ -97,7 +97,9 @@ .. py:method:: deploy(app_name: str, app_deployment: AppDeployment) -> Wait[AppDeployment] - Creates an app deployment for the app with the supplied name. + Creates an app deployment for the app with the supplied name. The call returns while the deployment is + still ``IN_PROGRESS``; poll the deployment until it reaches a terminal state. The request fails with + RESOURCE_CONFLICT if another deployment of the same app is still pending and has not timed out. :param app_name: str The name of the app. @@ -225,14 +227,15 @@ .. py:method:: list_deployments(app_name: str [, page_size: Optional[int], page_token: Optional[str]]) -> Iterator[AppDeployment] - Lists all app deployments for the app with the supplied name. + Lists all app deployments for the app with the supplied name. The history holds only the app's most + recent deployments. :param app_name: str The name of the app. :param page_size: int (optional) - Upper bound for items returned. + Upper bound for items returned. The default is 100 and the maximum is 1000. :param page_token: str (optional) - Pagination token to go to the next page of apps. Requests first page if absent. + Pagination token to go to the next page of deployments. Requests first page if absent. :returns: Iterator over :class:`AppDeployment` @@ -349,18 +352,12 @@ :param name: str The name of the app space. The name must contain only lowercase alphanumeric characters and hyphens. - It must be unique within the workspace. + It must be unique within the workspace. It can't start or end with a hyphen, and it can't be changed + after the space is created. :param space: :class:`Space` :param update_mask: FieldMask - 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. + Comma-separated names of the ``space`` fields to update, such as ``description`` or ``resources``. A + field named in the mask but absent from ``space`` is cleared. :returns: :class:`Operation` diff --git a/docs/workspace/catalog/ai_gateway.rst b/docs/workspace/catalog/ai_gateway.rst index 95157db1e..7076d5021 100644 --- a/docs/workspace/catalog/ai_gateway.rst +++ b/docs/workspace/catalog/ai_gateway.rst @@ -123,8 +123,9 @@ 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. + Name of the skill within the parent schema. The name must not contain periods, spaces, forward + slashes, percent signs, or control characters, and it is stored in lowercase. It is independent of + the bundle name read from SKILL.md. :returns: :class:`Skill` @@ -541,14 +542,14 @@ :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. + is capped at 255 characters individually. The server derives the name on Create from ``parent`` and + ``skill_id``; it is required and immutable on Update, Get, and 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. + Comma-separated list of ``skill`` fields to update. ``comment`` is the only field that can be + updated. :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 diff --git a/docs/workspace/catalog/grants.rst b/docs/workspace/catalog/grants.rst index d709622ee..34fefab05 100644 --- a/docs/workspace/catalog/grants.rst +++ b/docs/workspace/catalog/grants.rst @@ -69,9 +69,11 @@ absent, which is the only indication that the end of results has been reached. :param securable_type: str - Type of securable. + Type of the securable, such as ``catalog``, ``schema``, ``table`` or ``volume``. The value is + case-insensitive. :param full_name: str - Full name of securable. + Full name of the securable. Tables, views, volumes and functions use the three-level name + ``catalog.schema.object``; a metastore uses its metastore ID. :param max_results: int (optional) Specifies the maximum number of privileges to return (page length). Every PrivilegeAssignment present in a single page response is guaranteed to contain all the privileges granted on the @@ -295,13 +297,16 @@ Updates the permissions for a securable. :param securable_type: str - Type of securable. + Type of the securable, such as ``catalog``, ``schema``, ``table`` or ``volume``. The value is + case-insensitive. :param full_name: str - Full name of securable. + Full name of the securable. Tables, views, volumes and functions use the three-level name + ``catalog.schema.object``; a metastore uses its metastore ID. :param changes: List[:class:`PermissionsChange`] (optional) Array of permissions change objects. :param omit_permissions_in_response: bool (optional) - Optional, default false. Specifies whether all the permissions should be returned in the response. + Whether to omit the privilege assignments from the response. When false, the response lists all + direct privilege assignments on the securable after the update. :returns: :class:`UpdatePermissionsResponse` \ No newline at end of file diff --git a/docs/workspace/catalog/model_versions.rst b/docs/workspace/catalog/model_versions.rst index faed9c493..bb50bb70c 100644 --- a/docs/workspace/catalog/model_versions.rst +++ b/docs/workspace/catalog/model_versions.rst @@ -21,7 +21,8 @@ **USE_SCHEMA** privilege on the parent schema. :param full_name: str - The three-level (fully qualified) name of the model version + The three-level (fully qualified) name of the parent registered model, in the form + ``catalog_name.schema_name.model_name``. :param version: int The integer version number of the model version @@ -37,7 +38,8 @@ privilege on the parent catalog and the **USE_SCHEMA** privilege on the parent schema. :param full_name: str - The three-level (fully qualified) name of the model version + The three-level (fully qualified) name of the parent registered model, in the form + ``catalog_name.schema_name.model_name``. :param version: int The integer version number of the model version :param include_aliases: bool (optional) @@ -116,7 +118,8 @@ Currently only the comment of the model version can be updated. :param full_name: str - The three-level (fully qualified) name of the model version + The three-level (fully qualified) name of the parent registered model, in the form + ``catalog_name.schema_name.model_name``. :param version: int The integer version number of the model version :param aliases: List[:class:`RegisteredModelAlias`] (optional) @@ -126,6 +129,7 @@ :param comment: str (optional) The comment attached to the model version :param created_at: int (optional) + Time at which the model version was created, in epoch milliseconds. :param created_by: str (optional) The identifier of the user who created the model version :param id: str (optional) @@ -153,6 +157,7 @@ :param storage_location: str (optional) The storage location on the cloud under which model version data files are stored :param updated_at: int (optional) + Time at which the model version was last updated, in epoch milliseconds. :param updated_by: str (optional) The identifier of the user who updated the model version last time diff --git a/docs/workspace/catalog/rfa.rst b/docs/workspace/catalog/rfa.rst index 2109b81cf..bc73fb49a 100644 --- a/docs/workspace/catalog/rfa.rst +++ b/docs/workspace/catalog/rfa.rst @@ -59,6 +59,12 @@ The supported securable types are: "metastore", "catalog", "schema", "table", "external_location", "connection", "credential", "function", "registered_model", and "volume". + On a metastore that has a **url_configuration**, its URLs are shared by every workspace, while emails + and webhooks are still saved per workspace. There, a URL destination replaces the configuration's + **redirect_url** and clears its **dynamic_url**, so requests that used the **dynamic_url** go to the + new URL. An update that has no URL destination and does not set **url_configuration** clears both + URLs, in every workspace. + :param access_request_destinations: :class:`AccessRequestDestinations` The access request destinations to assign to the securable. For each destination, a **destination_id** and **destination_type** must be defined. diff --git a/docs/workspace/catalog/secrets_uc.rst b/docs/workspace/catalog/secrets_uc.rst index 1ae313fa9..06a8b6d0e 100644 --- a/docs/workspace/catalog/secrets_uc.rst +++ b/docs/workspace/catalog/secrets_uc.rst @@ -44,11 +44,14 @@ Gets a secret by its three-level (fully qualified) name. - You must be a metastore admin, the owner of the secret, or have the **MANAGE** privilege on the - secret. + You must be a metastore admin or the owner of the secret, or have the **MANAGE** privilege on the + secret (together with **USE CATALOG** on its catalog and **USE SCHEMA** on its schema), on its schema + (together with **USE CATALOG** on its catalog), or on its catalog. Alternatively, you can have the + **READ_SECRET**, **WRITE_SECRET**, or **REFERENCE_SECRET** privilege on the secret, its schema, or its + catalog, together with **USE CATALOG** on its catalog and **USE SCHEMA** on its schema. - The secret value isn't returned by default. To retrieve it, you must also have the **READ_SECRET** - privilege and set **include_value** to true in the request. + The secret value isn't returned by default. To retrieve it, set **include_value** to true in the + request; this requires ownership of the secret or the **READ_SECRET** privilege. :param full_name: str The three-level (fully qualified) name of the secret (for example, @@ -62,14 +65,16 @@ .. py:method:: list_secrets( [, catalog_name: Optional[str], page_size: Optional[int], page_token: Optional[str], schema_name: Optional[str]]) -> Iterator[Secret] - Lists secrets in Unity Catalog. + Lists the secrets in a schema. - You must be a metastore admin, the owner of the secret, or have the **MANAGE** privilege on the - secret. + With **USE CATALOG** on the catalog and **USE SCHEMA** on the schema, the response contains the + secrets that you own or hold a privilege on. Metastore admins, principals with the **MANAGE** + privilege on the catalog, and principals with the **MANAGE** privilege on the schema together with + **USE CATALOG** on the catalog see every secret in the schema. - Both **catalog_name** and **schema_name** must be specified together to filter secrets within a - specific schema. Results are paginated; use the **page_token** field from the response to retrieve - subsequent pages. + Secrets are listed within a single schema, so both **catalog_name** and **schema_name** must be + specified. Results are paginated; pass the **next_page_token** value from the response as + **page_token** to retrieve the next page. :param catalog_name: str (optional) The name of the catalog under which to list secrets. Both **catalog_name** and **schema_name** must @@ -82,8 +87,8 @@ - If set to 0, the page length is set to 1000. - If set to a value less than 0, an invalid parameter error is returned. :param page_token: str (optional) - Opaque pagination token to go to the next page based on previous query. The maximum page length is - determined by a server configured value. + Opaque pagination token for the next page of results. Set it to the **next_page_token** value from + the previous response. :param schema_name: str (optional) The name of the schema under which to list secrets. Both **catalog_name** and **schema_name** must be specified together. @@ -95,11 +100,16 @@ Updates an existing secret in Unity Catalog. - You must be the owner of the secret or a metastore admin. If you are a metastore admin, only the - **owner** field can be changed. + To change **value**, you must be the owner of the secret, or have the **WRITE_SECRET** privilege on it + together with **USE CATALOG** on its catalog and **USE SCHEMA** on its schema. To change **comment** + or **expire_time**, you must be the owner or have the **MANAGE** privilege on the secret (together + with **USE CATALOG** on its catalog and **USE SCHEMA** on its schema), on its schema (together with + **USE CATALOG** on its catalog), or on its catalog. To change **owner**, you must be the owner, a + metastore admin, or have the **MANAGE** privilege on the secret (together with **USE CATALOG** on its + catalog and **USE SCHEMA** on its schema), on its schema (together with **USE CATALOG** on its + catalog), or on its catalog. A metastore admin can change only the **owner** field. - Use the **update_mask** field to specify which fields to update. Supported updatable fields include - **value**, **comment**, **owner**, and **expire_time**. + Use the **update_mask** field to specify which fields to update. :param full_name: str The three-level (fully qualified) name of the secret (for example, diff --git a/docs/workspace/catalog/tables.rst b/docs/workspace/catalog/tables.rst index 84f89b1eb..9017c9cac 100644 --- a/docs/workspace/catalog/tables.rst +++ b/docs/workspace/catalog/tables.rst @@ -37,9 +37,10 @@ :param name: str Name of table, relative to parent schema. :param catalog_name: str - Name of parent catalog. + Name of parent catalog. Required for creation using catalog and schema names. :param schema_name: str - Name of parent schema relative to its parent catalog. + Name of parent schema relative to its parent catalog. Required for creation using catalog and schema + names. :param table_type: :class:`TableType` The type of the table. MANAGED tables store their data in storage that Unity Catalog manages, EXTERNAL tables store it in a registered external location, FOREIGN tables mirror objects of an diff --git a/docs/workspace/catalog/workspace_bindings.rst b/docs/workspace/catalog/workspace_bindings.rst index 1d9787ae8..c94daba2a 100644 --- a/docs/workspace/catalog/workspace_bindings.rst +++ b/docs/workspace/catalog/workspace_bindings.rst @@ -113,9 +113,9 @@ :param name: str The name of the catalog. :param assign_workspaces: List[int] (optional) - A list of workspace IDs. + The IDs of the workspaces to bind to the catalog. :param unassign_workspaces: List[int] (optional) - A list of workspace IDs. + The IDs of the workspaces to unbind from the catalog. :returns: :class:`UpdateCatalogWorkspaceBindingsResponse` diff --git a/docs/workspace/compute/serverless_compute_service.rst b/docs/workspace/compute/serverless_compute_service.rst index 6b4e8597e..3722b5a8e 100644 --- a/docs/workspace/compute/serverless_compute_service.rst +++ b/docs/workspace/compute/serverless_compute_service.rst @@ -6,6 +6,37 @@ ServerlessCompute Service API. + .. py:method:: create_compute_policy(compute_policy: ComputePolicy) -> ComputePolicy + + Creates a custom compute policy in the workspace. + + :param compute_policy: :class:`ComputePolicy` + The compute policy to create. + + :returns: :class:`ComputePolicy` + + + .. py:method:: delete_compute_policy(compute_policy_id: str) + + Deletes a custom compute policy in the workspace. Default (system-provisioned) policies cannot be + deleted. + + :param compute_policy_id: str + The ID of the compute policy to delete. + + + + + .. py:method:: get_compute_policy(compute_policy_id: str) -> ComputePolicy + + Retrieves a compute policy by its ID. + + :param compute_policy_id: str + The ID of the compute policy to retrieve. + + :returns: :class:`ComputePolicy` + + .. py:method:: list( [, page_size: Optional[int], page_token: Optional[str]]) -> Iterator[ServerlessCompute] Lists Interactive serverless computes that the caller can use or manage. Results are returned in an @@ -32,4 +63,26 @@ Token for cursor-based pagination. :returns: Iterator over :class:`ComputePolicy` + + + .. py:method:: update_compute_policy(compute_policy_id: str, compute_policy: ComputePolicy, update_mask: FieldMask) -> ComputePolicy + + Updates a custom compute policy in the workspace. The display_name and allowed_compute_products are + mutable; use update_mask to control which fields change. Default (system-provisioned) policies cannot + be updated. + + :param compute_policy_id: str + The unique identifier of the compute policy (UUID). Server-assigned on create. + :param compute_policy: :class:`ComputePolicy` + The compute policy to update. ``compute_policy.compute_policy_id`` identifies which policy to + update; only the fields named in ``update_mask`` are applied. + :param update_mask: FieldMask + Fields to update, relative to ``compute_policy``. Must contain at least one path; the supported + paths are ``display_name`` and ``allowed_compute_products``. Supplied product arms replace their + constraints and omitted products remain unchanged. An empty arm clears that product's limits; an + absent or empty products object is invalid. Removing a product requires its delete API. Nested masks + and wildcards are unsupported. ``display_name`` cannot be cleared: if it is in the mask it must be + non-empty. + + :returns: :class:`ComputePolicy` \ No newline at end of file diff --git a/docs/workspace/dataclassification/data_classification.rst b/docs/workspace/dataclassification/data_classification.rst index 2393037b0..07fb519cc 100644 --- a/docs/workspace/dataclassification/data_classification.rst +++ b/docs/workspace/dataclassification/data_classification.rst @@ -48,6 +48,25 @@ :returns: :class:`CatalogConfig` + .. py:method:: rescan_catalog(name: str) -> RescanCatalogResponse + + Rescan the tables in a catalog's Data Classification scope that changed since their last scan. + + The rescan uses the catalog's current classifiers and follows its config (schema selection) and SKIP + tags. Tables with no commits since their last scan are skipped. Views and tables without a Delta + commit history keep their regular rescan schedule. The call returns once the rescan is scheduled; + scanning runs in the background. If a scan of the catalog is running, the call cancels it and starts a + new run. + + - Data Classification must be enabled for the catalog. + - The call must come from the workspace where Data Classification was enabled. + + :param name: str + Resource name of the catalog, in the format: catalogs/{catalog_name}. + + :returns: :class:`RescanCatalogResponse` + + .. py:method:: update_catalog_config(name: str, catalog_config: CatalogConfig, update_mask: FieldMask) -> CatalogConfig Update the Data Classification configuration for a catalog. diff --git a/docs/workspace/genieagents/genie_agents.rst b/docs/workspace/genieagents/genie_agents.rst index 96437c800..43194025e 100644 --- a/docs/workspace/genieagents/genie_agents.rst +++ b/docs/workspace/genieagents/genie_agents.rst @@ -81,7 +81,11 @@ A field named in the mask takes the value from ``genie_agent``, even when it is unset there: an unset ``description`` is cleared; an unset ``display_name``, ``warehouse_id``, or ``definition`` is rejected with INVALID_PARAMETER_VALUE; an unset ``parent_path`` is cleared without moving the Genie - Agent. ``definition`` is replaced as a whole; paths within it are not supported. + Agent. ``definition`` is replaced as a whole. + + The one supported path inside ``definition`` is ``definition.data_sources.sub_agents``, and only + alongside ``definition``. Naming it makes the sub-agent list exact, so an empty list detaches every + sub-agent. Without it, including with ``*``, an empty list keeps them. The special value ``*`` replaces the whole Genie Agent, as if every updatable field were named. It must be the only path in the mask. Prefer naming fields explicitly: with ``*``, any field added to diff --git a/docs/workspace/iamv2/workspace_iam_v2.rst b/docs/workspace/iamv2/workspace_iam_v2.rst index 75a7d7294..025d23dca 100644 --- a/docs/workspace/iamv2/workspace_iam_v2.rst +++ b/docs/workspace/iamv2/workspace_iam_v2.rst @@ -197,6 +197,18 @@ automatic identity management. If your account has group visibility filters, the group must match them. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param name: str The resource name of the external group, in the format ``external-groups/{external_group_id}``. @@ -209,6 +221,18 @@ memberships from your IdP. If the service principal isn't in the account that contains this workspace yet, it's added. Requires automatic identity management with Microsoft Entra ID as your IdP. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param name: str The resource name of the external service principal, in the format ``external-service-principals/{external_service_principal_id}``. @@ -222,6 +246,18 @@ from your IdP. If the user isn't in the account that contains this workspace yet, they're added. Requires automatic identity management. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param name: str The resource name of the external user, in the format ``external-users/{external_user_id}``. @@ -313,8 +349,12 @@ .. py:method:: list_direct_group_members_proxy(parent: str [, page_size: Optional[int], page_token: Optional[str]]) -> Iterator[DirectGroupMember] Lists the direct members of a group in the account that contains this workspace, sorted by display - name, with where each membership comes from. Members in your identity provider who haven't been added - to Databricks aren't included. + name, with where each membership comes from. Results combine memberships added in Databricks (in the + UI, through the API, or through SCIM provisioning) with, if automatic identity management is on and + the group has an ``external_id``, memberships from your identity provider (IdP). Only members in your + Databricks account are returned: an IdP member of the group appears only if that user, service + principal, or group has been added to Databricks. Nested groups aren't expanded. To get the full + membership, list the direct members of each member group. :param parent: str The resource name of the group, in the format ``groups/{group_id}``. @@ -371,9 +411,12 @@ .. py:method:: list_transitive_parent_groups_proxy(parent: str [, page_size: Optional[int], page_token: Optional[str]]) -> ListTransitiveParentGroupsResponse Lists every group that a user, service principal, or group belongs to, directly or through other - groups, in the account that contains this workspace. Results are sorted by Databricks ID. If automatic - identity management is on, the principal's group memberships are synced from your identity provider - first. + groups, in the account that contains this workspace. Results are sorted by Databricks ID and combine + memberships from every source: added in the UI, through the API, through SCIM provisioning, or synced + from your identity provider (IdP) by automatic identity management. Only groups that exist in your + Databricks account are returned, not every group that the principal belongs to in your IdP. If + automatic identity management is on, only the principal's own group memberships are refreshed from + your IdP before the list is read. :param parent: str The user, service principal, or group whose parent groups to list, in the format @@ -448,6 +491,18 @@ automatic identity management. If your account has group visibility filters, the group must match them. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param external_id: str The ID of the group in your IdP. @@ -460,6 +515,18 @@ memberships from your IdP. If the service principal isn't in the account that contains this workspace yet, it's added. Requires automatic identity management with Microsoft Entra ID as your IdP. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param external_id: str The ID of the service principal in your IdP. @@ -472,6 +539,18 @@ from your IdP. If the user isn't in the account that contains this workspace yet, they're added. Requires automatic identity management. + To control how fresh the synced data is, send a ``Cache-Control`` request header: + + - ``no-cache`` syncs from your IdP before the call returns. + - ``max-age=, max-stale=0`` syncs from your IdP before the call returns if the last sync is more + than ```` seconds old. + + Without the header, the call skips the sync if the last sync is within the default freshness window. + Databricks might sync more often than you request. If you send ``max-age`` without ``max-stale=0``, + the call can return the data from the last sync and sync in the background. Databricks ignores other + ``Cache-Control`` directives. A forced sync makes the call wait for your IdP. A forced sync on every + call adds load on your IdP and can hit rate limits. + :param external_id: str The ID of the user in your IdP. diff --git a/docs/workspace/settings/token_management.rst b/docs/workspace/settings/token_management.rst index 8c9f97601..176906e08 100644 --- a/docs/workspace/settings/token_management.rst +++ b/docs/workspace/settings/token_management.rst @@ -39,7 +39,8 @@ :param application_id: str Application ID of the service principal. :param autoscope_enabled: bool (optional) - Whether to enable autoscoping for this token. + Whether to enable autoscoping for this token. ``disable_autoscoping`` supersedes this field and is + the one read when both are set. :param comment: str (optional) Comment that describes the purpose of the token. :param lifetime_seconds: int (optional) diff --git a/docs/workspace/settings/tokens.rst b/docs/workspace/settings/tokens.rst index bdc25f60d..d0b864557 100644 --- a/docs/workspace/settings/tokens.rst +++ b/docs/workspace/settings/tokens.rst @@ -31,7 +31,8 @@ :param autoscope_enabled: bool (optional) Whether to enable autoscoping for this token. When true, the token will automatically collect - inferred API path scopes as it is used. + inferred API path scopes as it is used. ``disable_autoscoping`` supersedes this field and is the one + read when both are set. :param comment: str (optional) Optional description to attach to the token. :param lifetime_seconds: int (optional) diff --git a/docs/workspace/sharing/shares.rst b/docs/workspace/sharing/shares.rst index e249ce8a4..e5c06f13c 100644 --- a/docs/workspace/sharing/shares.rst +++ b/docs/workspace/sharing/shares.rst @@ -35,7 +35,8 @@ :param comment: str (optional) User-provided free-form text description. :param storage_root: str (optional) - Storage root URL for the share. + Cloud storage path, within an external location, under which the share stores the notebook files + added to it. When unset, notebook files are stored under the metastore root storage location. :returns: :class:`ShareInfo` @@ -76,7 +77,8 @@ :param name: str The name of the share. :param include_shared_data: bool (optional) - Query for data to include in the share. + Whether to include the share's data objects in the response. When false or omitted, the response + omits ``objects``. :returns: :class:`ShareInfo` @@ -217,9 +219,11 @@ :param owner: str (optional) Username of current owner of share. :param storage_root: str (optional) - Storage root URL for the share. + Cloud storage path, within an external location, under which the share stores the notebook files + added to it. When unset, notebook files are stored under the metastore root storage location. :param updates: List[:class:`SharedDataObjectUpdate`] (optional) - Array of shared data object updates. + Array of shared data object updates. The server limits how many updates a single request can + contain. :returns: :class:`ShareInfo` diff --git a/docs/workspace/sql/alerts.rst b/docs/workspace/sql/alerts.rst index 4595fade9..49c63ae5c 100644 --- a/docs/workspace/sql/alerts.rst +++ b/docs/workspace/sql/alerts.rst @@ -53,6 +53,7 @@ Creates an alert. :param alert: :class:`CreateAlertRequestAlert` (optional) + The alert to create. A display name, a ``query_id``, and a ``condition`` are required. :param auto_resolve_display_name: bool (optional) If true, automatically resolve alert display name conflicts. Otherwise, fail the request if the alert's display name conflicts with an existing alert's display name. @@ -67,6 +68,7 @@ deleted after 30 days. :param id: str + UUID of the alert to move to the trash. @@ -117,6 +119,7 @@ Gets an alert. :param id: str + UUID of the alert to fetch. :returns: :class:`Alert` @@ -139,7 +142,9 @@ concurrently 10 or more times could result in throttling, service degradation, or a temporary ban. :param page_size: int (optional) + Maximum number of alerts to return per page. :param page_token: str (optional) + Token from the ``next_page_token`` of a previous response. Omit it to fetch the first page. :returns: Iterator over :class:`ListAlertsResponseAlert` @@ -191,10 +196,15 @@ w.queries.delete(id=query.id) w.alerts.delete(id=alert.id) - Updates an alert. + Updates the fields of an alert named in ``update_mask``. Changing ``owner_user_name`` requires + workspace admin privileges; changing any other field requires CAN MANAGE permission on the alert. :param id: str + UUID of the alert to update. :param update_mask: str + Comma-separated list of the alert fields to update, such as ``display_name`` or ``condition``. + Fields not listed keep their current values. + 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 @@ -205,6 +215,7 @@ fields being updated and avoid using ``*`` wildcards, as it can lead to unintended results if the API changes in the future. :param alert: :class:`UpdateAlertRequestAlert` (optional) + Alert fields to update. Only the fields named in ``update_mask`` are changed. :param auto_resolve_display_name: bool (optional) If true, automatically resolve alert display name conflicts. Otherwise, fail the request if the alert's display name conflicts with an existing alert's display name. diff --git a/docs/workspace/supervisoragents/supervisor_agents.rst b/docs/workspace/supervisoragents/supervisor_agents.rst index 2d2969ce3..56d2efd83 100644 --- a/docs/workspace/supervisoragents/supervisor_agents.rst +++ b/docs/workspace/supervisoragents/supervisor_agents.rst @@ -20,7 +20,8 @@ .. py:method:: create_supervisor_agent(supervisor_agent: SupervisorAgent) -> SupervisorAgent - Creates a new Supervisor Agent. + Creates a Supervisor Agent together with its serving endpoint and MLflow experiment. Tools and + subagents are added to the agent afterwards with the Tool methods. :param supervisor_agent: :class:`SupervisorAgent` The Supervisor Agent to create. @@ -59,7 +60,8 @@ .. py:method:: delete_supervisor_agent(name: str) - Deletes a Supervisor Agent. + Deletes a Supervisor Agent together with the resources created for it, including its tools, examples, + serving endpoint and MLflow experiment. :param name: str The resource name of the Supervisor Agent. Format: supervisor-agents/{supervisor_agent_id} @@ -147,7 +149,7 @@ .. py:method:: list_supervisor_agents( [, page_size: Optional[int], page_token: Optional[str]]) -> Iterator[SupervisorAgent] - Lists Supervisor Agents. + Lists the Supervisor Agents in the workspace that the caller has permission to view. :param page_size: int (optional) The maximum number of supervisor agents to return. If unspecified, at most 100 supervisor agents @@ -215,15 +217,18 @@ .. py:method:: update_supervisor_agent(name: str, supervisor_agent: SupervisorAgent, update_mask: FieldMask) -> SupervisorAgent - Updates a Supervisor Agent. The fields that are required depend on the paths specified in - ``update_mask``. Only fields included in the mask will be updated. + Updates a Supervisor Agent. Only the fields listed in ``update_mask`` are changed. All other fields + keep their current values. :param name: str - The resource name of the SupervisorAgent. Format: supervisor-agents/{supervisor_agent_id} + The resource name of the Supervisor Agent. Format: supervisor-agents/{supervisor_agent_id} The + server assigns the name when the agent is created. :param supervisor_agent: :class:`SupervisorAgent` - The SupervisorAgent to update. + The Supervisor Agent to update. ``name`` identifies the agent. The other fields carry the new values + for the paths listed in ``update_mask``. :param update_mask: FieldMask - Field mask for fields to be updated. + Comma-separated list of the fields to update. Supported values are ``display_name``, ``description`` + and ``instructions``. The request fails if the mask is empty or names any other field. :returns: :class:`SupervisorAgent` diff --git a/docs/workspace/workspace/repos.rst b/docs/workspace/workspace/repos.rst index bafdcfbc1..9215da5e2 100644 --- a/docs/workspace/workspace/repos.rst +++ b/docs/workspace/workspace/repos.rst @@ -147,8 +147,10 @@ through additional pages. Deprecated: This operation does not return a complete list of the repos in the workspace, because - repos with the Git CLI enabled are not included in its results. Instead, use the Repos and Workspace - APIs to find repos and their associated metadata in the workspace. + repos with the Git CLI enabled are not included in its results. Instead, find Git folders with ``GET + /api/2.0/workspace/get-status`` (for one path) or ``GET /api/2.0/workspace/list`` (keep objects with + ``object_type == "REPO"`` or ``directory_info.is_git_folder == true``), then call ``GET + /api/2.0/repos/{object_id}`` for Git metadata. :param next_page_token: str (optional) Token used to get the next page of results. If not specified, returns the first page of results as