databricks-sdk 0.56.0__py3-none-any.whl → 0.57.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.
- databricks/sdk/__init__.py +15 -9
- databricks/sdk/service/aibuilder.py +157 -16
- databricks/sdk/service/apps.py +14 -42
- databricks/sdk/service/billing.py +17 -51
- databricks/sdk/service/catalog.py +198 -399
- databricks/sdk/service/cleanrooms.py +11 -33
- databricks/sdk/service/compute.py +63 -189
- databricks/sdk/service/dashboards.py +21 -63
- databricks/sdk/service/database.py +45 -30
- databricks/sdk/service/files.py +18 -54
- databricks/sdk/service/iam.py +55 -165
- databricks/sdk/service/jobs.py +232 -85
- databricks/sdk/service/marketplace.py +46 -146
- databricks/sdk/service/ml.py +455 -216
- databricks/sdk/service/oauth2.py +17 -45
- databricks/sdk/service/pipelines.py +81 -40
- databricks/sdk/service/provisioning.py +30 -90
- databricks/sdk/service/qualitymonitorv2.py +5 -15
- databricks/sdk/service/serving.py +30 -42
- databricks/sdk/service/settings.py +103 -314
- databricks/sdk/service/sharing.py +30 -86
- databricks/sdk/service/sql.py +74 -184
- databricks/sdk/service/vectorsearch.py +13 -43
- databricks/sdk/service/workspace.py +35 -105
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/RECORD +31 -31
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/licenses/LICENSE +0 -0
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/licenses/NOTICE +0 -0
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/top_level.txt +0 -0
databricks/sdk/__init__.py
CHANGED
|
@@ -36,7 +36,7 @@ from databricks.sdk.service import sharing as pkg_sharing
|
|
|
36
36
|
from databricks.sdk.service import sql as pkg_sql
|
|
37
37
|
from databricks.sdk.service import vectorsearch as pkg_vectorsearch
|
|
38
38
|
from databricks.sdk.service import workspace as pkg_workspace
|
|
39
|
-
from databricks.sdk.service.aibuilder import
|
|
39
|
+
from databricks.sdk.service.aibuilder import AiBuilderAPI
|
|
40
40
|
from databricks.sdk.service.apps import AppsAPI
|
|
41
41
|
from databricks.sdk.service.billing import (BillableUsageAPI, BudgetPolicyAPI,
|
|
42
42
|
BudgetsAPI, LogDeliveryAPI,
|
|
@@ -87,8 +87,8 @@ from databricks.sdk.service.marketplace import (
|
|
|
87
87
|
ProviderExchangeFiltersAPI, ProviderExchangesAPI, ProviderFilesAPI,
|
|
88
88
|
ProviderListingsAPI, ProviderPersonalizationRequestsAPI,
|
|
89
89
|
ProviderProviderAnalyticsDashboardsAPI, ProviderProvidersAPI)
|
|
90
|
-
from databricks.sdk.service.ml import (ExperimentsAPI,
|
|
91
|
-
ModelRegistryAPI)
|
|
90
|
+
from databricks.sdk.service.ml import (ExperimentsAPI, FeatureStoreAPI,
|
|
91
|
+
ForecastingAPI, ModelRegistryAPI)
|
|
92
92
|
from databricks.sdk.service.oauth2 import (AccountFederationPolicyAPI,
|
|
93
93
|
CustomAppIntegrationAPI,
|
|
94
94
|
OAuthPublishedAppsAPI,
|
|
@@ -235,6 +235,7 @@ class WorkspaceClient:
|
|
|
235
235
|
serving_endpoints = ServingEndpointsExt(self._api_client)
|
|
236
236
|
self._access_control = pkg_iam.AccessControlAPI(self._api_client)
|
|
237
237
|
self._account_access_control_proxy = pkg_iam.AccountAccessControlProxyAPI(self._api_client)
|
|
238
|
+
self._ai_builder = pkg_aibuilder.AiBuilderAPI(self._api_client)
|
|
238
239
|
self._alerts = pkg_sql.AlertsAPI(self._api_client)
|
|
239
240
|
self._alerts_legacy = pkg_sql.AlertsLegacyAPI(self._api_client)
|
|
240
241
|
self._alerts_v2 = pkg_sql.AlertsV2API(self._api_client)
|
|
@@ -256,7 +257,6 @@ class WorkspaceClient:
|
|
|
256
257
|
self._credentials = pkg_catalog.CredentialsAPI(self._api_client)
|
|
257
258
|
self._credentials_manager = pkg_settings.CredentialsManagerAPI(self._api_client)
|
|
258
259
|
self._current_user = pkg_iam.CurrentUserAPI(self._api_client)
|
|
259
|
-
self._custom_llms = pkg_aibuilder.CustomLlmsAPI(self._api_client)
|
|
260
260
|
self._dashboard_widgets = pkg_sql.DashboardWidgetsAPI(self._api_client)
|
|
261
261
|
self._dashboards = pkg_sql.DashboardsAPI(self._api_client)
|
|
262
262
|
self._data_sources = pkg_sql.DataSourcesAPI(self._api_client)
|
|
@@ -265,6 +265,7 @@ class WorkspaceClient:
|
|
|
265
265
|
self._dbsql_permissions = pkg_sql.DbsqlPermissionsAPI(self._api_client)
|
|
266
266
|
self._experiments = pkg_ml.ExperimentsAPI(self._api_client)
|
|
267
267
|
self._external_locations = pkg_catalog.ExternalLocationsAPI(self._api_client)
|
|
268
|
+
self._feature_store = pkg_ml.FeatureStoreAPI(self._api_client)
|
|
268
269
|
self._files = _make_files_client(self._api_client, self._config)
|
|
269
270
|
self._functions = pkg_catalog.FunctionsAPI(self._api_client)
|
|
270
271
|
self._genie = pkg_dashboards.GenieAPI(self._api_client)
|
|
@@ -366,6 +367,11 @@ class WorkspaceClient:
|
|
|
366
367
|
"""These APIs manage access rules on resources in an account."""
|
|
367
368
|
return self._account_access_control_proxy
|
|
368
369
|
|
|
370
|
+
@property
|
|
371
|
+
def ai_builder(self) -> pkg_aibuilder.AiBuilderAPI:
|
|
372
|
+
"""The Custom LLMs service manages state and powers the UI for the Custom LLM product."""
|
|
373
|
+
return self._ai_builder
|
|
374
|
+
|
|
369
375
|
@property
|
|
370
376
|
def alerts(self) -> pkg_sql.AlertsAPI:
|
|
371
377
|
"""The alerts API can be used to perform CRUD operations on alerts."""
|
|
@@ -471,11 +477,6 @@ class WorkspaceClient:
|
|
|
471
477
|
"""This API allows retrieving information about currently authenticated user or service principal."""
|
|
472
478
|
return self._current_user
|
|
473
479
|
|
|
474
|
-
@property
|
|
475
|
-
def custom_llms(self) -> pkg_aibuilder.CustomLlmsAPI:
|
|
476
|
-
"""The Custom LLMs service manages state and powers the UI for the Custom LLM product."""
|
|
477
|
-
return self._custom_llms
|
|
478
|
-
|
|
479
480
|
@property
|
|
480
481
|
def dashboard_widgets(self) -> pkg_sql.DashboardWidgetsAPI:
|
|
481
482
|
"""This is an evolving API that facilitates the addition and removal of widgets from existing dashboards within the Databricks Workspace."""
|
|
@@ -516,6 +517,11 @@ class WorkspaceClient:
|
|
|
516
517
|
"""An external location is an object that combines a cloud storage path with a storage credential that authorizes access to the cloud storage path."""
|
|
517
518
|
return self._external_locations
|
|
518
519
|
|
|
520
|
+
@property
|
|
521
|
+
def feature_store(self) -> pkg_ml.FeatureStoreAPI:
|
|
522
|
+
"""A feature store is a centralized repository that enables data scientists to find and share features."""
|
|
523
|
+
return self._feature_store
|
|
524
|
+
|
|
519
525
|
@property
|
|
520
526
|
def files(self) -> pkg_files.FilesAPI:
|
|
521
527
|
"""The Files API is a standard HTTP API that allows you to read, write, list, and delete files and directories by referring to their URI."""
|
|
@@ -21,23 +21,85 @@ class CancelCustomLlmOptimizationRunRequest:
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
@dataclass
|
|
24
|
-
class
|
|
24
|
+
class CancelOptimizeResponse:
|
|
25
25
|
def as_dict(self) -> dict:
|
|
26
|
-
"""Serializes the
|
|
26
|
+
"""Serializes the CancelOptimizeResponse into a dictionary suitable for use as a JSON request body."""
|
|
27
27
|
body = {}
|
|
28
28
|
return body
|
|
29
29
|
|
|
30
30
|
def as_shallow_dict(self) -> dict:
|
|
31
|
-
"""Serializes the
|
|
31
|
+
"""Serializes the CancelOptimizeResponse into a shallow dictionary of its immediate attributes."""
|
|
32
32
|
body = {}
|
|
33
33
|
return body
|
|
34
34
|
|
|
35
35
|
@classmethod
|
|
36
|
-
def from_dict(cls, d: Dict[str, Any]) ->
|
|
37
|
-
"""Deserializes the
|
|
36
|
+
def from_dict(cls, d: Dict[str, Any]) -> CancelOptimizeResponse:
|
|
37
|
+
"""Deserializes the CancelOptimizeResponse from a dictionary."""
|
|
38
38
|
return cls()
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
@dataclass
|
|
42
|
+
class CreateCustomLlmRequest:
|
|
43
|
+
name: str
|
|
44
|
+
"""Name of the custom LLM. Only alphanumeric characters and dashes allowed."""
|
|
45
|
+
|
|
46
|
+
instructions: str
|
|
47
|
+
"""Instructions for the custom LLM to follow"""
|
|
48
|
+
|
|
49
|
+
agent_artifact_path: Optional[str] = None
|
|
50
|
+
"""Optional: UC path for agent artifacts. If you are using a dataset that you only have read
|
|
51
|
+
permissions, please provide a destination path where you have write permissions. Please provide
|
|
52
|
+
this in catalog.schema format."""
|
|
53
|
+
|
|
54
|
+
datasets: Optional[List[Dataset]] = None
|
|
55
|
+
"""Datasets used for training and evaluating the model, not for inference. Currently, only 1
|
|
56
|
+
dataset is accepted."""
|
|
57
|
+
|
|
58
|
+
guidelines: Optional[List[str]] = None
|
|
59
|
+
"""Guidelines for the custom LLM to adhere to"""
|
|
60
|
+
|
|
61
|
+
def as_dict(self) -> dict:
|
|
62
|
+
"""Serializes the CreateCustomLlmRequest into a dictionary suitable for use as a JSON request body."""
|
|
63
|
+
body = {}
|
|
64
|
+
if self.agent_artifact_path is not None:
|
|
65
|
+
body["agent_artifact_path"] = self.agent_artifact_path
|
|
66
|
+
if self.datasets:
|
|
67
|
+
body["datasets"] = [v.as_dict() for v in self.datasets]
|
|
68
|
+
if self.guidelines:
|
|
69
|
+
body["guidelines"] = [v for v in self.guidelines]
|
|
70
|
+
if self.instructions is not None:
|
|
71
|
+
body["instructions"] = self.instructions
|
|
72
|
+
if self.name is not None:
|
|
73
|
+
body["name"] = self.name
|
|
74
|
+
return body
|
|
75
|
+
|
|
76
|
+
def as_shallow_dict(self) -> dict:
|
|
77
|
+
"""Serializes the CreateCustomLlmRequest into a shallow dictionary of its immediate attributes."""
|
|
78
|
+
body = {}
|
|
79
|
+
if self.agent_artifact_path is not None:
|
|
80
|
+
body["agent_artifact_path"] = self.agent_artifact_path
|
|
81
|
+
if self.datasets:
|
|
82
|
+
body["datasets"] = self.datasets
|
|
83
|
+
if self.guidelines:
|
|
84
|
+
body["guidelines"] = self.guidelines
|
|
85
|
+
if self.instructions is not None:
|
|
86
|
+
body["instructions"] = self.instructions
|
|
87
|
+
if self.name is not None:
|
|
88
|
+
body["name"] = self.name
|
|
89
|
+
return body
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def from_dict(cls, d: Dict[str, Any]) -> CreateCustomLlmRequest:
|
|
93
|
+
"""Deserializes the CreateCustomLlmRequest from a dictionary."""
|
|
94
|
+
return cls(
|
|
95
|
+
agent_artifact_path=d.get("agent_artifact_path", None),
|
|
96
|
+
datasets=_repeated_dict(d, "datasets", Dataset),
|
|
97
|
+
guidelines=d.get("guidelines", None),
|
|
98
|
+
instructions=d.get("instructions", None),
|
|
99
|
+
name=d.get("name", None),
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
|
|
41
103
|
@dataclass
|
|
42
104
|
class CustomLlm:
|
|
43
105
|
name: str
|
|
@@ -159,6 +221,24 @@ class Dataset:
|
|
|
159
221
|
return cls(table=_from_dict(d, "table", Table))
|
|
160
222
|
|
|
161
223
|
|
|
224
|
+
@dataclass
|
|
225
|
+
class DeleteCustomLlmResponse:
|
|
226
|
+
def as_dict(self) -> dict:
|
|
227
|
+
"""Serializes the DeleteCustomLlmResponse into a dictionary suitable for use as a JSON request body."""
|
|
228
|
+
body = {}
|
|
229
|
+
return body
|
|
230
|
+
|
|
231
|
+
def as_shallow_dict(self) -> dict:
|
|
232
|
+
"""Serializes the DeleteCustomLlmResponse into a shallow dictionary of its immediate attributes."""
|
|
233
|
+
body = {}
|
|
234
|
+
return body
|
|
235
|
+
|
|
236
|
+
@classmethod
|
|
237
|
+
def from_dict(cls, d: Dict[str, Any]) -> DeleteCustomLlmResponse:
|
|
238
|
+
"""Deserializes the DeleteCustomLlmResponse from a dictionary."""
|
|
239
|
+
return cls()
|
|
240
|
+
|
|
241
|
+
|
|
162
242
|
@dataclass
|
|
163
243
|
class StartCustomLlmOptimizationRunRequest:
|
|
164
244
|
id: Optional[str] = None
|
|
@@ -273,13 +353,13 @@ class UpdateCustomLlmRequest:
|
|
|
273
353
|
)
|
|
274
354
|
|
|
275
355
|
|
|
276
|
-
class
|
|
356
|
+
class AiBuilderAPI:
|
|
277
357
|
"""The Custom LLMs service manages state and powers the UI for the Custom LLM product."""
|
|
278
358
|
|
|
279
359
|
def __init__(self, api_client):
|
|
280
360
|
self._api = api_client
|
|
281
361
|
|
|
282
|
-
def
|
|
362
|
+
def cancel_optimize(self, id: str):
|
|
283
363
|
"""Cancel a Custom LLM Optimization Run.
|
|
284
364
|
|
|
285
365
|
:param id: str
|
|
@@ -294,24 +374,68 @@ class CustomLlmsAPI:
|
|
|
294
374
|
|
|
295
375
|
self._api.do("POST", f"/api/2.0/custom-llms/{id}/optimize/cancel", headers=headers)
|
|
296
376
|
|
|
297
|
-
def
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
:
|
|
301
|
-
|
|
377
|
+
def create_custom_llm(
|
|
378
|
+
self,
|
|
379
|
+
name: str,
|
|
380
|
+
instructions: str,
|
|
381
|
+
*,
|
|
382
|
+
agent_artifact_path: Optional[str] = None,
|
|
383
|
+
datasets: Optional[List[Dataset]] = None,
|
|
384
|
+
guidelines: Optional[List[str]] = None,
|
|
385
|
+
) -> CustomLlm:
|
|
386
|
+
"""Create a Custom LLM.
|
|
387
|
+
|
|
388
|
+
:param name: str
|
|
389
|
+
Name of the custom LLM. Only alphanumeric characters and dashes allowed.
|
|
390
|
+
:param instructions: str
|
|
391
|
+
Instructions for the custom LLM to follow
|
|
392
|
+
:param agent_artifact_path: str (optional)
|
|
393
|
+
Optional: UC path for agent artifacts. If you are using a dataset that you only have read
|
|
394
|
+
permissions, please provide a destination path where you have write permissions. Please provide this
|
|
395
|
+
in catalog.schema format.
|
|
396
|
+
:param datasets: List[:class:`Dataset`] (optional)
|
|
397
|
+
Datasets used for training and evaluating the model, not for inference. Currently, only 1 dataset is
|
|
398
|
+
accepted.
|
|
399
|
+
:param guidelines: List[str] (optional)
|
|
400
|
+
Guidelines for the custom LLM to adhere to
|
|
302
401
|
|
|
303
402
|
:returns: :class:`CustomLlm`
|
|
304
403
|
"""
|
|
305
|
-
|
|
404
|
+
body = {}
|
|
405
|
+
if agent_artifact_path is not None:
|
|
406
|
+
body["agent_artifact_path"] = agent_artifact_path
|
|
407
|
+
if datasets is not None:
|
|
408
|
+
body["datasets"] = [v.as_dict() for v in datasets]
|
|
409
|
+
if guidelines is not None:
|
|
410
|
+
body["guidelines"] = [v for v in guidelines]
|
|
411
|
+
if instructions is not None:
|
|
412
|
+
body["instructions"] = instructions
|
|
413
|
+
if name is not None:
|
|
414
|
+
body["name"] = name
|
|
306
415
|
headers = {
|
|
307
416
|
"Accept": "application/json",
|
|
308
417
|
"Content-Type": "application/json",
|
|
309
418
|
}
|
|
310
419
|
|
|
311
|
-
res = self._api.do("POST",
|
|
420
|
+
res = self._api.do("POST", "/api/2.0/custom-llms", body=body, headers=headers)
|
|
312
421
|
return CustomLlm.from_dict(res)
|
|
313
422
|
|
|
314
|
-
def
|
|
423
|
+
def delete_custom_llm(self, id: str):
|
|
424
|
+
"""Delete a Custom LLM.
|
|
425
|
+
|
|
426
|
+
:param id: str
|
|
427
|
+
The id of the custom llm
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
"""
|
|
431
|
+
|
|
432
|
+
headers = {
|
|
433
|
+
"Accept": "application/json",
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
self._api.do("DELETE", f"/api/2.0/custom-lms/{id}", headers=headers)
|
|
437
|
+
|
|
438
|
+
def get_custom_llm(self, id: str) -> CustomLlm:
|
|
315
439
|
"""Get a Custom LLM.
|
|
316
440
|
|
|
317
441
|
:param id: str
|
|
@@ -327,7 +451,24 @@ class CustomLlmsAPI:
|
|
|
327
451
|
res = self._api.do("GET", f"/api/2.0/custom-llms/{id}", headers=headers)
|
|
328
452
|
return CustomLlm.from_dict(res)
|
|
329
453
|
|
|
330
|
-
def
|
|
454
|
+
def start_optimize(self, id: str) -> CustomLlm:
|
|
455
|
+
"""Start a Custom LLM Optimization Run.
|
|
456
|
+
|
|
457
|
+
:param id: str
|
|
458
|
+
The Id of the tile.
|
|
459
|
+
|
|
460
|
+
:returns: :class:`CustomLlm`
|
|
461
|
+
"""
|
|
462
|
+
|
|
463
|
+
headers = {
|
|
464
|
+
"Accept": "application/json",
|
|
465
|
+
"Content-Type": "application/json",
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
res = self._api.do("POST", f"/api/2.0/custom-llms/{id}/optimize", headers=headers)
|
|
469
|
+
return CustomLlm.from_dict(res)
|
|
470
|
+
|
|
471
|
+
def update_custom_llm(self, id: str, custom_llm: CustomLlm, update_mask: str) -> CustomLlm:
|
|
331
472
|
"""Update a Custom LLM.
|
|
332
473
|
|
|
333
474
|
:param id: str
|
databricks/sdk/service/apps.py
CHANGED
|
@@ -1232,9 +1232,7 @@ class AppsAPI:
|
|
|
1232
1232
|
raise TimeoutError(f"timed out after {timeout}: {status_message}")
|
|
1233
1233
|
|
|
1234
1234
|
def create(self, app: App, *, no_compute: Optional[bool] = None) -> Wait[App]:
|
|
1235
|
-
"""
|
|
1236
|
-
|
|
1237
|
-
Creates a new app.
|
|
1235
|
+
"""Creates a new app.
|
|
1238
1236
|
|
|
1239
1237
|
:param app: :class:`App`
|
|
1240
1238
|
:param no_compute: bool (optional)
|
|
@@ -1260,9 +1258,7 @@ class AppsAPI:
|
|
|
1260
1258
|
return self.create(app=app, no_compute=no_compute).result(timeout=timeout)
|
|
1261
1259
|
|
|
1262
1260
|
def delete(self, name: str) -> App:
|
|
1263
|
-
"""
|
|
1264
|
-
|
|
1265
|
-
Deletes an app.
|
|
1261
|
+
"""Deletes an app.
|
|
1266
1262
|
|
|
1267
1263
|
:param name: str
|
|
1268
1264
|
The name of the app.
|
|
@@ -1278,9 +1274,7 @@ class AppsAPI:
|
|
|
1278
1274
|
return App.from_dict(res)
|
|
1279
1275
|
|
|
1280
1276
|
def deploy(self, app_name: str, app_deployment: AppDeployment) -> Wait[AppDeployment]:
|
|
1281
|
-
"""
|
|
1282
|
-
|
|
1283
|
-
Creates an app deployment for the app with the supplied name.
|
|
1277
|
+
"""Creates an app deployment for the app with the supplied name.
|
|
1284
1278
|
|
|
1285
1279
|
:param app_name: str
|
|
1286
1280
|
The name of the app.
|
|
@@ -1310,9 +1304,7 @@ class AppsAPI:
|
|
|
1310
1304
|
return self.deploy(app_deployment=app_deployment, app_name=app_name).result(timeout=timeout)
|
|
1311
1305
|
|
|
1312
1306
|
def get(self, name: str) -> App:
|
|
1313
|
-
"""
|
|
1314
|
-
|
|
1315
|
-
Retrieves information for the app with the supplied name.
|
|
1307
|
+
"""Retrieves information for the app with the supplied name.
|
|
1316
1308
|
|
|
1317
1309
|
:param name: str
|
|
1318
1310
|
The name of the app.
|
|
@@ -1328,9 +1320,7 @@ class AppsAPI:
|
|
|
1328
1320
|
return App.from_dict(res)
|
|
1329
1321
|
|
|
1330
1322
|
def get_deployment(self, app_name: str, deployment_id: str) -> AppDeployment:
|
|
1331
|
-
"""
|
|
1332
|
-
|
|
1333
|
-
Retrieves information for the app deployment with the supplied name and deployment id.
|
|
1323
|
+
"""Retrieves information for the app deployment with the supplied name and deployment id.
|
|
1334
1324
|
|
|
1335
1325
|
:param app_name: str
|
|
1336
1326
|
The name of the app.
|
|
@@ -1348,9 +1338,7 @@ class AppsAPI:
|
|
|
1348
1338
|
return AppDeployment.from_dict(res)
|
|
1349
1339
|
|
|
1350
1340
|
def get_permission_levels(self, app_name: str) -> GetAppPermissionLevelsResponse:
|
|
1351
|
-
"""
|
|
1352
|
-
|
|
1353
|
-
Gets the permission levels that a user can have on an object.
|
|
1341
|
+
"""Gets the permission levels that a user can have on an object.
|
|
1354
1342
|
|
|
1355
1343
|
:param app_name: str
|
|
1356
1344
|
The app for which to get or manage permissions.
|
|
@@ -1366,9 +1354,7 @@ class AppsAPI:
|
|
|
1366
1354
|
return GetAppPermissionLevelsResponse.from_dict(res)
|
|
1367
1355
|
|
|
1368
1356
|
def get_permissions(self, app_name: str) -> AppPermissions:
|
|
1369
|
-
"""
|
|
1370
|
-
|
|
1371
|
-
Gets the permissions of an app. Apps can inherit permissions from their root object.
|
|
1357
|
+
"""Gets the permissions of an app. Apps can inherit permissions from their root object.
|
|
1372
1358
|
|
|
1373
1359
|
:param app_name: str
|
|
1374
1360
|
The app for which to get or manage permissions.
|
|
@@ -1384,9 +1370,7 @@ class AppsAPI:
|
|
|
1384
1370
|
return AppPermissions.from_dict(res)
|
|
1385
1371
|
|
|
1386
1372
|
def list(self, *, page_size: Optional[int] = None, page_token: Optional[str] = None) -> Iterator[App]:
|
|
1387
|
-
"""
|
|
1388
|
-
|
|
1389
|
-
Lists all apps in the workspace.
|
|
1373
|
+
"""Lists all apps in the workspace.
|
|
1390
1374
|
|
|
1391
1375
|
:param page_size: int (optional)
|
|
1392
1376
|
Upper bound for items returned.
|
|
@@ -1417,9 +1401,7 @@ class AppsAPI:
|
|
|
1417
1401
|
def list_deployments(
|
|
1418
1402
|
self, app_name: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None
|
|
1419
1403
|
) -> Iterator[AppDeployment]:
|
|
1420
|
-
"""
|
|
1421
|
-
|
|
1422
|
-
Lists all app deployments for the app with the supplied name.
|
|
1404
|
+
"""Lists all app deployments for the app with the supplied name.
|
|
1423
1405
|
|
|
1424
1406
|
:param app_name: str
|
|
1425
1407
|
The name of the app.
|
|
@@ -1452,9 +1434,7 @@ class AppsAPI:
|
|
|
1452
1434
|
def set_permissions(
|
|
1453
1435
|
self, app_name: str, *, access_control_list: Optional[List[AppAccessControlRequest]] = None
|
|
1454
1436
|
) -> AppPermissions:
|
|
1455
|
-
"""
|
|
1456
|
-
|
|
1457
|
-
Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
|
|
1437
|
+
"""Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
|
|
1458
1438
|
permissions if none are specified. Objects can inherit permissions from their root object.
|
|
1459
1439
|
|
|
1460
1440
|
:param app_name: str
|
|
@@ -1475,9 +1455,7 @@ class AppsAPI:
|
|
|
1475
1455
|
return AppPermissions.from_dict(res)
|
|
1476
1456
|
|
|
1477
1457
|
def start(self, name: str) -> Wait[App]:
|
|
1478
|
-
"""Start
|
|
1479
|
-
|
|
1480
|
-
Start the last active deployment of the app in the workspace.
|
|
1458
|
+
"""Start the last active deployment of the app in the workspace.
|
|
1481
1459
|
|
|
1482
1460
|
:param name: str
|
|
1483
1461
|
The name of the app.
|
|
@@ -1499,9 +1477,7 @@ class AppsAPI:
|
|
|
1499
1477
|
return self.start(name=name).result(timeout=timeout)
|
|
1500
1478
|
|
|
1501
1479
|
def stop(self, name: str) -> Wait[App]:
|
|
1502
|
-
"""
|
|
1503
|
-
|
|
1504
|
-
Stops the active deployment of the app in the workspace.
|
|
1480
|
+
"""Stops the active deployment of the app in the workspace.
|
|
1505
1481
|
|
|
1506
1482
|
:param name: str
|
|
1507
1483
|
The name of the app.
|
|
@@ -1523,9 +1499,7 @@ class AppsAPI:
|
|
|
1523
1499
|
return self.stop(name=name).result(timeout=timeout)
|
|
1524
1500
|
|
|
1525
1501
|
def update(self, name: str, app: App) -> App:
|
|
1526
|
-
"""
|
|
1527
|
-
|
|
1528
|
-
Updates the app with the supplied name.
|
|
1502
|
+
"""Updates the app with the supplied name.
|
|
1529
1503
|
|
|
1530
1504
|
:param name: str
|
|
1531
1505
|
The name of the app. The name must contain only lowercase alphanumeric characters and hyphens. It
|
|
@@ -1546,9 +1520,7 @@ class AppsAPI:
|
|
|
1546
1520
|
def update_permissions(
|
|
1547
1521
|
self, app_name: str, *, access_control_list: Optional[List[AppAccessControlRequest]] = None
|
|
1548
1522
|
) -> AppPermissions:
|
|
1549
|
-
"""
|
|
1550
|
-
|
|
1551
|
-
Updates the permissions on an app. Apps can inherit permissions from their root object.
|
|
1523
|
+
"""Updates the permissions on an app. Apps can inherit permissions from their root object.
|
|
1552
1524
|
|
|
1553
1525
|
:param app_name: str
|
|
1554
1526
|
The app for which to get or manage permissions.
|
|
@@ -1719,9 +1719,7 @@ class BillableUsageAPI:
|
|
|
1719
1719
|
self._api = api_client
|
|
1720
1720
|
|
|
1721
1721
|
def download(self, start_month: str, end_month: str, *, personal_data: Optional[bool] = None) -> DownloadResponse:
|
|
1722
|
-
"""
|
|
1723
|
-
|
|
1724
|
-
Returns billable usage logs in CSV format for the specified account and date range. For the data
|
|
1722
|
+
"""Returns billable usage logs in CSV format for the specified account and date range. For the data
|
|
1725
1723
|
schema, see [CSV file schema]. Note that this method might take multiple minutes to complete.
|
|
1726
1724
|
|
|
1727
1725
|
**Warning**: Depending on the queried date range, the number of workspaces in the account, the size of
|
|
@@ -1766,9 +1764,7 @@ class BudgetPolicyAPI:
|
|
|
1766
1764
|
self._api = api_client
|
|
1767
1765
|
|
|
1768
1766
|
def create(self, *, policy: Optional[BudgetPolicy] = None, request_id: Optional[str] = None) -> BudgetPolicy:
|
|
1769
|
-
"""
|
|
1770
|
-
|
|
1771
|
-
Creates a new policy.
|
|
1767
|
+
"""Creates a new policy.
|
|
1772
1768
|
|
|
1773
1769
|
:param policy: :class:`BudgetPolicy` (optional)
|
|
1774
1770
|
The policy to create. `policy_id` needs to be empty as it will be generated `policy_name` must be
|
|
@@ -1796,9 +1792,7 @@ class BudgetPolicyAPI:
|
|
|
1796
1792
|
return BudgetPolicy.from_dict(res)
|
|
1797
1793
|
|
|
1798
1794
|
def delete(self, policy_id: str):
|
|
1799
|
-
"""
|
|
1800
|
-
|
|
1801
|
-
Deletes a policy
|
|
1795
|
+
"""Deletes a policy
|
|
1802
1796
|
|
|
1803
1797
|
:param policy_id: str
|
|
1804
1798
|
The Id of the policy.
|
|
@@ -1813,9 +1807,7 @@ class BudgetPolicyAPI:
|
|
|
1813
1807
|
self._api.do("DELETE", f"/api/2.1/accounts/{self._api.account_id}/budget-policies/{policy_id}", headers=headers)
|
|
1814
1808
|
|
|
1815
1809
|
def get(self, policy_id: str) -> BudgetPolicy:
|
|
1816
|
-
"""
|
|
1817
|
-
|
|
1818
|
-
Retrieves a policy by it's ID.
|
|
1810
|
+
"""Retrieves a policy by it's ID.
|
|
1819
1811
|
|
|
1820
1812
|
:param policy_id: str
|
|
1821
1813
|
The Id of the policy.
|
|
@@ -1840,9 +1832,7 @@ class BudgetPolicyAPI:
|
|
|
1840
1832
|
page_token: Optional[str] = None,
|
|
1841
1833
|
sort_spec: Optional[SortSpec] = None,
|
|
1842
1834
|
) -> Iterator[BudgetPolicy]:
|
|
1843
|
-
"""
|
|
1844
|
-
|
|
1845
|
-
Lists all policies. Policies are returned in the alphabetically ascending order of their names.
|
|
1835
|
+
"""Lists all policies. Policies are returned in the alphabetically ascending order of their names.
|
|
1846
1836
|
|
|
1847
1837
|
:param filter_by: :class:`Filter` (optional)
|
|
1848
1838
|
A filter to apply to the list of policies.
|
|
@@ -1888,9 +1878,7 @@ class BudgetPolicyAPI:
|
|
|
1888
1878
|
def update(
|
|
1889
1879
|
self, policy_id: str, policy: BudgetPolicy, *, limit_config: Optional[LimitConfig] = None
|
|
1890
1880
|
) -> BudgetPolicy:
|
|
1891
|
-
"""
|
|
1892
|
-
|
|
1893
|
-
Updates a policy
|
|
1881
|
+
"""Updates a policy
|
|
1894
1882
|
|
|
1895
1883
|
:param policy_id: str
|
|
1896
1884
|
The Id of the policy. This field is generated by Databricks and globally unique.
|
|
@@ -1929,9 +1917,7 @@ class BudgetsAPI:
|
|
|
1929
1917
|
self._api = api_client
|
|
1930
1918
|
|
|
1931
1919
|
def create(self, budget: CreateBudgetConfigurationBudget) -> CreateBudgetConfigurationResponse:
|
|
1932
|
-
"""Create new budget.
|
|
1933
|
-
|
|
1934
|
-
Create a new budget configuration for an account. For full details, see
|
|
1920
|
+
"""Create a new budget configuration for an account. For full details, see
|
|
1935
1921
|
https://docs.databricks.com/en/admin/account-settings/budgets.html.
|
|
1936
1922
|
|
|
1937
1923
|
:param budget: :class:`CreateBudgetConfigurationBudget`
|
|
@@ -1951,9 +1937,7 @@ class BudgetsAPI:
|
|
|
1951
1937
|
return CreateBudgetConfigurationResponse.from_dict(res)
|
|
1952
1938
|
|
|
1953
1939
|
def delete(self, budget_id: str):
|
|
1954
|
-
"""
|
|
1955
|
-
|
|
1956
|
-
Deletes a budget configuration for an account. Both account and budget configuration are specified by
|
|
1940
|
+
"""Deletes a budget configuration for an account. Both account and budget configuration are specified by
|
|
1957
1941
|
ID. This cannot be undone.
|
|
1958
1942
|
|
|
1959
1943
|
:param budget_id: str
|
|
@@ -1969,9 +1953,7 @@ class BudgetsAPI:
|
|
|
1969
1953
|
self._api.do("DELETE", f"/api/2.1/accounts/{self._api.account_id}/budgets/{budget_id}", headers=headers)
|
|
1970
1954
|
|
|
1971
1955
|
def get(self, budget_id: str) -> GetBudgetConfigurationResponse:
|
|
1972
|
-
"""
|
|
1973
|
-
|
|
1974
|
-
Gets a budget configuration for an account. Both account and budget configuration are specified by ID.
|
|
1956
|
+
"""Gets a budget configuration for an account. Both account and budget configuration are specified by ID.
|
|
1975
1957
|
|
|
1976
1958
|
:param budget_id: str
|
|
1977
1959
|
The budget configuration ID
|
|
@@ -1987,9 +1969,7 @@ class BudgetsAPI:
|
|
|
1987
1969
|
return GetBudgetConfigurationResponse.from_dict(res)
|
|
1988
1970
|
|
|
1989
1971
|
def list(self, *, page_token: Optional[str] = None) -> Iterator[BudgetConfiguration]:
|
|
1990
|
-
"""
|
|
1991
|
-
|
|
1992
|
-
Gets all budgets associated with this account.
|
|
1972
|
+
"""Gets all budgets associated with this account.
|
|
1993
1973
|
|
|
1994
1974
|
:param page_token: str (optional)
|
|
1995
1975
|
A page token received from a previous get all budget configurations call. This token can be used to
|
|
@@ -2017,9 +1997,7 @@ class BudgetsAPI:
|
|
|
2017
1997
|
query["page_token"] = json["next_page_token"]
|
|
2018
1998
|
|
|
2019
1999
|
def update(self, budget_id: str, budget: UpdateBudgetConfigurationBudget) -> UpdateBudgetConfigurationResponse:
|
|
2020
|
-
"""
|
|
2021
|
-
|
|
2022
|
-
Updates a budget configuration for an account. Both account and budget configuration are specified by
|
|
2000
|
+
"""Updates a budget configuration for an account. Both account and budget configuration are specified by
|
|
2023
2001
|
ID.
|
|
2024
2002
|
|
|
2025
2003
|
:param budget_id: str
|
|
@@ -2053,9 +2031,7 @@ class LogDeliveryAPI:
|
|
|
2053
2031
|
def create(
|
|
2054
2032
|
self, log_delivery_configuration: CreateLogDeliveryConfigurationParams
|
|
2055
2033
|
) -> WrappedLogDeliveryConfiguration:
|
|
2056
|
-
"""
|
|
2057
|
-
|
|
2058
|
-
Creates a new Databricks log delivery configuration to enable delivery of the specified type of logs
|
|
2034
|
+
"""Creates a new Databricks log delivery configuration to enable delivery of the specified type of logs
|
|
2059
2035
|
to your storage location. This requires that you already created a [credential
|
|
2060
2036
|
object](:method:Credentials/Create) (which encapsulates a cross-account service IAM role) and a
|
|
2061
2037
|
[storage configuration object](:method:Storage/Create) (which encapsulates an S3 bucket).
|
|
@@ -2093,9 +2069,7 @@ class LogDeliveryAPI:
|
|
|
2093
2069
|
return WrappedLogDeliveryConfiguration.from_dict(res)
|
|
2094
2070
|
|
|
2095
2071
|
def get(self, log_delivery_configuration_id: str) -> GetLogDeliveryConfigurationResponse:
|
|
2096
|
-
"""
|
|
2097
|
-
|
|
2098
|
-
Gets a Databricks log delivery configuration object for an account, both specified by ID.
|
|
2072
|
+
"""Gets a Databricks log delivery configuration object for an account, both specified by ID.
|
|
2099
2073
|
|
|
2100
2074
|
:param log_delivery_configuration_id: str
|
|
2101
2075
|
The log delivery configuration id of customer
|
|
@@ -2122,9 +2096,7 @@ class LogDeliveryAPI:
|
|
|
2122
2096
|
status: Optional[LogDeliveryConfigStatus] = None,
|
|
2123
2097
|
storage_configuration_id: Optional[str] = None,
|
|
2124
2098
|
) -> Iterator[LogDeliveryConfiguration]:
|
|
2125
|
-
"""
|
|
2126
|
-
|
|
2127
|
-
Gets all Databricks log delivery configurations associated with an account specified by ID.
|
|
2099
|
+
"""Gets all Databricks log delivery configurations associated with an account specified by ID.
|
|
2128
2100
|
|
|
2129
2101
|
:param credentials_id: str (optional)
|
|
2130
2102
|
The Credentials id to filter the search results with
|
|
@@ -2164,9 +2136,7 @@ class LogDeliveryAPI:
|
|
|
2164
2136
|
query["page_token"] = json["next_page_token"]
|
|
2165
2137
|
|
|
2166
2138
|
def patch_status(self, log_delivery_configuration_id: str, status: LogDeliveryConfigStatus):
|
|
2167
|
-
"""
|
|
2168
|
-
|
|
2169
|
-
Enables or disables a log delivery configuration. Deletion of delivery configurations is not
|
|
2139
|
+
"""Enables or disables a log delivery configuration. Deletion of delivery configurations is not
|
|
2170
2140
|
supported, so disable log delivery configurations that are no longer needed. Note that you can't
|
|
2171
2141
|
re-enable a delivery configuration if this would violate the delivery configuration limits described
|
|
2172
2142
|
under [Create log delivery](:method:LogDelivery/Create).
|
|
@@ -2208,9 +2178,7 @@ class UsageDashboardsAPI:
|
|
|
2208
2178
|
def create(
|
|
2209
2179
|
self, *, dashboard_type: Optional[UsageDashboardType] = None, workspace_id: Optional[int] = None
|
|
2210
2180
|
) -> CreateBillingUsageDashboardResponse:
|
|
2211
|
-
"""Create
|
|
2212
|
-
|
|
2213
|
-
Create a usage dashboard specified by workspaceId, accountId, and dashboard type.
|
|
2181
|
+
"""Create a usage dashboard specified by workspaceId, accountId, and dashboard type.
|
|
2214
2182
|
|
|
2215
2183
|
:param dashboard_type: :class:`UsageDashboardType` (optional)
|
|
2216
2184
|
Workspace level usage dashboard shows usage data for the specified workspace ID. Global level usage
|
|
@@ -2236,9 +2204,7 @@ class UsageDashboardsAPI:
|
|
|
2236
2204
|
def get(
|
|
2237
2205
|
self, *, dashboard_type: Optional[UsageDashboardType] = None, workspace_id: Optional[int] = None
|
|
2238
2206
|
) -> GetBillingUsageDashboardResponse:
|
|
2239
|
-
"""Get usage dashboard.
|
|
2240
|
-
|
|
2241
|
-
Get a usage dashboard specified by workspaceId, accountId, and dashboard type.
|
|
2207
|
+
"""Get a usage dashboard specified by workspaceId, accountId, and dashboard type.
|
|
2242
2208
|
|
|
2243
2209
|
:param dashboard_type: :class:`UsageDashboardType` (optional)
|
|
2244
2210
|
Workspace level usage dashboard shows usage data for the specified workspace ID. Global level usage
|