databricks-sdk 0.20.0__py3-none-any.whl → 0.21.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.

Files changed (33) hide show
  1. databricks/sdk/__init__.py +21 -6
  2. databricks/sdk/_widgets/__init__.py +2 -2
  3. databricks/sdk/config.py +3 -2
  4. databricks/sdk/oauth.py +1 -1
  5. databricks/sdk/runtime/__init__.py +85 -11
  6. databricks/sdk/runtime/dbutils_stub.py +1 -1
  7. databricks/sdk/service/_internal.py +1 -1
  8. databricks/sdk/service/billing.py +42 -0
  9. databricks/sdk/service/catalog.py +245 -44
  10. databricks/sdk/service/compute.py +334 -13
  11. databricks/sdk/service/dashboards.py +14 -0
  12. databricks/sdk/service/files.py +154 -12
  13. databricks/sdk/service/iam.py +161 -0
  14. databricks/sdk/service/jobs.py +95 -8
  15. databricks/sdk/service/ml.py +350 -0
  16. databricks/sdk/service/oauth2.py +70 -0
  17. databricks/sdk/service/pipelines.py +66 -8
  18. databricks/sdk/service/provisioning.py +78 -36
  19. databricks/sdk/service/serving.py +28 -0
  20. databricks/sdk/service/settings.py +1292 -203
  21. databricks/sdk/service/sharing.py +56 -0
  22. databricks/sdk/service/sql.py +138 -11
  23. databricks/sdk/service/vectorsearch.py +95 -60
  24. databricks/sdk/service/workspace.py +141 -1
  25. databricks/sdk/version.py +1 -1
  26. {databricks_sdk-0.20.0.dist-info → databricks_sdk-0.21.0.dist-info}/METADATA +3 -1
  27. databricks_sdk-0.21.0.dist-info/RECORD +53 -0
  28. databricks/sdk/runtime/stub.py +0 -48
  29. databricks_sdk-0.20.0.dist-info/RECORD +0 -54
  30. {databricks_sdk-0.20.0.dist-info → databricks_sdk-0.21.0.dist-info}/LICENSE +0 -0
  31. {databricks_sdk-0.20.0.dist-info → databricks_sdk-0.21.0.dist-info}/NOTICE +0 -0
  32. {databricks_sdk-0.20.0.dist-info → databricks_sdk-0.21.0.dist-info}/WHEEL +0 -0
  33. {databricks_sdk-0.20.0.dist-info → databricks_sdk-0.21.0.dist-info}/top_level.txt +0 -0
@@ -14,6 +14,220 @@ _LOG = logging.getLogger('databricks.sdk')
14
14
  # all definitions in this file are in alphabetical order
15
15
 
16
16
 
17
+ @dataclass
18
+ class AutomaticClusterUpdateSetting:
19
+ automatic_cluster_update_workspace: ClusterAutoRestartMessage
20
+
21
+ etag: Optional[str] = None
22
+ """etag used for versioning. The response is at least as fresh as the eTag provided. This is used
23
+ for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
24
+ overwriting each other. It is strongly suggested that systems make use of the etag in the read
25
+ -> update pattern to perform setting updates in order to avoid race conditions. That is, get an
26
+ etag from a GET request, and pass it with the PATCH request to identify the setting version you
27
+ are updating."""
28
+
29
+ setting_name: Optional[str] = None
30
+ """Name of the corresponding setting. This field is populated in the response, but it will not be
31
+ respected even if it's set in the request body. The setting name in the path parameter will be
32
+ respected instead. Setting name is required to be 'default' if the setting only has one instance
33
+ per workspace."""
34
+
35
+ def as_dict(self) -> dict:
36
+ """Serializes the AutomaticClusterUpdateSetting into a dictionary suitable for use as a JSON request body."""
37
+ body = {}
38
+ if self.automatic_cluster_update_workspace:
39
+ body['automatic_cluster_update_workspace'] = self.automatic_cluster_update_workspace.as_dict()
40
+ if self.etag is not None: body['etag'] = self.etag
41
+ if self.setting_name is not None: body['setting_name'] = self.setting_name
42
+ return body
43
+
44
+ @classmethod
45
+ def from_dict(cls, d: Dict[str, any]) -> AutomaticClusterUpdateSetting:
46
+ """Deserializes the AutomaticClusterUpdateSetting from a dictionary."""
47
+ return cls(automatic_cluster_update_workspace=_from_dict(d, 'automatic_cluster_update_workspace',
48
+ ClusterAutoRestartMessage),
49
+ etag=d.get('etag', None),
50
+ setting_name=d.get('setting_name', None))
51
+
52
+
53
+ @dataclass
54
+ class ClusterAutoRestartMessage:
55
+ can_toggle: Optional[bool] = None
56
+
57
+ enabled: Optional[bool] = None
58
+
59
+ enablement_details: Optional[ClusterAutoRestartMessageEnablementDetails] = None
60
+ """Contains an information about the enablement status judging (e.g. whether the enterprise tier is
61
+ enabled) This is only additional information that MUST NOT be used to decide whether the setting
62
+ is enabled or not. This is intended to use only for purposes like showing an error message to
63
+ the customer with the additional details. For example, using these details we can check why
64
+ exactly the feature is disabled for this customer."""
65
+
66
+ maintenance_window: Optional[ClusterAutoRestartMessageMaintenanceWindow] = None
67
+
68
+ restart_even_if_no_updates_available: Optional[bool] = None
69
+
70
+ def as_dict(self) -> dict:
71
+ """Serializes the ClusterAutoRestartMessage into a dictionary suitable for use as a JSON request body."""
72
+ body = {}
73
+ if self.can_toggle is not None: body['can_toggle'] = self.can_toggle
74
+ if self.enabled is not None: body['enabled'] = self.enabled
75
+ if self.enablement_details: body['enablement_details'] = self.enablement_details.as_dict()
76
+ if self.maintenance_window: body['maintenance_window'] = self.maintenance_window.as_dict()
77
+ if self.restart_even_if_no_updates_available is not None:
78
+ body['restart_even_if_no_updates_available'] = self.restart_even_if_no_updates_available
79
+ return body
80
+
81
+ @classmethod
82
+ def from_dict(cls, d: Dict[str, any]) -> ClusterAutoRestartMessage:
83
+ """Deserializes the ClusterAutoRestartMessage from a dictionary."""
84
+ return cls(can_toggle=d.get('can_toggle', None),
85
+ enabled=d.get('enabled', None),
86
+ enablement_details=_from_dict(d, 'enablement_details',
87
+ ClusterAutoRestartMessageEnablementDetails),
88
+ maintenance_window=_from_dict(d, 'maintenance_window',
89
+ ClusterAutoRestartMessageMaintenanceWindow),
90
+ restart_even_if_no_updates_available=d.get('restart_even_if_no_updates_available', None))
91
+
92
+
93
+ @dataclass
94
+ class ClusterAutoRestartMessageEnablementDetails:
95
+ """Contains an information about the enablement status judging (e.g. whether the enterprise tier is
96
+ enabled) This is only additional information that MUST NOT be used to decide whether the setting
97
+ is enabled or not. This is intended to use only for purposes like showing an error message to
98
+ the customer with the additional details. For example, using these details we can check why
99
+ exactly the feature is disabled for this customer."""
100
+
101
+ forced_for_compliance_mode: Optional[bool] = None
102
+ """The feature is force enabled if compliance mode is active"""
103
+
104
+ unavailable_for_disabled_entitlement: Optional[bool] = None
105
+ """The feature is unavailable if the corresponding entitlement disabled (see
106
+ getShieldEntitlementEnable)"""
107
+
108
+ unavailable_for_non_enterprise_tier: Optional[bool] = None
109
+ """The feature is unavailable if the customer doesn't have enterprise tier"""
110
+
111
+ def as_dict(self) -> dict:
112
+ """Serializes the ClusterAutoRestartMessageEnablementDetails into a dictionary suitable for use as a JSON request body."""
113
+ body = {}
114
+ if self.forced_for_compliance_mode is not None:
115
+ body['forced_for_compliance_mode'] = self.forced_for_compliance_mode
116
+ if self.unavailable_for_disabled_entitlement is not None:
117
+ body['unavailable_for_disabled_entitlement'] = self.unavailable_for_disabled_entitlement
118
+ if self.unavailable_for_non_enterprise_tier is not None:
119
+ body['unavailable_for_non_enterprise_tier'] = self.unavailable_for_non_enterprise_tier
120
+ return body
121
+
122
+ @classmethod
123
+ def from_dict(cls, d: Dict[str, any]) -> ClusterAutoRestartMessageEnablementDetails:
124
+ """Deserializes the ClusterAutoRestartMessageEnablementDetails from a dictionary."""
125
+ return cls(forced_for_compliance_mode=d.get('forced_for_compliance_mode', None),
126
+ unavailable_for_disabled_entitlement=d.get('unavailable_for_disabled_entitlement', None),
127
+ unavailable_for_non_enterprise_tier=d.get('unavailable_for_non_enterprise_tier', None))
128
+
129
+
130
+ @dataclass
131
+ class ClusterAutoRestartMessageMaintenanceWindow:
132
+ week_day_based_schedule: Optional[ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule] = None
133
+
134
+ def as_dict(self) -> dict:
135
+ """Serializes the ClusterAutoRestartMessageMaintenanceWindow into a dictionary suitable for use as a JSON request body."""
136
+ body = {}
137
+ if self.week_day_based_schedule:
138
+ body['week_day_based_schedule'] = self.week_day_based_schedule.as_dict()
139
+ return body
140
+
141
+ @classmethod
142
+ def from_dict(cls, d: Dict[str, any]) -> ClusterAutoRestartMessageMaintenanceWindow:
143
+ """Deserializes the ClusterAutoRestartMessageMaintenanceWindow from a dictionary."""
144
+ return cls(week_day_based_schedule=_from_dict(
145
+ d, 'week_day_based_schedule', ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule))
146
+
147
+
148
+ class ClusterAutoRestartMessageMaintenanceWindowDayOfWeek(Enum):
149
+
150
+ DAY_OF_WEEK_UNSPECIFIED = 'DAY_OF_WEEK_UNSPECIFIED'
151
+ FRIDAY = 'FRIDAY'
152
+ MONDAY = 'MONDAY'
153
+ SATURDAY = 'SATURDAY'
154
+ SUNDAY = 'SUNDAY'
155
+ THURSDAY = 'THURSDAY'
156
+ TUESDAY = 'TUESDAY'
157
+ WEDNESDAY = 'WEDNESDAY'
158
+
159
+
160
+ @dataclass
161
+ class ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule:
162
+ day_of_week: Optional[ClusterAutoRestartMessageMaintenanceWindowDayOfWeek] = None
163
+
164
+ frequency: Optional[ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency] = None
165
+
166
+ window_start_time: Optional[ClusterAutoRestartMessageMaintenanceWindowWindowStartTime] = None
167
+
168
+ def as_dict(self) -> dict:
169
+ """Serializes the ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule into a dictionary suitable for use as a JSON request body."""
170
+ body = {}
171
+ if self.day_of_week is not None: body['day_of_week'] = self.day_of_week.value
172
+ if self.frequency is not None: body['frequency'] = self.frequency.value
173
+ if self.window_start_time: body['window_start_time'] = self.window_start_time.as_dict()
174
+ return body
175
+
176
+ @classmethod
177
+ def from_dict(cls, d: Dict[str, any]) -> ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule:
178
+ """Deserializes the ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule from a dictionary."""
179
+ return cls(day_of_week=_enum(d, 'day_of_week', ClusterAutoRestartMessageMaintenanceWindowDayOfWeek),
180
+ frequency=_enum(d, 'frequency',
181
+ ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency),
182
+ window_start_time=_from_dict(d, 'window_start_time',
183
+ ClusterAutoRestartMessageMaintenanceWindowWindowStartTime))
184
+
185
+
186
+ class ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency(Enum):
187
+
188
+ EVERY_WEEK = 'EVERY_WEEK'
189
+ FIRST_AND_THIRD_OF_MONTH = 'FIRST_AND_THIRD_OF_MONTH'
190
+ FIRST_OF_MONTH = 'FIRST_OF_MONTH'
191
+ FOURTH_OF_MONTH = 'FOURTH_OF_MONTH'
192
+ SECOND_AND_FOURTH_OF_MONTH = 'SECOND_AND_FOURTH_OF_MONTH'
193
+ SECOND_OF_MONTH = 'SECOND_OF_MONTH'
194
+ THIRD_OF_MONTH = 'THIRD_OF_MONTH'
195
+ WEEK_DAY_FREQUENCY_UNSPECIFIED = 'WEEK_DAY_FREQUENCY_UNSPECIFIED'
196
+
197
+
198
+ @dataclass
199
+ class ClusterAutoRestartMessageMaintenanceWindowWindowStartTime:
200
+ hours: Optional[int] = None
201
+
202
+ minutes: Optional[int] = None
203
+
204
+ def as_dict(self) -> dict:
205
+ """Serializes the ClusterAutoRestartMessageMaintenanceWindowWindowStartTime into a dictionary suitable for use as a JSON request body."""
206
+ body = {}
207
+ if self.hours is not None: body['hours'] = self.hours
208
+ if self.minutes is not None: body['minutes'] = self.minutes
209
+ return body
210
+
211
+ @classmethod
212
+ def from_dict(cls, d: Dict[str, any]) -> ClusterAutoRestartMessageMaintenanceWindowWindowStartTime:
213
+ """Deserializes the ClusterAutoRestartMessageMaintenanceWindowWindowStartTime from a dictionary."""
214
+ return cls(hours=d.get('hours', None), minutes=d.get('minutes', None))
215
+
216
+
217
+ class ComplianceStandard(Enum):
218
+ """Compliance stardard for SHIELD customers"""
219
+
220
+ COMPLIANCE_STANDARD_UNSPECIFIED = 'COMPLIANCE_STANDARD_UNSPECIFIED'
221
+ FEDRAMP_HIGH = 'FEDRAMP_HIGH'
222
+ FEDRAMP_IL5 = 'FEDRAMP_IL5'
223
+ FEDRAMP_MODERATE = 'FEDRAMP_MODERATE'
224
+ HIPAA = 'HIPAA'
225
+ IRAP_PROTECTED = 'IRAP_PROTECTED'
226
+ ITAR_EAR = 'ITAR_EAR'
227
+ NONE = 'NONE'
228
+ PCI_DSS = 'PCI_DSS'
229
+
230
+
17
231
  @dataclass
