databricks-sdk 0.60.0__py3-none-any.whl → 0.62.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of databricks-sdk might be problematic. Click here for more details.

@@ -59,7 +59,9 @@ from databricks.sdk.service.catalog import (AccountMetastoreAssignmentsAPI,
59
59
  TableConstraintsAPI, TablesAPI,
60
60
  TemporaryTableCredentialsAPI,
61
61
  VolumesAPI, WorkspaceBindingsAPI)
62
- from databricks.sdk.service.cleanrooms import (CleanRoomAssetsAPI,
62
+ from databricks.sdk.service.cleanrooms import (CleanRoomAssetRevisionsAPI,
63
+ CleanRoomAssetsAPI,
64
+ CleanRoomAutoApprovalRulesAPI,
63
65
  CleanRoomsAPI,
64
66
  CleanRoomTaskRunsAPI)
65
67
  from databricks.sdk.service.compute import (ClusterPoliciesAPI, ClustersAPI,
@@ -247,7 +249,9 @@ class WorkspaceClient:
247
249
  self._apps = pkg_apps.AppsAPI(self._api_client)
248
250
  self._artifact_allowlists = pkg_catalog.ArtifactAllowlistsAPI(self._api_client)
249
251
  self._catalogs = pkg_catalog.CatalogsAPI(self._api_client)
252
+ self._clean_room_asset_revisions = pkg_cleanrooms.CleanRoomAssetRevisionsAPI(self._api_client)
250
253
  self._clean_room_assets = pkg_cleanrooms.CleanRoomAssetsAPI(self._api_client)
254
+ self._clean_room_auto_approval_rules = pkg_cleanrooms.CleanRoomAutoApprovalRulesAPI(self._api_client)
251
255
  self._clean_room_task_runs = pkg_cleanrooms.CleanRoomTaskRunsAPI(self._api_client)
252
256
  self._clean_rooms = pkg_cleanrooms.CleanRoomsAPI(self._api_client)
253
257
  self._cluster_policies = pkg_compute.ClusterPoliciesAPI(self._api_client)
@@ -411,11 +415,21 @@ class WorkspaceClient:
411
415
  """A catalog is the first layer of Unity Catalog’s three-level namespace."""
412
416
  return self._catalogs
413
417
 
418
+ @property
419
+ def clean_room_asset_revisions(self) -> pkg_cleanrooms.CleanRoomAssetRevisionsAPI:
420
+ """Clean Room Asset Revisions denote new versions of uploaded assets (e.g."""
421
+ return self._clean_room_asset_revisions
422
+
414
423
  @property
415
424
  def clean_room_assets(self) -> pkg_cleanrooms.CleanRoomAssetsAPI:
416
425
  """Clean room assets are data and code objects — Tables, volumes, and notebooks that are shared with the clean room."""
417
426
  return self._clean_room_assets
418
427
 
428
+ @property
429
+ def clean_room_auto_approval_rules(self) -> pkg_cleanrooms.CleanRoomAutoApprovalRulesAPI:
430
+ """Clean room auto-approval rules automatically create an approval on your behalf when an asset (e.g."""
431
+ return self._clean_room_auto_approval_rules
432
+
419
433
  @property
420
434
  def clean_room_task_runs(self) -> pkg_cleanrooms.CleanRoomTaskRunsAPI:
421
435
  """Clean room task runs are the executions of notebooks in a clean room."""
databricks/sdk/config.py CHANGED
@@ -13,7 +13,8 @@ import requests
13
13
  from . import useragent
14
14
  from ._base_client import _fix_host_if_needed
15
15
  from .clock import Clock, RealClock
16
- from .credentials_provider import CredentialsStrategy, DefaultCredentials
16
+ from .credentials_provider import (CredentialsStrategy, DefaultCredentials,
17
+ OAuthCredentialsProvider)
17
18
  from .environments import (ALL_ENVS, AzureEnvironment, Cloud,
18
19
  DatabricksEnvironment, get_environment_for_hostname)
19
20
  from .oauth import (OidcEndpoints, Token, get_account_endpoints,
@@ -200,7 +201,19 @@ class Config:
200
201
  raise ValueError(message) from e
201
202
 
202
203
  def oauth_token(self) -> Token:
203
- return self._credentials_strategy.oauth_token(self)
204
+ """Returns the OAuth token from the current credential provider.
205
+
206
+ This method only works when using OAuth-based authentication methods.
207
+ If the current credential provider is an OAuthCredentialsProvider, it reuses
208
+ the existing provider. Otherwise, it raises a ValueError indicating that
209
+ OAuth tokens are not available for the current authentication method.
210
+ """
211
+ if isinstance(self._header_factory, OAuthCredentialsProvider):
212
+ return self._header_factory.oauth_token()
213
+ raise ValueError(
214
+ f"OAuth tokens are not available for {self.auth_type} authentication. "
215
+ f"Use an OAuth-based authentication method to access OAuth tokens."
216
+ )
204
217
 
205
218
  def wrap_debug_info(self, message: str) -> str:
206
219
  debug_string = self.debug_string()
@@ -32,6 +32,8 @@ class App:
32
32
  app_status: Optional[ApplicationStatus] = None
33
33
 
34
34
  budget_policy_id: Optional[str] = None
35
+ """TODO: Deprecate this field after serverless entitlements are released to all prod stages and the
36
+ new usage_policy_id is properly populated and used."""
35
37
 
36
38
  compute_status: Optional[ComputeStatus] = None
37
39
 
@@ -49,6 +51,8 @@ class App:
49
51
  """The description of the app."""
50
52
 
51
53
  effective_budget_policy_id: Optional[str] = None
54
+ """TODO: Deprecate this field after serverless entitlements are released to all prod stages and the
55
+ new usage_policy_id is properly populated and used."""
52
56
 
53
57
  effective_user_api_scopes: Optional[List[str]] = None
54
58
  """The effective api scopes granted to the user access token."""