databricks-sdk 0.18.0__py3-none-any.whl → 0.19.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 +30 -1
- databricks/sdk/azure.py +14 -0
- databricks/sdk/clock.py +49 -0
- databricks/sdk/config.py +7 -0
- databricks/sdk/core.py +2 -1
- databricks/sdk/credentials_provider.py +14 -3
- databricks/sdk/environments.py +1 -1
- databricks/sdk/errors/__init__.py +1 -1
- databricks/sdk/errors/mapper.py +5 -5
- databricks/sdk/mixins/workspace.py +3 -3
- databricks/sdk/retries.py +9 -5
- databricks/sdk/service/catalog.py +173 -78
- databricks/sdk/service/compute.py +86 -25
- databricks/sdk/service/files.py +136 -22
- databricks/sdk/service/iam.py +42 -36
- databricks/sdk/service/jobs.py +192 -14
- databricks/sdk/service/ml.py +27 -36
- databricks/sdk/service/oauth2.py +3 -4
- databricks/sdk/service/pipelines.py +50 -29
- databricks/sdk/service/settings.py +338 -57
- databricks/sdk/service/sharing.py +3 -4
- databricks/sdk/service/sql.py +24 -17
- databricks/sdk/service/vectorsearch.py +13 -17
- databricks/sdk/service/workspace.py +18 -7
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.18.0.dist-info → databricks_sdk-0.19.0.dist-info}/METADATA +1 -1
- databricks_sdk-0.19.0.dist-info/RECORD +53 -0
- databricks_sdk-0.18.0.dist-info/RECORD +0 -52
- /databricks/sdk/errors/{mapping.py → platform.py} +0 -0
- {databricks_sdk-0.18.0.dist-info → databricks_sdk-0.19.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.18.0.dist-info → databricks_sdk-0.19.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.18.0.dist-info → databricks_sdk-0.19.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.18.0.dist-info → databricks_sdk-0.19.0.dist-info}/top_level.txt +0 -0
|
@@ -266,36 +266,40 @@ class DefaultNamespaceSetting:
|
|
|
266
266
|
|
|
267
267
|
|
|
268
268
|
@dataclass
|
|
269
|
-
class
|
|
269
|
+
class DeleteDefaultNamespaceSettingResponse:
|
|
270
|
+
"""The etag is returned."""
|
|
271
|
+
|
|
270
272
|
etag: str
|
|
271
273
|
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
272
274
|
for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
|
|
273
275
|
overwriting each other. It is strongly suggested that systems make use of the etag in the read
|
|
274
|
-
->
|
|
275
|
-
etag from a GET request, and pass it with the
|
|
276
|
-
are
|
|
276
|
+
-> delete pattern to perform setting deletions in order to avoid race conditions. That is, get
|
|
277
|
+
an etag from a GET request, and pass it with the DELETE request to identify the rule set version
|
|
278
|
+
you are deleting."""
|
|
277
279
|
|
|
278
280
|
def as_dict(self) -> dict:
|
|
279
|
-
"""Serializes the
|
|
281
|
+
"""Serializes the DeleteDefaultNamespaceSettingResponse into a dictionary suitable for use as a JSON request body."""
|
|
280
282
|
body = {}
|
|
281
283
|
if self.etag is not None: body['etag'] = self.etag
|
|
282
284
|
return body
|
|
283
285
|
|
|
284
286
|
@classmethod
|
|
285
|
-
def from_dict(cls, d: Dict[str, any]) ->
|
|
286
|
-
"""Deserializes the
|
|
287
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteDefaultNamespaceSettingResponse:
|
|
288
|
+
"""Deserializes the DeleteDefaultNamespaceSettingResponse from a dictionary."""
|
|
287
289
|
return cls(etag=d.get('etag', None))
|
|
288
290
|
|
|
289
291
|
|
|
290
292
|
@dataclass
|
|
291
293
|
class DeletePersonalComputeSettingResponse:
|
|
294
|
+
"""The etag is returned."""
|
|
295
|
+
|
|
292
296
|
etag: str
|
|
293
297
|
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
294
298
|
for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
|
|
295
299
|
overwriting each other. It is strongly suggested that systems make use of the etag in the read
|
|
296
|
-
->
|
|
297
|
-
etag from a GET request, and pass it with the
|
|
298
|
-
are
|
|
300
|
+
-> delete pattern to perform setting deletions in order to avoid race conditions. That is, get
|
|
301
|
+
an etag from a GET request, and pass it with the DELETE request to identify the rule set version
|
|
302
|
+
you are deleting."""
|
|
299
303
|
|
|
300
304
|
def as_dict(self) -> dict:
|
|
301
305
|
"""Serializes the DeletePersonalComputeSettingResponse into a dictionary suitable for use as a JSON request body."""
|
|
@@ -309,8 +313,34 @@ class DeletePersonalComputeSettingResponse:
|
|
|
309
313
|
return cls(etag=d.get('etag', None))
|
|
310
314
|
|
|
311
315
|
|
|
316
|
+
@dataclass
|
|
317
|
+
class DeleteRestrictWorkspaceAdminsSettingResponse:
|
|
318
|
+
"""The etag is returned."""
|
|
319
|
+
|
|
320
|
+
etag: str
|
|
321
|
+
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
322
|
+
for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
|
|
323
|
+
overwriting each other. It is strongly suggested that systems make use of the etag in the read
|
|
324
|
+
-> delete pattern to perform setting deletions in order to avoid race conditions. That is, get
|
|
325
|
+
an etag from a GET request, and pass it with the DELETE request to identify the rule set version
|
|
326
|
+
you are deleting."""
|
|
327
|
+
|
|
328
|
+
def as_dict(self) -> dict:
|
|
329
|
+
"""Serializes the DeleteRestrictWorkspaceAdminsSettingResponse into a dictionary suitable for use as a JSON request body."""
|
|
330
|
+
body = {}
|
|
331
|
+
if self.etag is not None: body['etag'] = self.etag
|
|
332
|
+
return body
|
|
333
|
+
|
|
334
|
+
@classmethod
|
|
335
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteRestrictWorkspaceAdminsSettingResponse:
|
|
336
|
+
"""Deserializes the DeleteRestrictWorkspaceAdminsSettingResponse from a dictionary."""
|
|
337
|
+
return cls(etag=d.get('etag', None))
|
|
338
|
+
|
|
339
|
+
|
|
312
340
|
@dataclass
|
|
313
341
|
class ExchangeToken:
|
|
342
|
+
"""The exchange token is the result of the token exchange with the IdP"""
|
|
343
|
+
|
|
314
344
|
credential: Optional[str] = None
|
|
315
345
|
"""The requested token."""
|
|
316
346
|
|
|
@@ -324,7 +354,7 @@ class ExchangeToken:
|
|
|
324
354
|
"""The scopes of access granted in the token."""
|
|
325
355
|
|
|
326
356
|
token_type: Optional[TokenType] = None
|
|
327
|
-
"""The type of
|
|
357
|
+
"""The type of this exchange token"""
|
|
328
358
|
|
|
329
359
|
def as_dict(self) -> dict:
|
|
330
360
|
"""Serializes the ExchangeToken into a dictionary suitable for use as a JSON request body."""
|
|
@@ -348,9 +378,13 @@ class ExchangeToken:
|
|
|
348
378
|
|
|
349
379
|
@dataclass
|
|
350
380
|
class ExchangeTokenRequest:
|
|
381
|
+
"""Exchange a token with the IdP"""
|
|
382
|
+
|
|
351
383
|
partition_id: PartitionId
|
|
384
|
+
"""The partition of Credentials store"""
|
|
352
385
|
|
|
353
386
|
token_type: List[TokenType]
|
|
387
|
+
"""A list of token types being requested"""
|
|
354
388
|
|
|
355
389
|
scopes: List[str]
|
|
356
390
|
"""Array of scopes for the token request."""
|
|
@@ -373,6 +407,8 @@ class ExchangeTokenRequest:
|
|
|
373
407
|
|
|
374
408
|
@dataclass
|
|
375
409
|
class ExchangeTokenResponse:
|
|
410
|
+
"""Exhanged tokens were successfully returned."""
|
|
411
|
+
|
|
376
412
|
values: Optional[List[ExchangeToken]] = None
|
|
377
413
|
|
|
378
414
|
def as_dict(self) -> dict:
|
|
@@ -911,6 +947,8 @@ class NetworkConnectivityConfiguration:
|
|
|
911
947
|
|
|
912
948
|
@dataclass
|
|
913
949
|
class PartitionId:
|
|
950
|
+
"""Partition by workspace or account"""
|
|
951
|
+
|
|
914
952
|
workspace_id: Optional[int] = None
|
|
915
953
|
"""The ID of the workspace."""
|
|
916
954
|
|
|
@@ -973,7 +1011,8 @@ class PersonalComputeSetting:
|
|
|
973
1011
|
setting_name: Optional[str] = None
|
|
974
1012
|
"""Name of the corresponding setting. This field is populated in the response, but it will not be
|
|
975
1013
|
respected even if it's set in the request body. The setting name in the path parameter will be
|
|
976
|
-
respected instead.
|
|
1014
|
+
respected instead. Setting name is required to be 'default' if the setting only has one instance
|
|
1015
|
+
per workspace."""
|
|
977
1016
|
|
|
978
1017
|
def as_dict(self) -> dict:
|
|
979
1018
|
"""Serializes the PersonalComputeSetting into a dictionary suitable for use as a JSON request body."""
|
|
@@ -1064,6 +1103,65 @@ class ReplaceIpAccessList:
|
|
|
1064
1103
|
list_type=_enum(d, 'list_type', ListType))
|
|
1065
1104
|
|
|
1066
1105
|
|
|
1106
|
+
@dataclass
|
|
1107
|
+
class RestrictWorkspaceAdminsMessage:
|
|
1108
|
+
status: RestrictWorkspaceAdminsMessageStatus
|
|
1109
|
+
|
|
1110
|
+
def as_dict(self) -> dict:
|
|
1111
|
+
"""Serializes the RestrictWorkspaceAdminsMessage into a dictionary suitable for use as a JSON request body."""
|
|
1112
|
+
body = {}
|
|
1113
|
+
if self.status is not None: body['status'] = self.status.value
|
|
1114
|
+
return body
|
|
1115
|
+
|
|
1116
|
+
@classmethod
|
|
1117
|
+
def from_dict(cls, d: Dict[str, any]) -> RestrictWorkspaceAdminsMessage:
|
|
1118
|
+
"""Deserializes the RestrictWorkspaceAdminsMessage from a dictionary."""
|
|
1119
|
+
return cls(status=_enum(d, 'status', RestrictWorkspaceAdminsMessageStatus))
|
|
1120
|
+
|
|
1121
|
+
|
|
1122
|
+
class RestrictWorkspaceAdminsMessageStatus(Enum):
|
|
1123
|
+
|
|
1124
|
+
ALLOW_ALL = 'ALLOW_ALL'
|
|
1125
|
+
RESTRICT_TOKENS_AND_JOB_RUN_AS = 'RESTRICT_TOKENS_AND_JOB_RUN_AS'
|
|
1126
|
+
STATUS_UNSPECIFIED = 'STATUS_UNSPECIFIED'
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
@dataclass
|
|
1130
|
+
class RestrictWorkspaceAdminsSetting:
|
|
1131
|
+
restrict_workspace_admins: RestrictWorkspaceAdminsMessage
|
|
1132
|
+
|
|
1133
|
+
etag: Optional[str] = None
|
|
1134
|
+
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
1135
|
+
for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
|
|
1136
|
+
overwriting each other. It is strongly suggested that systems make use of the etag in the read
|
|
1137
|
+
-> update pattern to perform setting updates in order to avoid race conditions. That is, get an
|
|
1138
|
+
etag from a GET request, and pass it with the PATCH request to identify the setting version you
|
|
1139
|
+
are updating."""
|
|
1140
|
+
|
|
1141
|
+
setting_name: Optional[str] = None
|
|
1142
|
+
"""Name of the corresponding setting. This field is populated in the response, but it will not be
|
|
1143
|
+
respected even if it's set in the request body. The setting name in the path parameter will be
|
|
1144
|
+
respected instead. Setting name is required to be 'default' if the setting only has one instance
|
|
1145
|
+
per workspace."""
|
|
1146
|
+
|
|
1147
|
+
def as_dict(self) -> dict:
|
|
1148
|
+
"""Serializes the RestrictWorkspaceAdminsSetting into a dictionary suitable for use as a JSON request body."""
|
|
1149
|
+
body = {}
|
|
1150
|
+
if self.etag is not None: body['etag'] = self.etag
|
|
1151
|
+
if self.restrict_workspace_admins:
|
|
1152
|
+
body['restrict_workspace_admins'] = self.restrict_workspace_admins.as_dict()
|
|
1153
|
+
if self.setting_name is not None: body['setting_name'] = self.setting_name
|
|
1154
|
+
return body
|
|
1155
|
+
|
|
1156
|
+
@classmethod
|
|
1157
|
+
def from_dict(cls, d: Dict[str, any]) -> RestrictWorkspaceAdminsSetting:
|
|
1158
|
+
"""Deserializes the RestrictWorkspaceAdminsSetting from a dictionary."""
|
|
1159
|
+
return cls(etag=d.get('etag', None),
|
|
1160
|
+
restrict_workspace_admins=_from_dict(d, 'restrict_workspace_admins',
|
|
1161
|
+
RestrictWorkspaceAdminsMessage),
|
|
1162
|
+
setting_name=d.get('setting_name', None))
|
|
1163
|
+
|
|
1164
|
+
|
|
1067
1165
|
@dataclass
|
|
1068
1166
|
class RevokeTokenRequest:
|
|
1069
1167
|
token_id: str
|
|
@@ -1316,6 +1414,43 @@ class TokenType(Enum):
|
|
|
1316
1414
|
AZURE_ACTIVE_DIRECTORY_TOKEN = 'AZURE_ACTIVE_DIRECTORY_TOKEN'
|
|
1317
1415
|
|
|
1318
1416
|
|
|
1417
|
+
@dataclass
|
|
1418
|
+
class UpdateDefaultNamespaceSettingRequest:
|
|
1419
|
+
"""Details required to update a setting."""
|
|
1420
|
+
|
|
1421
|
+
allow_missing: bool
|
|
1422
|
+
"""This should always be set to true for Settings API. Added for AIP compliance."""
|
|
1423
|
+
|
|
1424
|
+
setting: DefaultNamespaceSetting
|
|
1425
|
+
"""This represents the setting configuration for the default namespace in the Databricks workspace.
|
|
1426
|
+
Setting the default catalog for the workspace determines the catalog that is used when queries
|
|
1427
|
+
do not reference a fully qualified 3 level name. For example, if the default catalog is set to
|
|
1428
|
+
'retail_prod' then a query 'SELECT * FROM myTable' would reference the object
|
|
1429
|
+
'retail_prod.default.myTable' (the schema 'default' is always assumed). This setting requires a
|
|
1430
|
+
restart of clusters and SQL warehouses to take effect. Additionally, the default namespace only
|
|
1431
|
+
applies when using Unity Catalog-enabled compute."""
|
|
1432
|
+
|
|
1433
|
+
field_mask: str
|
|
1434
|
+
"""Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
|
|
1435
|
+
the setting payload will be updated. The field mask needs to be supplied as single string. To
|
|
1436
|
+
specify multiple fields in the field mask, use comma as the separator (no space)."""
|
|
1437
|
+
|
|
1438
|
+
def as_dict(self) -> dict:
|
|
1439
|
+
"""Serializes the UpdateDefaultNamespaceSettingRequest into a dictionary suitable for use as a JSON request body."""
|
|
1440
|
+
body = {}
|
|
1441
|
+
if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
|
|
1442
|
+
if self.field_mask is not None: body['field_mask'] = self.field_mask
|
|
1443
|
+
if self.setting: body['setting'] = self.setting.as_dict()
|
|
1444
|
+
return body
|
|
1445
|
+
|
|
1446
|
+
@classmethod
|
|
1447
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateDefaultNamespaceSettingRequest:
|
|
1448
|
+
"""Deserializes the UpdateDefaultNamespaceSettingRequest from a dictionary."""
|
|
1449
|
+
return cls(allow_missing=d.get('allow_missing', None),
|
|
1450
|
+
field_mask=d.get('field_mask', None),
|
|
1451
|
+
setting=_from_dict(d, 'setting', DefaultNamespaceSetting))
|
|
1452
|
+
|
|
1453
|
+
|
|
1319
1454
|
@dataclass
|
|
1320
1455
|
class UpdateIpAccessList:
|
|
1321
1456
|
"""Details required to update an IP access list."""
|
|
@@ -1357,6 +1492,66 @@ class UpdateIpAccessList:
|
|
|
1357
1492
|
list_type=_enum(d, 'list_type', ListType))
|
|
1358
1493
|
|
|
1359
1494
|
|
|
1495
|
+
@dataclass
|
|
1496
|
+
class UpdatePersonalComputeSettingRequest:
|
|
1497
|
+
"""Details required to update a setting."""
|
|
1498
|
+
|
|
1499
|
+
allow_missing: bool
|
|
1500
|
+
"""This should always be set to true for Settings API. Added for AIP compliance."""
|
|
1501
|
+
|
|
1502
|
+
setting: PersonalComputeSetting
|
|
1503
|
+
|
|
1504
|
+
field_mask: str
|
|
1505
|
+
"""Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
|
|
1506
|
+
the setting payload will be updated. The field mask needs to be supplied as single string. To
|
|
1507
|
+
specify multiple fields in the field mask, use comma as the separator (no space)."""
|
|
1508
|
+
|
|
1509
|
+
def as_dict(self) -> dict:
|
|
1510
|
+
"""Serializes the UpdatePersonalComputeSettingRequest into a dictionary suitable for use as a JSON request body."""
|
|
1511
|
+
body = {}
|
|
1512
|
+
if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
|
|
1513
|
+
if self.field_mask is not None: body['field_mask'] = self.field_mask
|
|
1514
|
+
if self.setting: body['setting'] = self.setting.as_dict()
|
|
1515
|
+
return body
|
|
1516
|
+
|
|
1517
|
+
@classmethod
|
|
1518
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdatePersonalComputeSettingRequest:
|
|
1519
|
+
"""Deserializes the UpdatePersonalComputeSettingRequest from a dictionary."""
|
|
1520
|
+
return cls(allow_missing=d.get('allow_missing', None),
|
|
1521
|
+
field_mask=d.get('field_mask', None),
|
|
1522
|
+
setting=_from_dict(d, 'setting', PersonalComputeSetting))
|
|
1523
|
+
|
|
1524
|
+
|
|
1525
|
+
@dataclass
|
|
1526
|
+
class UpdateRestrictWorkspaceAdminsSettingRequest:
|
|
1527
|
+
"""Details required to update a setting."""
|
|
1528
|
+
|
|
1529
|
+
allow_missing: bool
|
|
1530
|
+
"""This should always be set to true for Settings API. Added for AIP compliance."""
|
|
1531
|
+
|
|
1532
|
+
setting: RestrictWorkspaceAdminsSetting
|
|
1533
|
+
|
|
1534
|
+
field_mask: str
|
|
1535
|
+
"""Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
|
|
1536
|
+
the setting payload will be updated. The field mask needs to be supplied as single string. To
|
|
1537
|
+
specify multiple fields in the field mask, use comma as the separator (no space)."""
|
|
1538
|
+
|
|
1539
|
+
def as_dict(self) -> dict:
|
|
1540
|
+
"""Serializes the UpdateRestrictWorkspaceAdminsSettingRequest into a dictionary suitable for use as a JSON request body."""
|
|
1541
|
+
body = {}
|
|
1542
|
+
if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
|
|
1543
|
+
if self.field_mask is not None: body['field_mask'] = self.field_mask
|
|
1544
|
+
if self.setting: body['setting'] = self.setting.as_dict()
|
|
1545
|
+
return body
|
|
1546
|
+
|
|
1547
|
+
@classmethod
|
|
1548
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateRestrictWorkspaceAdminsSettingRequest:
|
|
1549
|
+
"""Deserializes the UpdateRestrictWorkspaceAdminsSettingRequest from a dictionary."""
|
|
1550
|
+
return cls(allow_missing=d.get('allow_missing', None),
|
|
1551
|
+
field_mask=d.get('field_mask', None),
|
|
1552
|
+
setting=_from_dict(d, 'setting', RestrictWorkspaceAdminsSetting))
|
|
1553
|
+
|
|
1554
|
+
|
|
1360
1555
|
WorkspaceConf = Dict[str, str]
|
|
1361
1556
|
|
|
1362
1557
|
|
|
@@ -1581,12 +1776,14 @@ class AccountSettingsAPI:
|
|
|
1581
1776
|
def __init__(self, api_client):
|
|
1582
1777
|
self._api = api_client
|
|
1583
1778
|
|
|
1584
|
-
def delete_personal_compute_setting(self,
|
|
1779
|
+
def delete_personal_compute_setting(self,
|
|
1780
|
+
*,
|
|
1781
|
+
etag: Optional[str] = None) -> DeletePersonalComputeSettingResponse:
|
|
1585
1782
|
"""Delete Personal Compute setting.
|
|
1586
1783
|
|
|
1587
1784
|
Reverts back the Personal Compute setting value to default (ON)
|
|
1588
1785
|
|
|
1589
|
-
:param etag: str
|
|
1786
|
+
:param etag: str (optional)
|
|
1590
1787
|
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
1591
1788
|
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
1592
1789
|
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
@@ -1606,12 +1803,12 @@ class AccountSettingsAPI:
|
|
|
1606
1803
|
headers=headers)
|
|
1607
1804
|
return DeletePersonalComputeSettingResponse.from_dict(res)
|
|
1608
1805
|
|
|
1609
|
-
def
|
|
1806
|
+
def get_personal_compute_setting(self, *, etag: Optional[str] = None) -> PersonalComputeSetting:
|
|
1610
1807
|
"""Get Personal Compute setting.
|
|
1611
1808
|
|
|
1612
1809
|
Gets the value of the Personal Compute setting.
|
|
1613
1810
|
|
|
1614
|
-
:param etag: str
|
|
1811
|
+
:param etag: str (optional)
|
|
1615
1812
|
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
1616
1813
|
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
1617
1814
|
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
@@ -1631,23 +1828,25 @@ class AccountSettingsAPI:
|
|
|
1631
1828
|
headers=headers)
|
|
1632
1829
|
return PersonalComputeSetting.from_dict(res)
|
|
1633
1830
|
|
|
1634
|
-
def update_personal_compute_setting(
|
|
1635
|
-
|
|
1636
|
-
*,
|
|
1637
|
-
allow_missing: Optional[bool] = None,
|
|
1638
|
-
setting: Optional[PersonalComputeSetting] = None) -> PersonalComputeSetting:
|
|
1831
|
+
def update_personal_compute_setting(self, allow_missing: bool, setting: PersonalComputeSetting,
|
|
1832
|
+
field_mask: str) -> PersonalComputeSetting:
|
|
1639
1833
|
"""Update Personal Compute setting.
|
|
1640
1834
|
|
|
1641
1835
|
Updates the value of the Personal Compute setting.
|
|
1642
1836
|
|
|
1643
|
-
:param allow_missing: bool
|
|
1644
|
-
This should always be set to true for Settings
|
|
1645
|
-
:param setting: :class:`PersonalComputeSetting`
|
|
1837
|
+
:param allow_missing: bool
|
|
1838
|
+
This should always be set to true for Settings API. Added for AIP compliance.
|
|
1839
|
+
:param setting: :class:`PersonalComputeSetting`
|
|
1840
|
+
:param field_mask: str
|
|
1841
|
+
Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
|
|
1842
|
+
setting payload will be updated. The field mask needs to be supplied as single string. To specify
|
|
1843
|
+
multiple fields in the field mask, use comma as the separator (no space).
|
|
1646
1844
|
|
|
1647
1845
|
:returns: :class:`PersonalComputeSetting`
|
|
1648
1846
|
"""
|
|
1649
1847
|
body = {}
|
|
1650
1848
|
if allow_missing is not None: body['allow_missing'] = allow_missing
|
|
1849
|
+
if field_mask is not None: body['field_mask'] = field_mask
|
|
1651
1850
|
if setting is not None: body['setting'] = setting.as_dict()
|
|
1652
1851
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1653
1852
|
res = self._api.do(
|
|
@@ -1669,11 +1868,13 @@ class CredentialsManagerAPI:
|
|
|
1669
1868
|
scopes: List[str]) -> ExchangeTokenResponse:
|
|
1670
1869
|
"""Exchange token.
|
|
1671
1870
|
|
|
1672
|
-
Exchange tokens with an Identity Provider to get a new access token. It
|
|
1871
|
+
Exchange tokens with an Identity Provider to get a new access token. It allows specifying scopes to
|
|
1673
1872
|
determine token permissions.
|
|
1674
1873
|
|
|
1675
1874
|
:param partition_id: :class:`PartitionId`
|
|
1875
|
+
The partition of Credentials store
|
|
1676
1876
|
:param token_type: List[:class:`TokenType`]
|
|
1877
|
+
A list of token types being requested
|
|
1677
1878
|
:param scopes: List[str]
|
|
1678
1879
|
Array of scopes for the token request.
|
|
1679
1880
|
|
|
@@ -2075,10 +2276,9 @@ class NetworkConnectivityAPI:
|
|
|
2075
2276
|
f'/api/2.0/accounts/{self._api.account_id}/network-connectivity-configs',
|
|
2076
2277
|
query=query,
|
|
2077
2278
|
headers=headers)
|
|
2078
|
-
if 'items'
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
yield NetworkConnectivityConfiguration.from_dict(v)
|
|
2279
|
+
if 'items' in json:
|
|
2280
|
+
for v in json['items']:
|
|
2281
|
+
yield NetworkConnectivityConfiguration.from_dict(v)
|
|
2082
2282
|
if 'next_page_token' not in json or not json['next_page_token']:
|
|
2083
2283
|
return
|
|
2084
2284
|
query['page_token'] = json['next_page_token']
|
|
@@ -2110,10 +2310,9 @@ class NetworkConnectivityAPI:
|
|
|
2110
2310
|
f'/api/2.0/accounts/{self._api.account_id}/network-connectivity-configs/{network_connectivity_config_id}/private-endpoint-rules',
|
|
2111
2311
|
query=query,
|
|
2112
2312
|
headers=headers)
|
|
2113
|
-
if 'items'
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
yield NccAzurePrivateEndpointRule.from_dict(v)
|
|
2313
|
+
if 'items' in json:
|
|
2314
|
+
for v in json['items']:
|
|
2315
|
+
yield NccAzurePrivateEndpointRule.from_dict(v)
|
|
2117
2316
|
if 'next_page_token' not in json or not json['next_page_token']:
|
|
2118
2317
|
return
|
|
2119
2318
|
query['page_token'] = json['next_page_token']
|
|
@@ -2134,7 +2333,9 @@ class SettingsAPI:
|
|
|
2134
2333
|
def __init__(self, api_client):
|
|
2135
2334
|
self._api = api_client
|
|
2136
2335
|
|
|
2137
|
-
def
|
|
2336
|
+
def delete_default_namespace_setting(self,
|
|
2337
|
+
*,
|
|
2338
|
+
etag: Optional[str] = None) -> DeleteDefaultNamespaceSettingResponse:
|
|
2138
2339
|
"""Delete the default namespace setting.
|
|
2139
2340
|
|
|
2140
2341
|
Deletes the default namespace setting for the workspace. A fresh etag needs to be provided in DELETE
|
|
@@ -2142,14 +2343,14 @@ class SettingsAPI:
|
|
|
2142
2343
|
request. If the setting is updated/deleted concurrently, DELETE will fail with 409 and the request
|
|
2143
2344
|
will need to be retried by using the fresh etag in the 409 response.
|
|
2144
2345
|
|
|
2145
|
-
:param etag: str
|
|
2346
|
+
:param etag: str (optional)
|
|
2146
2347
|
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
2147
2348
|
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
2148
2349
|
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
2149
2350
|
to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
|
|
2150
2351
|
request, and pass it with the DELETE request to identify the rule set version you are deleting.
|
|
2151
2352
|
|
|
2152
|
-
:returns: :class:`
|
|
2353
|
+
:returns: :class:`DeleteDefaultNamespaceSettingResponse`
|
|
2153
2354
|
"""
|
|
2154
2355
|
|
|
2155
2356
|
query = {}
|
|
@@ -2159,14 +2360,44 @@ class SettingsAPI:
|
|
|
2159
2360
|
'/api/2.0/settings/types/default_namespace_ws/names/default',
|
|
2160
2361
|
query=query,
|
|
2161
2362
|
headers=headers)
|
|
2162
|
-
return
|
|
2363
|
+
return DeleteDefaultNamespaceSettingResponse.from_dict(res)
|
|
2364
|
+
|
|
2365
|
+
def delete_restrict_workspace_admins_setting(self,
|
|
2366
|
+
*,
|
|
2367
|
+
etag: Optional[str] = None
|
|
2368
|
+
) -> DeleteRestrictWorkspaceAdminsSettingResponse:
|
|
2369
|
+
"""Delete the restrict workspace admins setting.
|
|
2370
|
+
|
|
2371
|
+
Reverts the restrict workspace admins setting status for the workspace. A fresh etag needs to be
|
|
2372
|
+
provided in DELETE requests (as a query parameter). The etag can be retrieved by making a GET request
|
|
2373
|
+
before the DELETE request. If the setting is updated/deleted concurrently, DELETE will fail with 409
|
|
2374
|
+
and the request will need to be retried by using the fresh etag in the 409 response.
|
|
2375
|
+
|
|
2376
|
+
:param etag: str (optional)
|
|
2377
|
+
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
2378
|
+
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
2379
|
+
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
2380
|
+
to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
|
|
2381
|
+
request, and pass it with the DELETE request to identify the rule set version you are deleting.
|
|
2382
|
+
|
|
2383
|
+
:returns: :class:`DeleteRestrictWorkspaceAdminsSettingResponse`
|
|
2384
|
+
"""
|
|
2163
2385
|
|
|
2164
|
-
|
|
2386
|
+
query = {}
|
|
2387
|
+
if etag is not None: query['etag'] = etag
|
|
2388
|
+
headers = {'Accept': 'application/json', }
|
|
2389
|
+
res = self._api.do('DELETE',
|
|
2390
|
+
'/api/2.0/settings/types/restrict_workspace_admins/names/default',
|
|
2391
|
+
query=query,
|
|
2392
|
+
headers=headers)
|
|
2393
|
+
return DeleteRestrictWorkspaceAdminsSettingResponse.from_dict(res)
|
|
2394
|
+
|
|
2395
|
+
def get_default_namespace_setting(self, *, etag: Optional[str] = None) -> DefaultNamespaceSetting:
|
|
2165
2396
|
"""Get the default namespace setting.
|
|
2166
2397
|
|
|
2167
2398
|
Gets the default namespace setting.
|
|
2168
2399
|
|
|
2169
|
-
:param etag: str
|
|
2400
|
+
:param etag: str (optional)
|
|
2170
2401
|
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
2171
2402
|
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
2172
2403
|
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
@@ -2185,12 +2416,34 @@ class SettingsAPI:
|
|
|
2185
2416
|
headers=headers)
|
|
2186
2417
|
return DefaultNamespaceSetting.from_dict(res)
|
|
2187
2418
|
|
|
2188
|
-
def
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2419
|
+
def get_restrict_workspace_admins_setting(self,
|
|
2420
|
+
*,
|
|
2421
|
+
etag: Optional[str] = None) -> RestrictWorkspaceAdminsSetting:
|
|
2422
|
+
"""Get the restrict workspace admins setting.
|
|
2423
|
+
|
|
2424
|
+
Gets the restrict workspace admins setting.
|
|
2425
|
+
|
|
2426
|
+
:param etag: str (optional)
|
|
2427
|
+
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
2428
|
+
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
2429
|
+
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
2430
|
+
to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
|
|
2431
|
+
request, and pass it with the DELETE request to identify the rule set version you are deleting.
|
|
2432
|
+
|
|
2433
|
+
:returns: :class:`RestrictWorkspaceAdminsSetting`
|
|
2434
|
+
"""
|
|
2435
|
+
|
|
2436
|
+
query = {}
|
|
2437
|
+
if etag is not None: query['etag'] = etag
|
|
2438
|
+
headers = {'Accept': 'application/json', }
|
|
2439
|
+
res = self._api.do('GET',
|
|
2440
|
+
'/api/2.0/settings/types/restrict_workspace_admins/names/default',
|
|
2441
|
+
query=query,
|
|
2442
|
+
headers=headers)
|
|
2443
|
+
return RestrictWorkspaceAdminsSetting.from_dict(res)
|
|
2444
|
+
|
|
2445
|
+
def update_default_namespace_setting(self, allow_missing: bool, setting: DefaultNamespaceSetting,
|
|
2446
|
+
field_mask: str) -> DefaultNamespaceSetting:
|
|
2194
2447
|
"""Update the default namespace setting.
|
|
2195
2448
|
|
|
2196
2449
|
Updates the default namespace setting for the workspace. A fresh etag needs to be provided in PATCH
|
|
@@ -2200,16 +2453,9 @@ class SettingsAPI:
|
|
|
2200
2453
|
updated concurrently, PATCH will fail with 409 and the request will need to be retried by using the
|
|
2201
2454
|
fresh etag in the 409 response.
|
|
2202
2455
|
|
|
2203
|
-
:param allow_missing: bool
|
|
2456
|
+
:param allow_missing: bool
|
|
2204
2457
|
This should always be set to true for Settings API. Added for AIP compliance.
|
|
2205
|
-
:param
|
|
2206
|
-
Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
|
|
2207
|
-
setting payload will be updated. For example, for Default Namespace setting, the field mask is
|
|
2208
|
-
supposed to contain fields from the DefaultNamespaceSetting.namespace schema.
|
|
2209
|
-
|
|
2210
|
-
The field mask needs to be supplied as single string. To specify multiple fields in the field mask,
|
|
2211
|
-
use comma as the seperator (no space).
|
|
2212
|
-
:param setting: :class:`DefaultNamespaceSetting` (optional)
|
|
2458
|
+
:param setting: :class:`DefaultNamespaceSetting`
|
|
2213
2459
|
This represents the setting configuration for the default namespace in the Databricks workspace.
|
|
2214
2460
|
Setting the default catalog for the workspace determines the catalog that is used when queries do
|
|
2215
2461
|
not reference a fully qualified 3 level name. For example, if the default catalog is set to
|
|
@@ -2217,6 +2463,10 @@ class SettingsAPI:
|
|
|
2217
2463
|
'retail_prod.default.myTable' (the schema 'default' is always assumed). This setting requires a
|
|
2218
2464
|
restart of clusters and SQL warehouses to take effect. Additionally, the default namespace only
|
|
2219
2465
|
applies when using Unity Catalog-enabled compute.
|
|
2466
|
+
:param field_mask: str
|
|
2467
|
+
Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
|
|
2468
|
+
setting payload will be updated. The field mask needs to be supplied as single string. To specify
|
|
2469
|
+
multiple fields in the field mask, use comma as the separator (no space).
|
|
2220
2470
|
|
|
2221
2471
|
:returns: :class:`DefaultNamespaceSetting`
|
|
2222
2472
|
"""
|
|
@@ -2231,6 +2481,37 @@ class SettingsAPI:
|
|
|
2231
2481
|
headers=headers)
|
|
2232
2482
|
return DefaultNamespaceSetting.from_dict(res)
|
|
2233
2483
|
|
|
2484
|
+
def update_restrict_workspace_admins_setting(self, allow_missing: bool,
|
|
2485
|
+
setting: RestrictWorkspaceAdminsSetting,
|
|
2486
|
+
field_mask: str) -> RestrictWorkspaceAdminsSetting:
|
|
2487
|
+
"""Update the restrict workspace admins setting.
|
|
2488
|
+
|
|
2489
|
+
Updates the restrict workspace admins setting for the workspace. A fresh etag needs to be provided in
|
|
2490
|
+
PATCH requests (as part of the setting field). The etag can be retrieved by making a GET request
|
|
2491
|
+
before the PATCH request. If the setting is updated concurrently, PATCH will fail with 409 and the
|
|
2492
|
+
request will need to be retried by using the fresh etag in the 409 response.
|
|
2493
|
+
|
|
2494
|
+
:param allow_missing: bool
|
|
2495
|
+
This should always be set to true for Settings API. Added for AIP compliance.
|
|
2496
|
+
:param setting: :class:`RestrictWorkspaceAdminsSetting`
|
|
2497
|
+
:param field_mask: str
|
|
2498
|
+
Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
|
|
2499
|
+
setting payload will be updated. The field mask needs to be supplied as single string. To specify
|
|
2500
|
+
multiple fields in the field mask, use comma as the separator (no space).
|
|
2501
|
+
|
|
2502
|
+
:returns: :class:`RestrictWorkspaceAdminsSetting`
|
|
2503
|
+
"""
|
|
2504
|
+
body = {}
|
|
2505
|
+
if allow_missing is not None: body['allow_missing'] = allow_missing
|
|
2506
|
+
if field_mask is not None: body['field_mask'] = field_mask
|
|
2507
|
+
if setting is not None: body['setting'] = setting.as_dict()
|
|
2508
|
+
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2509
|
+
res = self._api.do('PATCH',
|
|
2510
|
+
'/api/2.0/settings/types/restrict_workspace_admins/names/default',
|
|
2511
|
+
body=body,
|
|
2512
|
+
headers=headers)
|
|
2513
|
+
return RestrictWorkspaceAdminsSetting.from_dict(res)
|
|
2514
|
+
|
|
2234
2515
|
|
|
2235
2516
|
class TokenManagementAPI:
|
|
2236
2517
|
"""Enables administrators to get all tokens and delete tokens for other users. Admins can either get every
|
|
@@ -2470,9 +2751,9 @@ class WorkspaceConfAPI:
|
|
|
2470
2751
|
if keys is not None: query['keys'] = keys
|
|
2471
2752
|
headers = {'Accept': 'application/json', }
|
|
2472
2753
|
res = self._api.do('GET', '/api/2.0/workspace-conf', query=query, headers=headers)
|
|
2473
|
-
return
|
|
2754
|
+
return res
|
|
2474
2755
|
|
|
2475
|
-
def set_status(self):
|
|
2756
|
+
def set_status(self, contents: Dict[str, str]):
|
|
2476
2757
|
"""Enable/disable features.
|
|
2477
2758
|
|
|
2478
2759
|
Sets the configuration status for a workspace, including enabling or disabling it.
|
|
@@ -2482,4 +2763,4 @@ class WorkspaceConfAPI:
|
|
|
2482
2763
|
"""
|
|
2483
2764
|
|
|
2484
2765
|
headers = {'Content-Type': 'application/json', }
|
|
2485
|
-
self._api.do('PATCH', '/api/2.0/workspace-conf', headers=headers)
|
|
2766
|
+
self._api.do('PATCH', '/api/2.0/workspace-conf', body=contents, headers=headers)
|
|
@@ -1644,10 +1644,9 @@ class CleanRoomsAPI:
|
|
|
1644
1644
|
|
|
1645
1645
|
while True:
|
|
1646
1646
|
json = self._api.do('GET', '/api/2.1/unity-catalog/clean-rooms', query=query, headers=headers)
|
|
1647
|
-
if 'clean_rooms'
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
yield CleanRoomInfo.from_dict(v)
|
|
1647
|
+
if 'clean_rooms' in json:
|
|
1648
|
+
for v in json['clean_rooms']:
|
|
1649
|
+
yield CleanRoomInfo.from_dict(v)
|
|
1651
1650
|
if 'next_page_token' not in json or not json['next_page_token']:
|
|
1652
1651
|
return
|
|
1653
1652
|
query['page_token'] = json['next_page_token']
|