18
232
  class CreateIpAccessList:
19
233
  """Details required to configure a block list or allow list."""
@@ -72,8 +286,8 @@ class CreateNetworkConnectivityConfigRequest:
72
286
  must match the regular expression `^[0-9a-zA-Z-_]{3,30}$`."""
73
287
 
74
288
  region: str
75
- """The Azure region for this network connectivity configuration. Only workspaces in the same Azure
76
- region can be attached to this network connectivity configuration."""
289
+ """The region for the network connectivity configuration. Only workspaces in the same region can be
290
+ attached to the network connectivity configuration."""
77
291
 
78
292
  def as_dict(self) -> dict:
79
293
  """Serializes the CreateNetworkConnectivityConfigRequest into a dictionary suitable for use as a JSON request body."""
@@ -223,6 +437,130 @@ class CreateTokenResponse:
223
437
  token_value=d.get('token_value', None))
224
438
 
225
439
 
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
+ @dataclass
467
+ class CspEnablementAccount:
468
+ """Account level policy for CSP"""
469
+
470
+ compliance_standards: Optional[List[ComplianceStandard]] = None
471
+ """Set by customers when they request Compliance Security Profile (CSP) Invariants are enforced in
472
+ Settings policy."""
473
+
474
+ is_enforced: Optional[bool] = None
475
+ """Enforced = it cannot be overriden at workspace level."""
476
+
477
+ def as_dict(self) -> dict:
478
+ """Serializes the CspEnablementAccount into a dictionary suitable for use as a JSON request body."""
479
+ body = {}
480
+ if self.compliance_standards:
481
+ body['compliance_standards'] = [v.value for v in self.compliance_standards]
482
+ if self.is_enforced is not None: body['is_enforced'] = self.is_enforced
483
+ return body
484
+
485
+ @classmethod
486
+ def from_dict(cls, d: Dict[str, any]) -> CspEnablementAccount:
487
+ """Deserializes the CspEnablementAccount from a dictionary."""
488
+ return cls(compliance_standards=_repeated_enum(d, 'compliance_standards', ComplianceStandard),
489
+ is_enforced=d.get('is_enforced', None))
490
+
491
+
492
+ @dataclass
493
+ class CspEnablementAccountSetting:
494
+ csp_enablement_account: CspEnablementAccount
495
+ """Account level policy for CSP"""
496
+
497
+ etag: Optional[str] = None
498
+ """etag used for versioning. The response is at least as fresh as the eTag provided. This is used
499
+ for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
500
+ overwriting each other. It is strongly suggested that systems make use of the etag in the read
501
+ -> update pattern to perform setting updates in order to avoid race conditions. That is, get an
502
+ etag from a GET request, and pass it with the PATCH request to identify the setting version you
503
+ are updating."""
504
+
505
+ setting_name: Optional[str] = None
506
+ """Name of the corresponding setting. This field is populated in the response, but it will not be
507
+ respected even if it's set in the request body. The setting name in the path parameter will be
508
+ respected instead. Setting name is required to be 'default' if the setting only has one instance
509
+ per workspace."""
510
+
511
+ def as_dict(self) -> dict:
512
+ """Serializes the CspEnablementAccountSetting into a dictionary suitable for use as a JSON request body."""
513
+ body = {}
514
+ if self.csp_enablement_account: body['csp_enablement_account'] = self.csp_enablement_account.as_dict()
515
+ if self.etag is not None: body['etag'] = self.etag
516
+ if self.setting_name is not None: body['setting_name'] = self.setting_name
517
+ return body
518
+
519
+ @classmethod
520
+ def from_dict(cls, d: Dict[str, any]) -> CspEnablementAccountSetting:
521
+ """Deserializes the CspEnablementAccountSetting from a dictionary."""
522
+ return cls(csp_enablement_account=_from_dict(d, 'csp_enablement_account', CspEnablementAccount),
523
+ etag=d.get('etag', None),
524
+ setting_name=d.get('setting_name', None))
525
+
526
+
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
+
226
564
  @dataclass
227
565
  class DefaultNamespaceSetting:
228
566
  """This represents the setting configuration for the default namespace in the Databricks workspace.
@@ -289,6 +627,20 @@ class DeleteDefaultNamespaceSettingResponse:
289
627
  return cls(etag=d.get('etag', None))
290
628
 
291
629
 
630
+ @dataclass
631
+ class DeleteNetworkConnectivityConfigurationResponse:
632
+
633
+ def as_dict(self) -> dict:
634
+ """Serializes the DeleteNetworkConnectivityConfigurationResponse into a dictionary suitable for use as a JSON request body."""
635
+ body = {}
636
+ return body
637
+
638
+ @classmethod
639
+ def from_dict(cls, d: Dict[str, any]) -> DeleteNetworkConnectivityConfigurationResponse:
640
+ """Deserializes the DeleteNetworkConnectivityConfigurationResponse from a dictionary."""
641
+ return cls()
642
+
643
+
292
644
  @dataclass
293
645
  class DeletePersonalComputeSettingResponse:
294
646
  """The etag is returned."""
@@ -313,6 +665,20 @@ class DeletePersonalComputeSettingResponse:
313
665
  return cls(etag=d.get('etag', None))
314
666
 
315
667
 
668
+ @dataclass
669
+ class DeleteResponse:
670
+
671
+ def as_dict(self) -> dict:
672
+ """Serializes the DeleteResponse into a dictionary suitable for use as a JSON request body."""
673
+ body = {}
674
+ return body
675
+
676
+ @classmethod
677
+ def from_dict(cls, d: Dict[str, any]) -> DeleteResponse:
678
+ """Deserializes the DeleteResponse from a dictionary."""
679
+ return cls()
680
+
681
+
316
682
  @dataclass
317
683
  class DeleteRestrictWorkspaceAdminsSettingResponse:
318
684
  """The etag is returned."""
@@ -337,6 +703,115 @@ class DeleteRestrictWorkspaceAdminsSettingResponse:
337
703
  return cls(etag=d.get('etag', None))
338
704
 
339
705
 
