databricks-sdk 0.26.0__py3-none-any.whl → 0.27.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 +3 -3
- databricks/sdk/_property.py +42 -0
- databricks/sdk/dbutils.py +18 -20
- databricks/sdk/mixins/files.py +324 -93
- databricks/sdk/service/catalog.py +2 -1
- databricks/sdk/service/jobs.py +2 -0
- databricks/sdk/service/pipelines.py +158 -0
- databricks/sdk/service/serving.py +538 -230
- databricks/sdk/service/settings.py +191 -189
- databricks/sdk/service/sql.py +47 -8
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.26.0.dist-info → databricks_sdk-0.27.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.26.0.dist-info → databricks_sdk-0.27.0.dist-info}/RECORD +17 -16
- {databricks_sdk-0.26.0.dist-info → databricks_sdk-0.27.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.26.0.dist-info → databricks_sdk-0.27.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.26.0.dist-info → databricks_sdk-0.27.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.26.0.dist-info → databricks_sdk-0.27.0.dist-info}/top_level.txt +0 -0
|
@@ -214,6 +214,70 @@ class ClusterAutoRestartMessageMaintenanceWindowWindowStartTime:
|
|
|
214
214
|
return cls(hours=d.get('hours', None), minutes=d.get('minutes', None))
|
|
215
215
|
|
|
216
216
|
|
|
217
|
+
@dataclass
|
|
218
|
+
class ComplianceSecurityProfile:
|
|
219
|
+
"""SHIELD feature: CSP"""
|
|
220
|
+
|
|
221
|
+
compliance_standards: Optional[List[ComplianceStandard]] = None
|
|
222
|
+
"""Set by customers when they request Compliance Security Profile (CSP)"""
|
|
223
|
+
|
|
224
|
+
is_enabled: Optional[bool] = None
|
|
225
|
+
|
|
226
|
+
def as_dict(self) -> dict:
|
|
227
|
+
"""Serializes the ComplianceSecurityProfile into a dictionary suitable for use as a JSON request body."""
|
|
228
|
+
body = {}
|
|
229
|
+
if self.compliance_standards:
|
|
230
|
+
body['compliance_standards'] = [v.value for v in self.compliance_standards]
|
|
231
|
+
if self.is_enabled is not None: body['is_enabled'] = self.is_enabled
|
|
232
|
+
return body
|
|
233
|
+
|
|
234
|
+
@classmethod
|
|
235
|
+
def from_dict(cls, d: Dict[str, any]) -> ComplianceSecurityProfile:
|
|
236
|
+
"""Deserializes the ComplianceSecurityProfile from a dictionary."""
|
|
237
|
+
return cls(compliance_standards=_repeated_enum(d, 'compliance_standards', ComplianceStandard),
|
|
238
|
+
is_enabled=d.get('is_enabled', None))
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
@dataclass
|
|
242
|
+
class ComplianceSecurityProfileSetting:
|
|
243
|
+
compliance_security_profile_workspace: ComplianceSecurityProfile
|
|
244
|
+
"""SHIELD feature: CSP"""
|
|
245
|
+
|
|
246
|
+
etag: Optional[str] = None
|
|
247
|
+
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
248
|
+
for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
|
|
249
|
+
overwriting each other. It is strongly suggested that systems make use of the etag in the read
|
|
250
|
+
-> update pattern to perform setting updates in order to avoid race conditions. That is, get an
|
|
251
|
+
etag from a GET request, and pass it with the PATCH request to identify the setting version you
|
|
252
|
+
are updating."""
|
|
253
|
+
|
|
254
|
+
setting_name: Optional[str] = None
|
|
255
|
+
"""Name of the corresponding setting. This field is populated in the response, but it will not be
|
|
256
|
+
respected even if it's set in the request body. The setting name in the path parameter will be
|
|
257
|
+
respected instead. Setting name is required to be 'default' if the setting only has one instance
|
|
258
|
+
per workspace."""
|
|
259
|
+
|
|
260
|
+
def as_dict(self) -> dict:
|
|
261
|
+
"""Serializes the ComplianceSecurityProfileSetting into a dictionary suitable for use as a JSON request body."""
|
|
262
|
+
body = {}
|
|
263
|
+
if self.compliance_security_profile_workspace:
|
|
264
|
+
body[
|
|
265
|
+
'compliance_security_profile_workspace'] = self.compliance_security_profile_workspace.as_dict(
|
|
266
|
+
)
|
|
267
|
+
if self.etag is not None: body['etag'] = self.etag
|
|
268
|
+
if self.setting_name is not None: body['setting_name'] = self.setting_name
|
|
269
|
+
return body
|
|
270
|
+
|
|
271
|
+
@classmethod
|
|
272
|
+
def from_dict(cls, d: Dict[str, any]) -> ComplianceSecurityProfileSetting:
|
|
273
|
+
"""Deserializes the ComplianceSecurityProfileSetting from a dictionary."""
|
|
274
|
+
return cls(compliance_security_profile_workspace=_from_dict(d,
|
|
275
|
+
'compliance_security_profile_workspace',
|
|
276
|
+
ComplianceSecurityProfile),
|
|
277
|
+
etag=d.get('etag', None),
|
|
278
|
+
setting_name=d.get('setting_name', None))
|
|
279
|
+
|
|
280
|
+
|
|
217
281
|
class ComplianceStandard(Enum):
|
|
218
282
|
"""Compliance stardard for SHIELD customers"""
|
|
219
283
|
|
|
@@ -437,32 +501,6 @@ class CreateTokenResponse:
|
|
|
437
501
|
token_value=d.get('token_value', None))
|
|
438
502
|
|
|
439
503
|
|
|
440
|
-
@dataclass
|
|
441
|
-
class CspEnablement:
|
|
442
|
-
"""Compliance Security Profile (CSP) - one of the features in ESC product Tracks if the feature is
|
|
443
|
-
enabled."""
|
|
444
|
-
|
|
445
|
-
compliance_standards: Optional[List[ComplianceStandard]] = None
|
|
446
|
-
"""Set by customers when they request Compliance Security Profile (CSP) Invariants are enforced in
|
|
447
|
-
Settings policy."""
|
|
448
|
-
|
|
449
|
-
is_enabled: Optional[bool] = None
|
|
450
|
-
|
|
451
|
-
def as_dict(self) -> dict:
|
|
452
|
-
"""Serializes the CspEnablement into a dictionary suitable for use as a JSON request body."""
|
|
453
|
-
body = {}
|
|
454
|
-
if self.compliance_standards:
|
|
455
|
-
body['compliance_standards'] = [v.value for v in self.compliance_standards]
|
|
456
|
-
if self.is_enabled is not None: body['is_enabled'] = self.is_enabled
|
|
457
|
-
return body
|
|
458
|
-
|
|
459
|
-
@classmethod
|
|
460
|
-
def from_dict(cls, d: Dict[str, any]) -> CspEnablement:
|
|
461
|
-
"""Deserializes the CspEnablement from a dictionary."""
|
|
462
|
-
return cls(compliance_standards=_repeated_enum(d, 'compliance_standards', ComplianceStandard),
|
|
463
|
-
is_enabled=d.get('is_enabled', None))
|
|
464
|
-
|
|
465
|
-
|
|
466
504
|
@dataclass
|
|
467
505
|
class CspEnablementAccount:
|
|
468
506
|
"""Account level policy for CSP"""
|
|
@@ -524,43 +562,6 @@ class CspEnablementAccountSetting:
|
|
|
524
562
|
setting_name=d.get('setting_name', None))
|
|
525
563
|
|
|
526
564
|
|
|
527
|
-
@dataclass
|
|
528
|
-
class CspEnablementSetting:
|
|
529
|
-
csp_enablement_workspace: CspEnablement
|
|
530
|
-
"""Compliance Security Profile (CSP) - one of the features in ESC product Tracks if the feature is
|
|
531
|
-
enabled."""
|
|
532
|
-
|
|
533
|
-
etag: Optional[str] = None
|
|
534
|
-
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
535
|
-
for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
|
|
536
|
-
overwriting each other. It is strongly suggested that systems make use of the etag in the read
|
|
537
|
-
-> update pattern to perform setting updates in order to avoid race conditions. That is, get an
|
|
538
|
-
etag from a GET request, and pass it with the PATCH request to identify the setting version you
|
|
539
|
-
are updating."""
|
|
540
|
-
|
|
541
|
-
setting_name: Optional[str] = None
|
|
542
|
-
"""Name of the corresponding setting. This field is populated in the response, but it will not be
|
|
543
|
-
respected even if it's set in the request body. The setting name in the path parameter will be
|
|
544
|
-
respected instead. Setting name is required to be 'default' if the setting only has one instance
|
|
545
|
-
per workspace."""
|
|
546
|
-
|
|
547
|
-
def as_dict(self) -> dict:
|
|
548
|
-
"""Serializes the CspEnablementSetting into a dictionary suitable for use as a JSON request body."""
|
|
549
|
-
body = {}
|
|
550
|
-
if self.csp_enablement_workspace:
|
|
551
|
-
body['csp_enablement_workspace'] = self.csp_enablement_workspace.as_dict()
|
|
552
|
-
if self.etag is not None: body['etag'] = self.etag
|
|
553
|
-
if self.setting_name is not None: body['setting_name'] = self.setting_name
|
|
554
|
-
return body
|
|
555
|
-
|
|
556
|
-
@classmethod
|
|
557
|
-
def from_dict(cls, d: Dict[str, any]) -> CspEnablementSetting:
|
|
558
|
-
"""Deserializes the CspEnablementSetting from a dictionary."""
|
|
559
|
-
return cls(csp_enablement_workspace=_from_dict(d, 'csp_enablement_workspace', CspEnablement),
|
|
560
|
-
etag=d.get('etag', None),
|
|
561
|
-
setting_name=d.get('setting_name', None))
|
|
562
|
-
|
|
563
|
-
|
|
564
565
|
@dataclass
|
|
565
566
|
class DefaultNamespaceSetting:
|
|
566
567
|
"""This represents the setting configuration for the default namespace in the Databricks workspace.
|
|
@@ -704,46 +705,27 @@ class DeleteRestrictWorkspaceAdminsSettingResponse:
|
|
|
704
705
|
|
|
705
706
|
|
|
706
707
|
@dataclass
|
|
707
|
-
class
|
|
708
|
-
"""
|
|
709
|
-
enabled."""
|
|
708
|
+
class EnhancedSecurityMonitoring:
|
|
709
|
+
"""SHIELD feature: ESM"""
|
|
710
710
|
|
|
711
711
|
is_enabled: Optional[bool] = None
|
|
712
712
|
|
|
713
713
|
def as_dict(self) -> dict:
|
|
714
|
-
"""Serializes the
|
|
714
|
+
"""Serializes the EnhancedSecurityMonitoring into a dictionary suitable for use as a JSON request body."""
|
|
715
715
|
body = {}
|
|
716
716
|
if self.is_enabled is not None: body['is_enabled'] = self.is_enabled
|
|
717
717
|
return body
|
|
718
718
|
|
|
719
719
|
@classmethod
|
|
720
|
-
def from_dict(cls, d: Dict[str, any]) ->
|
|
721
|
-
"""Deserializes the
|
|
720
|
+
def from_dict(cls, d: Dict[str, any]) -> EnhancedSecurityMonitoring:
|
|
721
|
+
"""Deserializes the EnhancedSecurityMonitoring from a dictionary."""
|
|
722
722
|
return cls(is_enabled=d.get('is_enabled', None))
|
|
723
723
|
|
|
724
724
|
|
|
725
725
|
@dataclass
|
|
726
|
-
class
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
is_enforced: Optional[bool] = None
|
|
730
|
-
|
|
731
|
-
def as_dict(self) -> dict:
|
|
732
|
-
"""Serializes the EsmEnablementAccount into a dictionary suitable for use as a JSON request body."""
|
|
733
|
-
body = {}
|
|
734
|
-
if self.is_enforced is not None: body['is_enforced'] = self.is_enforced
|
|
735
|
-
return body
|
|
736
|
-
|
|
737
|
-
@classmethod
|
|
738
|
-
def from_dict(cls, d: Dict[str, any]) -> EsmEnablementAccount:
|
|
739
|
-
"""Deserializes the EsmEnablementAccount from a dictionary."""
|
|
740
|
-
return cls(is_enforced=d.get('is_enforced', None))
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
@dataclass
|
|
744
|
-
class EsmEnablementAccountSetting:
|
|
745
|
-
esm_enablement_account: EsmEnablementAccount
|
|
746
|
-
"""Account level policy for ESM"""
|
|
726
|
+
class EnhancedSecurityMonitoringSetting:
|
|
727
|
+
enhanced_security_monitoring_workspace: EnhancedSecurityMonitoring
|
|
728
|
+
"""SHIELD feature: ESM"""
|
|
747
729
|
|
|
748
730
|
etag: Optional[str] = None
|
|
749
731
|
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
@@ -760,26 +742,47 @@ class EsmEnablementAccountSetting:
|
|
|
760
742
|
per workspace."""
|
|
761
743
|
|
|
762
744
|
def as_dict(self) -> dict:
|
|
763
|
-
"""Serializes the
|
|
745
|
+
"""Serializes the EnhancedSecurityMonitoringSetting into a dictionary suitable for use as a JSON request body."""
|
|
764
746
|
body = {}
|
|
765
|
-
if self.
|
|
747
|
+
if self.enhanced_security_monitoring_workspace:
|
|
748
|
+
body[
|
|
749
|
+
'enhanced_security_monitoring_workspace'] = self.enhanced_security_monitoring_workspace.as_dict(
|
|
750
|
+
)
|
|
766
751
|
if self.etag is not None: body['etag'] = self.etag
|
|
767
752
|
if self.setting_name is not None: body['setting_name'] = self.setting_name
|
|
768
753
|
return body
|
|
769
754
|
|
|
770
755
|
@classmethod
|
|
771
|
-
def from_dict(cls, d: Dict[str, any]) ->
|
|
772
|
-
"""Deserializes the
|
|
773
|
-
return cls(
|
|
756
|
+
def from_dict(cls, d: Dict[str, any]) -> EnhancedSecurityMonitoringSetting:
|
|
757
|
+
"""Deserializes the EnhancedSecurityMonitoringSetting from a dictionary."""
|
|
758
|
+
return cls(enhanced_security_monitoring_workspace=_from_dict(
|
|
759
|
+
d, 'enhanced_security_monitoring_workspace', EnhancedSecurityMonitoring),
|
|
774
760
|
etag=d.get('etag', None),
|
|
775
761
|
setting_name=d.get('setting_name', None))
|
|
776
762
|
|
|
777
763
|
|
|
778
764
|
@dataclass
|
|
779
|
-
class
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
765
|
+
class EsmEnablementAccount:
|
|
766
|
+
"""Account level policy for ESM"""
|
|
767
|
+
|
|
768
|
+
is_enforced: Optional[bool] = None
|
|
769
|
+
|
|
770
|
+
def as_dict(self) -> dict:
|
|
771
|
+
"""Serializes the EsmEnablementAccount into a dictionary suitable for use as a JSON request body."""
|
|
772
|
+
body = {}
|
|
773
|
+
if self.is_enforced is not None: body['is_enforced'] = self.is_enforced
|
|
774
|
+
return body
|
|
775
|
+
|
|
776
|
+
@classmethod
|
|
777
|
+
def from_dict(cls, d: Dict[str, any]) -> EsmEnablementAccount:
|
|
778
|
+
"""Deserializes the EsmEnablementAccount from a dictionary."""
|
|
779
|
+
return cls(is_enforced=d.get('is_enforced', None))
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
@dataclass
|
|
783
|
+
class EsmEnablementAccountSetting:
|
|
784
|
+
esm_enablement_account: EsmEnablementAccount
|
|
785
|
+
"""Account level policy for ESM"""
|
|
783
786
|
|
|
784
787
|
etag: Optional[str] = None
|
|
785
788
|
"""etag used for versioning. The response is at least as fresh as the eTag provided. This is used
|
|
@@ -796,18 +799,17 @@ class EsmEnablementSetting:
|
|
|
796
799
|
per workspace."""
|
|
797
800
|
|
|
798
801
|
def as_dict(self) -> dict:
|
|
799
|
-
"""Serializes the
|
|
802
|
+
"""Serializes the EsmEnablementAccountSetting into a dictionary suitable for use as a JSON request body."""
|
|
800
803
|
body = {}
|
|
801
|
-
if self.
|
|
802
|
-
body['esm_enablement_workspace'] = self.esm_enablement_workspace.as_dict()
|
|
804
|
+
if self.esm_enablement_account: body['esm_enablement_account'] = self.esm_enablement_account.as_dict()
|
|
803
805
|
if self.etag is not None: body['etag'] = self.etag
|
|
804
806
|
if self.setting_name is not None: body['setting_name'] = self.setting_name
|
|
805
807
|
return body
|
|
806
808
|
|
|
807
809
|
@classmethod
|
|
808
|
-
def from_dict(cls, d: Dict[str, any]) ->
|
|
809
|
-
"""Deserializes the
|
|
810
|
-
return cls(
|
|
810
|
+
def from_dict(cls, d: Dict[str, any]) -> EsmEnablementAccountSetting:
|
|
811
|
+
"""Deserializes the EsmEnablementAccountSetting from a dictionary."""
|
|
812
|
+
return cls(esm_enablement_account=_from_dict(d, 'esm_enablement_account', EsmEnablementAccount),
|
|
811
813
|
etag=d.get('etag', None),
|
|
812
814
|
setting_name=d.get('setting_name', None))
|
|
813
815
|
|
|
@@ -1989,13 +1991,13 @@ class UpdateAutomaticClusterUpdateSettingRequest:
|
|
|
1989
1991
|
|
|
1990
1992
|
|
|
1991
1993
|
@dataclass
|
|
1992
|
-
class
|
|
1994
|
+
class UpdateComplianceSecurityProfileSettingRequest:
|
|
1993
1995
|
"""Details required to update a setting."""
|
|
1994
1996
|
|
|
1995
1997
|
allow_missing: bool
|
|
1996
1998
|
"""This should always be set to true for Settings API. Added for AIP compliance."""
|
|
1997
1999
|
|
|
1998
|
-
setting:
|
|
2000
|
+
setting: ComplianceSecurityProfileSetting
|
|
1999
2001
|
|
|
2000
2002
|
field_mask: str
|
|
2001
2003
|
"""Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
|
|
@@ -2003,7 +2005,7 @@ class UpdateCspEnablementAccountSettingRequest:
|
|
|
2003
2005
|
specify multiple fields in the field mask, use comma as the separator (no space)."""
|
|
2004
2006
|
|
|
2005
2007
|
def as_dict(self) -> dict:
|
|
2006
|
-
"""Serializes the
|
|
2008
|
+
"""Serializes the UpdateComplianceSecurityProfileSettingRequest into a dictionary suitable for use as a JSON request body."""
|
|
2007
2009
|
body = {}
|
|
2008
2010
|
if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
|
|
2009
2011
|
if self.field_mask is not None: body['field_mask'] = self.field_mask
|
|
@@ -2011,21 +2013,21 @@ class UpdateCspEnablementAccountSettingRequest:
|
|
|
2011
2013
|
return body
|
|
2012
2014
|
|
|
2013
2015
|
@classmethod
|
|
2014
|
-
def from_dict(cls, d: Dict[str, any]) ->
|
|
2015
|
-
"""Deserializes the
|
|
2016
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateComplianceSecurityProfileSettingRequest:
|
|
2017
|
+
"""Deserializes the UpdateComplianceSecurityProfileSettingRequest from a dictionary."""
|
|
2016
2018
|
return cls(allow_missing=d.get('allow_missing', None),
|
|
2017
2019
|
field_mask=d.get('field_mask', None),
|
|
2018
|
-
setting=_from_dict(d, 'setting',
|
|
2020
|
+
setting=_from_dict(d, 'setting', ComplianceSecurityProfileSetting))
|
|
2019
2021
|
|
|
2020
2022
|
|
|
2021
2023
|
@dataclass
|
|
2022
|
-
class
|
|
2024
|
+
class UpdateCspEnablementAccountSettingRequest:
|
|
2023
2025
|
"""Details required to update a setting."""
|
|
2024
2026
|
|
|
2025
2027
|
allow_missing: bool
|
|
2026
2028
|
"""This should always be set to true for Settings API. Added for AIP compliance."""
|
|
2027
2029
|
|
|
2028
|
-
setting:
|
|
2030
|
+
setting: CspEnablementAccountSetting
|
|
2029
2031
|
|
|
2030
2032
|
field_mask: str
|
|
2031
2033
|
"""Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
|
|
@@ -2033,7 +2035,7 @@ class UpdateCspEnablementSettingRequest:
|
|
|
2033
2035
|
specify multiple fields in the field mask, use comma as the separator (no space)."""
|
|
2034
2036
|
|
|
2035
2037
|
def as_dict(self) -> dict:
|
|
2036
|
-
"""Serializes the
|
|
2038
|
+
"""Serializes the UpdateCspEnablementAccountSettingRequest into a dictionary suitable for use as a JSON request body."""
|
|
2037
2039
|
body = {}
|
|
2038
2040
|
if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
|
|
2039
2041
|
if self.field_mask is not None: body['field_mask'] = self.field_mask
|
|
@@ -2041,11 +2043,11 @@ class UpdateCspEnablementSettingRequest:
|
|
|
2041
2043
|
return body
|
|
2042
2044
|
|
|
2043
2045
|
@classmethod
|
|
2044
|
-
def from_dict(cls, d: Dict[str, any]) ->
|
|
2045
|
-
"""Deserializes the
|
|
2046
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateCspEnablementAccountSettingRequest:
|
|
2047
|
+
"""Deserializes the UpdateCspEnablementAccountSettingRequest from a dictionary."""
|
|
2046
2048
|
return cls(allow_missing=d.get('allow_missing', None),
|
|
2047
2049
|
field_mask=d.get('field_mask', None),
|
|
2048
|
-
setting=_from_dict(d, 'setting',
|
|
2050
|
+
setting=_from_dict(d, 'setting', CspEnablementAccountSetting))
|
|
2049
2051
|
|
|
2050
2052
|
|
|
2051
2053
|
@dataclass
|
|
@@ -2086,13 +2088,13 @@ class UpdateDefaultNamespaceSettingRequest:
|
|
|
2086
2088
|
|
|
2087
2089
|
|
|
2088
2090
|
@dataclass
|
|
2089
|
-
class
|
|
2091
|
+
class UpdateEnhancedSecurityMonitoringSettingRequest:
|
|
2090
2092
|
"""Details required to update a setting."""
|
|
2091
2093
|
|
|
2092
2094
|
allow_missing: bool
|
|
2093
2095
|
"""This should always be set to true for Settings API. Added for AIP compliance."""
|
|
2094
2096
|
|
|
2095
|
-
setting:
|
|
2097
|
+
setting: EnhancedSecurityMonitoringSetting
|
|
2096
2098
|
|
|
2097
2099
|
field_mask: str
|
|
2098
2100
|
"""Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
|
|
@@ -2100,7 +2102,7 @@ class UpdateEsmEnablementAccountSettingRequest:
|
|
|
2100
2102
|
specify multiple fields in the field mask, use comma as the separator (no space)."""
|
|
2101
2103
|
|
|
2102
2104
|
def as_dict(self) -> dict:
|
|
2103
|
-
"""Serializes the
|
|
2105
|
+
"""Serializes the UpdateEnhancedSecurityMonitoringSettingRequest into a dictionary suitable for use as a JSON request body."""
|
|
2104
2106
|
body = {}
|
|
2105
2107
|
if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
|
|
2106
2108
|
if self.field_mask is not None: body['field_mask'] = self.field_mask
|
|
@@ -2108,21 +2110,21 @@ class UpdateEsmEnablementAccountSettingRequest:
|
|
|
2108
2110
|
return body
|
|
2109
2111
|
|
|
2110
2112
|
@classmethod
|
|
2111
|
-
def from_dict(cls, d: Dict[str, any]) ->
|
|
2112
|
-
"""Deserializes the
|
|
2113
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateEnhancedSecurityMonitoringSettingRequest:
|
|
2114
|
+
"""Deserializes the UpdateEnhancedSecurityMonitoringSettingRequest from a dictionary."""
|
|
2113
2115
|
return cls(allow_missing=d.get('allow_missing', None),
|
|
2114
2116
|
field_mask=d.get('field_mask', None),
|
|
2115
|
-
setting=_from_dict(d, 'setting',
|
|
2117
|
+
setting=_from_dict(d, 'setting', EnhancedSecurityMonitoringSetting))
|
|
2116
2118
|
|
|
2117
2119
|
|
|
2118
2120
|
@dataclass
|
|
2119
|
-
class
|
|
2121
|
+
class UpdateEsmEnablementAccountSettingRequest:
|
|
2120
2122
|
"""Details required to update a setting."""
|
|
2121
2123
|
|
|
2122
2124
|
allow_missing: bool
|
|
2123
2125
|
"""This should always be set to true for Settings API. Added for AIP compliance."""
|
|
2124
2126
|
|
|
2125
|
-
setting:
|
|
2127
|
+
setting: EsmEnablementAccountSetting
|
|
2126
2128
|
|
|
2127
2129
|
field_mask: str
|
|
2128
2130
|
"""Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
|
|
@@ -2130,7 +2132,7 @@ class UpdateEsmEnablementSettingRequest:
|
|
|
2130
2132
|
specify multiple fields in the field mask, use comma as the separator (no space)."""
|
|
2131
2133
|
|
|
2132
2134
|
def as_dict(self) -> dict:
|
|
2133
|
-
"""Serializes the
|
|
2135
|
+
"""Serializes the UpdateEsmEnablementAccountSettingRequest into a dictionary suitable for use as a JSON request body."""
|
|
2134
2136
|
body = {}
|
|
2135
2137
|
if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
|
|
2136
2138
|
if self.field_mask is not None: body['field_mask'] = self.field_mask
|
|
@@ -2138,11 +2140,11 @@ class UpdateEsmEnablementSettingRequest:
|
|
|
2138
2140
|
return body
|
|
2139
2141
|
|
|
2140
2142
|
@classmethod
|
|
2141
|
-
def from_dict(cls, d: Dict[str, any]) ->
|
|
2142
|
-
"""Deserializes the
|
|
2143
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateEsmEnablementAccountSettingRequest:
|
|
2144
|
+
"""Deserializes the UpdateEsmEnablementAccountSettingRequest from a dictionary."""
|
|
2143
2145
|
return cls(allow_missing=d.get('allow_missing', None),
|
|
2144
2146
|
field_mask=d.get('field_mask', None),
|
|
2145
|
-
setting=_from_dict(d, 'setting',
|
|
2147
|
+
setting=_from_dict(d, 'setting', EsmEnablementAccountSetting))
|
|
2146
2148
|
|
|
2147
2149
|
|
|
2148
2150
|
@dataclass
|
|
@@ -2568,43 +2570,7 @@ class AutomaticClusterUpdateAPI:
|
|
|
2568
2570
|
return AutomaticClusterUpdateSetting.from_dict(res)
|
|
2569
2571
|
|
|
2570
2572
|
|
|
2571
|
-
class
|
|
2572
|
-
"""Credentials manager interacts with with Identity Providers to to perform token exchanges using stored
|
|
2573
|
-
credentials and refresh tokens."""
|
|
2574
|
-
|
|
2575
|
-
def __init__(self, api_client):
|
|
2576
|
-
self._api = api_client
|
|
2577
|
-
|
|
2578
|
-
def exchange_token(self, partition_id: PartitionId, token_type: List[TokenType],
|
|
2579
|
-
scopes: List[str]) -> ExchangeTokenResponse:
|
|
2580
|
-
"""Exchange token.
|
|
2581
|
-
|
|
2582
|
-
Exchange tokens with an Identity Provider to get a new access token. It allows specifying scopes to
|
|
2583
|
-
determine token permissions.
|
|
2584
|
-
|
|
2585
|
-
:param partition_id: :class:`PartitionId`
|
|
2586
|
-
The partition of Credentials store
|
|
2587
|
-
:param token_type: List[:class:`TokenType`]
|
|
2588
|
-
A list of token types being requested
|
|
2589
|
-
:param scopes: List[str]
|
|
2590
|
-
Array of scopes for the token request.
|
|
2591
|
-
|
|
2592
|
-
:returns: :class:`ExchangeTokenResponse`
|
|
2593
|
-
"""
|
|
2594
|
-
body = {}
|
|
2595
|
-
if partition_id is not None: body['partitionId'] = partition_id.as_dict()
|
|
2596
|
-
if scopes is not None: body['scopes'] = [v for v in scopes]
|
|
2597
|
-
if token_type is not None: body['tokenType'] = [v.value for v in token_type]
|
|
2598
|
-
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2599
|
-
|
|
2600
|
-
res = self._api.do('POST',
|
|
2601
|
-
'/api/2.0/credentials-manager/exchange-tokens/token',
|
|
2602
|
-
body=body,
|
|
2603
|
-
headers=headers)
|
|
2604
|
-
return ExchangeTokenResponse.from_dict(res)
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
class CspEnablementAPI:
|
|
2573
|
+
class ComplianceSecurityProfileAPI:
|
|
2608
2574
|
"""Controls whether to enable the compliance security profile for the current workspace. Enabling it on a
|
|
2609
2575
|
workspace is permanent. By default, it is turned off.
|
|
2610
2576
|
|
|
@@ -2613,7 +2579,7 @@ class CspEnablementAPI:
|
|
|
2613
2579
|
def __init__(self, api_client):
|
|
2614
2580
|
self._api = api_client
|
|
2615
2581
|
|
|
2616
|
-
def get(self, *, etag: Optional[str] = None) ->
|
|
2582
|
+
def get(self, *, etag: Optional[str] = None) -> ComplianceSecurityProfileSetting:
|
|
2617
2583
|
"""Get the compliance security profile setting.
|
|
2618
2584
|
|
|
2619
2585
|
Gets the compliance security profile setting.
|
|
@@ -2625,7 +2591,7 @@ class CspEnablementAPI:
|
|
|
2625
2591
|
to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
|
|
2626
2592
|
request, and pass it with the DELETE request to identify the rule set version you are deleting.
|
|
2627
2593
|
|
|
2628
|
-
:returns: :class:`
|
|
2594
|
+
:returns: :class:`ComplianceSecurityProfileSetting`
|
|
2629
2595
|
"""
|
|
2630
2596
|
|
|
2631
2597
|
query = {}
|
|
@@ -2636,10 +2602,10 @@ class CspEnablementAPI:
|
|
|
2636
2602
|
'/api/2.0/settings/types/shield_csp_enablement_ws_db/names/default',
|
|
2637
2603
|
query=query,
|
|
2638
2604
|
headers=headers)
|
|
2639
|
-
return
|
|
2605
|
+
return ComplianceSecurityProfileSetting.from_dict(res)
|
|
2640
2606
|
|
|
2641
|
-
def update(self, allow_missing: bool, setting:
|
|
2642
|
-
field_mask: str) ->
|
|
2607
|
+
def update(self, allow_missing: bool, setting: ComplianceSecurityProfileSetting,
|
|
2608
|
+
field_mask: str) -> ComplianceSecurityProfileSetting:
|
|
2643
2609
|
"""Update the compliance security profile setting.
|
|
2644
2610
|
|
|
2645
2611
|
Updates the compliance security profile setting for the workspace. A fresh etag needs to be provided
|
|
@@ -2649,13 +2615,13 @@ class CspEnablementAPI:
|
|
|
2649
2615
|
|
|
2650
2616
|
:param allow_missing: bool
|
|
2651
2617
|
This should always be set to true for Settings API. Added for AIP compliance.
|
|
2652
|
-
:param setting: :class:`
|
|
2618
|
+
:param setting: :class:`ComplianceSecurityProfileSetting`
|
|
2653
2619
|
:param field_mask: str
|
|
2654
2620
|
Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
|
|
2655
2621
|
setting payload will be updated. The field mask needs to be supplied as single string. To specify
|
|
2656
2622
|
multiple fields in the field mask, use comma as the separator (no space).
|
|
2657
2623
|
|
|
2658
|
-
:returns: :class:`
|
|
2624
|
+
:returns: :class:`ComplianceSecurityProfileSetting`
|
|
2659
2625
|
"""
|
|
2660
2626
|
body = {}
|
|
2661
2627
|
if allow_missing is not None: body['allow_missing'] = allow_missing
|
|
@@ -2667,7 +2633,43 @@ class CspEnablementAPI:
|
|
|
2667
2633
|
'/api/2.0/settings/types/shield_csp_enablement_ws_db/names/default',
|
|
2668
2634
|
body=body,
|
|
2669
2635
|
headers=headers)
|
|
2670
|
-
return
|
|
2636
|
+
return ComplianceSecurityProfileSetting.from_dict(res)
|
|
2637
|
+
|
|
2638
|
+
|
|
2639
|
+
class CredentialsManagerAPI:
|
|
2640
|
+
"""Credentials manager interacts with with Identity Providers to to perform token exchanges using stored
|
|
2641
|
+
credentials and refresh tokens."""
|
|
2642
|
+
|
|
2643
|
+
def __init__(self, api_client):
|
|
2644
|
+
self._api = api_client
|
|
2645
|
+
|
|
2646
|
+
def exchange_token(self, partition_id: PartitionId, token_type: List[TokenType],
|
|
2647
|
+
scopes: List[str]) -> ExchangeTokenResponse:
|
|
2648
|
+
"""Exchange token.
|
|
2649
|
+
|
|
2650
|
+
Exchange tokens with an Identity Provider to get a new access token. It allows specifying scopes to
|
|
2651
|
+
determine token permissions.
|
|
2652
|
+
|
|
2653
|
+
:param partition_id: :class:`PartitionId`
|
|
2654
|
+
The partition of Credentials store
|
|
2655
|
+
:param token_type: List[:class:`TokenType`]
|
|
2656
|
+
A list of token types being requested
|
|
2657
|
+
:param scopes: List[str]
|
|
2658
|
+
Array of scopes for the token request.
|
|
2659
|
+
|
|
2660
|
+
:returns: :class:`ExchangeTokenResponse`
|
|
2661
|
+
"""
|
|
2662
|
+
body = {}
|
|
2663
|
+
if partition_id is not None: body['partitionId'] = partition_id.as_dict()
|
|
2664
|
+
if scopes is not None: body['scopes'] = [v for v in scopes]
|
|
2665
|
+
if token_type is not None: body['tokenType'] = [v.value for v in token_type]
|
|
2666
|
+
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2667
|
+
|
|
2668
|
+
res = self._api.do('POST',
|
|
2669
|
+
'/api/2.0/credentials-manager/exchange-tokens/token',
|
|
2670
|
+
body=body,
|
|
2671
|
+
headers=headers)
|
|
2672
|
+
return ExchangeTokenResponse.from_dict(res)
|
|
2671
2673
|
|
|
2672
2674
|
|
|
2673
2675
|
class CspEnablementAccountAPI:
|
|
@@ -2846,7 +2848,7 @@ class DefaultNamespaceAPI:
|
|
|
2846
2848
|
return DefaultNamespaceSetting.from_dict(res)
|
|
2847
2849
|
|
|
2848
2850
|
|
|
2849
|
-
class
|
|
2851
|
+
class EnhancedSecurityMonitoringAPI:
|
|
2850
2852
|
"""Controls whether enhanced security monitoring is enabled for the current workspace. If the compliance
|
|
2851
2853
|
security profile is enabled, this is automatically enabled. By default, it is disabled. However, if the
|
|
2852
2854
|
compliance security profile is enabled, this is automatically enabled.
|
|
@@ -2857,7 +2859,7 @@ class EsmEnablementAPI:
|
|
|
2857
2859
|
def __init__(self, api_client):
|
|
2858
2860
|
self._api = api_client
|
|
2859
2861
|
|
|
2860
|
-
def get(self, *, etag: Optional[str] = None) ->
|
|
2862
|
+
def get(self, *, etag: Optional[str] = None) -> EnhancedSecurityMonitoringSetting:
|
|
2861
2863
|
"""Get the enhanced security monitoring setting.
|
|
2862
2864
|
|
|
2863
2865
|
Gets the enhanced security monitoring setting.
|
|
@@ -2869,7 +2871,7 @@ class EsmEnablementAPI:
|
|
|
2869
2871
|
to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
|
|
2870
2872
|
request, and pass it with the DELETE request to identify the rule set version you are deleting.
|
|
2871
2873
|
|
|
2872
|
-
:returns: :class:`
|
|
2874
|
+
:returns: :class:`EnhancedSecurityMonitoringSetting`
|
|
2873
2875
|
"""
|
|
2874
2876
|
|
|
2875
2877
|
query = {}
|
|
@@ -2880,10 +2882,10 @@ class EsmEnablementAPI:
|
|
|
2880
2882
|
'/api/2.0/settings/types/shield_esm_enablement_ws_db/names/default',
|
|
2881
2883
|
query=query,
|
|
2882
2884
|
headers=headers)
|
|
2883
|
-
return
|
|
2885
|
+
return EnhancedSecurityMonitoringSetting.from_dict(res)
|
|
2884
2886
|
|
|
2885
|
-
def update(self, allow_missing: bool, setting:
|
|
2886
|
-
field_mask: str) ->
|
|
2887
|
+
def update(self, allow_missing: bool, setting: EnhancedSecurityMonitoringSetting,
|
|
2888
|
+
field_mask: str) -> EnhancedSecurityMonitoringSetting:
|
|
2887
2889
|
"""Update the enhanced security monitoring setting.
|
|
2888
2890
|
|
|
2889
2891
|
Updates the enhanced security monitoring setting for the workspace. A fresh etag needs to be provided
|
|
@@ -2893,13 +2895,13 @@ class EsmEnablementAPI:
|
|
|
2893
2895
|
|
|
2894
2896
|
:param allow_missing: bool
|
|
2895
2897
|
This should always be set to true for Settings API. Added for AIP compliance.
|
|
2896
|
-
:param setting: :class:`
|
|
2898
|
+
:param setting: :class:`EnhancedSecurityMonitoringSetting`
|
|
2897
2899
|
:param field_mask: str
|
|
2898
2900
|
Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
|
|
2899
2901
|
setting payload will be updated. The field mask needs to be supplied as single string. To specify
|
|
2900
2902
|
multiple fields in the field mask, use comma as the separator (no space).
|
|
2901
2903
|
|
|
2902
|
-
:returns: :class:`
|
|
2904
|
+
:returns: :class:`EnhancedSecurityMonitoringSetting`
|
|
2903
2905
|
"""
|
|
2904
2906
|
body = {}
|
|
2905
2907
|
if allow_missing is not None: body['allow_missing'] = allow_missing
|
|
@@ -2911,7 +2913,7 @@ class EsmEnablementAPI:
|
|
|
2911
2913
|
'/api/2.0/settings/types/shield_esm_enablement_ws_db/names/default',
|
|
2912
2914
|
body=body,
|
|
2913
2915
|
headers=headers)
|
|
2914
|
-
return
|
|
2916
|
+
return EnhancedSecurityMonitoringSetting.from_dict(res)
|
|
2915
2917
|
|
|
2916
2918
|
|
|
2917
2919
|
class EsmEnablementAccountAPI:
|
|
@@ -3599,9 +3601,9 @@ class SettingsAPI:
|
|
|
3599
3601
|
self._api = api_client
|
|
3600
3602
|
|
|
3601
3603
|
self._automatic_cluster_update = AutomaticClusterUpdateAPI(self._api)
|
|
3602
|
-
self.
|
|
3604
|
+
self._compliance_security_profile = ComplianceSecurityProfileAPI(self._api)
|
|
3603
3605
|
self._default_namespace = DefaultNamespaceAPI(self._api)
|
|
3604
|
-
self.
|
|
3606
|
+
self._enhanced_security_monitoring = EnhancedSecurityMonitoringAPI(self._api)
|
|
3605
3607
|
self._restrict_workspace_admins = RestrictWorkspaceAdminsAPI(self._api)
|
|
3606
3608
|
|
|
3607
3609
|
@property
|
|
@@ -3610,9 +3612,9 @@ class SettingsAPI:
|
|
|
3610
3612
|
return self._automatic_cluster_update
|
|
3611
3613
|
|
|
3612
3614
|
@property
|
|
3613
|
-
def
|
|
3615
|
+
def compliance_security_profile(self) -> ComplianceSecurityProfileAPI:
|
|
3614
3616
|
"""Controls whether to enable the compliance security profile for the current workspace."""
|
|
3615
|
-
return self.
|
|
3617
|
+
return self._compliance_security_profile
|
|
3616
3618
|
|
|
3617
3619
|
@property
|
|
3618
3620
|
def default_namespace(self) -> DefaultNamespaceAPI:
|
|
@@ -3620,9 +3622,9 @@ class SettingsAPI:
|
|
|
3620
3622
|
return self._default_namespace
|
|
3621
3623
|
|
|
3622
3624
|
@property
|
|
3623
|
-
def
|
|
3625
|
+
def enhanced_security_monitoring(self) -> EnhancedSecurityMonitoringAPI:
|
|
3624
3626
|
"""Controls whether enhanced security monitoring is enabled for the current workspace."""
|
|
3625
|
-
return self.
|
|
3627
|
+
return self._enhanced_security_monitoring
|
|
3626
3628
|
|
|
3627
3629
|
@property
|
|
3628
3630
|
def restrict_workspace_admins(self) -> RestrictWorkspaceAdminsAPI:
|