databricks-sdk 0.32.2__py3-none-any.whl → 0.33.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 +9 -0
- databricks/sdk/credentials_provider.py +91 -6
- databricks/sdk/service/apps.py +154 -106
- databricks/sdk/service/catalog.py +266 -7
- databricks/sdk/service/compute.py +68 -18
- databricks/sdk/service/dashboards.py +32 -9
- databricks/sdk/service/jobs.py +98 -86
- databricks/sdk/service/pipelines.py +58 -1
- databricks/sdk/service/serving.py +326 -10
- databricks/sdk/service/settings.py +394 -1
- databricks/sdk/service/sql.py +3 -243
- databricks/sdk/service/workspace.py +266 -105
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.32.2.dist-info → databricks_sdk-0.33.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.32.2.dist-info → databricks_sdk-0.33.0.dist-info}/RECORD +19 -19
- {databricks_sdk-0.32.2.dist-info → databricks_sdk-0.33.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.32.2.dist-info → databricks_sdk-0.33.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.32.2.dist-info → databricks_sdk-0.33.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.32.2.dist-info → databricks_sdk-0.33.0.dist-info}/top_level.txt +0 -0
|
@@ -50,6 +50,22 @@ class AutomaticClusterUpdateSetting:
|
|
|
50
50
|
setting_name=d.get('setting_name', None))
|
|
51
51
|
|
|
52
52
|
|
|
53
|
+
@dataclass
|
|
54
|
+
class BooleanMessage:
|
|
55
|
+
value: Optional[bool] = None
|
|
56
|
+
|
|
57
|
+
def as_dict(self) -> dict:
|
|
58
|
+
"""Serializes the BooleanMessage into a dictionary suitable for use as a JSON request body."""
|
|
59
|
+
body = {}
|
|
60
|
+
if self.value is not None: body['value'] = self.value
|
|
61
|
+
return body
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
def from_dict(cls, d: Dict[str, any]) -> BooleanMessage:
|
|
65
|
+
"""Deserializes the BooleanMessage from a dictionary."""
|
|
66
|
+
return cls(value=d.get('value', None))
|
|
67
|
+
|
|
68
|
+
|
|
53
69
|
@dataclass
|
|
54
70
|
class ClusterAutoRestartMessage:
|
|
55
71
|
can_toggle: Optional[bool] = None
|
|
@@ -680,6 +696,54 @@ class DeleteDefaultNamespaceSettingResponse:
|
|
|
680
696
|
return cls(etag=d.get('etag', None))
|
|
681
697
|
|
|
682
698
|
|
|
699
|
+
@dataclass
|
|
700
|
+
class DeleteDisableLegacyAccessResponse:
|
|
701
|
+
"""The etag is returned."""
|
|
702
|
+
|
|
703
|
+
etag: str
|
|
704
|
+
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
705
|
+
for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
|
|
706
|
+
overwriting each other. It is strongly suggested that systems make use of the etag in the read
|
|
707
|
+
-> delete pattern to perform setting deletions in order to avoid race conditions. That is, get
|
|
708
|
+
an etag from a GET request, and pass it with the DELETE request to identify the rule set version
|
|
709
|
+
you are deleting."""
|
|
710
|
+
|
|
711
|
+
def as_dict(self) -> dict:
|
|
712
|
+
"""Serializes the DeleteDisableLegacyAccessResponse into a dictionary suitable for use as a JSON request body."""
|
|
713
|
+
body = {}
|
|
714
|
+
if self.etag is not None: body['etag'] = self.etag
|
|
715
|
+
return body
|
|
716
|
+
|
|
717
|
+
@classmethod
|
|
718
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteDisableLegacyAccessResponse:
|
|
719
|
+
"""Deserializes the DeleteDisableLegacyAccessResponse from a dictionary."""
|
|
720
|
+
return cls(etag=d.get('etag', None))
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
@dataclass
|
|
724
|
+
class DeleteDisableLegacyFeaturesResponse:
|
|
725
|
+
"""The etag is returned."""
|
|
726
|
+
|
|
727
|
+
etag: str
|
|
728
|
+
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
729
|
+
for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
|
|
730
|
+
overwriting each other. It is strongly suggested that systems make use of the etag in the read
|
|
731
|
+
-> delete pattern to perform setting deletions in order to avoid race conditions. That is, get
|
|
732
|
+
an etag from a GET request, and pass it with the DELETE request to identify the rule set version
|
|
733
|
+
you are deleting."""
|
|
734
|
+
|
|
735
|
+
def as_dict(self) -> dict:
|
|
736
|
+
"""Serializes the DeleteDisableLegacyFeaturesResponse into a dictionary suitable for use as a JSON request body."""
|
|
737
|
+
body = {}
|
|
738
|
+
if self.etag is not None: body['etag'] = self.etag
|
|
739
|
+
return body
|
|
740
|
+
|
|
741
|
+
@classmethod
|
|
742
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteDisableLegacyFeaturesResponse:
|
|
743
|
+
"""Deserializes the DeleteDisableLegacyFeaturesResponse from a dictionary."""
|
|
744
|
+
return cls(etag=d.get('etag', None))
|
|
745
|
+
|
|
746
|
+
|
|
683
747
|
@dataclass
|
|
684
748
|
class DeleteNetworkConnectivityConfigurationResponse:
|
|
685
749
|
|
|
@@ -765,6 +829,75 @@ class DestinationType(Enum):
|
|
|
765
829
|
WEBHOOK = 'WEBHOOK'
|
|
766
830
|
|
|
767
831
|
|
|
832
|
+
@dataclass
|
|
833
|
+
class DisableLegacyAccess:
|
|
834
|
+
disable_legacy_access: BooleanMessage
|
|
835
|
+
|
|
836
|
+
etag: Optional[str] = None
|
|
837
|
+
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
838
|
+
for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
|
|
839
|
+
overwriting each other. It is strongly suggested that systems make use of the etag in the read
|
|
840
|
+
-> update pattern to perform setting updates in order to avoid race conditions. That is, get an
|
|
841
|
+
etag from a GET request, and pass it with the PATCH request to identify the setting version you
|
|
842
|
+
are updating."""
|
|
843
|
+
|
|
844
|
+
setting_name: Optional[str] = None
|
|
845
|
+
"""Name of the corresponding setting. This field is populated in the response, but it will not be
|
|
846
|
+
respected even if it's set in the request body. The setting name in the path parameter will be
|
|
847
|
+
respected instead. Setting name is required to be 'default' if the setting only has one instance
|
|
848
|
+
per workspace."""
|
|
849
|
+
|
|
850
|
+
def as_dict(self) -> dict:
|
|
851
|
+
"""Serializes the DisableLegacyAccess into a dictionary suitable for use as a JSON request body."""
|
|
852
|
+
body = {}
|
|
853
|
+
if self.disable_legacy_access: body['disable_legacy_access'] = self.disable_legacy_access.as_dict()
|
|
854
|
+
if self.etag is not None: body['etag'] = self.etag
|
|
855
|
+
if self.setting_name is not None: body['setting_name'] = self.setting_name
|
|
856
|
+
return body
|
|
857
|
+
|
|
858
|
+
@classmethod
|
|
859
|
+
def from_dict(cls, d: Dict[str, any]) -> DisableLegacyAccess:
|
|
860
|
+
"""Deserializes the DisableLegacyAccess from a dictionary."""
|
|
861
|
+
return cls(disable_legacy_access=_from_dict(d, 'disable_legacy_access', BooleanMessage),
|
|
862
|
+
etag=d.get('etag', None),
|
|
863
|
+
setting_name=d.get('setting_name', None))
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
@dataclass
|
|
867
|
+
class DisableLegacyFeatures:
|
|
868
|
+
disable_legacy_features: BooleanMessage
|
|
869
|
+
|
|
870
|
+
etag: Optional[str] = None
|
|
871
|
+
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
872
|
+
for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
|
|
873
|
+
overwriting each other. It is strongly suggested that systems make use of the etag in the read
|
|
874
|
+
-> update pattern to perform setting updates in order to avoid race conditions. That is, get an
|
|
875
|
+
etag from a GET request, and pass it with the PATCH request to identify the setting version you
|
|
876
|
+
are updating."""
|
|
877
|
+
|
|
878
|
+
setting_name: Optional[str] = None
|
|
879
|
+
"""Name of the corresponding setting. This field is populated in the response, but it will not be
|
|
880
|
+
respected even if it's set in the request body. The setting name in the path parameter will be
|
|
881
|
+
respected instead. Setting name is required to be 'default' if the setting only has one instance
|
|
882
|
+
per workspace."""
|
|
883
|
+
|
|
884
|
+
def as_dict(self) -> dict:
|
|
885
|
+
"""Serializes the DisableLegacyFeatures into a dictionary suitable for use as a JSON request body."""
|
|
886
|
+
body = {}
|
|
887
|
+
if self.disable_legacy_features:
|
|
888
|
+
body['disable_legacy_features'] = self.disable_legacy_features.as_dict()
|
|
889
|
+
if self.etag is not None: body['etag'] = self.etag
|
|
890
|
+
if self.setting_name is not None: body['setting_name'] = self.setting_name
|
|
891
|
+
return body
|
|
892
|
+
|
|
893
|
+
@classmethod
|
|
894
|
+
def from_dict(cls, d: Dict[str, any]) -> DisableLegacyFeatures:
|
|
895
|
+
"""Deserializes the DisableLegacyFeatures from a dictionary."""
|
|
896
|
+
return cls(disable_legacy_features=_from_dict(d, 'disable_legacy_features', BooleanMessage),
|
|
897
|
+
etag=d.get('etag', None),
|
|
898
|
+
setting_name=d.get('setting_name', None))
|
|
899
|
+
|
|
900
|
+
|
|
768
901
|
@dataclass
|
|
769
902
|
class EmailConfig:
|
|
770
903
|
addresses: Optional[List[str]] = None
|
|
@@ -2114,6 +2247,9 @@ class TokenInfo:
|
|
|
2114
2247
|
token_id: Optional[str] = None
|
|
2115
2248
|
"""ID of the token."""
|
|
2116
2249
|
|
|
2250
|
+
workspace_id: Optional[int] = None
|
|
2251
|
+
"""If applicable, the ID of the workspace that the token was created in."""
|
|
2252
|
+
|
|
2117
2253
|
def as_dict(self) -> dict:
|
|
2118
2254
|
"""Serializes the TokenInfo into a dictionary suitable for use as a JSON request body."""
|
|
2119
2255
|
body = {}
|
|
@@ -2124,6 +2260,7 @@ class TokenInfo:
|
|
|
2124
2260
|
if self.expiry_time is not None: body['expiry_time'] = self.expiry_time
|
|
2125
2261
|
if self.owner_id is not None: body['owner_id'] = self.owner_id
|
|
2126
2262
|
if self.token_id is not None: body['token_id'] = self.token_id
|
|
2263
|
+
if self.workspace_id is not None: body['workspace_id'] = self.workspace_id
|
|
2127
2264
|
return body
|
|
2128
2265
|
|
|
2129
2266
|
@classmethod
|
|
@@ -2135,7 +2272,8 @@ class TokenInfo:
|
|
|
2135
2272
|
creation_time=d.get('creation_time', None),
|
|
2136
2273
|
expiry_time=d.get('expiry_time', None),
|
|
2137
2274
|
owner_id=d.get('owner_id', None),
|
|
2138
|
-
token_id=d.get('token_id', None)
|
|
2275
|
+
token_id=d.get('token_id', None),
|
|
2276
|
+
workspace_id=d.get('workspace_id', None))
|
|
2139
2277
|
|
|
2140
2278
|
|
|
2141
2279
|
@dataclass
|
|
@@ -2235,6 +2373,7 @@ class TokenPermissionsRequest:
|
|
|
2235
2373
|
class TokenType(Enum):
|
|
2236
2374
|
"""The type of token request. As of now, only `AZURE_ACTIVE_DIRECTORY_TOKEN` is supported."""
|
|
2237
2375
|
|
|
2376
|
+
ARCLIGHT_AZURE_EXCHANGE_TOKEN = 'ARCLIGHT_AZURE_EXCHANGE_TOKEN'
|
|
2238
2377
|
AZURE_ACTIVE_DIRECTORY_TOKEN = 'AZURE_ACTIVE_DIRECTORY_TOKEN'
|
|
2239
2378
|
|
|
2240
2379
|
|
|
@@ -2365,6 +2504,66 @@ class UpdateDefaultNamespaceSettingRequest:
|
|
|
2365
2504
|
setting=_from_dict(d, 'setting', DefaultNamespaceSetting))
|
|
2366
2505
|
|
|
2367
2506
|
|
|
2507
|
+
@dataclass
|
|
2508
|
+
class UpdateDisableLegacyAccessRequest:
|
|
2509
|
+
"""Details required to update a setting."""
|
|
2510
|
+
|
|
2511
|
+
allow_missing: bool
|
|
2512
|
+
"""This should always be set to true for Settings API. Added for AIP compliance."""
|
|
2513
|
+
|
|
2514
|
+
setting: DisableLegacyAccess
|
|
2515
|
+
|
|
2516
|
+
field_mask: str
|
|
2517
|
+
"""Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
|
|
2518
|
+
the setting payload will be updated. The field mask needs to be supplied as single string. To
|
|
2519
|
+
specify multiple fields in the field mask, use comma as the separator (no space)."""
|
|
2520
|
+
|
|
2521
|
+
def as_dict(self) -> dict:
|
|
2522
|
+
"""Serializes the UpdateDisableLegacyAccessRequest into a dictionary suitable for use as a JSON request body."""
|
|
2523
|
+
body = {}
|
|
2524
|
+
if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
|
|
2525
|
+
if self.field_mask is not None: body['field_mask'] = self.field_mask
|
|
2526
|
+
if self.setting: body['setting'] = self.setting.as_dict()
|
|
2527
|
+
return body
|
|
2528
|
+
|
|
2529
|
+
@classmethod
|
|
2530
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateDisableLegacyAccessRequest:
|
|
2531
|
+
"""Deserializes the UpdateDisableLegacyAccessRequest from a dictionary."""
|
|
2532
|
+
return cls(allow_missing=d.get('allow_missing', None),
|
|
2533
|
+
field_mask=d.get('field_mask', None),
|
|
2534
|
+
setting=_from_dict(d, 'setting', DisableLegacyAccess))
|
|
2535
|
+
|
|
2536
|
+
|
|
2537
|
+
@dataclass
|
|
2538
|
+
class UpdateDisableLegacyFeaturesRequest:
|
|
2539
|
+
"""Details required to update a setting."""
|
|
2540
|
+
|
|
2541
|
+
allow_missing: bool
|
|
2542
|
+
"""This should always be set to true for Settings API. Added for AIP compliance."""
|
|
2543
|
+
|
|
2544
|
+
setting: DisableLegacyFeatures
|
|
2545
|
+
|
|
2546
|
+
field_mask: str
|
|
2547
|
+
"""Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
|
|
2548
|
+
the setting payload will be updated. The field mask needs to be supplied as single string. To
|
|
2549
|
+
specify multiple fields in the field mask, use comma as the separator (no space)."""
|
|
2550
|
+
|
|
2551
|
+
def as_dict(self) -> dict:
|
|
2552
|
+
"""Serializes the UpdateDisableLegacyFeaturesRequest into a dictionary suitable for use as a JSON request body."""
|
|
2553
|
+
body = {}
|
|
2554
|
+
if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
|
|
2555
|
+
if self.field_mask is not None: body['field_mask'] = self.field_mask
|
|
2556
|
+
if self.setting: body['setting'] = self.setting.as_dict()
|
|
2557
|
+
return body
|
|
2558
|
+
|
|
2559
|
+
@classmethod
|
|
2560
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateDisableLegacyFeaturesRequest:
|
|
2561
|
+
"""Deserializes the UpdateDisableLegacyFeaturesRequest from a dictionary."""
|
|
2562
|
+
return cls(allow_missing=d.get('allow_missing', None),
|
|
2563
|
+
field_mask=d.get('field_mask', None),
|
|
2564
|
+
setting=_from_dict(d, 'setting', DisableLegacyFeatures))
|
|
2565
|
+
|
|
2566
|
+
|
|
2368
2567
|
@dataclass
|
|
2369
2568
|
class UpdateEnhancedSecurityMonitoringSettingRequest:
|
|
2370
2569
|
"""Details required to update a setting."""
|
|
@@ -2791,6 +2990,7 @@ class AccountSettingsAPI:
|
|
|
2791
2990
|
self._api = api_client
|
|
2792
2991
|
|
|
2793
2992
|
self._csp_enablement_account = CspEnablementAccountAPI(self._api)
|
|
2993
|
+
self._disable_legacy_features = DisableLegacyFeaturesAPI(self._api)
|
|
2794
2994
|
self._esm_enablement_account = EsmEnablementAccountAPI(self._api)
|
|
2795
2995
|
self._personal_compute = PersonalComputeAPI(self._api)
|
|
2796
2996
|
|
|
@@ -2799,6 +2999,11 @@ class AccountSettingsAPI:
|
|
|
2799
2999
|
"""The compliance security profile settings at the account level control whether to enable it for new workspaces."""
|
|
2800
3000
|
return self._csp_enablement_account
|
|
2801
3001
|
|
|
3002
|
+
@property
|
|
3003
|
+
def disable_legacy_features(self) -> DisableLegacyFeaturesAPI:
|
|
3004
|
+
"""Disable legacy features for new Databricks workspaces."""
|
|
3005
|
+
return self._disable_legacy_features
|
|
3006
|
+
|
|
2802
3007
|
@property
|
|
2803
3008
|
def esm_enablement_account(self) -> EsmEnablementAccountAPI:
|
|
2804
3009
|
"""The enhanced security monitoring setting at the account level controls whether to enable the feature on new workspaces."""
|
|
@@ -3152,6 +3357,188 @@ class DefaultNamespaceAPI:
|
|
|
3152
3357
|
return DefaultNamespaceSetting.from_dict(res)
|
|
3153
3358
|
|
|
3154
3359
|
|
|
3360
|
+
class DisableLegacyAccessAPI:
|
|
3361
|
+
"""'Disabling legacy access' has the following impacts:
|
|
3362
|
+
|
|
3363
|
+
1. Disables direct access to the Hive Metastore. However, you can still access Hive Metastore through HMS
|
|
3364
|
+
Federation. 2. Disables Fallback Mode (docs link) on any External Location access from the workspace. 3.
|
|
3365
|
+
Alters DBFS path access to use External Location permissions in place of legacy credentials. 4. Enforces
|
|
3366
|
+
Unity Catalog access on all path based access."""
|
|
3367
|
+
|
|
3368
|
+
def __init__(self, api_client):
|
|
3369
|
+
self._api = api_client
|
|
3370
|
+
|
|
3371
|
+
def delete(self, *, etag: Optional[str] = None) -> DeleteDisableLegacyAccessResponse:
|
|
3372
|
+
"""Delete Legacy Access Disablement Status.
|
|
3373
|
+
|
|
3374
|
+
Deletes legacy access disablement status.
|
|
3375
|
+
|
|
3376
|
+
:param etag: str (optional)
|
|
3377
|
+
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
3378
|
+
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
3379
|
+
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
3380
|
+
to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
|
|
3381
|
+
request, and pass it with the DELETE request to identify the rule set version you are deleting.
|
|
3382
|
+
|
|
3383
|
+
:returns: :class:`DeleteDisableLegacyAccessResponse`
|
|
3384
|
+
"""
|
|
3385
|
+
|
|
3386
|
+
query = {}
|
|
3387
|
+
if etag is not None: query['etag'] = etag
|
|
3388
|
+
headers = {'Accept': 'application/json', }
|
|
3389
|
+
|
|
3390
|
+
res = self._api.do('DELETE',
|
|
3391
|
+
'/api/2.0/settings/types/disable_legacy_access/names/default',
|
|
3392
|
+
query=query,
|
|
3393
|
+
headers=headers)
|
|
3394
|
+
return DeleteDisableLegacyAccessResponse.from_dict(res)
|
|
3395
|
+
|
|
3396
|
+
def get(self, *, etag: Optional[str] = None) -> DisableLegacyAccess:
|
|
3397
|
+
"""Retrieve Legacy Access Disablement Status.
|
|
3398
|
+
|
|
3399
|
+
Retrieves legacy access disablement Status.
|
|
3400
|
+
|
|
3401
|
+
:param etag: str (optional)
|
|
3402
|
+
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
3403
|
+
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
3404
|
+
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
3405
|
+
to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
|
|
3406
|
+
request, and pass it with the DELETE request to identify the rule set version you are deleting.
|
|
3407
|
+
|
|
3408
|
+
:returns: :class:`DisableLegacyAccess`
|
|
3409
|
+
"""
|
|
3410
|
+
|
|
3411
|
+
query = {}
|
|
3412
|
+
if etag is not None: query['etag'] = etag
|
|
3413
|
+
headers = {'Accept': 'application/json', }
|
|
3414
|
+
|
|
3415
|
+
res = self._api.do('GET',
|
|
3416
|
+
'/api/2.0/settings/types/disable_legacy_access/names/default',
|
|
3417
|
+
query=query,
|
|
3418
|
+
headers=headers)
|
|
3419
|
+
return DisableLegacyAccess.from_dict(res)
|
|
3420
|
+
|
|
3421
|
+
def update(self, allow_missing: bool, setting: DisableLegacyAccess,
|
|
3422
|
+
field_mask: str) -> DisableLegacyAccess:
|
|
3423
|
+
"""Update Legacy Access Disablement Status.
|
|
3424
|
+
|
|
3425
|
+
Updates legacy access disablement status.
|
|
3426
|
+
|
|
3427
|
+
:param allow_missing: bool
|
|
3428
|
+
This should always be set to true for Settings API. Added for AIP compliance.
|
|
3429
|
+
:param setting: :class:`DisableLegacyAccess`
|
|
3430
|
+
:param field_mask: str
|
|
3431
|
+
Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
|
|
3432
|
+
setting payload will be updated. The field mask needs to be supplied as single string. To specify
|
|
3433
|
+
multiple fields in the field mask, use comma as the separator (no space).
|
|
3434
|
+
|
|
3435
|
+
:returns: :class:`DisableLegacyAccess`
|
|
3436
|
+
"""
|
|
3437
|
+
body = {}
|
|
3438
|
+
if allow_missing is not None: body['allow_missing'] = allow_missing
|
|
3439
|
+
if field_mask is not None: body['field_mask'] = field_mask
|
|
3440
|
+
if setting is not None: body['setting'] = setting.as_dict()
|
|
3441
|
+
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3442
|
+
|
|
3443
|
+
res = self._api.do('PATCH',
|
|
3444
|
+
'/api/2.0/settings/types/disable_legacy_access/names/default',
|
|
3445
|
+
body=body,
|
|
3446
|
+
headers=headers)
|
|
3447
|
+
return DisableLegacyAccess.from_dict(res)
|
|
3448
|
+
|
|
3449
|
+
|
|
3450
|
+
class DisableLegacyFeaturesAPI:
|
|
3451
|
+
"""Disable legacy features for new Databricks workspaces.
|
|
3452
|
+
|
|
3453
|
+
For newly created workspaces: 1. Disables the use of DBFS root and mounts. 2. Hive Metastore will not be
|
|
3454
|
+
provisioned. 3. Disables the use of ‘No-isolation clusters’. 4. Disables Databricks Runtime versions
|
|
3455
|
+
prior to 13.3LTS."""
|
|
3456
|
+
|
|
3457
|
+
def __init__(self, api_client):
|
|
3458
|
+
self._api = api_client
|
|
3459
|
+
|
|
3460
|
+
def delete(self, *, etag: Optional[str] = None) -> DeleteDisableLegacyFeaturesResponse:
|
|
3461
|
+
"""Delete the disable legacy features setting.
|
|
3462
|
+
|
|
3463
|
+
Deletes the disable legacy features setting.
|
|
3464
|
+
|
|
3465
|
+
:param etag: str (optional)
|
|
3466
|
+
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
3467
|
+
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
3468
|
+
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
3469
|
+
to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
|
|
3470
|
+
request, and pass it with the DELETE request to identify the rule set version you are deleting.
|
|
3471
|
+
|
|
3472
|
+
:returns: :class:`DeleteDisableLegacyFeaturesResponse`
|
|
3473
|
+
"""
|
|
3474
|
+
|
|
3475
|
+
query = {}
|
|
3476
|
+
if etag is not None: query['etag'] = etag
|
|
3477
|
+
headers = {'Accept': 'application/json', }
|
|
3478
|
+
|
|
3479
|
+
res = self._api.do(
|
|
3480
|
+
'DELETE',
|
|
3481
|
+
f'/api/2.0/accounts/{self._api.account_id}/settings/types/disable_legacy_features/names/default',
|
|
3482
|
+
query=query,
|
|
3483
|
+
headers=headers)
|
|
3484
|
+
return DeleteDisableLegacyFeaturesResponse.from_dict(res)
|
|
3485
|
+
|
|
3486
|
+
def get(self, *, etag: Optional[str] = None) -> DisableLegacyFeatures:
|
|
3487
|
+
"""Get the disable legacy features setting.
|
|
3488
|
+
|
|
3489
|
+
Gets the value of the disable legacy features setting.
|
|
3490
|
+
|
|
3491
|
+
:param etag: str (optional)
|
|
3492
|
+
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
3493
|
+
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
3494
|
+
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
3495
|
+
to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
|
|
3496
|
+
request, and pass it with the DELETE request to identify the rule set version you are deleting.
|
|
3497
|
+
|
|
3498
|
+
:returns: :class:`DisableLegacyFeatures`
|
|
3499
|
+
"""
|
|
3500
|
+
|
|
3501
|
+
query = {}
|
|
3502
|
+
if etag is not None: query['etag'] = etag
|
|
3503
|
+
headers = {'Accept': 'application/json', }
|
|
3504
|
+
|
|
3505
|
+
res = self._api.do(
|
|
3506
|
+
'GET',
|
|
3507
|
+
f'/api/2.0/accounts/{self._api.account_id}/settings/types/disable_legacy_features/names/default',
|
|
3508
|
+
query=query,
|
|
3509
|
+
headers=headers)
|
|
3510
|
+
return DisableLegacyFeatures.from_dict(res)
|
|
3511
|
+
|
|
3512
|
+
def update(self, allow_missing: bool, setting: DisableLegacyFeatures,
|
|
3513
|
+
field_mask: str) -> DisableLegacyFeatures:
|
|
3514
|
+
"""Update the disable legacy features setting.
|
|
3515
|
+
|
|
3516
|
+
Updates the value of the disable legacy features setting.
|
|
3517
|
+
|
|
3518
|
+
:param allow_missing: bool
|
|
3519
|
+
This should always be set to true for Settings API. Added for AIP compliance.
|
|
3520
|
+
:param setting: :class:`DisableLegacyFeatures`
|
|
3521
|
+
:param field_mask: str
|
|
3522
|
+
Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
|
|
3523
|
+
setting payload will be updated. The field mask needs to be supplied as single string. To specify
|
|
3524
|
+
multiple fields in the field mask, use comma as the separator (no space).
|
|
3525
|
+
|
|
3526
|
+
:returns: :class:`DisableLegacyFeatures`
|
|
3527
|
+
"""
|
|
3528
|
+
body = {}
|
|
3529
|
+
if allow_missing is not None: body['allow_missing'] = allow_missing
|
|
3530
|
+
if field_mask is not None: body['field_mask'] = field_mask
|
|
3531
|
+
if setting is not None: body['setting'] = setting.as_dict()
|
|
3532
|
+
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3533
|
+
|
|
3534
|
+
res = self._api.do(
|
|
3535
|
+
'PATCH',
|
|
3536
|
+
f'/api/2.0/accounts/{self._api.account_id}/settings/types/disable_legacy_features/names/default',
|
|
3537
|
+
body=body,
|
|
3538
|
+
headers=headers)
|
|
3539
|
+
return DisableLegacyFeatures.from_dict(res)
|
|
3540
|
+
|
|
3541
|
+
|
|
3155
3542
|
class EnhancedSecurityMonitoringAPI:
|
|
3156
3543
|
"""Controls whether enhanced security monitoring is enabled for the current workspace. If the compliance
|
|
3157
3544
|
security profile is enabled, this is automatically enabled. By default, it is disabled. However, if the
|
|
@@ -4023,6 +4410,7 @@ class SettingsAPI:
|
|
|
4023
4410
|
self._automatic_cluster_update = AutomaticClusterUpdateAPI(self._api)
|
|
4024
4411
|
self._compliance_security_profile = ComplianceSecurityProfileAPI(self._api)
|
|
4025
4412
|
self._default_namespace = DefaultNamespaceAPI(self._api)
|
|
4413
|
+
self._disable_legacy_access = DisableLegacyAccessAPI(self._api)
|
|
4026
4414
|
self._enhanced_security_monitoring = EnhancedSecurityMonitoringAPI(self._api)
|
|
4027
4415
|
self._restrict_workspace_admins = RestrictWorkspaceAdminsAPI(self._api)
|
|
4028
4416
|
|
|
@@ -4041,6 +4429,11 @@ class SettingsAPI:
|
|
|
4041
4429
|
"""The default namespace setting API allows users to configure the default namespace for a Databricks workspace."""
|
|
4042
4430
|
return self._default_namespace
|
|
4043
4431
|
|
|
4432
|
+
@property
|
|
4433
|
+
def disable_legacy_access(self) -> DisableLegacyAccessAPI:
|
|
4434
|
+
"""'Disabling legacy access' has the following impacts: 1."""
|
|
4435
|
+
return self._disable_legacy_access
|
|
4436
|
+
|
|
4044
4437
|
@property
|
|
4045
4438
|
def enhanced_security_monitoring(self) -> EnhancedSecurityMonitoringAPI:
|
|
4046
4439
|
"""Controls whether enhanced security monitoring is enabled for the current workspace."""
|