706
+ @dataclass
707
+ class EsmEnablement:
708
+ """Enhanced Security Monitoring (ESM) - one of the features in ESC product Tracks if the feature is
709
+ enabled."""
710
+
711
+ is_enabled: Optional[bool] = None
712
+
713
+ def as_dict(self) -> dict:
714
+ """Serializes the EsmEnablement into a dictionary suitable for use as a JSON request body."""
715
+ body = {}
716
+ if self.is_enabled is not None: body['is_enabled'] = self.is_enabled
717
+ return body
718
+
719
+ @classmethod
720
+ def from_dict(cls, d: Dict[str, any]) -> EsmEnablement:
721
+ """Deserializes the EsmEnablement from a dictionary."""
722
+ return cls(is_enabled=d.get('is_enabled', None))
723
+
724
+
725
+ @dataclass
726
+ class EsmEnablementAccount:
727
+ """Account level policy for ESM"""
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"""
747
+
748
+ etag: Optional[str] = None
749
+ """etag used for versioning. The response is at least as fresh as the eTag provided. This is used
750
+ for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
751
+ overwriting each other. It is strongly suggested that systems make use of the etag in the read
752
+ -> update pattern to perform setting updates in order to avoid race conditions. That is, get an
753
+ etag from a GET request, and pass it with the PATCH request to identify the setting version you
754
+ are updating."""
755
+
756
+ setting_name: Optional[str] = None
757
+ """Name of the corresponding setting. This field is populated in the response, but it will not be
758
+ respected even if it's set in the request body. The setting name in the path parameter will be
759
+ respected instead. Setting name is required to be 'default' if the setting only has one instance
760
+ per workspace."""
761
+
762
+ def as_dict(self) -> dict:
763
+ """Serializes the EsmEnablementAccountSetting into a dictionary suitable for use as a JSON request body."""
764
+ body = {}
765
+ if self.esm_enablement_account: body['esm_enablement_account'] = self.esm_enablement_account.as_dict()
766
+ if self.etag is not None: body['etag'] = self.etag
767
+ if self.setting_name is not None: body['setting_name'] = self.setting_name
768
+ return body
769
+
770
+ @classmethod
771
+ def from_dict(cls, d: Dict[str, any]) -> EsmEnablementAccountSetting:
772
+ """Deserializes the EsmEnablementAccountSetting from a dictionary."""
773
+ return cls(esm_enablement_account=_from_dict(d, 'esm_enablement_account', EsmEnablementAccount),
774
+ etag=d.get('etag', None),
775
+ setting_name=d.get('setting_name', None))
776
+
777
+
778
+ @dataclass
779
+ class EsmEnablementSetting:
780
+ esm_enablement_workspace: EsmEnablement
781
+ """Enhanced Security Monitoring (ESM) - one of the features in ESC product Tracks if the feature is
782
+ enabled."""
783
+
784
+ etag: Optional[str] = None
785
+ """etag used for versioning. The response is at least as fresh as the eTag provided. This is used
786
+ for optimistic concurrency control as a way to help prevent simultaneous writes of a setting
787
+ overwriting each other. It is strongly suggested that systems make use of the etag in the read
788
+ -> update pattern to perform setting updates in order to avoid race conditions. That is, get an
789
+ etag from a GET request, and pass it with the PATCH request to identify the setting version you
790
+ are updating."""
791
+
792
+ setting_name: Optional[str] = None
793
+ """Name of the corresponding setting. This field is populated in the response, but it will not be
794
+ respected even if it's set in the request body. The setting name in the path parameter will be
795
+ respected instead. Setting name is required to be 'default' if the setting only has one instance
796
+ per workspace."""
797
+
798
+ def as_dict(self) -> dict:
799
+ """Serializes the EsmEnablementSetting into a dictionary suitable for use as a JSON request body."""
800
+ body = {}
801
+ if self.esm_enablement_workspace:
802
+ body['esm_enablement_workspace'] = self.esm_enablement_workspace.as_dict()
803
+ if self.etag is not None: body['etag'] = self.etag
804
+ if self.setting_name is not None: body['setting_name'] = self.setting_name
805
+ return body
806
+
807
+ @classmethod
808
+ def from_dict(cls, d: Dict[str, any]) -> EsmEnablementSetting:
809
+ """Deserializes the EsmEnablementSetting from a dictionary."""
810
+ return cls(esm_enablement_workspace=_from_dict(d, 'esm_enablement_workspace', EsmEnablement),
811
+ etag=d.get('etag', None),
812
+ setting_name=d.get('setting_name', None))
813
+
814
+
340
815
  @dataclass
341
816
  class ExchangeToken:
342
817
  """The exchange token is the result of the token exchange with the IdP"""
@@ -686,6 +1161,27 @@ class ListType(Enum):
686
1161
  BLOCK = 'BLOCK'
687
1162
 
688
1163
 
1164
+ @dataclass
1165
+ class NccAwsStableIpRule:
1166
+ """The stable AWS IP CIDR blocks. You can use these to configure the firewall of your resources to
1167
+ allow traffic from your Databricks workspace."""
1168
+
1169
+ cidr_blocks: Optional[List[str]] = None
1170
+ """The list of stable IP CIDR blocks from which Databricks network traffic originates when
1171
+ accessing your resources."""
1172
+
1173
+ def as_dict(self) -> dict:
1174
+ """Serializes the NccAwsStableIpRule into a dictionary suitable for use as a JSON request body."""
1175
+ body = {}
1176
+ if self.cidr_blocks: body['cidr_blocks'] = [v for v in self.cidr_blocks]
1177
+ return body
1178
+
1179
+ @classmethod
1180
+ def from_dict(cls, d: Dict[str, any]) -> NccAwsStableIpRule:
1181
+ """Deserializes the NccAwsStableIpRule from a dictionary."""
1182
+ return cls(cidr_blocks=d.get('cidr_blocks', None))
1183
+
1184
+
689
1185
  @dataclass
690
1186
  class NccAzurePrivateEndpointRule:
691
1187
  connection_state: Optional[NccAzurePrivateEndpointRuleConnectionState] = None
@@ -854,6 +1350,10 @@ class NccEgressDefaultRules:
854
1350
  configurations. You can find the stable network information of your serverless compute resources
855
1351
  here."""
856
1352
 
1353
+ aws_stable_ip_rule: Optional[NccAwsStableIpRule] = None
1354
+ """The stable AWS IP CIDR blocks. You can use these to configure the firewall of your resources to
1355
+ allow traffic from your Databricks workspace."""
1356
+
857
1357
  azure_service_endpoint_rule: Optional[NccAzureServiceEndpointRule] = None
858
1358
  """The stable Azure service endpoints. You can configure the firewall of your Azure resources to
859
1359
  allow traffic from your Databricks serverless compute resources."""
@@ -861,6 +1361,7 @@ class NccEgressDefaultRules:
861
1361
  def as_dict(self) -> dict:
862
1362
  """Serializes the NccEgressDefaultRules into a dictionary suitable for use as a JSON request body."""
863
1363
  body = {}
1364
+ if self.aws_stable_ip_rule: body['aws_stable_ip_rule'] = self.aws_stable_ip_rule.as_dict()
864
1365
  if self.azure_service_endpoint_rule:
865
1366
  body['azure_service_endpoint_rule'] = self.azure_service_endpoint_rule.as_dict()
866
1367
  return body
@@ -868,7 +1369,8 @@ class NccEgressDefaultRules:
868
1369
  @classmethod
869
1370
  def from_dict(cls, d: Dict[str, any]) -> NccEgressDefaultRules:
870
1371
  """Deserializes the NccEgressDefaultRules from a dictionary."""
871
- return cls(azure_service_endpoint_rule=_from_dict(d, 'azure_service_endpoint_rule',
1372
+ return cls(aws_stable_ip_rule=_from_dict(d, 'aws_stable_ip_rule', NccAwsStableIpRule),
1373
+ azure_service_endpoint_rule=_from_dict(d, 'azure_service_endpoint_rule',
872
1374
  NccAzureServiceEndpointRule))
873
1375
 
874
1376
 
@@ -914,8 +1416,8 @@ class NetworkConnectivityConfiguration:
914
1416
  """Databricks network connectivity configuration ID."""
915
1417
 
916
1418
  region: Optional[str] = None
917
- """The Azure region for this network connectivity configuration. Only workspaces in the same Azure
918
- region can be attached to this network connectivity configuration."""
1419
+ """The region for the network connectivity configuration. Only workspaces in the same region can be
1420
+ attached to the network connectivity configuration."""
919
1421
 
920
1422
  updated_time: Optional[int] = None
921
1423
  """Time in epoch milliseconds when this object was updated."""
@@ -1103,6 +1605,20 @@ class ReplaceIpAccessList:
1103
1605
  list_type=_enum(d, 'list_type', ListType))
1104
1606
 
1105
1607
 
1608
+ @dataclass
1609
+ class ReplaceResponse:
1610
+
1611
+ def as_dict(self) -> dict:
1612
+ """Serializes the ReplaceResponse into a dictionary suitable for use as a JSON request body."""
1613
+ body = {}
1614
+ return body
1615
+
1616
+ @classmethod
1617
+ def from_dict(cls, d: Dict[str, any]) -> ReplaceResponse:
1618
+ """Deserializes the ReplaceResponse from a dictionary."""
1619
+ return cls()
1620
+
1621
+
1106
1622
  @dataclass
1107
1623
  class RestrictWorkspaceAdminsMessage:
1108
1624
  status: RestrictWorkspaceAdminsMessageStatus
@@ -1179,6 +1695,34 @@ class RevokeTokenRequest:
1179
1695
  return cls(token_id=d.get('token_id', None))
1180
1696
 
1181
1697
 
1698
+ @dataclass
1699
+ class RevokeTokenResponse:
1700
+
1701
+ def as_dict(self) -> dict:
1702
+ """Serializes the RevokeTokenResponse into a dictionary suitable for use as a JSON request body."""
1703
+ body = {}
1704
+ return body
1705
+
1706
+ @classmethod
1707
+ def from_dict(cls, d: Dict[str, any]) -> RevokeTokenResponse:
1708
+ """Deserializes the RevokeTokenResponse from a dictionary."""
1709
+ return cls()
1710
+
1711
+
1712
+ @dataclass
1713
+ class SetStatusResponse:
1714
+
1715
+ def as_dict(self) -> dict:
1716
+ """Serializes the SetStatusResponse into a dictionary suitable for use as a JSON request body."""
1717
+ body = {}
1718
+ return body
1719
+
1720
+ @classmethod
1721
+ def from_dict(cls, d: Dict[str, any]) -> SetStatusResponse:
1722
+ """Deserializes the SetStatusResponse from a dictionary."""
1723
+ return cls()
1724
+
1725
+
1182
1726
  @dataclass
1183
1727
  class StringMessage:
1184
1728
  value: Optional[str] = None
@@ -1414,6 +1958,96 @@ class TokenType(Enum):
1414
1958
  AZURE_ACTIVE_DIRECTORY_TOKEN = 'AZURE_ACTIVE_DIRECTORY_TOKEN'
1415
1959
 
1416
1960
 
1961
+ @dataclass
1962
+ class UpdateAutomaticClusterUpdateSettingRequest:
1963
+ """Details required to update a setting."""
1964
+
1965
+ allow_missing: bool
1966
+ """This should always be set to true for Settings API. Added for AIP compliance."""
1967
+
1968
+ setting: AutomaticClusterUpdateSetting
1969
+
1970
+ field_mask: str
1971
+ """Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
1972
+ the setting payload will be updated. The field mask needs to be supplied as single string. To
1973
+ specify multiple fields in the field mask, use comma as the separator (no space)."""
1974
+
1975
+ def as_dict(self) -> dict:
1976
+ """Serializes the UpdateAutomaticClusterUpdateSettingRequest into a dictionary suitable for use as a JSON request body."""
1977
+ body = {}
1978
+ if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
1979
+ if self.field_mask is not None: body['field_mask'] = self.field_mask
1980
+ if self.setting: body['setting'] = self.setting.as_dict()
1981
+ return body
1982
+
1983
+ @classmethod
1984
+ def from_dict(cls, d: Dict[str, any]) -> UpdateAutomaticClusterUpdateSettingRequest:
1985
+ """Deserializes the UpdateAutomaticClusterUpdateSettingRequest from a dictionary."""
1986
+ return cls(allow_missing=d.get('allow_missing', None),
1987
+ field_mask=d.get('field_mask', None),
1988
+ setting=_from_dict(d, 'setting', AutomaticClusterUpdateSetting))
1989
+
1990
+
1991
+ @dataclass
1992
+ class UpdateCspEnablementAccountSettingRequest:
1993
+ """Details required to update a setting."""
1994
+
1995
+ allow_missing: bool
1996
+ """This should always be set to true for Settings API. Added for AIP compliance."""
1997
+
1998
+ setting: CspEnablementAccountSetting
1999
+
2000
+ field_mask: str
2001
+ """Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
2002
+ the setting payload will be updated. The field mask needs to be supplied as single string. To
2003
+ specify multiple fields in the field mask, use comma as the separator (no space)."""
2004
+
2005
+ def as_dict(self) -> dict:
2006
+ """Serializes the UpdateCspEnablementAccountSettingRequest into a dictionary suitable for use as a JSON request body."""
2007
+ body = {}
2008
+ if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
2009
+ if self.field_mask is not None: body['field_mask'] = self.field_mask
2010
+ if self.setting: body['setting'] = self.setting.as_dict()
2011
+ return body
2012
+
2013
+ @classmethod
2014
+ def from_dict(cls, d: Dict[str, any]) -> UpdateCspEnablementAccountSettingRequest:
2015
+ """Deserializes the UpdateCspEnablementAccountSettingRequest from a dictionary."""
2016
+ return cls(allow_missing=d.get('allow_missing', None),
2017
+ field_mask=d.get('field_mask', None),
2018
+ setting=_from_dict(d, 'setting', CspEnablementAccountSetting))
2019
+
2020
+
2021
+ @dataclass
2022
+ class UpdateCspEnablementSettingRequest:
2023
+ """Details required to update a setting."""
2024
+
2025
+ allow_missing: bool
2026
+ """This should always be set to true for Settings API. Added for AIP compliance."""
2027
+
2028
+ setting: CspEnablementSetting
2029
+
2030
+ field_mask: str
2031
+ """Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
2032
+ the setting payload will be updated. The field mask needs to be supplied as single string. To
2033
+ specify multiple fields in the field mask, use comma as the separator (no space)."""
2034
+
2035
+ def as_dict(self) -> dict:
2036
+ """Serializes the UpdateCspEnablementSettingRequest into a dictionary suitable for use as a JSON request body."""
2037
+ body = {}
2038
+ if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
2039
+ if self.field_mask is not None: body['field_mask'] = self.field_mask
2040
+ if self.setting: body['setting'] = self.setting.as_dict()
2041
+ return body
2042
+
2043
+ @classmethod
2044
+ def from_dict(cls, d: Dict[str, any]) -> UpdateCspEnablementSettingRequest:
2045
+ """Deserializes the UpdateCspEnablementSettingRequest from a dictionary."""
2046
+ return cls(allow_missing=d.get('allow_missing', None),
2047
+ field_mask=d.get('field_mask', None),
2048
+ setting=_from_dict(d, 'setting', CspEnablementSetting))
2049
+
2050
+
1417
2051
  @dataclass
1418
2052
  class UpdateDefaultNamespaceSettingRequest:
1419
2053
  """Details required to update a setting."""
@@ -1451,6 +2085,66 @@ class UpdateDefaultNamespaceSettingRequest:
1451
2085
  setting=_from_dict(d, 'setting', DefaultNamespaceSetting))
