databricks-sdk 0.56.0__py3-none-any.whl → 0.58.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 +38 -11
- databricks/sdk/service/aibuilder.py +122 -17
- databricks/sdk/service/apps.py +15 -45
- databricks/sdk/service/billing.py +70 -74
- databricks/sdk/service/catalog.py +1898 -557
- databricks/sdk/service/cleanrooms.py +14 -55
- databricks/sdk/service/compute.py +305 -508
- databricks/sdk/service/dashboards.py +148 -223
- databricks/sdk/service/database.py +657 -127
- databricks/sdk/service/files.py +18 -54
- databricks/sdk/service/iam.py +55 -165
- databricks/sdk/service/jobs.py +238 -214
- databricks/sdk/service/marketplace.py +47 -146
- databricks/sdk/service/ml.py +1137 -447
- databricks/sdk/service/oauth2.py +17 -46
- databricks/sdk/service/pipelines.py +93 -69
- databricks/sdk/service/provisioning.py +34 -212
- databricks/sdk/service/qualitymonitorv2.py +5 -33
- databricks/sdk/service/serving.py +69 -55
- databricks/sdk/service/settings.py +106 -434
- databricks/sdk/service/sharing.py +33 -95
- databricks/sdk/service/sql.py +164 -254
- databricks/sdk/service/vectorsearch.py +13 -62
- databricks/sdk/service/workspace.py +36 -110
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/RECORD +31 -31
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/licenses/LICENSE +0 -0
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/licenses/NOTICE +0 -0
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.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,
|
|
@@ -46,7 +46,9 @@ from databricks.sdk.service.catalog import (AccountMetastoreAssignmentsAPI,
|
|
|
46
46
|
AccountStorageCredentialsAPI,
|
|
47
47
|
ArtifactAllowlistsAPI, CatalogsAPI,
|
|
48
48
|
ConnectionsAPI, CredentialsAPI,
|
|
49
|
-
|
|
49
|
+
ExternalLineageAPI,
|
|
50
|
+
ExternalLocationsAPI,
|
|
51
|
+
ExternalMetadataAPI, FunctionsAPI,
|
|
50
52
|
GrantsAPI, MetastoresAPI,
|
|
51
53
|
ModelVersionsAPI, OnlineTablesAPI,
|
|
52
54
|
QualityMonitorsAPI,
|
|
@@ -87,7 +89,8 @@ from databricks.sdk.service.marketplace import (
|
|
|
87
89
|
ProviderExchangeFiltersAPI, ProviderExchangesAPI, ProviderFilesAPI,
|
|
88
90
|
ProviderListingsAPI, ProviderPersonalizationRequestsAPI,
|
|
89
91
|
ProviderProviderAnalyticsDashboardsAPI, ProviderProvidersAPI)
|
|
90
|
-
from databricks.sdk.service.ml import (ExperimentsAPI,
|
|
92
|
+
from databricks.sdk.service.ml import (ExperimentsAPI, FeatureStoreAPI,
|
|
93
|
+
ForecastingAPI, MaterializedFeaturesAPI,
|
|
91
94
|
ModelRegistryAPI)
|
|
92
95
|
from databricks.sdk.service.oauth2 import (AccountFederationPolicyAPI,
|
|
93
96
|
CustomAppIntegrationAPI,
|
|
@@ -235,6 +238,7 @@ class WorkspaceClient:
|
|
|
235
238
|
serving_endpoints = ServingEndpointsExt(self._api_client)
|
|
236
239
|
self._access_control = pkg_iam.AccessControlAPI(self._api_client)
|
|
237
240
|
self._account_access_control_proxy = pkg_iam.AccountAccessControlProxyAPI(self._api_client)
|
|
241
|
+
self._ai_builder = pkg_aibuilder.AiBuilderAPI(self._api_client)
|
|
238
242
|
self._alerts = pkg_sql.AlertsAPI(self._api_client)
|
|
239
243
|
self._alerts_legacy = pkg_sql.AlertsLegacyAPI(self._api_client)
|
|
240
244
|
self._alerts_v2 = pkg_sql.AlertsV2API(self._api_client)
|
|
@@ -256,7 +260,6 @@ class WorkspaceClient:
|
|
|
256
260
|
self._credentials = pkg_catalog.CredentialsAPI(self._api_client)
|
|
257
261
|
self._credentials_manager = pkg_settings.CredentialsManagerAPI(self._api_client)
|
|
258
262
|
self._current_user = pkg_iam.CurrentUserAPI(self._api_client)
|
|
259
|
-
self._custom_llms = pkg_aibuilder.CustomLlmsAPI(self._api_client)
|
|
260
263
|
self._dashboard_widgets = pkg_sql.DashboardWidgetsAPI(self._api_client)
|
|
261
264
|
self._dashboards = pkg_sql.DashboardsAPI(self._api_client)
|
|
262
265
|
self._data_sources = pkg_sql.DataSourcesAPI(self._api_client)
|
|
@@ -264,7 +267,10 @@ class WorkspaceClient:
|
|
|
264
267
|
self._dbfs = DbfsExt(self._api_client)
|
|
265
268
|
self._dbsql_permissions = pkg_sql.DbsqlPermissionsAPI(self._api_client)
|
|
266
269
|
self._experiments = pkg_ml.ExperimentsAPI(self._api_client)
|
|
270
|
+
self._external_lineage = pkg_catalog.ExternalLineageAPI(self._api_client)
|
|
267
271
|
self._external_locations = pkg_catalog.ExternalLocationsAPI(self._api_client)
|
|
272
|
+
self._external_metadata = pkg_catalog.ExternalMetadataAPI(self._api_client)
|
|
273
|
+
self._feature_store = pkg_ml.FeatureStoreAPI(self._api_client)
|
|
268
274
|
self._files = _make_files_client(self._api_client, self._config)
|
|
269
275
|
self._functions = pkg_catalog.FunctionsAPI(self._api_client)
|
|
270
276
|
self._genie = pkg_dashboards.GenieAPI(self._api_client)
|
|
@@ -279,6 +285,7 @@ class WorkspaceClient:
|
|
|
279
285
|
self._lakeview = pkg_dashboards.LakeviewAPI(self._api_client)
|
|
280
286
|
self._lakeview_embedded = pkg_dashboards.LakeviewEmbeddedAPI(self._api_client)
|
|
281
287
|
self._libraries = pkg_compute.LibrariesAPI(self._api_client)
|
|
288
|
+
self._materialized_features = pkg_ml.MaterializedFeaturesAPI(self._api_client)
|
|
282
289
|
self._metastores = pkg_catalog.MetastoresAPI(self._api_client)
|
|
283
290
|
self._model_registry = pkg_ml.ModelRegistryAPI(self._api_client)
|
|
284
291
|
self._model_versions = pkg_catalog.ModelVersionsAPI(self._api_client)
|
|
@@ -366,6 +373,11 @@ class WorkspaceClient:
|
|
|
366
373
|
"""These APIs manage access rules on resources in an account."""
|
|
367
374
|
return self._account_access_control_proxy
|
|
368
375
|
|
|
376
|
+
@property
|
|
377
|
+
def ai_builder(self) -> pkg_aibuilder.AiBuilderAPI:
|
|
378
|
+
"""The Custom LLMs service manages state and powers the UI for the Custom LLM product."""
|
|
379
|
+
return self._ai_builder
|
|
380
|
+
|
|
369
381
|
@property
|
|
370
382
|
def alerts(self) -> pkg_sql.AlertsAPI:
|
|
371
383
|
"""The alerts API can be used to perform CRUD operations on alerts."""
|
|
@@ -408,7 +420,7 @@ class WorkspaceClient:
|
|
|
408
420
|
|
|
409
421
|
@property
|
|
410
422
|
def clean_rooms(self) -> pkg_cleanrooms.CleanRoomsAPI:
|
|
411
|
-
"""A clean room uses Delta Sharing and serverless compute to provide a secure and privacy-protecting environment where multiple parties can work together on sensitive enterprise data without direct access to each other
|
|
423
|
+
"""A clean room uses Delta Sharing and serverless compute to provide a secure and privacy-protecting environment where multiple parties can work together on sensitive enterprise data without direct access to each other's data."""
|
|
412
424
|
return self._clean_rooms
|
|
413
425
|
|
|
414
426
|
@property
|
|
@@ -471,11 +483,6 @@ class WorkspaceClient:
|
|
|
471
483
|
"""This API allows retrieving information about currently authenticated user or service principal."""
|
|
472
484
|
return self._current_user
|
|
473
485
|
|
|
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
486
|
@property
|
|
480
487
|
def dashboard_widgets(self) -> pkg_sql.DashboardWidgetsAPI:
|
|
481
488
|
"""This is an evolving API that facilitates the addition and removal of widgets from existing dashboards within the Databricks Workspace."""
|
|
@@ -511,11 +518,26 @@ class WorkspaceClient:
|
|
|
511
518
|
"""Experiments are the primary unit of organization in MLflow; all MLflow runs belong to an experiment."""
|
|
512
519
|
return self._experiments
|
|
513
520
|
|
|
521
|
+
@property
|
|
522
|
+
def external_lineage(self) -> pkg_catalog.ExternalLineageAPI:
|
|
523
|
+
"""External Lineage APIs enable defining and managing lineage relationships between Databricks objects and external systems."""
|
|
524
|
+
return self._external_lineage
|
|
525
|
+
|
|
514
526
|
@property
|
|
515
527
|
def external_locations(self) -> pkg_catalog.ExternalLocationsAPI:
|
|
516
528
|
"""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
529
|
return self._external_locations
|
|
518
530
|
|
|
531
|
+
@property
|
|
532
|
+
def external_metadata(self) -> pkg_catalog.ExternalMetadataAPI:
|
|
533
|
+
"""External Metadata objects enable customers to register and manage metadata about external systems within Unity Catalog."""
|
|
534
|
+
return self._external_metadata
|
|
535
|
+
|
|
536
|
+
@property
|
|
537
|
+
def feature_store(self) -> pkg_ml.FeatureStoreAPI:
|
|
538
|
+
"""A feature store is a centralized repository that enables data scientists to find and share features."""
|
|
539
|
+
return self._feature_store
|
|
540
|
+
|
|
519
541
|
@property
|
|
520
542
|
def files(self) -> pkg_files.FilesAPI:
|
|
521
543
|
"""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."""
|
|
@@ -586,6 +608,11 @@ class WorkspaceClient:
|
|
|
586
608
|
"""The Libraries API allows you to install and uninstall libraries and get the status of libraries on a cluster."""
|
|
587
609
|
return self._libraries
|
|
588
610
|
|
|
611
|
+
@property
|
|
612
|
+
def materialized_features(self) -> pkg_ml.MaterializedFeaturesAPI:
|
|
613
|
+
"""Materialized Features are columns in tables and views that can be directly used as features to train and serve ML models."""
|
|
614
|
+
return self._materialized_features
|
|
615
|
+
|
|
589
616
|
@property
|
|
590
617
|
def metastores(self) -> pkg_catalog.MetastoresAPI:
|
|
591
618
|
"""A metastore is the top-level container of objects in Unity Catalog."""
|
|
@@ -1032,7 +1059,7 @@ class AccountClient:
|
|
|
1032
1059
|
|
|
1033
1060
|
@property
|
|
1034
1061
|
def log_delivery(self) -> pkg_billing.LogDeliveryAPI:
|
|
1035
|
-
"""These APIs manage
|
|
1062
|
+
"""These APIs manage log delivery configurations for this account."""
|
|
1036
1063
|
return self._log_delivery
|
|
1037
1064
|
|
|
1038
1065
|
@property
|
|
@@ -21,21 +21,65 @@ class CancelCustomLlmOptimizationRunRequest:
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
@dataclass
|
|
24
|
-
class
|
|
24
|
+
class CreateCustomLlmRequest:
|
|
25
|
+
name: str
|
|
26
|
+
"""Name of the custom LLM. Only alphanumeric characters and dashes allowed."""
|
|
27
|
+
|
|
28
|
+
instructions: str
|
|
29
|
+
"""Instructions for the custom LLM to follow"""
|
|
30
|
+
|
|
31
|
+
agent_artifact_path: Optional[str] = None
|
|
32
|
+
"""Optional: UC path for agent artifacts. If you are using a dataset that you only have read
|
|
33
|
+
permissions, please provide a destination path where you have write permissions. Please provide
|
|
34
|
+
this in catalog.schema format."""
|
|
35
|
+
|
|
36
|
+
datasets: Optional[List[Dataset]] = None
|
|
37
|
+
"""Datasets used for training and evaluating the model, not for inference. Currently, only 1
|
|
38
|
+
dataset is accepted."""
|
|
39
|
+
|
|
40
|
+
guidelines: Optional[List[str]] = None
|
|
41
|
+
"""Guidelines for the custom LLM to adhere to"""
|
|
42
|
+
|
|
25
43
|
def as_dict(self) -> dict:
|
|
26
|
-
"""Serializes the
|
|
44
|
+
"""Serializes the CreateCustomLlmRequest into a dictionary suitable for use as a JSON request body."""
|
|
27
45
|
body = {}
|
|
46
|
+
if self.agent_artifact_path is not None:
|
|
47
|
+
body["agent_artifact_path"] = self.agent_artifact_path
|
|
48
|
+
if self.datasets:
|
|
49
|
+
body["datasets"] = [v.as_dict() for v in self.datasets]
|
|
50
|
+
if self.guidelines:
|
|
51
|
+
body["guidelines"] = [v for v in self.guidelines]
|
|
52
|
+
if self.instructions is not None:
|
|
53
|
+
body["instructions"] = self.instructions
|
|
54
|
+
if self.name is not None:
|
|
55
|
+
body["name"] = self.name
|
|
28
56
|
return body
|
|
29
57
|
|
|
30
58
|
def as_shallow_dict(self) -> dict:
|
|
31
|
-
"""Serializes the
|
|
59
|
+
"""Serializes the CreateCustomLlmRequest into a shallow dictionary of its immediate attributes."""
|
|
32
60
|
body = {}
|
|
61
|
+
if self.agent_artifact_path is not None:
|
|
62
|
+
body["agent_artifact_path"] = self.agent_artifact_path
|
|
63
|
+
if self.datasets:
|
|
64
|
+
body["datasets"] = self.datasets
|
|
65
|
+
if self.guidelines:
|
|
66
|
+
body["guidelines"] = self.guidelines
|
|
67
|
+
if self.instructions is not None:
|
|
68
|
+
body["instructions"] = self.instructions
|
|
69
|
+
if self.name is not None:
|
|
70
|
+
body["name"] = self.name
|
|
33
71
|
return body
|
|
34
72
|
|
|
35
73
|
@classmethod
|
|
36
|
-
def from_dict(cls, d: Dict[str, Any]) ->
|
|
37
|
-
"""Deserializes the
|
|
38
|
-
return cls(
|
|
74
|
+
def from_dict(cls, d: Dict[str, Any]) -> CreateCustomLlmRequest:
|
|
75
|
+
"""Deserializes the CreateCustomLlmRequest from a dictionary."""
|
|
76
|
+
return cls(
|
|
77
|
+
agent_artifact_path=d.get("agent_artifact_path", None),
|
|
78
|
+
datasets=_repeated_dict(d, "datasets", Dataset),
|
|
79
|
+
guidelines=d.get("guidelines", None),
|
|
80
|
+
instructions=d.get("instructions", None),
|
|
81
|
+
name=d.get("name", None),
|
|
82
|
+
)
|
|
39
83
|
|
|
40
84
|
|
|
41
85
|
@dataclass
|
|
@@ -273,13 +317,13 @@ class UpdateCustomLlmRequest:
|
|
|
273
317
|
)
|
|
274
318
|
|
|
275
319
|
|
|
276
|
-
class
|
|
320
|
+
class AiBuilderAPI:
|
|
277
321
|
"""The Custom LLMs service manages state and powers the UI for the Custom LLM product."""
|
|
278
322
|
|
|
279
323
|
def __init__(self, api_client):
|
|
280
324
|
self._api = api_client
|
|
281
325
|
|
|
282
|
-
def
|
|
326
|
+
def cancel_optimize(self, id: str):
|
|
283
327
|
"""Cancel a Custom LLM Optimization Run.
|
|
284
328
|
|
|
285
329
|
:param id: str
|
|
@@ -294,24 +338,68 @@ class CustomLlmsAPI:
|
|
|
294
338
|
|
|
295
339
|
self._api.do("POST", f"/api/2.0/custom-llms/{id}/optimize/cancel", headers=headers)
|
|
296
340
|
|
|
297
|
-
def
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
:
|
|
301
|
-
|
|
341
|
+
def create_custom_llm(
|
|
342
|
+
self,
|
|
343
|
+
name: str,
|
|
344
|
+
instructions: str,
|
|
345
|
+
*,
|
|
346
|
+
agent_artifact_path: Optional[str] = None,
|
|
347
|
+
datasets: Optional[List[Dataset]] = None,
|
|
348
|
+
guidelines: Optional[List[str]] = None,
|
|
349
|
+
) -> CustomLlm:
|
|
350
|
+
"""Create a Custom LLM.
|
|
351
|
+
|
|
352
|
+
:param name: str
|
|
353
|
+
Name of the custom LLM. Only alphanumeric characters and dashes allowed.
|
|
354
|
+
:param instructions: str
|
|
355
|
+
Instructions for the custom LLM to follow
|
|
356
|
+
:param agent_artifact_path: str (optional)
|
|
357
|
+
Optional: UC path for agent artifacts. If you are using a dataset that you only have read
|
|
358
|
+
permissions, please provide a destination path where you have write permissions. Please provide this
|
|
359
|
+
in catalog.schema format.
|
|
360
|
+
:param datasets: List[:class:`Dataset`] (optional)
|
|
361
|
+
Datasets used for training and evaluating the model, not for inference. Currently, only 1 dataset is
|
|
362
|
+
accepted.
|
|
363
|
+
:param guidelines: List[str] (optional)
|
|
364
|
+
Guidelines for the custom LLM to adhere to
|
|
302
365
|
|
|
303
366
|
:returns: :class:`CustomLlm`
|
|
304
367
|
"""
|
|
305
|
-
|
|
368
|
+
body = {}
|
|
369
|
+
if agent_artifact_path is not None:
|
|
370
|
+
body["agent_artifact_path"] = agent_artifact_path
|
|
371
|
+
if datasets is not None:
|
|
372
|
+
body["datasets"] = [v.as_dict() for v in datasets]
|
|
373
|
+
if guidelines is not None:
|
|
374
|
+
body["guidelines"] = [v for v in guidelines]
|
|
375
|
+
if instructions is not None:
|
|
376
|
+
body["instructions"] = instructions
|
|
377
|
+
if name is not None:
|
|
378
|
+
body["name"] = name
|
|
306
379
|
headers = {
|
|
307
380
|
"Accept": "application/json",
|
|
308
381
|
"Content-Type": "application/json",
|
|
309
382
|
}
|
|
310
383
|
|
|
311
|
-
res = self._api.do("POST",
|
|
384
|
+
res = self._api.do("POST", "/api/2.0/custom-llms", body=body, headers=headers)
|
|
312
385
|
return CustomLlm.from_dict(res)
|
|
313
386
|
|
|
314
|
-
def
|
|
387
|
+
def delete_custom_llm(self, id: str):
|
|
388
|
+
"""Delete a Custom LLM.
|
|
389
|
+
|
|
390
|
+
:param id: str
|
|
391
|
+
The id of the custom llm
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
"""
|
|
395
|
+
|
|
396
|
+
headers = {
|
|
397
|
+
"Accept": "application/json",
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
self._api.do("DELETE", f"/api/2.0/custom-lms/{id}", headers=headers)
|
|
401
|
+
|
|
402
|
+
def get_custom_llm(self, id: str) -> CustomLlm:
|
|
315
403
|
"""Get a Custom LLM.
|
|
316
404
|
|
|
317
405
|
:param id: str
|
|
@@ -327,7 +415,24 @@ class CustomLlmsAPI:
|
|
|
327
415
|
res = self._api.do("GET", f"/api/2.0/custom-llms/{id}", headers=headers)
|
|
328
416
|
return CustomLlm.from_dict(res)
|
|
329
417
|
|
|
330
|
-
def
|
|
418
|
+
def start_optimize(self, id: str) -> CustomLlm:
|
|
419
|
+
"""Start a Custom LLM Optimization Run.
|
|
420
|
+
|
|
421
|
+
:param id: str
|
|
422
|
+
The Id of the tile.
|
|
423
|
+
|
|
424
|
+
:returns: :class:`CustomLlm`
|
|
425
|
+
"""
|
|
426
|
+
|
|
427
|
+
headers = {
|
|
428
|
+
"Accept": "application/json",
|
|
429
|
+
"Content-Type": "application/json",
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
res = self._api.do("POST", f"/api/2.0/custom-llms/{id}/optimize", headers=headers)
|
|
433
|
+
return CustomLlm.from_dict(res)
|
|
434
|
+
|
|
435
|
+
def update_custom_llm(self, id: str, custom_llm: CustomLlm, update_mask: str) -> CustomLlm:
|
|
331
436
|
"""Update a Custom LLM.
|
|
332
437
|
|
|
333
438
|
:param id: str
|
databricks/sdk/service/apps.py
CHANGED
|
@@ -222,7 +222,6 @@ class AppAccessControlRequest:
|
|
|
222
222
|
"""name of the group"""
|
|
223
223
|
|
|
224
224
|
permission_level: Optional[AppPermissionLevel] = None
|
|
225
|
-
"""Permission level"""
|
|
226
225
|
|
|
227
226
|
service_principal_name: Optional[str] = None
|
|
228
227
|
"""application ID of a service principal"""
|
|
@@ -491,7 +490,6 @@ class AppPermission:
|
|
|
491
490
|
inherited_from_object: Optional[List[str]] = None
|
|
492
491
|
|
|
493
492
|
permission_level: Optional[AppPermissionLevel] = None
|
|
494
|
-
"""Permission level"""
|
|
495
493
|
|
|
496
494
|
def as_dict(self) -> dict:
|
|
497
495
|
"""Serializes the AppPermission into a dictionary suitable for use as a JSON request body."""
|
|
@@ -577,7 +575,6 @@ class AppPermissionsDescription:
|
|
|
577
575
|
description: Optional[str] = None
|
|
578
576
|
|
|
579
577
|
permission_level: Optional[AppPermissionLevel] = None
|
|
580
|
-
"""Permission level"""
|
|
581
578
|
|
|
582
579
|
def as_dict(self) -> dict:
|
|
583
580
|
"""Serializes the AppPermissionsDescription into a dictionary suitable for use as a JSON request body."""
|
|
@@ -1232,9 +1229,7 @@ class AppsAPI:
|
|
|
1232
1229
|
raise TimeoutError(f"timed out after {timeout}: {status_message}")
|
|
1233
1230
|
|
|
1234
1231
|
def create(self, app: App, *, no_compute: Optional[bool] = None) -> Wait[App]:
|
|
1235
|
-
"""
|
|
1236
|
-
|
|
1237
|
-
Creates a new app.
|
|
1232
|
+
"""Creates a new app.
|
|
1238
1233
|
|
|
1239
1234
|
:param app: :class:`App`
|
|
1240
1235
|
:param no_compute: bool (optional)
|
|
@@ -1260,9 +1255,7 @@ class AppsAPI:
|
|
|
1260
1255
|
return self.create(app=app, no_compute=no_compute).result(timeout=timeout)
|
|
1261
1256
|
|
|
1262
1257
|
def delete(self, name: str) -> App:
|
|
1263
|
-
"""
|
|
1264
|
-
|
|
1265
|
-
Deletes an app.
|
|
1258
|
+
"""Deletes an app.
|
|
1266
1259
|
|
|
1267
1260
|
:param name: str
|
|
1268
1261
|
The name of the app.
|
|
@@ -1278,13 +1271,12 @@ class AppsAPI:
|
|
|
1278
1271
|
return App.from_dict(res)
|
|
1279
1272
|
|
|
1280
1273
|
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.
|
|
1274
|
+
"""Creates an app deployment for the app with the supplied name.
|
|
1284
1275
|
|
|
1285
1276
|
:param app_name: str
|
|
1286
1277
|
The name of the app.
|
|
1287
1278
|
:param app_deployment: :class:`AppDeployment`
|
|
1279
|
+
The app deployment configuration.
|
|
1288
1280
|
|
|
1289
1281
|
:returns:
|
|
1290
1282
|
Long-running operation waiter for :class:`AppDeployment`.
|
|
@@ -1310,9 +1302,7 @@ class AppsAPI:
|
|
|
1310
1302
|
return self.deploy(app_deployment=app_deployment, app_name=app_name).result(timeout=timeout)
|
|
1311
1303
|
|
|
1312
1304
|
def get(self, name: str) -> App:
|
|
1313
|
-
"""
|
|
1314
|
-
|
|
1315
|
-
Retrieves information for the app with the supplied name.
|
|
1305
|
+
"""Retrieves information for the app with the supplied name.
|
|
1316
1306
|
|
|
1317
1307
|
:param name: str
|
|
1318
1308
|
The name of the app.
|
|
@@ -1328,9 +1318,7 @@ class AppsAPI:
|
|
|
1328
1318
|
return App.from_dict(res)
|
|
1329
1319
|
|
|
1330
1320
|
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.
|
|
1321
|
+
"""Retrieves information for the app deployment with the supplied name and deployment id.
|
|
1334
1322
|
|
|
1335
1323
|
:param app_name: str
|
|
1336
1324
|
The name of the app.
|
|
@@ -1348,9 +1336,7 @@ class AppsAPI:
|
|
|
1348
1336
|
return AppDeployment.from_dict(res)
|
|
1349
1337
|
|
|
1350
1338
|
def get_permission_levels(self, app_name: str) -> GetAppPermissionLevelsResponse:
|
|
1351
|
-
"""
|
|
1352
|
-
|
|
1353
|
-
Gets the permission levels that a user can have on an object.
|
|
1339
|
+
"""Gets the permission levels that a user can have on an object.
|
|
1354
1340
|
|
|
1355
1341
|
:param app_name: str
|
|
1356
1342
|
The app for which to get or manage permissions.
|
|
@@ -1366,9 +1352,7 @@ class AppsAPI:
|
|
|
1366
1352
|
return GetAppPermissionLevelsResponse.from_dict(res)
|
|
1367
1353
|
|
|
1368
1354
|
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.
|
|
1355
|
+
"""Gets the permissions of an app. Apps can inherit permissions from their root object.
|
|
1372
1356
|
|
|
1373
1357
|
:param app_name: str
|
|
1374
1358
|
The app for which to get or manage permissions.
|
|
@@ -1384,9 +1368,7 @@ class AppsAPI:
|
|
|
1384
1368
|
return AppPermissions.from_dict(res)
|
|
1385
1369
|
|
|
1386
1370
|
def list(self, *, page_size: Optional[int] = None, page_token: Optional[str] = None) -> Iterator[App]:
|
|
1387
|
-
"""
|
|
1388
|
-
|
|
1389
|
-
Lists all apps in the workspace.
|
|
1371
|
+
"""Lists all apps in the workspace.
|
|
1390
1372
|
|
|
1391
1373
|
:param page_size: int (optional)
|
|
1392
1374
|
Upper bound for items returned.
|
|
@@ -1417,9 +1399,7 @@ class AppsAPI:
|
|
|
1417
1399
|
def list_deployments(
|
|
1418
1400
|
self, app_name: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None
|
|
1419
1401
|
) -> Iterator[AppDeployment]:
|
|
1420
|
-
"""
|
|
1421
|
-
|
|
1422
|
-
Lists all app deployments for the app with the supplied name.
|
|
1402
|
+
"""Lists all app deployments for the app with the supplied name.
|
|
1423
1403
|
|
|
1424
1404
|
:param app_name: str
|
|
1425
1405
|
The name of the app.
|
|
@@ -1452,9 +1432,7 @@ class AppsAPI:
|
|
|
1452
1432
|
def set_permissions(
|
|
1453
1433
|
self, app_name: str, *, access_control_list: Optional[List[AppAccessControlRequest]] = None
|
|
1454
1434
|
) -> AppPermissions:
|
|
1455
|
-
"""
|
|
1456
|
-
|
|
1457
|
-
Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
|
|
1435
|
+
"""Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
|
|
1458
1436
|
permissions if none are specified. Objects can inherit permissions from their root object.
|
|
1459
1437
|
|
|
1460
1438
|
:param app_name: str
|
|
@@ -1475,9 +1453,7 @@ class AppsAPI:
|
|
|
1475
1453
|
return AppPermissions.from_dict(res)
|
|
1476
1454
|
|
|
1477
1455
|
def start(self, name: str) -> Wait[App]:
|
|
1478
|
-
"""Start
|
|
1479
|
-
|
|
1480
|
-
Start the last active deployment of the app in the workspace.
|
|
1456
|
+
"""Start the last active deployment of the app in the workspace.
|
|
1481
1457
|
|
|
1482
1458
|
:param name: str
|
|
1483
1459
|
The name of the app.
|
|
@@ -1499,9 +1475,7 @@ class AppsAPI:
|
|
|
1499
1475
|
return self.start(name=name).result(timeout=timeout)
|
|
1500
1476
|
|
|
1501
1477
|
def stop(self, name: str) -> Wait[App]:
|
|
1502
|
-
"""
|
|
1503
|
-
|
|
1504
|
-
Stops the active deployment of the app in the workspace.
|
|
1478
|
+
"""Stops the active deployment of the app in the workspace.
|
|
1505
1479
|
|
|
1506
1480
|
:param name: str
|
|
1507
1481
|
The name of the app.
|
|
@@ -1523,9 +1497,7 @@ class AppsAPI:
|
|
|
1523
1497
|
return self.stop(name=name).result(timeout=timeout)
|
|
1524
1498
|
|
|
1525
1499
|
def update(self, name: str, app: App) -> App:
|
|
1526
|
-
"""
|
|
1527
|
-
|
|
1528
|
-
Updates the app with the supplied name.
|
|
1500
|
+
"""Updates the app with the supplied name.
|
|
1529
1501
|
|
|
1530
1502
|
:param name: str
|
|
1531
1503
|
The name of the app. The name must contain only lowercase alphanumeric characters and hyphens. It
|
|
@@ -1546,9 +1518,7 @@ class AppsAPI:
|
|
|
1546
1518
|
def update_permissions(
|
|
1547
1519
|
self, app_name: str, *, access_control_list: Optional[List[AppAccessControlRequest]] = None
|
|
1548
1520
|
) -> AppPermissions:
|
|
1549
|
-
"""
|
|
1550
|
-
|
|
1551
|
-
Updates the permissions on an app. Apps can inherit permissions from their root object.
|
|
1521
|
+
"""Updates the permissions on an app. Apps can inherit permissions from their root object.
|
|
1552
1522
|
|
|
1553
1523
|
:param app_name: str
|
|
1554
1524
|
The app for which to get or manage permissions.
|