databricks-sdk 0.32.3__py3-none-any.whl → 0.34.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 +10 -0
- databricks/sdk/_base_client.py +323 -0
- databricks/sdk/core.py +25 -292
- databricks/sdk/mixins/files.py +9 -9
- databricks/sdk/service/apps.py +366 -113
- databricks/sdk/service/catalog.py +269 -7
- databricks/sdk/service/compute.py +68 -18
- databricks/sdk/service/dashboards.py +34 -11
- databricks/sdk/service/jobs.py +104 -86
- databricks/sdk/service/pipelines.py +58 -1
- databricks/sdk/service/serving.py +326 -10
- databricks/sdk/service/settings.py +573 -1
- databricks/sdk/service/sharing.py +1 -1
- databricks/sdk/service/sql.py +10 -246
- databricks/sdk/service/workspace.py +268 -107
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.32.3.dist-info → databricks_sdk-0.34.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.32.3.dist-info → databricks_sdk-0.34.0.dist-info}/RECORD +22 -21
- {databricks_sdk-0.32.3.dist-info → databricks_sdk-0.34.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.32.3.dist-info → databricks_sdk-0.34.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.32.3.dist-info → databricks_sdk-0.34.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.32.3.dist-info → databricks_sdk-0.34.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,78 @@ 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 DeleteDisableLegacyDbfsResponse:
|
|
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 DeleteDisableLegacyDbfsResponse 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]) -> DeleteDisableLegacyDbfsResponse:
|
|
743
|
+
"""Deserializes the DeleteDisableLegacyDbfsResponse from a dictionary."""
|
|
744
|
+
return cls(etag=d.get('etag', None))
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
@dataclass
|
|
748
|
+
class DeleteDisableLegacyFeaturesResponse:
|
|
749
|
+
"""The etag is returned."""
|
|
750
|
+
|
|
751
|
+
etag: str
|
|
752
|
+
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
753
|
+
for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
|
|
754
|
+
overwriting each other. It is strongly suggested that systems make use of the etag in the read
|
|
755
|
+
-> delete pattern to perform setting deletions in order to avoid race conditions. That is, get
|
|
756
|
+
an etag from a GET request, and pass it with the DELETE request to identify the rule set version
|
|
757
|
+
you are deleting."""
|
|
758
|
+
|
|
759
|
+
def as_dict(self) -> dict:
|
|
760
|
+
"""Serializes the DeleteDisableLegacyFeaturesResponse into a dictionary suitable for use as a JSON request body."""
|
|
761
|
+
body = {}
|
|
762
|
+
if self.etag is not None: body['etag'] = self.etag
|
|
763
|
+
return body
|
|
764
|
+
|
|
765
|
+
@classmethod
|
|
766
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteDisableLegacyFeaturesResponse:
|
|
767
|
+
"""Deserializes the DeleteDisableLegacyFeaturesResponse from a dictionary."""
|
|
768
|
+
return cls(etag=d.get('etag', None))
|
|
769
|
+
|
|
770
|
+
|
|
683
771
|
@dataclass
|
|
684
772
|
class DeleteNetworkConnectivityConfigurationResponse:
|
|
685
773
|
|
|
@@ -765,6 +853,109 @@ class DestinationType(Enum):
|
|
|
765
853
|
WEBHOOK = 'WEBHOOK'
|
|
766
854
|
|
|
767
855
|
|
|
856
|
+
@dataclass
|
|
857
|
+
class DisableLegacyAccess:
|
|
858
|
+
disable_legacy_access: BooleanMessage
|
|
859
|
+
|
|
860
|
+
etag: Optional[str] = None
|
|
861
|
+
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
862
|
+
for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
|
|
863
|
+
overwriting each other. It is strongly suggested that systems make use of the etag in the read
|
|
864
|
+
-> update pattern to perform setting updates in order to avoid race conditions. That is, get an
|
|
865
|
+
etag from a GET request, and pass it with the PATCH request to identify the setting version you
|
|
866
|
+
are updating."""
|
|
867
|
+
|
|
868
|
+
setting_name: Optional[str] = None
|
|
869
|
+
"""Name of the corresponding setting. This field is populated in the response, but it will not be
|
|
870
|
+
respected even if it's set in the request body. The setting name in the path parameter will be
|
|
871
|
+
respected instead. Setting name is required to be 'default' if the setting only has one instance
|
|
872
|
+
per workspace."""
|
|
873
|
+
|
|
874
|
+
def as_dict(self) -> dict:
|
|
875
|
+
"""Serializes the DisableLegacyAccess into a dictionary suitable for use as a JSON request body."""
|
|
876
|
+
body = {}
|
|
877
|
+
if self.disable_legacy_access: body['disable_legacy_access'] = self.disable_legacy_access.as_dict()
|
|
878
|
+
if self.etag is not None: body['etag'] = self.etag
|
|
879
|
+
if self.setting_name is not None: body['setting_name'] = self.setting_name
|
|
880
|
+
return body
|
|
881
|
+
|
|
882
|
+
@classmethod
|
|
883
|
+
def from_dict(cls, d: Dict[str, any]) -> DisableLegacyAccess:
|
|
884
|
+
"""Deserializes the DisableLegacyAccess from a dictionary."""
|
|
885
|
+
return cls(disable_legacy_access=_from_dict(d, 'disable_legacy_access', BooleanMessage),
|
|
886
|
+
etag=d.get('etag', None),
|
|
887
|
+
setting_name=d.get('setting_name', None))
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
@dataclass
|
|
891
|
+
class DisableLegacyDbfs:
|
|
892
|
+
disable_legacy_dbfs: BooleanMessage
|
|
893
|
+
|
|
894
|
+
etag: Optional[str] = None
|
|
895
|
+
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
896
|
+
for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
|
|
897
|
+
overwriting each other. It is strongly suggested that systems make use of the etag in the read
|
|
898
|
+
-> update pattern to perform setting updates in order to avoid race conditions. That is, get an
|
|
899
|
+
etag from a GET request, and pass it with the PATCH request to identify the setting version you
|
|
900
|
+
are updating."""
|
|
901
|
+
|
|
902
|
+
setting_name: Optional[str] = None
|
|
903
|
+
"""Name of the corresponding setting. This field is populated in the response, but it will not be
|
|
904
|
+
respected even if it's set in the request body. The setting name in the path parameter will be
|
|
905
|
+
respected instead. Setting name is required to be 'default' if the setting only has one instance
|
|
906
|
+
per workspace."""
|
|
907
|
+
|
|
908
|
+
def as_dict(self) -> dict:
|
|
909
|
+
"""Serializes the DisableLegacyDbfs into a dictionary suitable for use as a JSON request body."""
|
|
910
|
+
body = {}
|
|
911
|
+
if self.disable_legacy_dbfs: body['disable_legacy_dbfs'] = self.disable_legacy_dbfs.as_dict()
|
|
912
|
+
if self.etag is not None: body['etag'] = self.etag
|
|
913
|
+
if self.setting_name is not None: body['setting_name'] = self.setting_name
|
|
914
|
+
return body
|
|
915
|
+
|
|
916
|
+
@classmethod
|
|
917
|
+
def from_dict(cls, d: Dict[str, any]) -> DisableLegacyDbfs:
|
|
918
|
+
"""Deserializes the DisableLegacyDbfs from a dictionary."""
|
|
919
|
+
return cls(disable_legacy_dbfs=_from_dict(d, 'disable_legacy_dbfs', BooleanMessage),
|
|
920
|
+
etag=d.get('etag', None),
|
|
921
|
+
setting_name=d.get('setting_name', None))
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
@dataclass
|
|
925
|
+
class DisableLegacyFeatures:
|
|
926
|
+
disable_legacy_features: BooleanMessage
|
|
927
|
+
|
|
928
|
+
etag: Optional[str] = None
|
|
929
|
+
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
930
|
+
for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
|
|
931
|
+
overwriting each other. It is strongly suggested that systems make use of the etag in the read
|
|
932
|
+
-> update pattern to perform setting updates in order to avoid race conditions. That is, get an
|
|
933
|
+
etag from a GET request, and pass it with the PATCH request to identify the setting version you
|
|
934
|
+
are updating."""
|
|
935
|
+
|
|
936
|
+
setting_name: Optional[str] = None
|
|
937
|
+
"""Name of the corresponding setting. This field is populated in the response, but it will not be
|
|
938
|
+
respected even if it's set in the request body. The setting name in the path parameter will be
|
|
939
|
+
respected instead. Setting name is required to be 'default' if the setting only has one instance
|
|
940
|
+
per workspace."""
|
|
941
|
+
|
|
942
|
+
def as_dict(self) -> dict:
|
|
943
|
+
"""Serializes the DisableLegacyFeatures into a dictionary suitable for use as a JSON request body."""
|
|
944
|
+
body = {}
|
|
945
|
+
if self.disable_legacy_features:
|
|
946
|
+
body['disable_legacy_features'] = self.disable_legacy_features.as_dict()
|
|
947
|
+
if self.etag is not None: body['etag'] = self.etag
|
|
948
|
+
if self.setting_name is not None: body['setting_name'] = self.setting_name
|
|
949
|
+
return body
|
|
950
|
+
|
|
951
|
+
@classmethod
|
|
952
|
+
def from_dict(cls, d: Dict[str, any]) -> DisableLegacyFeatures:
|
|
953
|
+
"""Deserializes the DisableLegacyFeatures from a dictionary."""
|
|
954
|
+
return cls(disable_legacy_features=_from_dict(d, 'disable_legacy_features', BooleanMessage),
|
|
955
|
+
etag=d.get('etag', None),
|
|
956
|
+
setting_name=d.get('setting_name', None))
|
|
957
|
+
|
|
958
|
+
|
|
768
959
|
@dataclass
|
|
769
960
|
class EmailConfig:
|
|
770
961
|
addresses: Optional[List[str]] = None
|
|
@@ -2114,6 +2305,9 @@ class TokenInfo:
|
|
|
2114
2305
|
token_id: Optional[str] = None
|
|
2115
2306
|
"""ID of the token."""
|
|
2116
2307
|
|
|
2308
|
+
workspace_id: Optional[int] = None
|
|
2309
|
+
"""If applicable, the ID of the workspace that the token was created in."""
|
|
2310
|
+
|
|
2117
2311
|
def as_dict(self) -> dict:
|
|
2118
2312
|
"""Serializes the TokenInfo into a dictionary suitable for use as a JSON request body."""
|
|
2119
2313
|
body = {}
|
|
@@ -2124,6 +2318,7 @@ class TokenInfo:
|
|
|
2124
2318
|
if self.expiry_time is not None: body['expiry_time'] = self.expiry_time
|
|
2125
2319
|
if self.owner_id is not None: body['owner_id'] = self.owner_id
|
|
2126
2320
|
if self.token_id is not None: body['token_id'] = self.token_id
|
|
2321
|
+
if self.workspace_id is not None: body['workspace_id'] = self.workspace_id
|
|
2127
2322
|
return body
|
|
2128
2323
|
|
|
2129
2324
|
@classmethod
|
|
@@ -2135,7 +2330,8 @@ class TokenInfo:
|
|
|
2135
2330
|
creation_time=d.get('creation_time', None),
|
|
2136
2331
|
expiry_time=d.get('expiry_time', None),
|
|
2137
2332
|
owner_id=d.get('owner_id', None),
|
|
2138
|
-
token_id=d.get('token_id', None)
|
|
2333
|
+
token_id=d.get('token_id', None),
|
|
2334
|
+
workspace_id=d.get('workspace_id', None))
|
|
2139
2335
|
|
|
2140
2336
|
|
|
2141
2337
|
@dataclass
|
|
@@ -2235,6 +2431,7 @@ class TokenPermissionsRequest:
|
|
|
2235
2431
|
class TokenType(Enum):
|
|
2236
2432
|
"""The type of token request. As of now, only `AZURE_ACTIVE_DIRECTORY_TOKEN` is supported."""
|
|
2237
2433
|
|
|
2434
|
+
ARCLIGHT_AZURE_EXCHANGE_TOKEN = 'ARCLIGHT_AZURE_EXCHANGE_TOKEN'
|
|
2238
2435
|
AZURE_ACTIVE_DIRECTORY_TOKEN = 'AZURE_ACTIVE_DIRECTORY_TOKEN'
|
|
2239
2436
|
|
|
2240
2437
|
|
|
@@ -2365,6 +2562,96 @@ class UpdateDefaultNamespaceSettingRequest:
|
|
|
2365
2562
|
setting=_from_dict(d, 'setting', DefaultNamespaceSetting))
|
|
2366
2563
|
|
|
2367
2564
|
|
|
2565
|
+
@dataclass
|
|
2566
|
+
class UpdateDisableLegacyAccessRequest:
|
|
2567
|
+
"""Details required to update a setting."""
|
|
2568
|
+
|
|
2569
|
+
allow_missing: bool
|
|
2570
|
+
"""This should always be set to true for Settings API. Added for AIP compliance."""
|
|
2571
|
+
|
|
2572
|
+
setting: DisableLegacyAccess
|
|
2573
|
+
|
|
2574
|
+
field_mask: str
|
|
2575
|
+
"""Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
|
|
2576
|
+
the setting payload will be updated. The field mask needs to be supplied as single string. To
|
|
2577
|
+
specify multiple fields in the field mask, use comma as the separator (no space)."""
|
|
2578
|
+
|
|
2579
|
+
def as_dict(self) -> dict:
|
|
2580
|
+
"""Serializes the UpdateDisableLegacyAccessRequest into a dictionary suitable for use as a JSON request body."""
|
|
2581
|
+
body = {}
|
|
2582
|
+
if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
|
|
2583
|
+
if self.field_mask is not None: body['field_mask'] = self.field_mask
|
|
2584
|
+
if self.setting: body['setting'] = self.setting.as_dict()
|
|
2585
|
+
return body
|
|
2586
|
+
|
|
2587
|
+
@classmethod
|
|
2588
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateDisableLegacyAccessRequest:
|
|
2589
|
+
"""Deserializes the UpdateDisableLegacyAccessRequest from a dictionary."""
|
|
2590
|
+
return cls(allow_missing=d.get('allow_missing', None),
|
|
2591
|
+
field_mask=d.get('field_mask', None),
|
|
2592
|
+
setting=_from_dict(d, 'setting', DisableLegacyAccess))
|
|
2593
|
+
|
|
2594
|
+
|
|
2595
|
+
@dataclass
|
|
2596
|
+
class UpdateDisableLegacyDbfsRequest:
|
|
2597
|
+
"""Details required to update a setting."""
|
|
2598
|
+
|
|
2599
|
+
allow_missing: bool
|
|
2600
|
+
"""This should always be set to true for Settings API. Added for AIP compliance."""
|
|
2601
|
+
|
|
2602
|
+
setting: DisableLegacyDbfs
|
|
2603
|
+
|
|
2604
|
+
field_mask: str
|
|
2605
|
+
"""Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
|
|
2606
|
+
the setting payload will be updated. The field mask needs to be supplied as single string. To
|
|
2607
|
+
specify multiple fields in the field mask, use comma as the separator (no space)."""
|
|
2608
|
+
|
|
2609
|
+
def as_dict(self) -> dict:
|
|
2610
|
+
"""Serializes the UpdateDisableLegacyDbfsRequest into a dictionary suitable for use as a JSON request body."""
|
|
2611
|
+
body = {}
|
|
2612
|
+
if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
|
|
2613
|
+
if self.field_mask is not None: body['field_mask'] = self.field_mask
|
|
2614
|
+
if self.setting: body['setting'] = self.setting.as_dict()
|
|
2615
|
+
return body
|
|
2616
|
+
|
|
2617
|
+
@classmethod
|
|
2618
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateDisableLegacyDbfsRequest:
|
|
2619
|
+
"""Deserializes the UpdateDisableLegacyDbfsRequest from a dictionary."""
|
|
2620
|
+
return cls(allow_missing=d.get('allow_missing', None),
|
|
2621
|
+
field_mask=d.get('field_mask', None),
|
|
2622
|
+
setting=_from_dict(d, 'setting', DisableLegacyDbfs))
|
|
2623
|
+
|
|
2624
|
+
|
|
2625
|
+
@dataclass
|
|
2626
|
+
class UpdateDisableLegacyFeaturesRequest:
|
|
2627
|
+
"""Details required to update a setting."""
|
|
2628
|
+
|
|
2629
|
+
allow_missing: bool
|
|
2630
|
+
"""This should always be set to true for Settings API. Added for AIP compliance."""
|
|
2631
|
+
|
|
2632
|
+
setting: DisableLegacyFeatures
|
|
2633
|
+
|
|
2634
|
+
field_mask: str
|
|
2635
|
+
"""Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
|
|
2636
|
+
the setting payload will be updated. The field mask needs to be supplied as single string. To
|
|
2637
|
+
specify multiple fields in the field mask, use comma as the separator (no space)."""
|
|
2638
|
+
|
|
2639
|
+
def as_dict(self) -> dict:
|
|
2640
|
+
"""Serializes the UpdateDisableLegacyFeaturesRequest into a dictionary suitable for use as a JSON request body."""
|
|
2641
|
+
body = {}
|
|
2642
|
+
if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
|
|
2643
|
+
if self.field_mask is not None: body['field_mask'] = self.field_mask
|
|
2644
|
+
if self.setting: body['setting'] = self.setting.as_dict()
|
|
2645
|
+
return body
|
|
2646
|
+
|
|
2647
|
+
@classmethod
|
|
2648
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateDisableLegacyFeaturesRequest:
|
|
2649
|
+
"""Deserializes the UpdateDisableLegacyFeaturesRequest from a dictionary."""
|
|
2650
|
+
return cls(allow_missing=d.get('allow_missing', None),
|
|
2651
|
+
field_mask=d.get('field_mask', None),
|
|
2652
|
+
setting=_from_dict(d, 'setting', DisableLegacyFeatures))
|
|
2653
|
+
|
|
2654
|
+
|
|
2368
2655
|
@dataclass
|
|
2369
2656
|
class UpdateEnhancedSecurityMonitoringSettingRequest:
|
|
2370
2657
|
"""Details required to update a setting."""
|
|
@@ -2791,6 +3078,7 @@ class AccountSettingsAPI:
|
|
|
2791
3078
|
self._api = api_client
|
|
2792
3079
|
|
|
2793
3080
|
self._csp_enablement_account = CspEnablementAccountAPI(self._api)
|
|
3081
|
+
self._disable_legacy_features = DisableLegacyFeaturesAPI(self._api)
|
|
2794
3082
|
self._esm_enablement_account = EsmEnablementAccountAPI(self._api)
|
|
2795
3083
|
self._personal_compute = PersonalComputeAPI(self._api)
|
|
2796
3084
|
|
|
@@ -2799,6 +3087,11 @@ class AccountSettingsAPI:
|
|
|
2799
3087
|
"""The compliance security profile settings at the account level control whether to enable it for new workspaces."""
|
|
2800
3088
|
return self._csp_enablement_account
|
|
2801
3089
|
|
|
3090
|
+
@property
|
|
3091
|
+
def disable_legacy_features(self) -> DisableLegacyFeaturesAPI:
|
|
3092
|
+
"""Disable legacy features for new Databricks workspaces."""
|
|
3093
|
+
return self._disable_legacy_features
|
|
3094
|
+
|
|
2802
3095
|
@property
|
|
2803
3096
|
def esm_enablement_account(self) -> EsmEnablementAccountAPI:
|
|
2804
3097
|
"""The enhanced security monitoring setting at the account level controls whether to enable the feature on new workspaces."""
|
|
@@ -3152,6 +3445,273 @@ class DefaultNamespaceAPI:
|
|
|
3152
3445
|
return DefaultNamespaceSetting.from_dict(res)
|
|
3153
3446
|
|
|
3154
3447
|
|
|
3448
|
+
class DisableLegacyAccessAPI:
|
|
3449
|
+
"""'Disabling legacy access' has the following impacts:
|
|
3450
|
+
|
|
3451
|
+
1. Disables direct access to the Hive Metastore. However, you can still access Hive Metastore through HMS
|
|
3452
|
+
Federation. 2. Disables Fallback Mode (docs link) on any External Location access from the workspace. 3.
|
|
3453
|
+
Alters DBFS path access to use External Location permissions in place of legacy credentials. 4. Enforces
|
|
3454
|
+
Unity Catalog access on all path based access."""
|
|
3455
|
+
|
|
3456
|
+
def __init__(self, api_client):
|
|
3457
|
+
self._api = api_client
|
|
3458
|
+
|
|
3459
|
+
def delete(self, *, etag: Optional[str] = None) -> DeleteDisableLegacyAccessResponse:
|
|
3460
|
+
"""Delete Legacy Access Disablement Status.
|
|
3461
|
+
|
|
3462
|
+
Deletes legacy access disablement status.
|
|
3463
|
+
|
|
3464
|
+
:param etag: str (optional)
|
|
3465
|
+
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
3466
|
+
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
3467
|
+
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
3468
|
+
to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
|
|
3469
|
+
request, and pass it with the DELETE request to identify the rule set version you are deleting.
|
|
3470
|
+
|
|
3471
|
+
:returns: :class:`DeleteDisableLegacyAccessResponse`
|
|
3472
|
+
"""
|
|
3473
|
+
|
|
3474
|
+
query = {}
|
|
3475
|
+
if etag is not None: query['etag'] = etag
|
|
3476
|
+
headers = {'Accept': 'application/json', }
|
|
3477
|
+
|
|
3478
|
+
res = self._api.do('DELETE',
|
|
3479
|
+
'/api/2.0/settings/types/disable_legacy_access/names/default',
|
|
3480
|
+
query=query,
|
|
3481
|
+
headers=headers)
|
|
3482
|
+
return DeleteDisableLegacyAccessResponse.from_dict(res)
|
|
3483
|
+
|
|
3484
|
+
def get(self, *, etag: Optional[str] = None) -> DisableLegacyAccess:
|
|
3485
|
+
"""Retrieve Legacy Access Disablement Status.
|
|
3486
|
+
|
|
3487
|
+
Retrieves legacy access disablement Status.
|
|
3488
|
+
|
|
3489
|
+
:param etag: str (optional)
|
|
3490
|
+
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
3491
|
+
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
3492
|
+
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
3493
|
+
to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
|
|
3494
|
+
request, and pass it with the DELETE request to identify the rule set version you are deleting.
|
|
3495
|
+
|
|
3496
|
+
:returns: :class:`DisableLegacyAccess`
|
|
3497
|
+
"""
|
|
3498
|
+
|
|
3499
|
+
query = {}
|
|
3500
|
+
if etag is not None: query['etag'] = etag
|
|
3501
|
+
headers = {'Accept': 'application/json', }
|
|
3502
|
+
|
|
3503
|
+
res = self._api.do('GET',
|
|
3504
|
+
'/api/2.0/settings/types/disable_legacy_access/names/default',
|
|
3505
|
+
query=query,
|
|
3506
|
+
headers=headers)
|
|
3507
|
+
return DisableLegacyAccess.from_dict(res)
|
|
3508
|
+
|
|
3509
|
+
def update(self, allow_missing: bool, setting: DisableLegacyAccess,
|
|
3510
|
+
field_mask: str) -> DisableLegacyAccess:
|
|
3511
|
+
"""Update Legacy Access Disablement Status.
|
|
3512
|
+
|
|
3513
|
+
Updates legacy access disablement status.
|
|
3514
|
+
|
|
3515
|
+
:param allow_missing: bool
|
|
3516
|
+
This should always be set to true for Settings API. Added for AIP compliance.
|
|
3517
|
+
:param setting: :class:`DisableLegacyAccess`
|
|
3518
|
+
:param field_mask: str
|
|
3519
|
+
Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
|
|
3520
|
+
setting payload will be updated. The field mask needs to be supplied as single string. To specify
|
|
3521
|
+
multiple fields in the field mask, use comma as the separator (no space).
|
|
3522
|
+
|
|
3523
|
+
:returns: :class:`DisableLegacyAccess`
|
|
3524
|
+
"""
|
|
3525
|
+
body = {}
|
|
3526
|
+
if allow_missing is not None: body['allow_missing'] = allow_missing
|
|
3527
|
+
if field_mask is not None: body['field_mask'] = field_mask
|
|
3528
|
+
if setting is not None: body['setting'] = setting.as_dict()
|
|
3529
|
+
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3530
|
+
|
|
3531
|
+
res = self._api.do('PATCH',
|
|
3532
|
+
'/api/2.0/settings/types/disable_legacy_access/names/default',
|
|
3533
|
+
body=body,
|
|
3534
|
+
headers=headers)
|
|
3535
|
+
return DisableLegacyAccess.from_dict(res)
|
|
3536
|
+
|
|
3537
|
+
|
|
3538
|
+
class DisableLegacyDbfsAPI:
|
|
3539
|
+
"""When this setting is on, access to DBFS root and DBFS mounts is disallowed (as well as creation of new
|
|
3540
|
+
mounts). When the setting is off, all DBFS functionality is enabled"""
|
|
3541
|
+
|
|
3542
|
+
def __init__(self, api_client):
|
|
3543
|
+
self._api = api_client
|
|
3544
|
+
|
|
3545
|
+
def delete(self, *, etag: Optional[str] = None) -> DeleteDisableLegacyDbfsResponse:
|
|
3546
|
+
"""Delete the disable legacy DBFS setting.
|
|
3547
|
+
|
|
3548
|
+
Deletes the disable legacy DBFS setting for a workspace, reverting back to the default.
|
|
3549
|
+
|
|
3550
|
+
:param etag: str (optional)
|
|
3551
|
+
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
3552
|
+
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
3553
|
+
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
3554
|
+
to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
|
|
3555
|
+
request, and pass it with the DELETE request to identify the rule set version you are deleting.
|
|
3556
|
+
|
|
3557
|
+
:returns: :class:`DeleteDisableLegacyDbfsResponse`
|
|
3558
|
+
"""
|
|
3559
|
+
|
|
3560
|
+
query = {}
|
|
3561
|
+
if etag is not None: query['etag'] = etag
|
|
3562
|
+
headers = {'Accept': 'application/json', }
|
|
3563
|
+
|
|
3564
|
+
res = self._api.do('DELETE',
|
|
3565
|
+
'/api/2.0/settings/types/disable_legacy_dbfs/names/default',
|
|
3566
|
+
query=query,
|
|
3567
|
+
headers=headers)
|
|
3568
|
+
return DeleteDisableLegacyDbfsResponse.from_dict(res)
|
|
3569
|
+
|
|
3570
|
+
def get(self, *, etag: Optional[str] = None) -> DisableLegacyDbfs:
|
|
3571
|
+
"""Get the disable legacy DBFS setting.
|
|
3572
|
+
|
|
3573
|
+
Gets the disable legacy DBFS setting.
|
|
3574
|
+
|
|
3575
|
+
:param etag: str (optional)
|
|
3576
|
+
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
3577
|
+
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
3578
|
+
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
3579
|
+
to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
|
|
3580
|
+
request, and pass it with the DELETE request to identify the rule set version you are deleting.
|
|
3581
|
+
|
|
3582
|
+
:returns: :class:`DisableLegacyDbfs`
|
|
3583
|
+
"""
|
|
3584
|
+
|
|
3585
|
+
query = {}
|
|
3586
|
+
if etag is not None: query['etag'] = etag
|
|
3587
|
+
headers = {'Accept': 'application/json', }
|
|
3588
|
+
|
|
3589
|
+
res = self._api.do('GET',
|
|
3590
|
+
'/api/2.0/settings/types/disable_legacy_dbfs/names/default',
|
|
3591
|
+
query=query,
|
|
3592
|
+
headers=headers)
|
|
3593
|
+
return DisableLegacyDbfs.from_dict(res)
|
|
3594
|
+
|
|
3595
|
+
def update(self, allow_missing: bool, setting: DisableLegacyDbfs, field_mask: str) -> DisableLegacyDbfs:
|
|
3596
|
+
"""Update the disable legacy DBFS setting.
|
|
3597
|
+
|
|
3598
|
+
Updates the disable legacy DBFS setting for the workspace.
|
|
3599
|
+
|
|
3600
|
+
:param allow_missing: bool
|
|
3601
|
+
This should always be set to true for Settings API. Added for AIP compliance.
|
|
3602
|
+
:param setting: :class:`DisableLegacyDbfs`
|
|
3603
|
+
:param field_mask: str
|
|
3604
|
+
Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
|
|
3605
|
+
setting payload will be updated. The field mask needs to be supplied as single string. To specify
|
|
3606
|
+
multiple fields in the field mask, use comma as the separator (no space).
|
|
3607
|
+
|
|
3608
|
+
:returns: :class:`DisableLegacyDbfs`
|
|
3609
|
+
"""
|
|
3610
|
+
body = {}
|
|
3611
|
+
if allow_missing is not None: body['allow_missing'] = allow_missing
|
|
3612
|
+
if field_mask is not None: body['field_mask'] = field_mask
|
|
3613
|
+
if setting is not None: body['setting'] = setting.as_dict()
|
|
3614
|
+
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3615
|
+
|
|
3616
|
+
res = self._api.do('PATCH',
|
|
3617
|
+
'/api/2.0/settings/types/disable_legacy_dbfs/names/default',
|
|
3618
|
+
body=body,
|
|
3619
|
+
headers=headers)
|
|
3620
|
+
return DisableLegacyDbfs.from_dict(res)
|
|
3621
|
+
|
|
3622
|
+
|
|
3623
|
+
class DisableLegacyFeaturesAPI:
|
|
3624
|
+
"""Disable legacy features for new Databricks workspaces.
|
|
3625
|
+
|
|
3626
|
+
For newly created workspaces: 1. Disables the use of DBFS root and mounts. 2. Hive Metastore will not be
|
|
3627
|
+
provisioned. 3. Disables the use of ‘No-isolation clusters’. 4. Disables Databricks Runtime versions
|
|
3628
|
+
prior to 13.3LTS."""
|
|
3629
|
+
|
|
3630
|
+
def __init__(self, api_client):
|
|
3631
|
+
self._api = api_client
|
|
3632
|
+
|
|
3633
|
+
def delete(self, *, etag: Optional[str] = None) -> DeleteDisableLegacyFeaturesResponse:
|
|
3634
|
+
"""Delete the disable legacy features setting.
|
|
3635
|
+
|
|
3636
|
+
Deletes the disable legacy features setting.
|
|
3637
|
+
|
|
3638
|
+
:param etag: str (optional)
|
|
3639
|
+
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
3640
|
+
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
3641
|
+
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
3642
|
+
to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
|
|
3643
|
+
request, and pass it with the DELETE request to identify the rule set version you are deleting.
|
|
3644
|
+
|
|
3645
|
+
:returns: :class:`DeleteDisableLegacyFeaturesResponse`
|
|
3646
|
+
"""
|
|
3647
|
+
|
|
3648
|
+
query = {}
|
|
3649
|
+
if etag is not None: query['etag'] = etag
|
|
3650
|
+
headers = {'Accept': 'application/json', }
|
|
3651
|
+
|
|
3652
|
+
res = self._api.do(
|
|
3653
|
+
'DELETE',
|
|
3654
|
+
f'/api/2.0/accounts/{self._api.account_id}/settings/types/disable_legacy_features/names/default',
|
|
3655
|
+
query=query,
|
|
3656
|
+
headers=headers)
|
|
3657
|
+
return DeleteDisableLegacyFeaturesResponse.from_dict(res)
|
|
3658
|
+
|
|
3659
|
+
def get(self, *, etag: Optional[str] = None) -> DisableLegacyFeatures:
|
|
3660
|
+
"""Get the disable legacy features setting.
|
|
3661
|
+
|
|
3662
|
+
Gets the value of the disable legacy features setting.
|
|
3663
|
+
|
|
3664
|
+
:param etag: str (optional)
|
|
3665
|
+
etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
|
|
3666
|
+
optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
|
|
3667
|
+
each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
|
|
3668
|
+
to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
|
|
3669
|
+
request, and pass it with the DELETE request to identify the rule set version you are deleting.
|
|
3670
|
+
|
|
3671
|
+
:returns: :class:`DisableLegacyFeatures`
|
|
3672
|
+
"""
|
|
3673
|
+
|
|
3674
|
+
query = {}
|
|
3675
|
+
if etag is not None: query['etag'] = etag
|
|
3676
|
+
headers = {'Accept': 'application/json', }
|
|
3677
|
+
|
|
3678
|
+
res = self._api.do(
|
|
3679
|
+
'GET',
|
|
3680
|
+
f'/api/2.0/accounts/{self._api.account_id}/settings/types/disable_legacy_features/names/default',
|
|
3681
|
+
query=query,
|
|
3682
|
+
headers=headers)
|
|
3683
|
+
return DisableLegacyFeatures.from_dict(res)
|
|
3684
|
+
|
|
3685
|
+
def update(self, allow_missing: bool, setting: DisableLegacyFeatures,
|
|
3686
|
+
field_mask: str) -> DisableLegacyFeatures:
|
|
3687
|
+
"""Update the disable legacy features setting.
|
|
3688
|
+
|
|
3689
|
+
Updates the value of the disable legacy features setting.
|
|
3690
|
+
|
|
3691
|
+
:param allow_missing: bool
|
|
3692
|
+
This should always be set to true for Settings API. Added for AIP compliance.
|
|
3693
|
+
:param setting: :class:`DisableLegacyFeatures`
|
|
3694
|
+
:param field_mask: str
|
|
3695
|
+
Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
|
|
3696
|
+
setting payload will be updated. The field mask needs to be supplied as single string. To specify
|
|
3697
|
+
multiple fields in the field mask, use comma as the separator (no space).
|
|
3698
|
+
|
|
3699
|
+
:returns: :class:`DisableLegacyFeatures`
|
|
3700
|
+
"""
|
|
3701
|
+
body = {}
|
|
3702
|
+
if allow_missing is not None: body['allow_missing'] = allow_missing
|
|
3703
|
+
if field_mask is not None: body['field_mask'] = field_mask
|
|
3704
|
+
if setting is not None: body['setting'] = setting.as_dict()
|
|
3705
|
+
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3706
|
+
|
|
3707
|
+
res = self._api.do(
|
|
3708
|
+
'PATCH',
|
|
3709
|
+
f'/api/2.0/accounts/{self._api.account_id}/settings/types/disable_legacy_features/names/default',
|
|
3710
|
+
body=body,
|
|
3711
|
+
headers=headers)
|
|
3712
|
+
return DisableLegacyFeatures.from_dict(res)
|
|
3713
|
+
|
|
3714
|
+
|
|
3155
3715
|
class EnhancedSecurityMonitoringAPI:
|
|
3156
3716
|
"""Controls whether enhanced security monitoring is enabled for the current workspace. If the compliance
|
|
3157
3717
|
security profile is enabled, this is automatically enabled. By default, it is disabled. However, if the
|
|
@@ -4023,6 +4583,8 @@ class SettingsAPI:
|
|
|
4023
4583
|
self._automatic_cluster_update = AutomaticClusterUpdateAPI(self._api)
|
|
4024
4584
|
self._compliance_security_profile = ComplianceSecurityProfileAPI(self._api)
|
|
4025
4585
|
self._default_namespace = DefaultNamespaceAPI(self._api)
|
|
4586
|
+
self._disable_legacy_access = DisableLegacyAccessAPI(self._api)
|
|
4587
|
+
self._disable_legacy_dbfs = DisableLegacyDbfsAPI(self._api)
|
|
4026
4588
|
self._enhanced_security_monitoring = EnhancedSecurityMonitoringAPI(self._api)
|
|
4027
4589
|
self._restrict_workspace_admins = RestrictWorkspaceAdminsAPI(self._api)
|
|
4028
4590
|
|
|
@@ -4041,6 +4603,16 @@ class SettingsAPI:
|
|
|
4041
4603
|
"""The default namespace setting API allows users to configure the default namespace for a Databricks workspace."""
|
|
4042
4604
|
return self._default_namespace
|
|
4043
4605
|
|
|
4606
|
+
@property
|
|
4607
|
+
def disable_legacy_access(self) -> DisableLegacyAccessAPI:
|
|
4608
|
+
"""'Disabling legacy access' has the following impacts: 1."""
|
|
4609
|
+
return self._disable_legacy_access
|
|
4610
|
+
|
|
4611
|
+
@property
|
|
4612
|
+
def disable_legacy_dbfs(self) -> DisableLegacyDbfsAPI:
|
|
4613
|
+
"""When this setting is on, access to DBFS root and DBFS mounts is disallowed (as well as creation of new mounts)."""
|
|
4614
|
+
return self._disable_legacy_dbfs
|
|
4615
|
+
|
|
4044
4616
|
@property
|
|
4045
4617
|
def enhanced_security_monitoring(self) -> EnhancedSecurityMonitoringAPI:
|
|
4046
4618
|
"""Controls whether enhanced security monitoring is enabled for the current workspace."""
|
|
@@ -2496,7 +2496,7 @@ class SharesAPI:
|
|
|
2496
2496
|
f'/api/2.1/unity-catalog/shares/{name}/permissions',
|
|
2497
2497
|
query=query,
|
|
2498
2498
|
headers=headers)
|
|
2499
|
-
return PermissionsList.from_dict(res)
|
|
2499
|
+
return catalog.PermissionsList.from_dict(res)
|
|
2500
2500
|
|
|
2501
2501
|
def update(self,
|
|
2502
2502
|
name: str,
|