1452
2086
 
1453
2087
 
2088
+ @dataclass
2089
+ class UpdateEsmEnablementAccountSettingRequest:
2090
+ """Details required to update a setting."""
2091
+
2092
+ allow_missing: bool
2093
+ """This should always be set to true for Settings API. Added for AIP compliance."""
2094
+
2095
+ setting: EsmEnablementAccountSetting
2096
+
2097
+ field_mask: str
2098
+ """Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
2099
+ the setting payload will be updated. The field mask needs to be supplied as single string. To
2100
+ specify multiple fields in the field mask, use comma as the separator (no space)."""
2101
+
2102
+ def as_dict(self) -> dict:
2103
+ """Serializes the UpdateEsmEnablementAccountSettingRequest into a dictionary suitable for use as a JSON request body."""
2104
+ body = {}
2105
+ if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
2106
+ if self.field_mask is not None: body['field_mask'] = self.field_mask
2107
+ if self.setting: body['setting'] = self.setting.as_dict()
2108
+ return body
2109
+
2110
+ @classmethod
2111
+ def from_dict(cls, d: Dict[str, any]) -> UpdateEsmEnablementAccountSettingRequest:
2112
+ """Deserializes the UpdateEsmEnablementAccountSettingRequest from a dictionary."""
2113
+ return cls(allow_missing=d.get('allow_missing', None),
2114
+ field_mask=d.get('field_mask', None),
2115
+ setting=_from_dict(d, 'setting', EsmEnablementAccountSetting))
2116
+
2117
+
2118
+ @dataclass
2119
+ class UpdateEsmEnablementSettingRequest:
2120
+ """Details required to update a setting."""
2121
+
2122
+ allow_missing: bool
2123
+ """This should always be set to true for Settings API. Added for AIP compliance."""
2124
+
2125
+ setting: EsmEnablementSetting
2126
+
2127
+ field_mask: str
2128
+ """Field mask is required to be passed into the PATCH request. Field mask specifies which fields of
2129
+ the setting payload will be updated. The field mask needs to be supplied as single string. To
2130
+ specify multiple fields in the field mask, use comma as the separator (no space)."""
2131
+
2132
+ def as_dict(self) -> dict:
2133
+ """Serializes the UpdateEsmEnablementSettingRequest into a dictionary suitable for use as a JSON request body."""
2134
+ body = {}
2135
+ if self.allow_missing is not None: body['allow_missing'] = self.allow_missing
2136
+ if self.field_mask is not None: body['field_mask'] = self.field_mask
2137
+ if self.setting: body['setting'] = self.setting.as_dict()
2138
+ return body
2139
+
2140
+ @classmethod
2141
+ def from_dict(cls, d: Dict[str, any]) -> UpdateEsmEnablementSettingRequest:
2142
+ """Deserializes the UpdateEsmEnablementSettingRequest from a dictionary."""
2143
+ return cls(allow_missing=d.get('allow_missing', None),
2144
+ field_mask=d.get('field_mask', None),
2145
+ setting=_from_dict(d, 'setting', EsmEnablementSetting))
2146
+
2147
+
1454
2148
  @dataclass
1455
2149
  class UpdateIpAccessList:
1456
2150
  """Details required to update an IP access list."""
@@ -1522,6 +2216,20 @@ class UpdatePersonalComputeSettingRequest:
1522
2216
  setting=_from_dict(d, 'setting', PersonalComputeSetting))
1523
2217
 
1524
2218
 
2219
+ @dataclass
2220
+ class UpdateResponse:
2221
+
2222
+ def as_dict(self) -> dict:
2223
+ """Serializes the UpdateResponse into a dictionary suitable for use as a JSON request body."""
2224
+ body = {}
2225
+ return body
2226
+
2227
+ @classmethod
2228
+ def from_dict(cls, d: Dict[str, any]) -> UpdateResponse:
2229
+ """Deserializes the UpdateResponse from a dictionary."""
2230
+ return cls()
2231
+
2232
+
1525
2233
  @dataclass
1526
2234
  class UpdateRestrictWorkspaceAdminsSettingRequest:
1527
2235
  """Details required to update a setting."""
@@ -1771,49 +2479,42 @@ class AccountIpAccessListsAPI:
1771
2479
 
1772
2480
 
1773
2481
  class AccountSettingsAPI:
1774
- """The Personal Compute enablement setting lets you control which users can use the Personal Compute default
1775
- policy to create compute resources. By default all users in all workspaces have access (ON), but you can
1776
- change the setting to instead let individual workspaces configure access control (DELEGATE).
1777
-
1778
- There is only one instance of this setting per account. Since this setting has a default value, this
1779
- setting is present on all accounts even though it's never set on a given account. Deletion reverts the
1780
- value of the setting back to the default value."""
2482
+ """Accounts Settings API allows users to manage settings at the account level."""
1781
2483
 
1782
2484
  def __init__(self, api_client):
1783
2485
  self._api = api_client
1784
2486
 
1785
- def delete_personal_compute_setting(self,
1786
- *,
1787
- etag: Optional[str] = None) -> DeletePersonalComputeSettingResponse:
1788
- """Delete Personal Compute setting.
1789
-
1790
- Reverts back the Personal Compute setting value to default (ON)
1791
-
1792
- :param etag: str (optional)
1793
- etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
1794
- optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
1795
- each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
1796
- to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
1797
- request, and pass it with the DELETE request to identify the rule set version you are deleting.
1798
-
1799
- :returns: :class:`DeletePersonalComputeSettingResponse`
1800
- """
2487
+ self._csp_enablement_account = CspEnablementAccountAPI(self._api)
2488
+ self._esm_enablement_account = EsmEnablementAccountAPI(self._api)
2489
+ self._personal_compute = PersonalComputeAPI(self._api)
1801
2490
 
1802
- query = {}
1803
- if etag is not None: query['etag'] = etag
1804
- headers = {'Accept': 'application/json', }
2491
+ @property
2492
+ def csp_enablement_account(self) -> CspEnablementAccountAPI:
2493
+ """The compliance security profile settings at the account level control whether to enable it for new workspaces."""
2494
+ return self._csp_enablement_account
1805
2495
 
1806
- res = self._api.do(
1807
- 'DELETE',
1808
- f'/api/2.0/accounts/{self._api.account_id}/settings/types/dcp_acct_enable/names/default',
1809
- query=query,
1810
- headers=headers)
1811
- return DeletePersonalComputeSettingResponse.from_dict(res)
2496
+ @property
2497
+ def esm_enablement_account(self) -> EsmEnablementAccountAPI:
2498
+ """The enhanced security monitoring setting at the account level controls whether to enable the feature on new workspaces."""
2499
+ return self._esm_enablement_account
1812
2500
 
1813
- def get_personal_compute_setting(self, *, etag: Optional[str] = None) -> PersonalComputeSetting:
1814
- """Get Personal Compute setting.
2501
+ @property
2502
+ def personal_compute(self) -> PersonalComputeAPI:
2503
+ """The Personal Compute enablement setting lets you control which users can use the Personal Compute default policy to create compute resources."""
2504
+ return self._personal_compute
2505
+
2506
+
2507
+ class AutomaticClusterUpdateAPI:
2508
+ """Controls whether automatic cluster update is enabled for the current workspace. By default, it is turned
2509
+ off."""
2510
+
2511
+ def __init__(self, api_client):
2512
+ self._api = api_client
2513
+
2514
+ def get(self, *, etag: Optional[str] = None) -> AutomaticClusterUpdateSetting:
2515
+ """Get the automatic cluster update setting.
1815
2516
 
