databricks-sdk 0.58.0__py3-none-any.whl → 0.59.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 +13 -5
- databricks/sdk/service/aibuilder.py +0 -127
- databricks/sdk/service/apps.py +52 -46
- databricks/sdk/service/billing.py +9 -200
- databricks/sdk/service/catalog.py +5500 -7697
- databricks/sdk/service/cleanrooms.py +2 -32
- databricks/sdk/service/compute.py +456 -2515
- databricks/sdk/service/dashboards.py +1 -177
- databricks/sdk/service/database.py +18 -52
- databricks/sdk/service/files.py +2 -218
- databricks/sdk/service/iam.py +16 -295
- databricks/sdk/service/jobs.py +108 -1171
- databricks/sdk/service/marketplace.py +0 -573
- databricks/sdk/service/ml.py +76 -2445
- databricks/sdk/service/oauth2.py +122 -237
- databricks/sdk/service/pipelines.py +178 -752
- databricks/sdk/service/provisioning.py +0 -603
- databricks/sdk/service/serving.py +5 -577
- databricks/sdk/service/settings.py +191 -1560
- databricks/sdk/service/sharing.py +3 -469
- databricks/sdk/service/sql.py +117 -1704
- databricks/sdk/service/vectorsearch.py +0 -391
- databricks/sdk/service/workspace.py +250 -721
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.59.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.59.0.dist-info}/RECORD +30 -30
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.59.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.59.0.dist-info}/licenses/LICENSE +0 -0
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.59.0.dist-info}/licenses/NOTICE +0 -0
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.59.0.dist-info}/top_level.txt +0 -0
databricks/sdk/__init__.py
CHANGED
|
@@ -97,7 +97,8 @@ from databricks.sdk.service.oauth2 import (AccountFederationPolicyAPI,
|
|
|
97
97
|
OAuthPublishedAppsAPI,
|
|
98
98
|
PublishedAppIntegrationAPI,
|
|
99
99
|
ServicePrincipalFederationPolicyAPI,
|
|
100
|
-
ServicePrincipalSecretsAPI
|
|
100
|
+
ServicePrincipalSecretsAPI,
|
|
101
|
+
ServicePrincipalSecretsProxyAPI)
|
|
101
102
|
from databricks.sdk.service.pipelines import PipelinesAPI
|
|
102
103
|
from databricks.sdk.service.provisioning import (CredentialsAPI,
|
|
103
104
|
EncryptionKeysAPI,
|
|
@@ -113,10 +114,11 @@ from databricks.sdk.service.settings import (
|
|
|
113
114
|
AibiDashboardEmbeddingApprovedDomainsAPI, AutomaticClusterUpdateAPI,
|
|
114
115
|
ComplianceSecurityProfileAPI, CredentialsManagerAPI,
|
|
115
116
|
CspEnablementAccountAPI, DashboardEmailSubscriptionsAPI,
|
|
116
|
-
DefaultNamespaceAPI,
|
|
117
|
-
DisableLegacyFeaturesAPI, EnableExportNotebookAPI,
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
DefaultNamespaceAPI, DefaultWarehouseIdAPI, DisableLegacyAccessAPI,
|
|
118
|
+
DisableLegacyDbfsAPI, DisableLegacyFeaturesAPI, EnableExportNotebookAPI,
|
|
119
|
+
EnableIpAccessListsAPI, EnableNotebookTableClipboardAPI,
|
|
120
|
+
EnableResultsDownloadingAPI, EnhancedSecurityMonitoringAPI,
|
|
121
|
+
EsmEnablementAccountAPI, IpAccessListsAPI,
|
|
120
122
|
LlmProxyPartnerPoweredAccountAPI, LlmProxyPartnerPoweredEnforceAPI,
|
|
121
123
|
LlmProxyPartnerPoweredWorkspaceAPI, NetworkConnectivityAPI,
|
|
122
124
|
NetworkPoliciesAPI, NotificationDestinationsAPI, PersonalComputeAPI,
|
|
@@ -323,6 +325,7 @@ class WorkspaceClient:
|
|
|
323
325
|
self._resource_quotas = pkg_catalog.ResourceQuotasAPI(self._api_client)
|
|
324
326
|
self._schemas = pkg_catalog.SchemasAPI(self._api_client)
|
|
325
327
|
self._secrets = pkg_workspace.SecretsAPI(self._api_client)
|
|
328
|
+
self._service_principal_secrets_proxy = pkg_oauth2.ServicePrincipalSecretsProxyAPI(self._api_client)
|
|
326
329
|
self._service_principals = pkg_iam.ServicePrincipalsAPI(self._api_client)
|
|
327
330
|
self._serving_endpoints = serving_endpoints
|
|
328
331
|
serving_endpoints_data_plane_token_source = DataPlaneTokenSource(
|
|
@@ -788,6 +791,11 @@ class WorkspaceClient:
|
|
|
788
791
|
"""The Secrets API allows you to manage secrets, secret scopes, and access permissions."""
|
|
789
792
|
return self._secrets
|
|
790
793
|
|
|
794
|
+
@property
|
|
795
|
+
def service_principal_secrets_proxy(self) -> pkg_oauth2.ServicePrincipalSecretsProxyAPI:
|
|
796
|
+
"""These APIs enable administrators to manage service principal secrets at the workspace level."""
|
|
797
|
+
return self._service_principal_secrets_proxy
|
|
798
|
+
|
|
791
799
|
@property
|
|
792
800
|
def service_principals(self) -> pkg_iam.ServicePrincipalsAPI:
|
|
793
801
|
"""Identities for use with jobs, automated tools, and systems such as scripts, apps, and CI/CD platforms."""
|
|
@@ -15,73 +15,6 @@ _LOG = logging.getLogger("databricks.sdk")
|
|
|
15
15
|
# all definitions in this file are in alphabetical order
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
@dataclass
|
|
19
|
-
class CancelCustomLlmOptimizationRunRequest:
|
|
20
|
-
id: Optional[str] = None
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
@dataclass
|
|
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
|
-
|
|
43
|
-
def as_dict(self) -> dict:
|
|
44
|
-
"""Serializes the CreateCustomLlmRequest into a dictionary suitable for use as a JSON request body."""
|
|
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
|
|
56
|
-
return body
|
|
57
|
-
|
|
58
|
-
def as_shallow_dict(self) -> dict:
|
|
59
|
-
"""Serializes the CreateCustomLlmRequest into a shallow dictionary of its immediate attributes."""
|
|
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
|
|
71
|
-
return body
|
|
72
|
-
|
|
73
|
-
@classmethod
|
|
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
|
-
)
|
|
83
|
-
|
|
84
|
-
|
|
85
18
|
@dataclass
|
|
86
19
|
class CustomLlm:
|
|
87
20
|
name: str
|
|
@@ -203,12 +136,6 @@ class Dataset:
|
|
|
203
136
|
return cls(table=_from_dict(d, "table", Table))
|
|
204
137
|
|
|
205
138
|
|
|
206
|
-
@dataclass
|
|
207
|
-
class StartCustomLlmOptimizationRunRequest:
|
|
208
|
-
id: Optional[str] = None
|
|
209
|
-
"""The Id of the tile."""
|
|
210
|
-
|
|
211
|
-
|
|
212
139
|
class State(Enum):
|
|
213
140
|
"""States of Custom LLM optimization lifecycle."""
|
|
214
141
|
|
|
@@ -263,60 +190,6 @@ class Table:
|
|
|
263
190
|
)
|
|
264
191
|
|
|
265
192
|
|
|
266
|
-
@dataclass
|
|
267
|
-
class UpdateCustomLlmRequest:
|
|
268
|
-
custom_llm: CustomLlm
|
|
269
|
-
"""The CustomLlm containing the fields which should be updated."""
|
|
270
|
-
|
|
271
|
-
update_mask: str
|
|
272
|
-
"""The list of the CustomLlm fields to update. These should correspond to the values (or lack
|
|
273
|
-
thereof) present in `custom_llm`.
|
|
274
|
-
|
|
275
|
-
The field mask must be a single string, with multiple fields separated by commas (no spaces).
|
|
276
|
-
The field path is relative to the resource object, using a dot (`.`) to navigate sub-fields
|
|
277
|
-
(e.g., `author.given_name`). Specification of elements in sequence or map fields is not allowed,
|
|
278
|
-
as only the entire collection field can be specified. Field names must exactly match the
|
|
279
|
-
resource field names.
|
|
280
|
-
|
|
281
|
-
A field mask of `*` indicates full replacement. It’s recommended to always explicitly list the
|
|
282
|
-
fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the
|
|
283
|
-
API changes in the future."""
|
|
284
|
-
|
|
285
|
-
id: Optional[str] = None
|
|
286
|
-
"""The id of the custom llm"""
|
|
287
|
-
|
|
288
|
-
def as_dict(self) -> dict:
|
|
289
|
-
"""Serializes the UpdateCustomLlmRequest into a dictionary suitable for use as a JSON request body."""
|
|
290
|
-
body = {}
|
|
291
|
-
if self.custom_llm:
|
|
292
|
-
body["custom_llm"] = self.custom_llm.as_dict()
|
|
293
|
-
if self.id is not None:
|
|
294
|
-
body["id"] = self.id
|
|
295
|
-
if self.update_mask is not None:
|
|
296
|
-
body["update_mask"] = self.update_mask
|
|
297
|
-
return body
|
|
298
|
-
|
|
299
|
-
def as_shallow_dict(self) -> dict:
|
|
300
|
-
"""Serializes the UpdateCustomLlmRequest into a shallow dictionary of its immediate attributes."""
|
|
301
|
-
body = {}
|
|
302
|
-
if self.custom_llm:
|
|
303
|
-
body["custom_llm"] = self.custom_llm
|
|
304
|
-
if self.id is not None:
|
|
305
|
-
body["id"] = self.id
|
|
306
|
-
if self.update_mask is not None:
|
|
307
|
-
body["update_mask"] = self.update_mask
|
|
308
|
-
return body
|
|
309
|
-
|
|
310
|
-
@classmethod
|
|
311
|
-
def from_dict(cls, d: Dict[str, Any]) -> UpdateCustomLlmRequest:
|
|
312
|
-
"""Deserializes the UpdateCustomLlmRequest from a dictionary."""
|
|
313
|
-
return cls(
|
|
314
|
-
custom_llm=_from_dict(d, "custom_llm", CustomLlm),
|
|
315
|
-
id=d.get("id", None),
|
|
316
|
-
update_mask=d.get("update_mask", None),
|
|
317
|
-
)
|
|
318
|
-
|
|
319
|
-
|
|
320
193
|
class AiBuilderAPI:
|
|
321
194
|
"""The Custom LLMs service manages state and powers the UI for the Custom LLM product."""
|
|
322
195
|
|
databricks/sdk/service/apps.py
CHANGED
|
@@ -602,45 +602,13 @@ class AppPermissionsDescription:
|
|
|
602
602
|
)
|
|
603
603
|
|
|
604
604
|
|
|
605
|
-
@dataclass
|
|
606
|
-
class AppPermissionsRequest:
|
|
607
|
-
access_control_list: Optional[List[AppAccessControlRequest]] = None
|
|
608
|
-
|
|
609
|
-
app_name: Optional[str] = None
|
|
610
|
-
"""The app for which to get or manage permissions."""
|
|
611
|
-
|
|
612
|
-
def as_dict(self) -> dict:
|
|
613
|
-
"""Serializes the AppPermissionsRequest into a dictionary suitable for use as a JSON request body."""
|
|
614
|
-
body = {}
|
|
615
|
-
if self.access_control_list:
|
|
616
|
-
body["access_control_list"] = [v.as_dict() for v in self.access_control_list]
|
|
617
|
-
if self.app_name is not None:
|
|
618
|
-
body["app_name"] = self.app_name
|
|
619
|
-
return body
|
|
620
|
-
|
|
621
|
-
def as_shallow_dict(self) -> dict:
|
|
622
|
-
"""Serializes the AppPermissionsRequest into a shallow dictionary of its immediate attributes."""
|
|
623
|
-
body = {}
|
|
624
|
-
if self.access_control_list:
|
|
625
|
-
body["access_control_list"] = self.access_control_list
|
|
626
|
-
if self.app_name is not None:
|
|
627
|
-
body["app_name"] = self.app_name
|
|
628
|
-
return body
|
|
629
|
-
|
|
630
|
-
@classmethod
|
|
631
|
-
def from_dict(cls, d: Dict[str, Any]) -> AppPermissionsRequest:
|
|
632
|
-
"""Deserializes the AppPermissionsRequest from a dictionary."""
|
|
633
|
-
return cls(
|
|
634
|
-
access_control_list=_repeated_dict(d, "access_control_list", AppAccessControlRequest),
|
|
635
|
-
app_name=d.get("app_name", None),
|
|
636
|
-
)
|
|
637
|
-
|
|
638
|
-
|
|
639
605
|
@dataclass
|
|
640
606
|
class AppResource:
|
|
641
607
|
name: str
|
|
642
608
|
"""Name of the App Resource."""
|
|
643
609
|
|
|
610
|
+
database: Optional[AppResourceDatabase] = None
|
|
611
|
+
|
|
644
612
|
description: Optional[str] = None
|
|
645
613
|
"""Description of the App Resource."""
|
|
646
614
|
|
|
@@ -657,6 +625,8 @@ class AppResource:
|
|
|
657
625
|
def as_dict(self) -> dict:
|
|
658
626
|
"""Serializes the AppResource into a dictionary suitable for use as a JSON request body."""
|
|
659
627
|
body = {}
|
|
628
|
+
if self.database:
|
|
629
|
+
body["database"] = self.database.as_dict()
|
|
660
630
|
if self.description is not None:
|
|
661
631
|
body["description"] = self.description
|
|
662
632
|
if self.job:
|
|
@@ -676,6 +646,8 @@ class AppResource:
|
|
|
676
646
|
def as_shallow_dict(self) -> dict:
|
|
677
647
|
"""Serializes the AppResource into a shallow dictionary of its immediate attributes."""
|
|
678
648
|
body = {}
|
|
649
|
+
if self.database:
|
|
650
|
+
body["database"] = self.database
|
|
679
651
|
if self.description is not None:
|
|
680
652
|
body["description"] = self.description
|
|
681
653
|
if self.job:
|
|
@@ -696,6 +668,7 @@ class AppResource:
|
|
|
696
668
|
def from_dict(cls, d: Dict[str, Any]) -> AppResource:
|
|
697
669
|
"""Deserializes the AppResource from a dictionary."""
|
|
698
670
|
return cls(
|
|
671
|
+
database=_from_dict(d, "database", AppResourceDatabase),
|
|
699
672
|
description=d.get("description", None),
|
|
700
673
|
job=_from_dict(d, "job", AppResourceJob),
|
|
701
674
|
name=d.get("name", None),
|
|
@@ -706,6 +679,51 @@ class AppResource:
|
|
|
706
679
|
)
|
|
707
680
|
|
|
708
681
|
|
|
682
|
+
@dataclass
|
|
683
|
+
class AppResourceDatabase:
|
|
684
|
+
instance_name: str
|
|
685
|
+
|
|
686
|
+
database_name: str
|
|
687
|
+
|
|
688
|
+
permission: AppResourceDatabaseDatabasePermission
|
|
689
|
+
|
|
690
|
+
def as_dict(self) -> dict:
|
|
691
|
+
"""Serializes the AppResourceDatabase into a dictionary suitable for use as a JSON request body."""
|
|
692
|
+
body = {}
|
|
693
|
+
if self.database_name is not None:
|
|
694
|
+
body["database_name"] = self.database_name
|
|
695
|
+
if self.instance_name is not None:
|
|
696
|
+
body["instance_name"] = self.instance_name
|
|
697
|
+
if self.permission is not None:
|
|
698
|
+
body["permission"] = self.permission.value
|
|
699
|
+
return body
|
|
700
|
+
|
|
701
|
+
def as_shallow_dict(self) -> dict:
|
|
702
|
+
"""Serializes the AppResourceDatabase into a shallow dictionary of its immediate attributes."""
|
|
703
|
+
body = {}
|
|
704
|
+
if self.database_name is not None:
|
|
705
|
+
body["database_name"] = self.database_name
|
|
706
|
+
if self.instance_name is not None:
|
|
707
|
+
body["instance_name"] = self.instance_name
|
|
708
|
+
if self.permission is not None:
|
|
709
|
+
body["permission"] = self.permission
|
|
710
|
+
return body
|
|
711
|
+
|
|
712
|
+
@classmethod
|
|
713
|
+
def from_dict(cls, d: Dict[str, Any]) -> AppResourceDatabase:
|
|
714
|
+
"""Deserializes the AppResourceDatabase from a dictionary."""
|
|
715
|
+
return cls(
|
|
716
|
+
database_name=d.get("database_name", None),
|
|
717
|
+
instance_name=d.get("instance_name", None),
|
|
718
|
+
permission=_enum(d, "permission", AppResourceDatabaseDatabasePermission),
|
|
719
|
+
)
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
class AppResourceDatabaseDatabasePermission(Enum):
|
|
723
|
+
|
|
724
|
+
CAN_CONNECT_AND_CREATE = "CAN_CONNECT_AND_CREATE"
|
|
725
|
+
|
|
726
|
+
|
|
709
727
|
@dataclass
|
|
710
728
|
class AppResourceJob:
|
|
711
729
|
id: str
|
|
@@ -1109,18 +1127,6 @@ class ListAppsResponse:
|
|
|
1109
1127
|
return cls(apps=_repeated_dict(d, "apps", App), next_page_token=d.get("next_page_token", None))
|
|
1110
1128
|
|
|
1111
1129
|
|
|
1112
|
-
@dataclass
|
|
1113
|
-
class StartAppRequest:
|
|
1114
|
-
name: Optional[str] = None
|
|
1115
|
-
"""The name of the app."""
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
@dataclass
|
|
1119
|
-
class StopAppRequest:
|
|
1120
|
-
name: Optional[str] = None
|
|
1121
|
-
"""The name of the app."""
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
1130
|
class AppsAPI:
|
|
1125
1131
|
"""Apps run directly on a customer’s Databricks instance, integrate with their data, use and extend
|
|
1126
1132
|
Databricks services, and enable users to interact through single sign-on."""
|
|
@@ -416,41 +416,6 @@ class BudgetPolicy:
|
|
|
416
416
|
)
|
|
417
417
|
|
|
418
418
|
|
|
419
|
-
@dataclass
|
|
420
|
-
class CreateBillingUsageDashboardRequest:
|
|
421
|
-
dashboard_type: Optional[UsageDashboardType] = None
|
|
422
|
-
"""Workspace level usage dashboard shows usage data for the specified workspace ID. Global level
|
|
423
|
-
usage dashboard shows usage data for all workspaces in the account."""
|
|
424
|
-
|
|
425
|
-
workspace_id: Optional[int] = None
|
|
426
|
-
"""The workspace ID of the workspace in which the usage dashboard is created."""
|
|
427
|
-
|
|
428
|
-
def as_dict(self) -> dict:
|
|
429
|
-
"""Serializes the CreateBillingUsageDashboardRequest into a dictionary suitable for use as a JSON request body."""
|
|
430
|
-
body = {}
|
|
431
|
-
if self.dashboard_type is not None:
|
|
432
|
-
body["dashboard_type"] = self.dashboard_type.value
|
|
433
|
-
if self.workspace_id is not None:
|
|
434
|
-
body["workspace_id"] = self.workspace_id
|
|
435
|
-
return body
|
|
436
|
-
|
|
437
|
-
def as_shallow_dict(self) -> dict:
|
|
438
|
-
"""Serializes the CreateBillingUsageDashboardRequest into a shallow dictionary of its immediate attributes."""
|
|
439
|
-
body = {}
|
|
440
|
-
if self.dashboard_type is not None:
|
|
441
|
-
body["dashboard_type"] = self.dashboard_type
|
|
442
|
-
if self.workspace_id is not None:
|
|
443
|
-
body["workspace_id"] = self.workspace_id
|
|
444
|
-
return body
|
|
445
|
-
|
|
446
|
-
@classmethod
|
|
447
|
-
def from_dict(cls, d: Dict[str, Any]) -> CreateBillingUsageDashboardRequest:
|
|
448
|
-
"""Deserializes the CreateBillingUsageDashboardRequest from a dictionary."""
|
|
449
|
-
return cls(
|
|
450
|
-
dashboard_type=_enum(d, "dashboard_type", UsageDashboardType), workspace_id=d.get("workspace_id", None)
|
|
451
|
-
)
|
|
452
|
-
|
|
453
|
-
|
|
454
419
|
@dataclass
|
|
455
420
|
class CreateBillingUsageDashboardResponse:
|
|
456
421
|
dashboard_id: Optional[str] = None
|
|
@@ -628,31 +593,6 @@ class CreateBudgetConfigurationBudgetAlertConfigurations:
|
|
|
628
593
|
)
|
|
629
594
|
|
|
630
595
|
|
|
631
|
-
@dataclass
|
|
632
|
-
class CreateBudgetConfigurationRequest:
|
|
633
|
-
budget: CreateBudgetConfigurationBudget
|
|
634
|
-
"""Properties of the new budget configuration."""
|
|
635
|
-
|
|
636
|
-
def as_dict(self) -> dict:
|
|
637
|
-
"""Serializes the CreateBudgetConfigurationRequest into a dictionary suitable for use as a JSON request body."""
|
|
638
|
-
body = {}
|
|
639
|
-
if self.budget:
|
|
640
|
-
body["budget"] = self.budget.as_dict()
|
|
641
|
-
return body
|
|
642
|
-
|
|
643
|
-
def as_shallow_dict(self) -> dict:
|
|
644
|
-
"""Serializes the CreateBudgetConfigurationRequest into a shallow dictionary of its immediate attributes."""
|
|
645
|
-
body = {}
|
|
646
|
-
if self.budget:
|
|
647
|
-
body["budget"] = self.budget
|
|
648
|
-
return body
|
|
649
|
-
|
|
650
|
-
@classmethod
|
|
651
|
-
def from_dict(cls, d: Dict[str, Any]) -> CreateBudgetConfigurationRequest:
|
|
652
|
-
"""Deserializes the CreateBudgetConfigurationRequest from a dictionary."""
|
|
653
|
-
return cls(budget=_from_dict(d, "budget", CreateBudgetConfigurationBudget))
|
|
654
|
-
|
|
655
|
-
|
|
656
596
|
@dataclass
|
|
657
597
|
class CreateBudgetConfigurationResponse:
|
|
658
598
|
budget: Optional[BudgetConfiguration] = None
|
|
@@ -678,43 +618,6 @@ class CreateBudgetConfigurationResponse:
|
|
|
678
618
|
return cls(budget=_from_dict(d, "budget", BudgetConfiguration))
|
|
679
619
|
|
|
680
620
|
|
|
681
|
-
@dataclass
|
|
682
|
-
class CreateBudgetPolicyRequest:
|
|
683
|
-
"""A request to create a BudgetPolicy."""
|
|
684
|
-
|
|
685
|
-
policy: Optional[BudgetPolicy] = None
|
|
686
|
-
"""The policy to create. `policy_id` needs to be empty as it will be generated `policy_name` must
|
|
687
|
-
be provided, custom_tags may need to be provided depending on the cloud provider. All other
|
|
688
|
-
fields are optional."""
|
|
689
|
-
|
|
690
|
-
request_id: Optional[str] = None
|
|
691
|
-
"""A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is
|
|
692
|
-
recommended. This request is only idempotent if a `request_id` is provided."""
|
|
693
|
-
|
|
694
|
-
def as_dict(self) -> dict:
|
|
695
|
-
"""Serializes the CreateBudgetPolicyRequest into a dictionary suitable for use as a JSON request body."""
|
|
696
|
-
body = {}
|
|
697
|
-
if self.policy:
|
|
698
|
-
body["policy"] = self.policy.as_dict()
|
|
699
|
-
if self.request_id is not None:
|
|
700
|
-
body["request_id"] = self.request_id
|
|
701
|
-
return body
|
|
702
|
-
|
|
703
|
-
def as_shallow_dict(self) -> dict:
|
|
704
|
-
"""Serializes the CreateBudgetPolicyRequest into a shallow dictionary of its immediate attributes."""
|
|
705
|
-
body = {}
|
|
706
|
-
if self.policy:
|
|
707
|
-
body["policy"] = self.policy
|
|
708
|
-
if self.request_id is not None:
|
|
709
|
-
body["request_id"] = self.request_id
|
|
710
|
-
return body
|
|
711
|
-
|
|
712
|
-
@classmethod
|
|
713
|
-
def from_dict(cls, d: Dict[str, Any]) -> CreateBudgetPolicyRequest:
|
|
714
|
-
"""Deserializes the CreateBudgetPolicyRequest from a dictionary."""
|
|
715
|
-
return cls(policy=_from_dict(d, "policy", BudgetPolicy), request_id=d.get("request_id", None))
|
|
716
|
-
|
|
717
|
-
|
|
718
621
|
@dataclass
|
|
719
622
|
class CreateLogDeliveryConfigurationParams:
|
|
720
623
|
"""* Log Delivery Configuration"""
|
|
@@ -1500,38 +1403,6 @@ class UpdateBudgetConfigurationBudget:
|
|
|
1500
1403
|
)
|
|
1501
1404
|
|
|
1502
1405
|
|
|
1503
|
-
@dataclass
|
|
1504
|
-
class UpdateBudgetConfigurationRequest:
|
|
1505
|
-
budget: UpdateBudgetConfigurationBudget
|
|
1506
|
-
"""The updated budget. This will overwrite the budget specified by the budget ID."""
|
|
1507
|
-
|
|
1508
|
-
budget_id: Optional[str] = None
|
|
1509
|
-
"""The Databricks budget configuration ID."""
|
|
1510
|
-
|
|
1511
|
-
def as_dict(self) -> dict:
|
|
1512
|
-
"""Serializes the UpdateBudgetConfigurationRequest into a dictionary suitable for use as a JSON request body."""
|
|
1513
|
-
body = {}
|
|
1514
|
-
if self.budget:
|
|
1515
|
-
body["budget"] = self.budget.as_dict()
|
|
1516
|
-
if self.budget_id is not None:
|
|
1517
|
-
body["budget_id"] = self.budget_id
|
|
1518
|
-
return body
|
|
1519
|
-
|
|
1520
|
-
def as_shallow_dict(self) -> dict:
|
|
1521
|
-
"""Serializes the UpdateBudgetConfigurationRequest into a shallow dictionary of its immediate attributes."""
|
|
1522
|
-
body = {}
|
|
1523
|
-
if self.budget:
|
|
1524
|
-
body["budget"] = self.budget
|
|
1525
|
-
if self.budget_id is not None:
|
|
1526
|
-
body["budget_id"] = self.budget_id
|
|
1527
|
-
return body
|
|
1528
|
-
|
|
1529
|
-
@classmethod
|
|
1530
|
-
def from_dict(cls, d: Dict[str, Any]) -> UpdateBudgetConfigurationRequest:
|
|
1531
|
-
"""Deserializes the UpdateBudgetConfigurationRequest from a dictionary."""
|
|
1532
|
-
return cls(budget=_from_dict(d, "budget", UpdateBudgetConfigurationBudget), budget_id=d.get("budget_id", None))
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
1406
|
@dataclass
|
|
1536
1407
|
class UpdateBudgetConfigurationResponse:
|
|
1537
1408
|
budget: Optional[BudgetConfiguration] = None
|
|
@@ -1557,80 +1428,12 @@ class UpdateBudgetConfigurationResponse:
|
|
|
1557
1428
|
return cls(budget=_from_dict(d, "budget", BudgetConfiguration))
|
|
1558
1429
|
|
|
1559
1430
|
|
|
1560
|
-
@dataclass
|
|
1561
|
-
class UpdateLogDeliveryConfigurationStatusRequest:
|
|
1562
|
-
"""* Update Log Delivery Configuration"""
|
|
1563
|
-
|
|
1564
|
-
status: LogDeliveryConfigStatus
|
|
1565
|
-
"""Status of log delivery configuration. Set to `ENABLED` (enabled) or `DISABLED` (disabled).
|
|
1566
|
-
Defaults to `ENABLED`. You can [enable or disable the
|
|
1567
|
-
configuration](#operation/patch-log-delivery-config-status) later. Deletion of a configuration
|
|
1568
|
-
is not supported, so disable a log delivery configuration that is no longer needed."""
|
|
1569
|
-
|
|
1570
|
-
log_delivery_configuration_id: Optional[str] = None
|
|
1571
|
-
"""The log delivery configuration id of customer"""
|
|
1572
|
-
|
|
1573
|
-
def as_dict(self) -> dict:
|
|
1574
|
-
"""Serializes the UpdateLogDeliveryConfigurationStatusRequest into a dictionary suitable for use as a JSON request body."""
|
|
1575
|
-
body = {}
|
|
1576
|
-
if self.log_delivery_configuration_id is not None:
|
|
1577
|
-
body["log_delivery_configuration_id"] = self.log_delivery_configuration_id
|
|
1578
|
-
if self.status is not None:
|
|
1579
|
-
body["status"] = self.status.value
|
|
1580
|
-
return body
|
|
1581
|
-
|
|
1582
|
-
def as_shallow_dict(self) -> dict:
|
|
1583
|
-
"""Serializes the UpdateLogDeliveryConfigurationStatusRequest into a shallow dictionary of its immediate attributes."""
|
|
1584
|
-
body = {}
|
|
1585
|
-
if self.log_delivery_configuration_id is not None:
|
|
1586
|
-
body["log_delivery_configuration_id"] = self.log_delivery_configuration_id
|
|
1587
|
-
if self.status is not None:
|
|
1588
|
-
body["status"] = self.status
|
|
1589
|
-
return body
|
|
1590
|
-
|
|
1591
|
-
@classmethod
|
|
1592
|
-
def from_dict(cls, d: Dict[str, Any]) -> UpdateLogDeliveryConfigurationStatusRequest:
|
|
1593
|
-
"""Deserializes the UpdateLogDeliveryConfigurationStatusRequest from a dictionary."""
|
|
1594
|
-
return cls(
|
|
1595
|
-
log_delivery_configuration_id=d.get("log_delivery_configuration_id", None),
|
|
1596
|
-
status=_enum(d, "status", LogDeliveryConfigStatus),
|
|
1597
|
-
)
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
1431
|
class UsageDashboardType(Enum):
|
|
1601
1432
|
|
|
1602
1433
|
USAGE_DASHBOARD_TYPE_GLOBAL = "USAGE_DASHBOARD_TYPE_GLOBAL"
|
|
1603
1434
|
USAGE_DASHBOARD_TYPE_WORKSPACE = "USAGE_DASHBOARD_TYPE_WORKSPACE"
|
|
1604
1435
|
|
|
1605
1436
|
|
|
1606
|
-
@dataclass
|
|
1607
|
-
class WrappedCreateLogDeliveryConfiguration:
|
|
1608
|
-
"""* Properties of the new log delivery configuration."""
|
|
1609
|
-
|
|
1610
|
-
log_delivery_configuration: CreateLogDeliveryConfigurationParams
|
|
1611
|
-
|
|
1612
|
-
def as_dict(self) -> dict:
|
|
1613
|
-
"""Serializes the WrappedCreateLogDeliveryConfiguration into a dictionary suitable for use as a JSON request body."""
|
|
1614
|
-
body = {}
|
|
1615
|
-
if self.log_delivery_configuration:
|
|
1616
|
-
body["log_delivery_configuration"] = self.log_delivery_configuration.as_dict()
|
|
1617
|
-
return body
|
|
1618
|
-
|
|
1619
|
-
def as_shallow_dict(self) -> dict:
|
|
1620
|
-
"""Serializes the WrappedCreateLogDeliveryConfiguration into a shallow dictionary of its immediate attributes."""
|
|
1621
|
-
body = {}
|
|
1622
|
-
if self.log_delivery_configuration:
|
|
1623
|
-
body["log_delivery_configuration"] = self.log_delivery_configuration
|
|
1624
|
-
return body
|
|
1625
|
-
|
|
1626
|
-
@classmethod
|
|
1627
|
-
def from_dict(cls, d: Dict[str, Any]) -> WrappedCreateLogDeliveryConfiguration:
|
|
1628
|
-
"""Deserializes the WrappedCreateLogDeliveryConfiguration from a dictionary."""
|
|
1629
|
-
return cls(
|
|
1630
|
-
log_delivery_configuration=_from_dict(d, "log_delivery_configuration", CreateLogDeliveryConfigurationParams)
|
|
1631
|
-
)
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
1437
|
@dataclass
|
|
1635
1438
|
class WrappedLogDeliveryConfiguration:
|
|
1636
1439
|
log_delivery_configuration: Optional[LogDeliveryConfiguration] = None
|
|
@@ -1701,16 +1504,22 @@ class BillableUsageAPI:
|
|
|
1701
1504
|
|
|
1702
1505
|
def download(self, start_month: str, end_month: str, *, personal_data: Optional[bool] = None) -> DownloadResponse:
|
|
1703
1506
|
"""Returns billable usage logs in CSV format for the specified account and date range. For the data
|
|
1704
|
-
schema, see
|
|
1507
|
+
schema, see:
|
|
1508
|
+
|
|
1509
|
+
- AWS: [CSV file schema]. - GCP: [CSV file schema].
|
|
1510
|
+
|
|
1511
|
+
Note that this method might take multiple minutes to complete.
|
|
1705
1512
|
|
|
1706
1513
|
**Warning**: Depending on the queried date range, the number of workspaces in the account, the size of
|
|
1707
1514
|
the response and the internet speed of the caller, this API may hit a timeout after a few minutes. If
|
|
1708
1515
|
you experience this, try to mitigate by calling the API with narrower date ranges.
|
|
1709
1516
|
|
|
1710
|
-
[CSV file schema]: https://docs.databricks.com/administration-guide/account-settings/usage-analysis.html#schema
|
|
1517
|
+
[CSV file schema]: https://docs.gcp.databricks.com/administration-guide/account-settings/usage-analysis.html#csv-file-schema
|
|
1711
1518
|
|
|
1712
1519
|
:param start_month: str
|
|
1713
|
-
Format
|
|
1520
|
+
Format specification for month in the format `YYYY-MM`. This is used to specify billable usage
|
|
1521
|
+
`start_month` and `end_month` properties. **Note**: Billable usage logs are unavailable before March
|
|
1522
|
+
2019 (`2019-03`).
|
|
1714
1523
|
:param end_month: str
|
|
1715
1524
|
Format: `YYYY-MM`. Last month to return billable usage logs for. This field is required.
|
|
1716
1525
|
:param personal_data: bool (optional)
|