1816
- Gets the value of the Personal Compute setting.
2517
+ Gets the automatic cluster update setting.
1817
2518
 
1818
2519
  :param etag: str (optional)
1819
2520
  etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
@@ -1822,35 +2523,37 @@ class AccountSettingsAPI:
1822
2523
  to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
1823
2524
  request, and pass it with the DELETE request to identify the rule set version you are deleting.
1824
2525
 
1825
- :returns: :class:`PersonalComputeSetting`
2526
+ :returns: :class:`AutomaticClusterUpdateSetting`
1826
2527
  """
1827
2528
 
1828
2529
  query = {}
1829
2530
  if etag is not None: query['etag'] = etag
1830
2531
  headers = {'Accept': 'application/json', }
1831
2532
 
1832
- res = self._api.do(
1833
- 'GET',
1834
- f'/api/2.0/accounts/{self._api.account_id}/settings/types/dcp_acct_enable/names/default',
1835
- query=query,
1836
- headers=headers)
1837
- return PersonalComputeSetting.from_dict(res)
2533
+ res = self._api.do('GET',
2534
+ '/api/2.0/settings/types/automatic_cluster_update/names/default',
2535
+ query=query,
2536
+ headers=headers)
2537
+ return AutomaticClusterUpdateSetting.from_dict(res)
1838
2538
 
1839
- def update_personal_compute_setting(self, allow_missing: bool, setting: PersonalComputeSetting,
1840
- field_mask: str) -> PersonalComputeSetting:
1841
- """Update Personal Compute setting.
2539
+ def update(self, allow_missing: bool, setting: AutomaticClusterUpdateSetting,
2540
+ field_mask: str) -> AutomaticClusterUpdateSetting:
2541
+ """Update the automatic cluster update setting.
1842
2542
 
1843
- Updates the value of the Personal Compute setting.
2543
+ Updates the automatic cluster update setting for the workspace. A fresh etag needs to be provided in
2544
+ `PATCH` requests (as part of the setting field). The etag can be retrieved by making a `GET` request
2545
+ before the `PATCH` request. If the setting is updated concurrently, `PATCH` fails with 409 and the
2546
+ request must be retried by using the fresh etag in the 409 response.
1844
2547
 
1845
2548
  :param allow_missing: bool
1846
2549
  This should always be set to true for Settings API. Added for AIP compliance.
1847
- :param setting: :class:`PersonalComputeSetting`
2550
+ :param setting: :class:`AutomaticClusterUpdateSetting`
1848
2551
  :param field_mask: str
1849
2552
  Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
1850
2553
  setting payload will be updated. The field mask needs to be supplied as single string. To specify
1851
2554
  multiple fields in the field mask, use comma as the separator (no space).
1852
2555
 
1853
- :returns: :class:`PersonalComputeSetting`
2556
+ :returns: :class:`AutomaticClusterUpdateSetting`
1854
2557
  """
1855
2558
  body = {}
1856
2559
  if allow_missing is not None: body['allow_missing'] = allow_missing
@@ -1858,12 +2561,11 @@ class AccountSettingsAPI:
1858
2561
  if setting is not None: body['setting'] = setting.as_dict()
1859
2562
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
1860
2563
 
1861
- res = self._api.do(
1862
- 'PATCH',
1863
- f'/api/2.0/accounts/{self._api.account_id}/settings/types/dcp_acct_enable/names/default',
1864
- body=body,
1865
- headers=headers)
1866
- return PersonalComputeSetting.from_dict(res)
2564
+ res = self._api.do('PATCH',
2565
+ '/api/2.0/settings/types/automatic_cluster_update/names/default',
2566
+ body=body,
2567
+ headers=headers)
2568
+ return AutomaticClusterUpdateSetting.from_dict(res)
1867
2569
 
1868
2570
 
1869
2571
  class CredentialsManagerAPI:
@@ -1902,41 +2604,415 @@ class CredentialsManagerAPI:
1902
2604
  return ExchangeTokenResponse.from_dict(res)
1903
2605
 
1904
2606
 
1905
- class IpAccessListsAPI:
1906
- """IP Access List enables admins to configure IP access lists.
1907
-
1908
- IP access lists affect web application access and REST API access to this workspace only. If the feature
1909
- is disabled for a workspace, all access is allowed for this workspace. There is support for allow lists
1910
- (inclusion) and block lists (exclusion).
1911
-
1912
- When a connection is attempted: 1. **First, all block lists are checked.** If the connection IP address
1913
- matches any block list, the connection is rejected. 2. **If the connection was not rejected by block
1914
- lists**, the IP address is compared with the allow lists.
1915
-
1916
- If there is at least one allow list for the workspace, the connection is allowed only if the IP address
1917
- matches an allow list. If there are no allow lists for the workspace, all IP addresses are allowed.
2607
+ class CspEnablementAPI:
2608
+ """Controls whether to enable the compliance security profile for the current workspace. Enabling it on a
2609
+ workspace is permanent. By default, it is turned off.
1918
2610
 
1919
- For all allow lists and block lists combined, the workspace supports a maximum of 1000 IP/CIDR values,
1920
- where one CIDR counts as a single value.
1921
-
1922
- After changes to the IP access list feature, it can take a few minutes for changes to take effect."""
2611
+ This settings can NOT be disabled once it is enabled."""
1923
2612
 
1924
2613
  def __init__(self, api_client):
1925
2614
  self._api = api_client
1926
2615
 
1927
- def create(self,
1928
- label: str,
1929
- list_type: ListType,
1930
- *,
1931
- ip_addresses: Optional[List[str]] = None) -> CreateIpAccessListResponse:
1932
- """Create access list.
1933
-
1934
- Creates an IP access list for this workspace.
2616
+ def get(self, *, etag: Optional[str] = None) -> CspEnablementSetting:
2617
+ """Get the compliance security profile setting.
1935
2618
 
1936
- A list can be an allow list or a block list. See the top of this file for a description of how the
1937
- server treats allow lists and block lists at runtime.
1938
-
1939
- When creating or updating an IP access list:
2619
+ Gets the compliance security profile setting.
2620
+
2621
+ :param etag: str (optional)
2622
+ etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
2623
+ optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
2624
+ each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
2625
+ to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
2626
+ request, and pass it with the DELETE request to identify the rule set version you are deleting.
2627
+
2628
+ :returns: :class:`CspEnablementSetting`
2629
+ """
2630
+
2631
+ query = {}
2632
+ if etag is not None: query['etag'] = etag
2633
+ headers = {'Accept': 'application/json', }
2634
+
2635
+ res = self._api.do('GET',
2636
+ '/api/2.0/settings/types/shield_csp_enablement_ws_db/names/default',
2637
+ query=query,
2638
+ headers=headers)
2639
+ return CspEnablementSetting.from_dict(res)
2640
+
2641
+ def update(self, allow_missing: bool, setting: CspEnablementSetting,
2642
+ field_mask: str) -> CspEnablementSetting:
2643
+ """Update the compliance security profile setting.
2644
+
2645
+ Updates the compliance security profile setting for the workspace. A fresh etag needs to be provided
2646
+ in `PATCH` requests (as part of the setting field). The etag can be retrieved by making a `GET`
2647
+ request before the `PATCH` request. If the setting is updated concurrently, `PATCH` fails with 409 and
2648
+ the request must be retried by using the fresh etag in the 409 response.
2649
+
2650
+ :param allow_missing: bool
2651
+ This should always be set to true for Settings API. Added for AIP compliance.
2652
+ :param setting: :class:`CspEnablementSetting`
2653
+ :param field_mask: str
2654
+ Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
2655
+ setting payload will be updated. The field mask needs to be supplied as single string. To specify
2656
+ multiple fields in the field mask, use comma as the separator (no space).
2657
+
2658
+ :returns: :class:`CspEnablementSetting`
2659
+ """
2660
+ body = {}
2661
+ if allow_missing is not None: body['allow_missing'] = allow_missing
2662
+ if field_mask is not None: body['field_mask'] = field_mask
2663
+ if setting is not None: body['setting'] = setting.as_dict()
2664
+ headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2665
+
2666
+ res = self._api.do('PATCH',
2667
+ '/api/2.0/settings/types/shield_csp_enablement_ws_db/names/default',
2668
+ body=body,
2669
+ headers=headers)
2670
+ return CspEnablementSetting.from_dict(res)
2671
+
2672
+
2673
+ class CspEnablementAccountAPI:
2674
+ """The compliance security profile settings at the account level control whether to enable it for new
2675
+ workspaces. By default, this account-level setting is disabled for new workspaces. After workspace
2676
+ creation, account admins can enable the compliance security profile individually for each workspace.
2677
+
2678
+ This settings can be disabled so that new workspaces do not have compliance security profile enabled by
2679
+ default."""
2680
+
2681
+ def __init__(self, api_client):
2682
+ self._api = api_client
2683
+
2684
+ def get(self, *, etag: Optional[str] = None) -> CspEnablementAccountSetting:
2685
+ """Get the compliance security profile setting for new workspaces.
2686
+
2687
+ Gets the compliance security profile setting for new workspaces.
2688
+
2689
+ :param etag: str (optional)
2690
+ etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
2691
+ optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
2692
+ each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
2693
+ to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
2694
+ request, and pass it with the DELETE request to identify the rule set version you are deleting.
2695
+
2696
+ :returns: :class:`CspEnablementAccountSetting`
2697
+ """
2698
+
2699
+ query = {}
2700
+ if etag is not None: query['etag'] = etag
2701
+ headers = {'Accept': 'application/json', }
2702
+
2703
+ res = self._api.do(
2704
+ 'GET',
2705
+ f'/api/2.0/accounts/{self._api.account_id}/settings/types/shield_csp_enablement_ac/names/default',
2706
+ query=query,
2707
+ headers=headers)
2708
+ return CspEnablementAccountSetting.from_dict(res)
2709
+
2710
+ def update(self, allow_missing: bool, setting: CspEnablementAccountSetting,
2711
+ field_mask: str) -> CspEnablementAccountSetting:
2712
+ """Update the compliance security profile setting for new workspaces.
2713
+
2714
+ Updates the value of the compliance security profile setting for new workspaces.
2715
+
2716
+ :param allow_missing: bool
2717
+ This should always be set to true for Settings API. Added for AIP compliance.
2718
+ :param setting: :class:`CspEnablementAccountSetting`
2719
+ :param field_mask: str
2720
+ Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
2721
+ setting payload will be updated. The field mask needs to be supplied as single string. To specify
2722
+ multiple fields in the field mask, use comma as the separator (no space).
2723
+
2724
+ :returns: :class:`CspEnablementAccountSetting`
2725
+ """
2726
+ body = {}
2727
+ if allow_missing is not None: body['allow_missing'] = allow_missing
2728
+ if field_mask is not None: body['field_mask'] = field_mask
2729
+ if setting is not None: body['setting'] = setting.as_dict()
2730
+ headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2731
+
2732
+ res = self._api.do(
2733
+ 'PATCH',
2734
+ f'/api/2.0/accounts/{self._api.account_id}/settings/types/shield_csp_enablement_ac/names/default',
2735
+ body=body,
2736
+ headers=headers)
2737
+ return CspEnablementAccountSetting.from_dict(res)
2738
+
2739
+
2740
+ class DefaultNamespaceAPI:
2741
+ """The default namespace setting API allows users to configure the default namespace for a Databricks
2742
+ workspace.
2743
+
2744
+ Through this API, users can retrieve, set, or modify the default namespace used when queries do not
2745
+ reference a fully qualified three-level name. For example, if you use the API to set 'retail_prod' as the
2746
+ default catalog, then a query 'SELECT * FROM myTable' would reference the object
2747
+ 'retail_prod.default.myTable' (the schema 'default' is always assumed).
2748
+
2749
+ This setting requires a restart of clusters and SQL warehouses to take effect. Additionally, the default
2750
+ namespace only applies when using Unity Catalog-enabled compute."""
2751
+
2752
+ def __init__(self, api_client):
2753
+ self._api = api_client
2754
+
2755
+ def delete(self, *, etag: Optional[str] = None) -> DeleteDefaultNamespaceSettingResponse:
2756
+ """Delete the default namespace setting.
2757
+
2758
+ Deletes the default namespace setting for the workspace. A fresh etag needs to be provided in `DELETE`
2759
+ requests (as a query parameter). The etag can be retrieved by making a `GET` request before the
2760
+ `DELETE` request. If the setting is updated/deleted concurrently, `DELETE` fails with 409 and the
2761
+ request must be retried by using the fresh etag in the 409 response.
2762
+
2763
+ :param etag: str (optional)
2764
+ etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
2765
+ optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
2766
+ each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
2767
+ to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
2768
+ request, and pass it with the DELETE request to identify the rule set version you are deleting.
2769
+
2770
+ :returns: :class:`DeleteDefaultNamespaceSettingResponse`
2771
+ """
2772
+
2773
+ query = {}
2774
+ if etag is not None: query['etag'] = etag
2775
+ headers = {'Accept': 'application/json', }
2776
+
2777
+ res = self._api.do('DELETE',
2778
+ '/api/2.0/settings/types/default_namespace_ws/names/default',
2779
+ query=query,
2780
+ headers=headers)
2781
+ return DeleteDefaultNamespaceSettingResponse.from_dict(res)
2782
+
2783
+ def get(self, *, etag: Optional[str] = None) -> DefaultNamespaceSetting:
2784
+ """Get the default namespace setting.
2785
+
2786
+ Gets the default namespace setting.
2787
+
2788
+ :param etag: str (optional)
2789
+ etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
2790
+ optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
2791
+ each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
2792
+ to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
2793
+ request, and pass it with the DELETE request to identify the rule set version you are deleting.
2794
+
2795
+ :returns: :class:`DefaultNamespaceSetting`
2796
+ """
2797
+
2798
+ query = {}
2799
+ if etag is not None: query['etag'] = etag
2800
+ headers = {'Accept': 'application/json', }
2801
+
2802
+ res = self._api.do('GET',
2803
+ '/api/2.0/settings/types/default_namespace_ws/names/default',
2804
+ query=query,
2805
+ headers=headers)
2806
+ return DefaultNamespaceSetting.from_dict(res)
2807
+
2808
+ def update(self, allow_missing: bool, setting: DefaultNamespaceSetting,
2809
+ field_mask: str) -> DefaultNamespaceSetting:
2810
+ """Update the default namespace setting.
2811
+
2812
+ Updates the default namespace setting for the workspace. A fresh etag needs to be provided in `PATCH`
2813
+ requests (as part of the setting field). The etag can be retrieved by making a `GET` request before
2814
+ the `PATCH` request. Note that if the setting does not exist, `GET` returns a NOT_FOUND error and the
2815
+ etag is present in the error response, which should be set in the `PATCH` request. If the setting is
2816
+ updated concurrently, `PATCH` fails with 409 and the request must be retried by using the fresh etag
2817
+ in the 409 response.
2818
+
2819
+ :param allow_missing: bool
2820
+ This should always be set to true for Settings API. Added for AIP compliance.
2821
+ :param setting: :class:`DefaultNamespaceSetting`
2822
+ This represents the setting configuration for the default namespace in the Databricks workspace.
2823
+ Setting the default catalog for the workspace determines the catalog that is used when queries do
2824
+ not reference a fully qualified 3 level name. For example, if the default catalog is set to
2825
+ 'retail_prod' then a query 'SELECT * FROM myTable' would reference the object
2826
+ 'retail_prod.default.myTable' (the schema 'default' is always assumed). This setting requires a
2827
+ restart of clusters and SQL warehouses to take effect. Additionally, the default namespace only
2828
+ applies when using Unity Catalog-enabled compute.
2829
+ :param field_mask: str
2830
+ Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
2831
+ setting payload will be updated. The field mask needs to be supplied as single string. To specify
2832
+ multiple fields in the field mask, use comma as the separator (no space).
2833
+
2834
+ :returns: :class:`DefaultNamespaceSetting`
2835
+ """
2836
+ body = {}
2837
+ if allow_missing is not None: body['allow_missing'] = allow_missing
2838
+ if field_mask is not None: body['field_mask'] = field_mask
2839
+ if setting is not None: body['setting'] = setting.as_dict()
2840
+ headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2841
+
2842
+ res = self._api.do('PATCH',
2843
+ '/api/2.0/settings/types/default_namespace_ws/names/default',
2844
+ body=body,
2845
+ headers=headers)
2846
+ return DefaultNamespaceSetting.from_dict(res)
2847
+
2848
+
2849
+ class EsmEnablementAPI:
2850
+ """Controls whether enhanced security monitoring is enabled for the current workspace. If the compliance
2851
+ security profile is enabled, this is automatically enabled. By default, it is disabled. However, if the
2852
+ compliance security profile is enabled, this is automatically enabled.
2853
+
2854
+ If the compliance security profile is disabled, you can enable or disable this setting and it is not
2855
+ permanent."""
2856
+
2857
+ def __init__(self, api_client):
2858
+ self._api = api_client
2859
+
2860
+ def get(self, *, etag: Optional[str] = None) -> EsmEnablementSetting:
2861
+ """Get the enhanced security monitoring setting.
2862
+
2863
+ Gets the enhanced security monitoring setting.
2864
+
2865
+ :param etag: str (optional)
2866
+ etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
2867
+ optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
2868
+ each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
2869
+ to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
2870
+ request, and pass it with the DELETE request to identify the rule set version you are deleting.
2871
+
2872
+ :returns: :class:`EsmEnablementSetting`
2873
+ """
2874
+
2875
+ query = {}
2876
+ if etag is not None: query['etag'] = etag
2877
+ headers = {'Accept': 'application/json', }
2878
+
2879
+ res = self._api.do('GET',
2880
+ '/api/2.0/settings/types/shield_esm_enablement_ws_db/names/default',
2881
+ query=query,
2882
+ headers=headers)
2883
+ return EsmEnablementSetting.from_dict(res)
2884
+
2885
+ def update(self, allow_missing: bool, setting: EsmEnablementSetting,
2886
+ field_mask: str) -> EsmEnablementSetting:
2887
+ """Update the enhanced security monitoring setting.
2888
+
2889
+ Updates the enhanced security monitoring setting for the workspace. A fresh etag needs to be provided
2890
+ in `PATCH` requests (as part of the setting field). The etag can be retrieved by making a `GET`
2891
+ request before the `PATCH` request. If the setting is updated concurrently, `PATCH` fails with 409 and
2892
+ the request must be retried by using the fresh etag in the 409 response.
2893
+
2894
+ :param allow_missing: bool
2895
+ This should always be set to true for Settings API. Added for AIP compliance.
2896
+ :param setting: :class:`EsmEnablementSetting`
2897
+ :param field_mask: str
2898
+ Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
2899
+ setting payload will be updated. The field mask needs to be supplied as single string. To specify
2900
+ multiple fields in the field mask, use comma as the separator (no space).
2901
+
2902
+ :returns: :class:`EsmEnablementSetting`
2903
+ """
2904
+ body = {}
2905
+ if allow_missing is not None: body['allow_missing'] = allow_missing
2906
+ if field_mask is not None: body['field_mask'] = field_mask
2907
+ if setting is not None: body['setting'] = setting.as_dict()
2908
+ headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2909
+
2910
+ res = self._api.do('PATCH',
2911
+ '/api/2.0/settings/types/shield_esm_enablement_ws_db/names/default',
2912
+ body=body,
2913
+ headers=headers)
2914
+ return EsmEnablementSetting.from_dict(res)
2915
+
2916
+
2917
+ class EsmEnablementAccountAPI:
2918
+ """The enhanced security monitoring setting at the account level controls whether to enable the feature on
2919
+ new workspaces. By default, this account-level setting is disabled for new workspaces. After workspace
2920
+ creation, account admins can enable enhanced security monitoring individually for each workspace."""
2921
+
2922
+ def __init__(self, api_client):
2923
+ self._api = api_client
2924
+
2925
+ def get(self, *, etag: Optional[str] = None) -> EsmEnablementAccountSetting:
2926
+ """Get the enhanced security monitoring setting for new workspaces.
2927
+
2928
+ Gets the enhanced security monitoring setting for new workspaces.
2929
+
2930
+ :param etag: str (optional)
2931
+ etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
2932
+ optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting
2933
+ each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern
2934
+ to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
2935
+ request, and pass it with the DELETE request to identify the rule set version you are deleting.
2936
+
2937
+ :returns: :class:`EsmEnablementAccountSetting`
2938
+ """
2939
+
2940
+ query = {}
2941
+ if etag is not None: query['etag'] = etag
2942
+ headers = {'Accept': 'application/json', }
2943
+
2944
+ res = self._api.do(
2945
+ 'GET',
2946
+ f'/api/2.0/accounts/{self._api.account_id}/settings/types/shield_esm_enablement_ac/names/default',
2947
+ query=query,
2948
+ headers=headers)
2949
+ return EsmEnablementAccountSetting.from_dict(res)
2950
+
2951
+ def update(self, allow_missing: bool, setting: EsmEnablementAccountSetting,
2952
+ field_mask: str) -> EsmEnablementAccountSetting:
2953
+ """Update the enhanced security monitoring setting for new workspaces.
2954
+
2955
+ Updates the value of the enhanced security monitoring setting for new workspaces.
2956
+
2957
+ :param allow_missing: bool
2958
+ This should always be set to true for Settings API. Added for AIP compliance.
2959
+ :param setting: :class:`EsmEnablementAccountSetting`
2960
+ :param field_mask: str
2961
+ Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
2962
+ setting payload will be updated. The field mask needs to be supplied as single string. To specify
2963
+ multiple fields in the field mask, use comma as the separator (no space).
2964
+
2965
+ :returns: :class:`EsmEnablementAccountSetting`
2966
+ """
2967
+ body = {}
2968
+ if allow_missing is not None: body['allow_missing'] = allow_missing
2969
+ if field_mask is not None: body['field_mask'] = field_mask
2970
+ if setting is not None: body['setting'] = setting.as_dict()
2971
+ headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2972
+
2973
+ res = self._api.do(
2974
+ 'PATCH',
2975
+ f'/api/2.0/accounts/{self._api.account_id}/settings/types/shield_esm_enablement_ac/names/default',
2976
+ body=body,
2977
+ headers=headers)
2978
+ return EsmEnablementAccountSetting.from_dict(res)
2979
+
2980
+
2981
+ class IpAccessListsAPI:
2982
+ """IP Access List enables admins to configure IP access lists.
2983
+
2984
+ IP access lists affect web application access and REST API access to this workspace only. If the feature
2985
+ is disabled for a workspace, all access is allowed for this workspace. There is support for allow lists
2986
+ (inclusion) and block lists (exclusion).
2987
+
2988
+ When a connection is attempted: 1. **First, all block lists are checked.** If the connection IP address
2989
+ matches any block list, the connection is rejected. 2. **If the connection was not rejected by block
2990
+ lists**, the IP address is compared with the allow lists.
2991
+
2992
+ If there is at least one allow list for the workspace, the connection is allowed only if the IP address
2993
+ matches an allow list. If there are no allow lists for the workspace, all IP addresses are allowed.
2994
+
2995
+ For all allow lists and block lists combined, the workspace supports a maximum of 1000 IP/CIDR values,
2996
+ where one CIDR counts as a single value.
2997
+
2998
+ After changes to the IP access list feature, it can take a few minutes for changes to take effect."""
2999
+
3000
+ def __init__(self, api_client):
3001
+ self._api = api_client
3002
+
3003
+ def create(self,
3004
+ label: str,
3005
+ list_type: ListType,
3006
+ *,
3007
+ ip_addresses: Optional[List[str]] = None) -> CreateIpAccessListResponse:
3008
+ """Create access list.
3009
+
3010
+ Creates an IP access list for this workspace.
3011
+
3012
+ A list can be an allow list or a block list. See the top of this file for a description of how the
3013
+ server treats allow lists and block lists at runtime.
3014
+
3015
+ When creating or updating an IP access list:
1940
3016
 
1941
3017
  * For all allow lists and block lists combined, the API supports a maximum of 1000 IP/CIDR values,
1942
3018
  where one CIDR counts as a single value. Attempts to exceed that number return error 400 with
@@ -2106,12 +3182,7 @@ class IpAccessListsAPI:
2106
3182
 
2107
3183
  class NetworkConnectivityAPI:
2108
3184
  """These APIs provide configurations for the network connectivity of your workspaces for serverless compute
2109
- resources. This API provides stable subnets for your workspace so that you can configure your firewalls on
2110
- your Azure Storage accounts to allow access from Databricks. You can also use the API to provision private
2111
- endpoints for Databricks to privately connect serverless compute resources to your Azure resources using
2112
- Azure Private Link. See [configure serverless secure connectivity].
2113
-
2114
- [configure serverless secure connectivity]: https://learn.microsoft.com/azure/databricks/security/network/serverless-network-security"""
3185
+ resources."""
2115
3186
 
2116
3187
  def __init__(self, api_client):
2117
3188
  self._api = api_client
@@ -2120,25 +3191,13 @@ class NetworkConnectivityAPI:
2120
3191
  region: str) -> NetworkConnectivityConfiguration:
2121
3192
  """Create a network connectivity configuration.
2122
3193
 
2123
- Creates a network connectivity configuration (NCC), which provides stable Azure service subnets when
2124
- accessing your Azure Storage accounts. You can also use a network connectivity configuration to create
2125
- Databricks-managed private endpoints so that Databricks serverless compute resources privately access
2126
- your resources.
2127
-
2128
- **IMPORTANT**: After you create the network connectivity configuration, you must assign one or more
2129
- workspaces to the new network connectivity configuration. You can share one network connectivity
2130
- configuration with multiple workspaces from the same Azure region within the same Databricks account.
2131
- See [configure serverless secure connectivity].
2132
-
2133
- [configure serverless secure connectivity]: https://learn.microsoft.com/azure/databricks/security/network/serverless-network-security
2134
-
2135
3194
  :param name: str
2136
3195
  The name of the network connectivity configuration. The name can contain alphanumeric characters,
2137
3196
  hyphens, and underscores. The length must be between 3 and 30 characters. The name must match the
2138
3197
  regular expression `^[0-9a-zA-Z-_]{3,30}$`.
2139
3198
  :param region: str
2140
- The Azure region for this network connectivity configuration. Only workspaces in the same Azure
2141
- region can be attached to this network connectivity configuration.
3199
+ The region for the network connectivity configuration. Only workspaces in the same region can be
3200
+ attached to the network connectivity configuration.
2142
3201
 
2143
3202
  :returns: :class:`NetworkConnectivityConfiguration`
2144
3203
  """
@@ -2340,30 +3399,22 @@ class NetworkConnectivityAPI:
2340
3399
  query['page_token'] = json['next_page_token']
2341
3400
 
2342
3401
 
2343
- class SettingsAPI:
2344
- """The default namespace setting API allows users to configure the default namespace for a Databricks
2345
- workspace.
2346
-
2347
- Through this API, users can retrieve, set, or modify the default namespace used when queries do not
2348
- reference a fully qualified three-level name. For example, if you use the API to set 'retail_prod' as the
2349
- default catalog, then a query 'SELECT * FROM myTable' would reference the object
2350
- 'retail_prod.default.myTable' (the schema 'default' is always assumed).
3402
+ class PersonalComputeAPI:
3403
+ """The Personal Compute enablement setting lets you control which users can use the Personal Compute default
3404
+ policy to create compute resources. By default all users in all workspaces have access (ON), but you can
3405
+ change the setting to instead let individual workspaces configure access control (DELEGATE).
2351
3406
 
2352
- This setting requires a restart of clusters and SQL warehouses to take effect. Additionally, the default
2353
- namespace only applies when using Unity Catalog-enabled compute."""
3407
+ There is only one instance of this setting per account. Since this setting has a default value, this
3408
+ setting is present on all accounts even though it's never set on a given account. Deletion reverts the
3409
+ value of the setting back to the default value."""
2354
3410
 
2355
3411
  def __init__(self, api_client):
2356
3412
  self._api = api_client
2357
3413
 
2358
- def delete_default_namespace_setting(self,
2359
- *,
2360
- etag: Optional[str] = None) -> DeleteDefaultNamespaceSettingResponse:
2361
- """Delete the default namespace setting.
3414
+ def delete(self, *, etag: Optional[str] = None) -> DeletePersonalComputeSettingResponse:
3415
+ """Delete Personal Compute setting.
2362
3416
 
2363
- Deletes the default namespace setting for the workspace. A fresh etag needs to be provided in DELETE
2364
- requests (as a query parameter). The etag can be retrieved by making a GET request before the DELETE
2365
- request. If the setting is updated/deleted concurrently, DELETE will fail with 409 and the request
2366
- will need to be retried by using the fresh etag in the 409 response.
3417
+ Reverts back the Personal Compute setting value to default (ON)
2367
3418
 
2368
3419
  :param etag: str (optional)
2369
3420
  etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
@@ -2372,29 +3423,24 @@ class SettingsAPI:
2372
3423
  to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
2373
3424
  request, and pass it with the DELETE request to identify the rule set version you are deleting.
2374
3425
 
2375
- :returns: :class:`DeleteDefaultNamespaceSettingResponse`
3426
+ :returns: :class:`DeletePersonalComputeSettingResponse`
2376
3427
  """
2377
3428
 
2378
3429
  query = {}
2379
3430
  if etag is not None: query['etag'] = etag
2380
3431
  headers = {'Accept': 'application/json', }
2381
3432
 
2382
- res = self._api.do('DELETE',
2383
- '/api/2.0/settings/types/default_namespace_ws/names/default',
2384
- query=query,
2385
- headers=headers)
2386
- return DeleteDefaultNamespaceSettingResponse.from_dict(res)
3433
+ res = self._api.do(
3434
+ 'DELETE',
3435
+ f'/api/2.0/accounts/{self._api.account_id}/settings/types/dcp_acct_enable/names/default',
3436
+ query=query,
3437
+ headers=headers)
3438
+ return DeletePersonalComputeSettingResponse.from_dict(res)
2387
3439
 
2388
- def delete_restrict_workspace_admins_setting(self,
2389
- *,
2390
- etag: Optional[str] = None
2391
- ) -> DeleteRestrictWorkspaceAdminsSettingResponse:
2392
- """Delete the restrict workspace admins setting.
3440
+ def get(self, *, etag: Optional[str] = None) -> PersonalComputeSetting:
3441
+ """Get Personal Compute setting.
2393
3442
 
2394
- Reverts the restrict workspace admins setting status for the workspace. A fresh etag needs to be
2395
- provided in DELETE requests (as a query parameter). The etag can be retrieved by making a GET request
2396
- before the DELETE request. If the setting is updated/deleted concurrently, DELETE will fail with 409
2397
- and the request will need to be retried by using the fresh etag in the 409 response.
3443
+ Gets the value of the Personal Compute setting.
2398
3444
 
2399
3445
  :param etag: str (optional)
2400
3446
  etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
@@ -2403,23 +3449,71 @@ class SettingsAPI:
2403
3449
  to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
2404
3450
  request, and pass it with the DELETE request to identify the rule set version you are deleting.
2405
3451
 
2406
- :returns: :class:`DeleteRestrictWorkspaceAdminsSettingResponse`
3452
+ :returns: :class:`PersonalComputeSetting`
2407
3453
  """
2408
3454
 
2409
3455
  query = {}
2410
3456
  if etag is not None: query['etag'] = etag
2411
3457
  headers = {'Accept': 'application/json', }
2412
3458
 
2413
- res = self._api.do('DELETE',
2414
- '/api/2.0/settings/types/restrict_workspace_admins/names/default',
2415
- query=query,
2416
- headers=headers)
2417
- return DeleteRestrictWorkspaceAdminsSettingResponse.from_dict(res)
3459
+ res = self._api.do(
3460
+ 'GET',
3461
+ f'/api/2.0/accounts/{self._api.account_id}/settings/types/dcp_acct_enable/names/default',
3462
+ query=query,
3463
+ headers=headers)
3464
+ return PersonalComputeSetting.from_dict(res)
2418
3465
 
2419
- def get_default_namespace_setting(self, *, etag: Optional[str] = None) -> DefaultNamespaceSetting:
2420
- """Get the default namespace setting.
3466
+ def update(self, allow_missing: bool, setting: PersonalComputeSetting,
3467
+ field_mask: str) -> PersonalComputeSetting:
3468
+ """Update Personal Compute setting.
2421
3469
 
2422
- Gets the default namespace setting.
3470
+ Updates the value of the Personal Compute setting.
3471
+
3472
+ :param allow_missing: bool
3473
+ This should always be set to true for Settings API. Added for AIP compliance.
3474
+ :param setting: :class:`PersonalComputeSetting`
3475
+ :param field_mask: str
3476
+ Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
3477
+ setting payload will be updated. The field mask needs to be supplied as single string. To specify
3478
+ multiple fields in the field mask, use comma as the separator (no space).
3479
+
3480
+ :returns: :class:`PersonalComputeSetting`
3481
+ """
3482
+ body = {}
3483
+ if allow_missing is not None: body['allow_missing'] = allow_missing
3484
+ if field_mask is not None: body['field_mask'] = field_mask
3485
+ if setting is not None: body['setting'] = setting.as_dict()
3486
+ headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
3487
+
3488
+ res = self._api.do(
3489
+ 'PATCH',
3490
+ f'/api/2.0/accounts/{self._api.account_id}/settings/types/dcp_acct_enable/names/default',
3491
+ body=body,
3492
+ headers=headers)
3493
+ return PersonalComputeSetting.from_dict(res)
3494
+
3495
+
3496
+ class RestrictWorkspaceAdminsAPI:
3497
+ """The Restrict Workspace Admins setting lets you control the capabilities of workspace admins. With the
3498
+ setting status set to ALLOW_ALL, workspace admins can create service principal personal access tokens on
3499
+ behalf of any service principal in their workspace. Workspace admins can also change a job owner to any
3500
+ user in their workspace. And they can change the job run_as setting to any user in their workspace or to a
3501
+ service principal on which they have the Service Principal User role. With the setting status set to
3502
+ RESTRICT_TOKENS_AND_JOB_RUN_AS, workspace admins can only create personal access tokens on behalf of
3503
+ service principals they have the Service Principal User role on. They can also only change a job owner to
3504
+ themselves. And they can change the job run_as setting to themselves or to a service principal on which
3505
+ they have the Service Principal User role."""
3506
+
3507
+ def __init__(self, api_client):
3508
+ self._api = api_client
3509
+
3510
+ def delete(self, *, etag: Optional[str] = None) -> DeleteRestrictWorkspaceAdminsSettingResponse:
3511
+ """Delete the restrict workspace admins setting.
3512
+
3513
+ Reverts the restrict workspace admins setting status for the workspace. A fresh etag needs to be
3514
+ provided in `DELETE` requests (as a query parameter). The etag can be retrieved by making a `GET`
3515
+ request before the DELETE request. If the setting is updated/deleted concurrently, `DELETE` fails with
3516
+ 409 and the request must be retried by using the fresh etag in the 409 response.
2423
3517
 
2424
3518
  :param etag: str (optional)
2425
3519
  etag used for versioning. The response is at least as fresh as the eTag provided. This is used for
@@ -2428,22 +3522,20 @@ class SettingsAPI:
2428
3522
  to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET
2429
3523
  request, and pass it with the DELETE request to identify the rule set version you are deleting.
2430
3524
 
2431
- :returns: :class:`DefaultNamespaceSetting`
3525
+ :returns: :class:`DeleteRestrictWorkspaceAdminsSettingResponse`
2432
3526
  """
2433
3527
 
2434
3528
  query = {}
2435
3529
  if etag is not None: query['etag'] = etag
2436
3530
  headers = {'Accept': 'application/json', }
2437
3531
 
2438
- res = self._api.do('GET',
2439
- '/api/2.0/settings/types/default_namespace_ws/names/default',
3532
+ res = self._api.do('DELETE',
3533
+ '/api/2.0/settings/types/restrict_workspace_admins/names/default',
2440
3534
  query=query,
2441
3535
  headers=headers)
2442
- return DefaultNamespaceSetting.from_dict(res)
3536
+ return DeleteRestrictWorkspaceAdminsSettingResponse.from_dict(res)
2443
3537
 
2444
- def get_restrict_workspace_admins_setting(self,
2445
- *,
2446
- etag: Optional[str] = None) -> RestrictWorkspaceAdminsSetting:
3538
+ def get(self, *, etag: Optional[str] = None) -> RestrictWorkspaceAdminsSetting:
2447
3539
  """Get the restrict workspace admins setting.
2448
3540
 
2449
3541
  Gets the restrict workspace admins setting.
@@ -2468,55 +3560,14 @@ class SettingsAPI:
2468
3560
  headers=headers)
2469
3561
  return RestrictWorkspaceAdminsSetting.from_dict(res)
2470
3562
 
2471
- def update_default_namespace_setting(self, allow_missing: bool, setting: DefaultNamespaceSetting,
2472
- field_mask: str) -> DefaultNamespaceSetting:
2473
- """Update the default namespace setting.
2474
-
2475
- Updates the default namespace setting for the workspace. A fresh etag needs to be provided in PATCH
2476
- requests (as part of the setting field). The etag can be retrieved by making a GET request before the
2477
- PATCH request. Note that if the setting does not exist, GET will return a NOT_FOUND error and the etag
2478
- will be present in the error response, which should be set in the PATCH request. If the setting is
2479
- updated concurrently, PATCH will fail with 409 and the request will need to be retried by using the
2480
- fresh etag in the 409 response.
2481
-
2482
- :param allow_missing: bool
2483
- This should always be set to true for Settings API. Added for AIP compliance.
2484
- :param setting: :class:`DefaultNamespaceSetting`
2485
- This represents the setting configuration for the default namespace in the Databricks workspace.
2486
- Setting the default catalog for the workspace determines the catalog that is used when queries do
2487
- not reference a fully qualified 3 level name. For example, if the default catalog is set to
2488
- 'retail_prod' then a query 'SELECT * FROM myTable' would reference the object
2489
- 'retail_prod.default.myTable' (the schema 'default' is always assumed). This setting requires a
2490
- restart of clusters and SQL warehouses to take effect. Additionally, the default namespace only
2491
- applies when using Unity Catalog-enabled compute.
2492
- :param field_mask: str
2493
- Field mask is required to be passed into the PATCH request. Field mask specifies which fields of the
2494
- setting payload will be updated. The field mask needs to be supplied as single string. To specify
2495
- multiple fields in the field mask, use comma as the separator (no space).
2496
-
2497
- :returns: :class:`DefaultNamespaceSetting`
2498
- """
2499
- body = {}
2500
- if allow_missing is not None: body['allow_missing'] = allow_missing
2501
- if field_mask is not None: body['field_mask'] = field_mask
2502
- if setting is not None: body['setting'] = setting.as_dict()
2503
- headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2504
-
2505
- res = self._api.do('PATCH',
2506
- '/api/2.0/settings/types/default_namespace_ws/names/default',
2507
- body=body,
2508
- headers=headers)
2509
- return DefaultNamespaceSetting.from_dict(res)
2510
-
2511
- def update_restrict_workspace_admins_setting(self, allow_missing: bool,
2512
- setting: RestrictWorkspaceAdminsSetting,
2513
- field_mask: str) -> RestrictWorkspaceAdminsSetting:
3563
+ def update(self, allow_missing: bool, setting: RestrictWorkspaceAdminsSetting,
3564
+ field_mask: str) -> RestrictWorkspaceAdminsSetting:
2514
3565
  """Update the restrict workspace admins setting.
2515
3566
 
2516
3567
  Updates the restrict workspace admins setting for the workspace. A fresh etag needs to be provided in
2517
- PATCH requests (as part of the setting field). The etag can be retrieved by making a GET request
2518
- before the PATCH request. If the setting is updated concurrently, PATCH will fail with 409 and the
2519
- request will need to be retried by using the fresh etag in the 409 response.
3568
+ `PATCH` requests (as part of the setting field). The etag can be retrieved by making a GET request
3569
+ before the `PATCH` request. If the setting is updated concurrently, `PATCH` fails with 409 and the
3570
+ request must be retried by using the fresh etag in the 409 response.
2520
3571
 
2521
3572
  :param allow_missing: bool
2522
3573
  This should always be set to true for Settings API. Added for AIP compliance.
@@ -2541,6 +3592,44 @@ class SettingsAPI:
2541
3592
  return RestrictWorkspaceAdminsSetting.from_dict(res)
2542
3593
 
2543
3594
 
3595
+ class SettingsAPI:
3596
+ """Workspace Settings API allows users to manage settings at the workspace level."""
3597
+
3598
+ def __init__(self, api_client):
3599
+ self._api = api_client
3600
+
3601
+ self._automatic_cluster_update = AutomaticClusterUpdateAPI(self._api)
3602
+ self._csp_enablement = CspEnablementAPI(self._api)
3603
+ self._default_namespace = DefaultNamespaceAPI(self._api)
3604
+ self._esm_enablement = EsmEnablementAPI(self._api)
3605
+ self._restrict_workspace_admins = RestrictWorkspaceAdminsAPI(self._api)
3606
+
3607
+ @property
3608
+ def automatic_cluster_update(self) -> AutomaticClusterUpdateAPI:
3609
+ """Controls whether automatic cluster update is enabled for the current workspace."""
3610
+ return self._automatic_cluster_update
3611
+
3612
+ @property
3613
+ def csp_enablement(self) -> CspEnablementAPI:
3614
+ """Controls whether to enable the compliance security profile for the current workspace."""
3615
+ return self._csp_enablement
3616
+
3617
+ @property
3618
+ def default_namespace(self) -> DefaultNamespaceAPI:
3619
+ """The default namespace setting API allows users to configure the default namespace for a Databricks workspace."""
3620
+ return self._default_namespace
3621
+
3622
+ @property
3623
+ def esm_enablement(self) -> EsmEnablementAPI:
3624
+ """Controls whether enhanced security monitoring is enabled for the current workspace."""
3625
+ return self._esm_enablement
3626
+
3627
+ @property
3628
+ def restrict_workspace_admins(self) -> RestrictWorkspaceAdminsAPI:
3629
+ """The Restrict Workspace Admins setting lets you control the capabilities of workspace admins."""
3630
+ return self._restrict_workspace_admins
3631
+
3632
+
2544
3633
  class TokenManagementAPI:
2545
3634
  """Enables administrators to get all tokens and delete tokens for other users. Admins can either get every
2546
3635
  token, get a specific token by ID, or get all tokens for a particular user."""