databricks-sdk 0.44.1__py3-none-any.whl → 0.45.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 +123 -115
- databricks/sdk/_base_client.py +112 -88
- databricks/sdk/_property.py +12 -7
- databricks/sdk/_widgets/__init__.py +13 -2
- databricks/sdk/_widgets/default_widgets_utils.py +21 -15
- databricks/sdk/_widgets/ipywidgets_utils.py +47 -24
- databricks/sdk/azure.py +8 -6
- databricks/sdk/casing.py +5 -5
- databricks/sdk/config.py +152 -99
- databricks/sdk/core.py +57 -47
- databricks/sdk/credentials_provider.py +300 -205
- databricks/sdk/data_plane.py +86 -3
- databricks/sdk/dbutils.py +123 -87
- databricks/sdk/environments.py +52 -35
- databricks/sdk/errors/base.py +61 -35
- databricks/sdk/errors/customizer.py +3 -3
- databricks/sdk/errors/deserializer.py +38 -25
- databricks/sdk/errors/details.py +417 -0
- databricks/sdk/errors/mapper.py +1 -1
- databricks/sdk/errors/overrides.py +27 -24
- databricks/sdk/errors/parser.py +26 -14
- databricks/sdk/errors/platform.py +10 -10
- databricks/sdk/errors/private_link.py +24 -24
- databricks/sdk/logger/round_trip_logger.py +28 -20
- databricks/sdk/mixins/compute.py +90 -60
- databricks/sdk/mixins/files.py +815 -145
- databricks/sdk/mixins/jobs.py +191 -16
- databricks/sdk/mixins/open_ai_client.py +26 -20
- databricks/sdk/mixins/workspace.py +45 -34
- databricks/sdk/oauth.py +372 -196
- databricks/sdk/retries.py +14 -12
- databricks/sdk/runtime/__init__.py +34 -17
- databricks/sdk/runtime/dbutils_stub.py +52 -39
- databricks/sdk/service/_internal.py +12 -7
- databricks/sdk/service/apps.py +618 -418
- databricks/sdk/service/billing.py +827 -604
- databricks/sdk/service/catalog.py +6552 -4474
- databricks/sdk/service/cleanrooms.py +550 -388
- databricks/sdk/service/compute.py +5241 -3531
- databricks/sdk/service/dashboards.py +1313 -923
- databricks/sdk/service/files.py +442 -309
- databricks/sdk/service/iam.py +2115 -1483
- databricks/sdk/service/jobs.py +4151 -2588
- databricks/sdk/service/marketplace.py +2210 -1517
- databricks/sdk/service/ml.py +3364 -2255
- databricks/sdk/service/oauth2.py +922 -584
- databricks/sdk/service/pipelines.py +1865 -1203
- databricks/sdk/service/provisioning.py +1435 -1029
- databricks/sdk/service/serving.py +2040 -1278
- databricks/sdk/service/settings.py +2846 -1929
- databricks/sdk/service/sharing.py +2201 -877
- databricks/sdk/service/sql.py +4650 -3103
- databricks/sdk/service/vectorsearch.py +816 -550
- databricks/sdk/service/workspace.py +1330 -906
- databricks/sdk/useragent.py +36 -22
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.45.0.dist-info}/METADATA +31 -31
- databricks_sdk-0.45.0.dist-info/RECORD +70 -0
- {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.45.0.dist-info}/WHEEL +1 -1
- databricks_sdk-0.44.1.dist-info/RECORD +0 -69
- {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.45.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.45.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.45.0.dist-info}/top_level.txt +0 -0
|
@@ -8,12 +8,13 @@ import time
|
|
|
8
8
|
from dataclasses import dataclass
|
|
9
9
|
from datetime import timedelta
|
|
10
10
|
from enum import Enum
|
|
11
|
-
from typing import Callable, Dict, Iterator, List, Optional
|
|
11
|
+
from typing import Any, Callable, Dict, Iterator, List, Optional
|
|
12
12
|
|
|
13
13
|
from ..errors import OperationFailed
|
|
14
14
|
from ._internal import Wait, _enum, _from_dict, _repeated_dict, _repeated_enum
|
|
15
15
|
|
|
16
|
-
_LOG = logging.getLogger(
|
|
16
|
+
_LOG = logging.getLogger("databricks.sdk")
|
|
17
|
+
|
|
17
18
|
|
|
18
19
|
# all definitions in this file are in alphabetical order
|
|
19
20
|
|
|
@@ -25,19 +26,21 @@ class AwsCredentials:
|
|
|
25
26
|
def as_dict(self) -> dict:
|
|
26
27
|
"""Serializes the AwsCredentials into a dictionary suitable for use as a JSON request body."""
|
|
27
28
|
body = {}
|
|
28
|
-
if self.sts_role:
|
|
29
|
+
if self.sts_role:
|
|
30
|
+
body["sts_role"] = self.sts_role.as_dict()
|
|
29
31
|
return body
|
|
30
32
|
|
|
31
33
|
def as_shallow_dict(self) -> dict:
|
|
32
34
|
"""Serializes the AwsCredentials into a shallow dictionary of its immediate attributes."""
|
|
33
35
|
body = {}
|
|
34
|
-
if self.sts_role:
|
|
36
|
+
if self.sts_role:
|
|
37
|
+
body["sts_role"] = self.sts_role
|
|
35
38
|
return body
|
|
36
39
|
|
|
37
40
|
@classmethod
|
|
38
|
-
def from_dict(cls, d: Dict[str,
|
|
41
|
+
def from_dict(cls, d: Dict[str, Any]) -> AwsCredentials:
|
|
39
42
|
"""Deserializes the AwsCredentials from a dictionary."""
|
|
40
|
-
return cls(sts_role=_from_dict(d,
|
|
43
|
+
return cls(sts_role=_from_dict(d, "sts_role", StsRole))
|
|
41
44
|
|
|
42
45
|
|
|
43
46
|
@dataclass
|
|
@@ -59,30 +62,38 @@ class AwsKeyInfo:
|
|
|
59
62
|
def as_dict(self) -> dict:
|
|
60
63
|
"""Serializes the AwsKeyInfo into a dictionary suitable for use as a JSON request body."""
|
|
61
64
|
body = {}
|
|
62
|
-
if self.key_alias is not None:
|
|
63
|
-
|
|
64
|
-
if self.
|
|
65
|
+
if self.key_alias is not None:
|
|
66
|
+
body["key_alias"] = self.key_alias
|
|
67
|
+
if self.key_arn is not None:
|
|
68
|
+
body["key_arn"] = self.key_arn
|
|
69
|
+
if self.key_region is not None:
|
|
70
|
+
body["key_region"] = self.key_region
|
|
65
71
|
if self.reuse_key_for_cluster_volumes is not None:
|
|
66
|
-
body[
|
|
72
|
+
body["reuse_key_for_cluster_volumes"] = self.reuse_key_for_cluster_volumes
|
|
67
73
|
return body
|
|
68
74
|
|
|
69
75
|
def as_shallow_dict(self) -> dict:
|
|
70
76
|
"""Serializes the AwsKeyInfo into a shallow dictionary of its immediate attributes."""
|
|
71
77
|
body = {}
|
|
72
|
-
if self.key_alias is not None:
|
|
73
|
-
|
|
74
|
-
if self.
|
|
78
|
+
if self.key_alias is not None:
|
|
79
|
+
body["key_alias"] = self.key_alias
|
|
80
|
+
if self.key_arn is not None:
|
|
81
|
+
body["key_arn"] = self.key_arn
|
|
82
|
+
if self.key_region is not None:
|
|
83
|
+
body["key_region"] = self.key_region
|
|
75
84
|
if self.reuse_key_for_cluster_volumes is not None:
|
|
76
|
-
body[
|
|
85
|
+
body["reuse_key_for_cluster_volumes"] = self.reuse_key_for_cluster_volumes
|
|
77
86
|
return body
|
|
78
87
|
|
|
79
88
|
@classmethod
|
|
80
|
-
def from_dict(cls, d: Dict[str,
|
|
89
|
+
def from_dict(cls, d: Dict[str, Any]) -> AwsKeyInfo:
|
|
81
90
|
"""Deserializes the AwsKeyInfo from a dictionary."""
|
|
82
|
-
return cls(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
91
|
+
return cls(
|
|
92
|
+
key_alias=d.get("key_alias", None),
|
|
93
|
+
key_arn=d.get("key_arn", None),
|
|
94
|
+
key_region=d.get("key_region", None),
|
|
95
|
+
reuse_key_for_cluster_volumes=d.get("reuse_key_for_cluster_volumes", None),
|
|
96
|
+
)
|
|
86
97
|
|
|
87
98
|
|
|
88
99
|
@dataclass
|
|
@@ -96,22 +107,25 @@ class AzureWorkspaceInfo:
|
|
|
96
107
|
def as_dict(self) -> dict:
|
|
97
108
|
"""Serializes the AzureWorkspaceInfo into a dictionary suitable for use as a JSON request body."""
|
|
98
109
|
body = {}
|
|
99
|
-
if self.resource_group is not None:
|
|
100
|
-
|
|
110
|
+
if self.resource_group is not None:
|
|
111
|
+
body["resource_group"] = self.resource_group
|
|
112
|
+
if self.subscription_id is not None:
|
|
113
|
+
body["subscription_id"] = self.subscription_id
|
|
101
114
|
return body
|
|
102
115
|
|
|
103
116
|
def as_shallow_dict(self) -> dict:
|
|
104
117
|
"""Serializes the AzureWorkspaceInfo into a shallow dictionary of its immediate attributes."""
|
|
105
118
|
body = {}
|
|
106
|
-
if self.resource_group is not None:
|
|
107
|
-
|
|
119
|
+
if self.resource_group is not None:
|
|
120
|
+
body["resource_group"] = self.resource_group
|
|
121
|
+
if self.subscription_id is not None:
|
|
122
|
+
body["subscription_id"] = self.subscription_id
|
|
108
123
|
return body
|
|
109
124
|
|
|
110
125
|
@classmethod
|
|
111
|
-
def from_dict(cls, d: Dict[str,
|
|
126
|
+
def from_dict(cls, d: Dict[str, Any]) -> AzureWorkspaceInfo:
|
|
112
127
|
"""Deserializes the AzureWorkspaceInfo from a dictionary."""
|
|
113
|
-
return cls(resource_group=d.get(
|
|
114
|
-
subscription_id=d.get('subscription_id', None))
|
|
128
|
+
return cls(resource_group=d.get("resource_group", None), subscription_id=d.get("subscription_id", None))
|
|
115
129
|
|
|
116
130
|
|
|
117
131
|
@dataclass
|
|
@@ -124,19 +138,21 @@ class CloudResourceContainer:
|
|
|
124
138
|
def as_dict(self) -> dict:
|
|
125
139
|
"""Serializes the CloudResourceContainer into a dictionary suitable for use as a JSON request body."""
|
|
126
140
|
body = {}
|
|
127
|
-
if self.gcp:
|
|
141
|
+
if self.gcp:
|
|
142
|
+
body["gcp"] = self.gcp.as_dict()
|
|
128
143
|
return body
|
|
129
144
|
|
|
130
145
|
def as_shallow_dict(self) -> dict:
|
|
131
146
|
"""Serializes the CloudResourceContainer into a shallow dictionary of its immediate attributes."""
|
|
132
147
|
body = {}
|
|
133
|
-
if self.gcp:
|
|
148
|
+
if self.gcp:
|
|
149
|
+
body["gcp"] = self.gcp
|
|
134
150
|
return body
|
|
135
151
|
|
|
136
152
|
@classmethod
|
|
137
|
-
def from_dict(cls, d: Dict[str,
|
|
153
|
+
def from_dict(cls, d: Dict[str, Any]) -> CloudResourceContainer:
|
|
138
154
|
"""Deserializes the CloudResourceContainer from a dictionary."""
|
|
139
|
-
return cls(gcp=_from_dict(d,
|
|
155
|
+
return cls(gcp=_from_dict(d, "gcp", CustomerFacingGcpCloudResourceContainer))
|
|
140
156
|
|
|
141
157
|
|
|
142
158
|
@dataclass
|
|
@@ -156,27 +172,33 @@ class CreateAwsKeyInfo:
|
|
|
156
172
|
def as_dict(self) -> dict:
|
|
157
173
|
"""Serializes the CreateAwsKeyInfo into a dictionary suitable for use as a JSON request body."""
|
|
158
174
|
body = {}
|
|
159
|
-
if self.key_alias is not None:
|
|
160
|
-
|
|
175
|
+
if self.key_alias is not None:
|
|
176
|
+
body["key_alias"] = self.key_alias
|
|
177
|
+
if self.key_arn is not None:
|
|
178
|
+
body["key_arn"] = self.key_arn
|
|
161
179
|
if self.reuse_key_for_cluster_volumes is not None:
|
|
162
|
-
body[
|
|
180
|
+
body["reuse_key_for_cluster_volumes"] = self.reuse_key_for_cluster_volumes
|
|
163
181
|
return body
|
|
164
182
|
|
|
165
183
|
def as_shallow_dict(self) -> dict:
|
|
166
184
|
"""Serializes the CreateAwsKeyInfo into a shallow dictionary of its immediate attributes."""
|
|
167
185
|
body = {}
|
|
168
|
-
if self.key_alias is not None:
|
|
169
|
-
|
|
186
|
+
if self.key_alias is not None:
|
|
187
|
+
body["key_alias"] = self.key_alias
|
|
188
|
+
if self.key_arn is not None:
|
|
189
|
+
body["key_arn"] = self.key_arn
|
|
170
190
|
if self.reuse_key_for_cluster_volumes is not None:
|
|
171
|
-
body[
|
|
191
|
+
body["reuse_key_for_cluster_volumes"] = self.reuse_key_for_cluster_volumes
|
|
172
192
|
return body
|
|
173
193
|
|
|
174
194
|
@classmethod
|
|
175
|
-
def from_dict(cls, d: Dict[str,
|
|
195
|
+
def from_dict(cls, d: Dict[str, Any]) -> CreateAwsKeyInfo:
|
|
176
196
|
"""Deserializes the CreateAwsKeyInfo from a dictionary."""
|
|
177
|
-
return cls(
|
|
178
|
-
|
|
179
|
-
|
|
197
|
+
return cls(
|
|
198
|
+
key_alias=d.get("key_alias", None),
|
|
199
|
+
key_arn=d.get("key_arn", None),
|
|
200
|
+
reuse_key_for_cluster_volumes=d.get("reuse_key_for_cluster_volumes", None),
|
|
201
|
+
)
|
|
180
202
|
|
|
181
203
|
|
|
182
204
|
@dataclass
|
|
@@ -186,19 +208,21 @@ class CreateCredentialAwsCredentials:
|
|
|
186
208
|
def as_dict(self) -> dict:
|
|
187
209
|
"""Serializes the CreateCredentialAwsCredentials into a dictionary suitable for use as a JSON request body."""
|
|
188
210
|
body = {}
|
|
189
|
-
if self.sts_role:
|
|
211
|
+
if self.sts_role:
|
|
212
|
+
body["sts_role"] = self.sts_role.as_dict()
|
|
190
213
|
return body
|
|
191
214
|
|
|
192
215
|
def as_shallow_dict(self) -> dict:
|
|
193
216
|
"""Serializes the CreateCredentialAwsCredentials into a shallow dictionary of its immediate attributes."""
|
|
194
217
|
body = {}
|
|
195
|
-
if self.sts_role:
|
|
218
|
+
if self.sts_role:
|
|
219
|
+
body["sts_role"] = self.sts_role
|
|
196
220
|
return body
|
|
197
221
|
|
|
198
222
|
@classmethod
|
|
199
|
-
def from_dict(cls, d: Dict[str,
|
|
223
|
+
def from_dict(cls, d: Dict[str, Any]) -> CreateCredentialAwsCredentials:
|
|
200
224
|
"""Deserializes the CreateCredentialAwsCredentials from a dictionary."""
|
|
201
|
-
return cls(sts_role=_from_dict(d,
|
|
225
|
+
return cls(sts_role=_from_dict(d, "sts_role", CreateCredentialStsRole))
|
|
202
226
|
|
|
203
227
|
|
|
204
228
|
@dataclass
|
|
@@ -211,22 +235,28 @@ class CreateCredentialRequest:
|
|
|
211
235
|
def as_dict(self) -> dict:
|
|
212
236
|
"""Serializes the CreateCredentialRequest into a dictionary suitable for use as a JSON request body."""
|
|
213
237
|
body = {}
|
|
214
|
-
if self.aws_credentials:
|
|
215
|
-
|
|
238
|
+
if self.aws_credentials:
|
|
239
|
+
body["aws_credentials"] = self.aws_credentials.as_dict()
|
|
240
|
+
if self.credentials_name is not None:
|
|
241
|
+
body["credentials_name"] = self.credentials_name
|
|
216
242
|
return body
|
|
217
243
|
|
|
218
244
|
def as_shallow_dict(self) -> dict:
|
|
219
245
|
"""Serializes the CreateCredentialRequest into a shallow dictionary of its immediate attributes."""
|
|
220
246
|
body = {}
|
|
221
|
-
if self.aws_credentials:
|
|
222
|
-
|
|
247
|
+
if self.aws_credentials:
|
|
248
|
+
body["aws_credentials"] = self.aws_credentials
|
|
249
|
+
if self.credentials_name is not None:
|
|
250
|
+
body["credentials_name"] = self.credentials_name
|
|
223
251
|
return body
|
|
224
252
|
|
|
225
253
|
@classmethod
|
|
226
|
-
def from_dict(cls, d: Dict[str,
|
|
254
|
+
def from_dict(cls, d: Dict[str, Any]) -> CreateCredentialRequest:
|
|
227
255
|
"""Deserializes the CreateCredentialRequest from a dictionary."""
|
|
228
|
-
return cls(
|
|
229
|
-
|
|
256
|
+
return cls(
|
|
257
|
+
aws_credentials=_from_dict(d, "aws_credentials", CreateCredentialAwsCredentials),
|
|
258
|
+
credentials_name=d.get("credentials_name", None),
|
|
259
|
+
)
|
|
230
260
|
|
|
231
261
|
|
|
232
262
|
@dataclass
|
|
@@ -237,19 +267,21 @@ class CreateCredentialStsRole:
|
|
|
237
267
|
def as_dict(self) -> dict:
|
|
238
268
|
"""Serializes the CreateCredentialStsRole into a dictionary suitable for use as a JSON request body."""
|
|
239
269
|
body = {}
|
|
240
|
-
if self.role_arn is not None:
|
|
270
|
+
if self.role_arn is not None:
|
|
271
|
+
body["role_arn"] = self.role_arn
|
|
241
272
|
return body
|
|
242
273
|
|
|
243
274
|
def as_shallow_dict(self) -> dict:
|
|
244
275
|
"""Serializes the CreateCredentialStsRole into a shallow dictionary of its immediate attributes."""
|
|
245
276
|
body = {}
|
|
246
|
-
if self.role_arn is not None:
|
|
277
|
+
if self.role_arn is not None:
|
|
278
|
+
body["role_arn"] = self.role_arn
|
|
247
279
|
return body
|
|
248
280
|
|
|
249
281
|
@classmethod
|
|
250
|
-
def from_dict(cls, d: Dict[str,
|
|
282
|
+
def from_dict(cls, d: Dict[str, Any]) -> CreateCredentialStsRole:
|
|
251
283
|
"""Deserializes the CreateCredentialStsRole from a dictionary."""
|
|
252
|
-
return cls(role_arn=d.get(
|
|
284
|
+
return cls(role_arn=d.get("role_arn", None))
|
|
253
285
|
|
|
254
286
|
|
|
255
287
|
@dataclass
|
|
@@ -264,25 +296,33 @@ class CreateCustomerManagedKeyRequest:
|
|
|
264
296
|
def as_dict(self) -> dict:
|
|
265
297
|
"""Serializes the CreateCustomerManagedKeyRequest into a dictionary suitable for use as a JSON request body."""
|
|
266
298
|
body = {}
|
|
267
|
-
if self.aws_key_info:
|
|
268
|
-
|
|
269
|
-
if self.
|
|
299
|
+
if self.aws_key_info:
|
|
300
|
+
body["aws_key_info"] = self.aws_key_info.as_dict()
|
|
301
|
+
if self.gcp_key_info:
|
|
302
|
+
body["gcp_key_info"] = self.gcp_key_info.as_dict()
|
|
303
|
+
if self.use_cases:
|
|
304
|
+
body["use_cases"] = [v.value for v in self.use_cases]
|
|
270
305
|
return body
|
|
271
306
|
|
|
272
307
|
def as_shallow_dict(self) -> dict:
|
|
273
308
|
"""Serializes the CreateCustomerManagedKeyRequest into a shallow dictionary of its immediate attributes."""
|
|
274
309
|
body = {}
|
|
275
|
-
if self.aws_key_info:
|
|
276
|
-
|
|
277
|
-
if self.
|
|
310
|
+
if self.aws_key_info:
|
|
311
|
+
body["aws_key_info"] = self.aws_key_info
|
|
312
|
+
if self.gcp_key_info:
|
|
313
|
+
body["gcp_key_info"] = self.gcp_key_info
|
|
314
|
+
if self.use_cases:
|
|
315
|
+
body["use_cases"] = self.use_cases
|
|
278
316
|
return body
|
|
279
317
|
|
|
280
318
|
@classmethod
|
|
281
|
-
def from_dict(cls, d: Dict[str,
|
|
319
|
+
def from_dict(cls, d: Dict[str, Any]) -> CreateCustomerManagedKeyRequest:
|
|
282
320
|
"""Deserializes the CreateCustomerManagedKeyRequest from a dictionary."""
|
|
283
|
-
return cls(
|
|
284
|
-
|
|
285
|
-
|
|
321
|
+
return cls(
|
|
322
|
+
aws_key_info=_from_dict(d, "aws_key_info", CreateAwsKeyInfo),
|
|
323
|
+
gcp_key_info=_from_dict(d, "gcp_key_info", CreateGcpKeyInfo),
|
|
324
|
+
use_cases=_repeated_enum(d, "use_cases", KeyUseCase),
|
|
325
|
+
)
|
|
286
326
|
|
|
287
327
|
|
|
288
328
|
@dataclass
|
|
@@ -293,19 +333,21 @@ class CreateGcpKeyInfo:
|
|
|
293
333
|
def as_dict(self) -> dict:
|
|
294
334
|
"""Serializes the CreateGcpKeyInfo into a dictionary suitable for use as a JSON request body."""
|
|
295
335
|
body = {}
|
|
296
|
-
if self.kms_key_id is not None:
|
|
336
|
+
if self.kms_key_id is not None:
|
|
337
|
+
body["kms_key_id"] = self.kms_key_id
|
|
297
338
|
return body
|
|
298
339
|
|
|
299
340
|
def as_shallow_dict(self) -> dict:
|
|
300
341
|
"""Serializes the CreateGcpKeyInfo into a shallow dictionary of its immediate attributes."""
|
|
301
342
|
body = {}
|
|
302
|
-
if self.kms_key_id is not None:
|
|
343
|
+
if self.kms_key_id is not None:
|
|
344
|
+
body["kms_key_id"] = self.kms_key_id
|
|
303
345
|
return body
|
|
304
346
|
|
|
305
347
|
@classmethod
|
|
306
|
-
def from_dict(cls, d: Dict[str,
|
|
348
|
+
def from_dict(cls, d: Dict[str, Any]) -> CreateGcpKeyInfo:
|
|
307
349
|
"""Deserializes the CreateGcpKeyInfo from a dictionary."""
|
|
308
|
-
return cls(kms_key_id=d.get(
|
|
350
|
+
return cls(kms_key_id=d.get("kms_key_id", None))
|
|
309
351
|
|
|
310
352
|
|
|
311
353
|
@dataclass
|
|
@@ -338,34 +380,48 @@ class CreateNetworkRequest:
|
|
|
338
380
|
def as_dict(self) -> dict:
|
|
339
381
|
"""Serializes the CreateNetworkRequest into a dictionary suitable for use as a JSON request body."""
|
|
340
382
|
body = {}
|
|
341
|
-
if self.gcp_network_info:
|
|
342
|
-
|
|
343
|
-
if self.
|
|
344
|
-
|
|
345
|
-
if self.
|
|
346
|
-
|
|
383
|
+
if self.gcp_network_info:
|
|
384
|
+
body["gcp_network_info"] = self.gcp_network_info.as_dict()
|
|
385
|
+
if self.network_name is not None:
|
|
386
|
+
body["network_name"] = self.network_name
|
|
387
|
+
if self.security_group_ids:
|
|
388
|
+
body["security_group_ids"] = [v for v in self.security_group_ids]
|
|
389
|
+
if self.subnet_ids:
|
|
390
|
+
body["subnet_ids"] = [v for v in self.subnet_ids]
|
|
391
|
+
if self.vpc_endpoints:
|
|
392
|
+
body["vpc_endpoints"] = self.vpc_endpoints.as_dict()
|
|
393
|
+
if self.vpc_id is not None:
|
|
394
|
+
body["vpc_id"] = self.vpc_id
|
|
347
395
|
return body
|
|
348
396
|
|
|
349
397
|
def as_shallow_dict(self) -> dict:
|
|
350
398
|
"""Serializes the CreateNetworkRequest into a shallow dictionary of its immediate attributes."""
|
|
351
399
|
body = {}
|
|
352
|
-
if self.gcp_network_info:
|
|
353
|
-
|
|
354
|
-
if self.
|
|
355
|
-
|
|
356
|
-
if self.
|
|
357
|
-
|
|
400
|
+
if self.gcp_network_info:
|
|
401
|
+
body["gcp_network_info"] = self.gcp_network_info
|
|
402
|
+
if self.network_name is not None:
|
|
403
|
+
body["network_name"] = self.network_name
|
|
404
|
+
if self.security_group_ids:
|
|
405
|
+
body["security_group_ids"] = self.security_group_ids
|
|
406
|
+
if self.subnet_ids:
|
|
407
|
+
body["subnet_ids"] = self.subnet_ids
|
|
408
|
+
if self.vpc_endpoints:
|
|
409
|
+
body["vpc_endpoints"] = self.vpc_endpoints
|
|
410
|
+
if self.vpc_id is not None:
|
|
411
|
+
body["vpc_id"] = self.vpc_id
|
|
358
412
|
return body
|
|
359
413
|
|
|
360
414
|
@classmethod
|
|
361
|
-
def from_dict(cls, d: Dict[str,
|
|
415
|
+
def from_dict(cls, d: Dict[str, Any]) -> CreateNetworkRequest:
|
|
362
416
|
"""Deserializes the CreateNetworkRequest from a dictionary."""
|
|
363
|
-
return cls(
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
417
|
+
return cls(
|
|
418
|
+
gcp_network_info=_from_dict(d, "gcp_network_info", GcpNetworkInfo),
|
|
419
|
+
network_name=d.get("network_name", None),
|
|
420
|
+
security_group_ids=d.get("security_group_ids", None),
|
|
421
|
+
subnet_ids=d.get("subnet_ids", None),
|
|
422
|
+
vpc_endpoints=_from_dict(d, "vpc_endpoints", NetworkVpcEndpoints),
|
|
423
|
+
vpc_id=d.get("vpc_id", None),
|
|
424
|
+
)
|
|
369
425
|
|
|
370
426
|
|
|
371
427
|
@dataclass
|
|
@@ -379,24 +435,28 @@ class CreateStorageConfigurationRequest:
|
|
|
379
435
|
def as_dict(self) -> dict:
|
|
380
436
|
"""Serializes the CreateStorageConfigurationRequest into a dictionary suitable for use as a JSON request body."""
|
|
381
437
|
body = {}
|
|
382
|
-
if self.root_bucket_info:
|
|
438
|
+
if self.root_bucket_info:
|
|
439
|
+
body["root_bucket_info"] = self.root_bucket_info.as_dict()
|
|
383
440
|
if self.storage_configuration_name is not None:
|
|
384
|
-
body[
|
|
441
|
+
body["storage_configuration_name"] = self.storage_configuration_name
|
|
385
442
|
return body
|
|
386
443
|
|
|
387
444
|
def as_shallow_dict(self) -> dict:
|
|
388
445
|
"""Serializes the CreateStorageConfigurationRequest into a shallow dictionary of its immediate attributes."""
|
|
389
446
|
body = {}
|
|
390
|
-
if self.root_bucket_info:
|
|
447
|
+
if self.root_bucket_info:
|
|
448
|
+
body["root_bucket_info"] = self.root_bucket_info
|
|
391
449
|
if self.storage_configuration_name is not None:
|
|
392
|
-
body[
|
|
450
|
+
body["storage_configuration_name"] = self.storage_configuration_name
|
|
393
451
|
return body
|
|
394
452
|
|
|
395
453
|
@classmethod
|
|
396
|
-
def from_dict(cls, d: Dict[str,
|
|
454
|
+
def from_dict(cls, d: Dict[str, Any]) -> CreateStorageConfigurationRequest:
|
|
397
455
|
"""Deserializes the CreateStorageConfigurationRequest from a dictionary."""
|
|
398
|
-
return cls(
|
|
399
|
-
|
|
456
|
+
return cls(
|
|
457
|
+
root_bucket_info=_from_dict(d, "root_bucket_info", RootBucketInfo),
|
|
458
|
+
storage_configuration_name=d.get("storage_configuration_name", None),
|
|
459
|
+
)
|
|
400
460
|
|
|
401
461
|
|
|
402
462
|
@dataclass
|
|
@@ -416,28 +476,38 @@ class CreateVpcEndpointRequest:
|
|
|
416
476
|
def as_dict(self) -> dict:
|
|
417
477
|
"""Serializes the CreateVpcEndpointRequest into a dictionary suitable for use as a JSON request body."""
|
|
418
478
|
body = {}
|
|
419
|
-
if self.aws_vpc_endpoint_id is not None:
|
|
420
|
-
|
|
421
|
-
if self.
|
|
422
|
-
|
|
479
|
+
if self.aws_vpc_endpoint_id is not None:
|
|
480
|
+
body["aws_vpc_endpoint_id"] = self.aws_vpc_endpoint_id
|
|
481
|
+
if self.gcp_vpc_endpoint_info:
|
|
482
|
+
body["gcp_vpc_endpoint_info"] = self.gcp_vpc_endpoint_info.as_dict()
|
|
483
|
+
if self.region is not None:
|
|
484
|
+
body["region"] = self.region
|
|
485
|
+
if self.vpc_endpoint_name is not None:
|
|
486
|
+
body["vpc_endpoint_name"] = self.vpc_endpoint_name
|
|
423
487
|
return body
|
|
424
488
|
|
|
425
489
|
def as_shallow_dict(self) -> dict:
|
|
426
490
|
"""Serializes the CreateVpcEndpointRequest into a shallow dictionary of its immediate attributes."""
|
|
427
491
|
body = {}
|
|
428
|
-
if self.aws_vpc_endpoint_id is not None:
|
|
429
|
-
|
|
430
|
-
if self.
|
|
431
|
-
|
|
492
|
+
if self.aws_vpc_endpoint_id is not None:
|
|
493
|
+
body["aws_vpc_endpoint_id"] = self.aws_vpc_endpoint_id
|
|
494
|
+
if self.gcp_vpc_endpoint_info:
|
|
495
|
+
body["gcp_vpc_endpoint_info"] = self.gcp_vpc_endpoint_info
|
|
496
|
+
if self.region is not None:
|
|
497
|
+
body["region"] = self.region
|
|
498
|
+
if self.vpc_endpoint_name is not None:
|
|
499
|
+
body["vpc_endpoint_name"] = self.vpc_endpoint_name
|
|
432
500
|
return body
|
|
433
501
|
|
|
434
502
|
@classmethod
|
|
435
|
-
def from_dict(cls, d: Dict[str,
|
|
503
|
+
def from_dict(cls, d: Dict[str, Any]) -> CreateVpcEndpointRequest:
|
|
436
504
|
"""Deserializes the CreateVpcEndpointRequest from a dictionary."""
|
|
437
|
-
return cls(
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
505
|
+
return cls(
|
|
506
|
+
aws_vpc_endpoint_id=d.get("aws_vpc_endpoint_id", None),
|
|
507
|
+
gcp_vpc_endpoint_info=_from_dict(d, "gcp_vpc_endpoint_info", GcpVpcEndpointInfo),
|
|
508
|
+
region=d.get("region", None),
|
|
509
|
+
vpc_endpoint_name=d.get("vpc_endpoint_name", None),
|
|
510
|
+
)
|
|
441
511
|
|
|
442
512
|
|
|
443
513
|
@dataclass
|
|
@@ -552,82 +622,103 @@ class CreateWorkspaceRequest:
|
|
|
552
622
|
def as_dict(self) -> dict:
|
|
553
623
|
"""Serializes the CreateWorkspaceRequest into a dictionary suitable for use as a JSON request body."""
|
|
554
624
|
body = {}
|
|
555
|
-
if self.aws_region is not None:
|
|
556
|
-
|
|
625
|
+
if self.aws_region is not None:
|
|
626
|
+
body["aws_region"] = self.aws_region
|
|
627
|
+
if self.cloud is not None:
|
|
628
|
+
body["cloud"] = self.cloud
|
|
557
629
|
if self.cloud_resource_container:
|
|
558
|
-
body[
|
|
559
|
-
if self.credentials_id is not None:
|
|
560
|
-
|
|
561
|
-
if self.
|
|
630
|
+
body["cloud_resource_container"] = self.cloud_resource_container.as_dict()
|
|
631
|
+
if self.credentials_id is not None:
|
|
632
|
+
body["credentials_id"] = self.credentials_id
|
|
633
|
+
if self.custom_tags:
|
|
634
|
+
body["custom_tags"] = self.custom_tags
|
|
635
|
+
if self.deployment_name is not None:
|
|
636
|
+
body["deployment_name"] = self.deployment_name
|
|
562
637
|
if self.gcp_managed_network_config:
|
|
563
|
-
body[
|
|
564
|
-
if self.gke_config:
|
|
638
|
+
body["gcp_managed_network_config"] = self.gcp_managed_network_config.as_dict()
|
|
639
|
+
if self.gke_config:
|
|
640
|
+
body["gke_config"] = self.gke_config.as_dict()
|
|
565
641
|
if self.is_no_public_ip_enabled is not None:
|
|
566
|
-
body[
|
|
567
|
-
if self.location is not None:
|
|
642
|
+
body["is_no_public_ip_enabled"] = self.is_no_public_ip_enabled
|
|
643
|
+
if self.location is not None:
|
|
644
|
+
body["location"] = self.location
|
|
568
645
|
if self.managed_services_customer_managed_key_id is not None:
|
|
569
|
-
body[
|
|
570
|
-
if self.network_id is not None:
|
|
571
|
-
|
|
646
|
+
body["managed_services_customer_managed_key_id"] = self.managed_services_customer_managed_key_id
|
|
647
|
+
if self.network_id is not None:
|
|
648
|
+
body["network_id"] = self.network_id
|
|
649
|
+
if self.pricing_tier is not None:
|
|
650
|
+
body["pricing_tier"] = self.pricing_tier.value
|
|
572
651
|
if self.private_access_settings_id is not None:
|
|
573
|
-
body[
|
|
652
|
+
body["private_access_settings_id"] = self.private_access_settings_id
|
|
574
653
|
if self.storage_configuration_id is not None:
|
|
575
|
-
body[
|
|
654
|
+
body["storage_configuration_id"] = self.storage_configuration_id
|
|
576
655
|
if self.storage_customer_managed_key_id is not None:
|
|
577
|
-
body[
|
|
578
|
-
if self.workspace_name is not None:
|
|
656
|
+
body["storage_customer_managed_key_id"] = self.storage_customer_managed_key_id
|
|
657
|
+
if self.workspace_name is not None:
|
|
658
|
+
body["workspace_name"] = self.workspace_name
|
|
579
659
|
return body
|
|
580
660
|
|
|
581
661
|
def as_shallow_dict(self) -> dict:
|
|
582
662
|
"""Serializes the CreateWorkspaceRequest into a shallow dictionary of its immediate attributes."""
|
|
583
663
|
body = {}
|
|
584
|
-
if self.aws_region is not None:
|
|
585
|
-
|
|
586
|
-
if self.
|
|
587
|
-
|
|
588
|
-
if self.
|
|
589
|
-
|
|
664
|
+
if self.aws_region is not None:
|
|
665
|
+
body["aws_region"] = self.aws_region
|
|
666
|
+
if self.cloud is not None:
|
|
667
|
+
body["cloud"] = self.cloud
|
|
668
|
+
if self.cloud_resource_container:
|
|
669
|
+
body["cloud_resource_container"] = self.cloud_resource_container
|
|
670
|
+
if self.credentials_id is not None:
|
|
671
|
+
body["credentials_id"] = self.credentials_id
|
|
672
|
+
if self.custom_tags:
|
|
673
|
+
body["custom_tags"] = self.custom_tags
|
|
674
|
+
if self.deployment_name is not None:
|
|
675
|
+
body["deployment_name"] = self.deployment_name
|
|
590
676
|
if self.gcp_managed_network_config:
|
|
591
|
-
body[
|
|
592
|
-
if self.gke_config:
|
|
677
|
+
body["gcp_managed_network_config"] = self.gcp_managed_network_config
|
|
678
|
+
if self.gke_config:
|
|
679
|
+
body["gke_config"] = self.gke_config
|
|
593
680
|
if self.is_no_public_ip_enabled is not None:
|
|
594
|
-
body[
|
|
595
|
-
if self.location is not None:
|
|
681
|
+
body["is_no_public_ip_enabled"] = self.is_no_public_ip_enabled
|
|
682
|
+
if self.location is not None:
|
|
683
|
+
body["location"] = self.location
|
|
596
684
|
if self.managed_services_customer_managed_key_id is not None:
|
|
597
|
-
body[
|
|
598
|
-
if self.network_id is not None:
|
|
599
|
-
|
|
685
|
+
body["managed_services_customer_managed_key_id"] = self.managed_services_customer_managed_key_id
|
|
686
|
+
if self.network_id is not None:
|
|
687
|
+
body["network_id"] = self.network_id
|
|
688
|
+
if self.pricing_tier is not None:
|
|
689
|
+
body["pricing_tier"] = self.pricing_tier
|
|
600
690
|
if self.private_access_settings_id is not None:
|
|
601
|
-
body[
|
|
691
|
+
body["private_access_settings_id"] = self.private_access_settings_id
|
|
602
692
|
if self.storage_configuration_id is not None:
|
|
603
|
-
body[
|
|
693
|
+
body["storage_configuration_id"] = self.storage_configuration_id
|
|
604
694
|
if self.storage_customer_managed_key_id is not None:
|
|
605
|
-
body[
|
|
606
|
-
if self.workspace_name is not None:
|
|
695
|
+
body["storage_customer_managed_key_id"] = self.storage_customer_managed_key_id
|
|
696
|
+
if self.workspace_name is not None:
|
|
697
|
+
body["workspace_name"] = self.workspace_name
|
|
607
698
|
return body
|
|
608
699
|
|
|
609
700
|
@classmethod
|
|
610
|
-
def from_dict(cls, d: Dict[str,
|
|
701
|
+
def from_dict(cls, d: Dict[str, Any]) -> CreateWorkspaceRequest:
|
|
611
702
|
"""Deserializes the CreateWorkspaceRequest from a dictionary."""
|
|
612
|
-
return cls(
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
703
|
+
return cls(
|
|
704
|
+
aws_region=d.get("aws_region", None),
|
|
705
|
+
cloud=d.get("cloud", None),
|
|
706
|
+
cloud_resource_container=_from_dict(d, "cloud_resource_container", CloudResourceContainer),
|
|
707
|
+
credentials_id=d.get("credentials_id", None),
|
|
708
|
+
custom_tags=d.get("custom_tags", None),
|
|
709
|
+
deployment_name=d.get("deployment_name", None),
|
|
710
|
+
gcp_managed_network_config=_from_dict(d, "gcp_managed_network_config", GcpManagedNetworkConfig),
|
|
711
|
+
gke_config=_from_dict(d, "gke_config", GkeConfig),
|
|
712
|
+
is_no_public_ip_enabled=d.get("is_no_public_ip_enabled", None),
|
|
713
|
+
location=d.get("location", None),
|
|
714
|
+
managed_services_customer_managed_key_id=d.get("managed_services_customer_managed_key_id", None),
|
|
715
|
+
network_id=d.get("network_id", None),
|
|
716
|
+
pricing_tier=_enum(d, "pricing_tier", PricingTier),
|
|
717
|
+
private_access_settings_id=d.get("private_access_settings_id", None),
|
|
718
|
+
storage_configuration_id=d.get("storage_configuration_id", None),
|
|
719
|
+
storage_customer_managed_key_id=d.get("storage_customer_managed_key_id", None),
|
|
720
|
+
workspace_name=d.get("workspace_name", None),
|
|
721
|
+
)
|
|
631
722
|
|
|
632
723
|
|
|
633
724
|
@dataclass
|
|
@@ -649,31 +740,43 @@ class Credential:
|
|
|
649
740
|
def as_dict(self) -> dict:
|
|
650
741
|
"""Serializes the Credential into a dictionary suitable for use as a JSON request body."""
|
|
651
742
|
body = {}
|
|
652
|
-
if self.account_id is not None:
|
|
653
|
-
|
|
654
|
-
if self.
|
|
655
|
-
|
|
656
|
-
if self.
|
|
743
|
+
if self.account_id is not None:
|
|
744
|
+
body["account_id"] = self.account_id
|
|
745
|
+
if self.aws_credentials:
|
|
746
|
+
body["aws_credentials"] = self.aws_credentials.as_dict()
|
|
747
|
+
if self.creation_time is not None:
|
|
748
|
+
body["creation_time"] = self.creation_time
|
|
749
|
+
if self.credentials_id is not None:
|
|
750
|
+
body["credentials_id"] = self.credentials_id
|
|
751
|
+
if self.credentials_name is not None:
|
|
752
|
+
body["credentials_name"] = self.credentials_name
|
|
657
753
|
return body
|
|
658
754
|
|
|
659
755
|
def as_shallow_dict(self) -> dict:
|
|
660
756
|
"""Serializes the Credential into a shallow dictionary of its immediate attributes."""
|
|
661
757
|
body = {}
|
|
662
|
-
if self.account_id is not None:
|
|
663
|
-
|
|
664
|
-
if self.
|
|
665
|
-
|
|
666
|
-
if self.
|
|
758
|
+
if self.account_id is not None:
|
|
759
|
+
body["account_id"] = self.account_id
|
|
760
|
+
if self.aws_credentials:
|
|
761
|
+
body["aws_credentials"] = self.aws_credentials
|
|
762
|
+
if self.creation_time is not None:
|
|
763
|
+
body["creation_time"] = self.creation_time
|
|
764
|
+
if self.credentials_id is not None:
|
|
765
|
+
body["credentials_id"] = self.credentials_id
|
|
766
|
+
if self.credentials_name is not None:
|
|
767
|
+
body["credentials_name"] = self.credentials_name
|
|
667
768
|
return body
|
|
668
769
|
|
|
669
770
|
@classmethod
|
|
670
|
-
def from_dict(cls, d: Dict[str,
|
|
771
|
+
def from_dict(cls, d: Dict[str, Any]) -> Credential:
|
|
671
772
|
"""Deserializes the Credential from a dictionary."""
|
|
672
|
-
return cls(
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
773
|
+
return cls(
|
|
774
|
+
account_id=d.get("account_id", None),
|
|
775
|
+
aws_credentials=_from_dict(d, "aws_credentials", AwsCredentials),
|
|
776
|
+
creation_time=d.get("creation_time", None),
|
|
777
|
+
credentials_id=d.get("credentials_id", None),
|
|
778
|
+
credentials_name=d.get("credentials_name", None),
|
|
779
|
+
)
|
|
677
780
|
|
|
678
781
|
|
|
679
782
|
CustomTags = Dict[str, str]
|
|
@@ -690,19 +793,21 @@ class CustomerFacingGcpCloudResourceContainer:
|
|
|
690
793
|
def as_dict(self) -> dict:
|
|
691
794
|
"""Serializes the CustomerFacingGcpCloudResourceContainer into a dictionary suitable for use as a JSON request body."""
|
|
692
795
|
body = {}
|
|
693
|
-
if self.project_id is not None:
|
|
796
|
+
if self.project_id is not None:
|
|
797
|
+
body["project_id"] = self.project_id
|
|
694
798
|
return body
|
|
695
799
|
|
|
696
800
|
def as_shallow_dict(self) -> dict:
|
|
697
801
|
"""Serializes the CustomerFacingGcpCloudResourceContainer into a shallow dictionary of its immediate attributes."""
|
|
698
802
|
body = {}
|
|
699
|
-
if self.project_id is not None:
|
|
803
|
+
if self.project_id is not None:
|
|
804
|
+
body["project_id"] = self.project_id
|
|
700
805
|
return body
|
|
701
806
|
|
|
702
807
|
@classmethod
|
|
703
|
-
def from_dict(cls, d: Dict[str,
|
|
808
|
+
def from_dict(cls, d: Dict[str, Any]) -> CustomerFacingGcpCloudResourceContainer:
|
|
704
809
|
"""Deserializes the CustomerFacingGcpCloudResourceContainer from a dictionary."""
|
|
705
|
-
return cls(project_id=d.get(
|
|
810
|
+
return cls(project_id=d.get("project_id", None))
|
|
706
811
|
|
|
707
812
|
|
|
708
813
|
@dataclass
|
|
@@ -726,41 +831,52 @@ class CustomerManagedKey:
|
|
|
726
831
|
def as_dict(self) -> dict:
|
|
727
832
|
"""Serializes the CustomerManagedKey into a dictionary suitable for use as a JSON request body."""
|
|
728
833
|
body = {}
|
|
729
|
-
if self.account_id is not None:
|
|
730
|
-
|
|
731
|
-
if self.
|
|
834
|
+
if self.account_id is not None:
|
|
835
|
+
body["account_id"] = self.account_id
|
|
836
|
+
if self.aws_key_info:
|
|
837
|
+
body["aws_key_info"] = self.aws_key_info.as_dict()
|
|
838
|
+
if self.creation_time is not None:
|
|
839
|
+
body["creation_time"] = self.creation_time
|
|
732
840
|
if self.customer_managed_key_id is not None:
|
|
733
|
-
body[
|
|
734
|
-
if self.gcp_key_info:
|
|
735
|
-
|
|
841
|
+
body["customer_managed_key_id"] = self.customer_managed_key_id
|
|
842
|
+
if self.gcp_key_info:
|
|
843
|
+
body["gcp_key_info"] = self.gcp_key_info.as_dict()
|
|
844
|
+
if self.use_cases:
|
|
845
|
+
body["use_cases"] = [v.value for v in self.use_cases]
|
|
736
846
|
return body
|
|
737
847
|
|
|
738
848
|
def as_shallow_dict(self) -> dict:
|
|
739
849
|
"""Serializes the CustomerManagedKey into a shallow dictionary of its immediate attributes."""
|
|
740
850
|
body = {}
|
|
741
|
-
if self.account_id is not None:
|
|
742
|
-
|
|
743
|
-
if self.
|
|
851
|
+
if self.account_id is not None:
|
|
852
|
+
body["account_id"] = self.account_id
|
|
853
|
+
if self.aws_key_info:
|
|
854
|
+
body["aws_key_info"] = self.aws_key_info
|
|
855
|
+
if self.creation_time is not None:
|
|
856
|
+
body["creation_time"] = self.creation_time
|
|
744
857
|
if self.customer_managed_key_id is not None:
|
|
745
|
-
body[
|
|
746
|
-
if self.gcp_key_info:
|
|
747
|
-
|
|
858
|
+
body["customer_managed_key_id"] = self.customer_managed_key_id
|
|
859
|
+
if self.gcp_key_info:
|
|
860
|
+
body["gcp_key_info"] = self.gcp_key_info
|
|
861
|
+
if self.use_cases:
|
|
862
|
+
body["use_cases"] = self.use_cases
|
|
748
863
|
return body
|
|
749
864
|
|
|
750
865
|
@classmethod
|
|
751
|
-
def from_dict(cls, d: Dict[str,
|
|
866
|
+
def from_dict(cls, d: Dict[str, Any]) -> CustomerManagedKey:
|
|
752
867
|
"""Deserializes the CustomerManagedKey from a dictionary."""
|
|
753
|
-
return cls(
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
868
|
+
return cls(
|
|
869
|
+
account_id=d.get("account_id", None),
|
|
870
|
+
aws_key_info=_from_dict(d, "aws_key_info", AwsKeyInfo),
|
|
871
|
+
creation_time=d.get("creation_time", None),
|
|
872
|
+
customer_managed_key_id=d.get("customer_managed_key_id", None),
|
|
873
|
+
gcp_key_info=_from_dict(d, "gcp_key_info", GcpKeyInfo),
|
|
874
|
+
use_cases=_repeated_enum(d, "use_cases", KeyUseCase),
|
|
875
|
+
)
|
|
759
876
|
|
|
760
877
|
|
|
761
878
|
@dataclass
|
|
762
879
|
class DeleteResponse:
|
|
763
|
-
|
|
764
880
|
def as_dict(self) -> dict:
|
|
765
881
|
"""Serializes the DeleteResponse into a dictionary suitable for use as a JSON request body."""
|
|
766
882
|
body = {}
|
|
@@ -772,7 +888,7 @@ class DeleteResponse:
|
|
|
772
888
|
return body
|
|
773
889
|
|
|
774
890
|
@classmethod
|
|
775
|
-
def from_dict(cls, d: Dict[str,
|
|
891
|
+
def from_dict(cls, d: Dict[str, Any]) -> DeleteResponse:
|
|
776
892
|
"""Deserializes the DeleteResponse from a dictionary."""
|
|
777
893
|
return cls()
|
|
778
894
|
|
|
@@ -780,22 +896,22 @@ class DeleteResponse:
|
|
|
780
896
|
class EndpointUseCase(Enum):
|
|
781
897
|
"""This enumeration represents the type of Databricks VPC [endpoint service] that was used when
|
|
782
898
|
creating this VPC endpoint.
|
|
783
|
-
|
|
899
|
+
|
|
784
900
|
[endpoint service]: https://docs.aws.amazon.com/vpc/latest/privatelink/endpoint-service.html"""
|
|
785
901
|
|
|
786
|
-
DATAPLANE_RELAY_ACCESS =
|
|
787
|
-
WORKSPACE_ACCESS =
|
|
902
|
+
DATAPLANE_RELAY_ACCESS = "DATAPLANE_RELAY_ACCESS"
|
|
903
|
+
WORKSPACE_ACCESS = "WORKSPACE_ACCESS"
|
|
788
904
|
|
|
789
905
|
|
|
790
906
|
class ErrorType(Enum):
|
|
791
907
|
"""The AWS resource associated with this error: credentials, VPC, subnet, security group, or
|
|
792
908
|
network ACL."""
|
|
793
909
|
|
|
794
|
-
CREDENTIALS =
|
|
795
|
-
NETWORK_ACL =
|
|
796
|
-
SECURITY_GROUP =
|
|
797
|
-
SUBNET =
|
|
798
|
-
VPC =
|
|
910
|
+
CREDENTIALS = "credentials"
|
|
911
|
+
NETWORK_ACL = "networkAcl"
|
|
912
|
+
SECURITY_GROUP = "securityGroup"
|
|
913
|
+
SUBNET = "subnet"
|
|
914
|
+
VPC = "vpc"
|
|
799
915
|
|
|
800
916
|
|
|
801
917
|
@dataclass
|
|
@@ -813,28 +929,32 @@ class ExternalCustomerInfo:
|
|
|
813
929
|
"""Serializes the ExternalCustomerInfo into a dictionary suitable for use as a JSON request body."""
|
|
814
930
|
body = {}
|
|
815
931
|
if self.authoritative_user_email is not None:
|
|
816
|
-
body[
|
|
932
|
+
body["authoritative_user_email"] = self.authoritative_user_email
|
|
817
933
|
if self.authoritative_user_full_name is not None:
|
|
818
|
-
body[
|
|
819
|
-
if self.customer_name is not None:
|
|
934
|
+
body["authoritative_user_full_name"] = self.authoritative_user_full_name
|
|
935
|
+
if self.customer_name is not None:
|
|
936
|
+
body["customer_name"] = self.customer_name
|
|
820
937
|
return body
|
|
821
938
|
|
|
822
939
|
def as_shallow_dict(self) -> dict:
|
|
823
940
|
"""Serializes the ExternalCustomerInfo into a shallow dictionary of its immediate attributes."""
|
|
824
941
|
body = {}
|
|
825
942
|
if self.authoritative_user_email is not None:
|
|
826
|
-
body[
|
|
943
|
+
body["authoritative_user_email"] = self.authoritative_user_email
|
|
827
944
|
if self.authoritative_user_full_name is not None:
|
|
828
|
-
body[
|
|
829
|
-
if self.customer_name is not None:
|
|
945
|
+
body["authoritative_user_full_name"] = self.authoritative_user_full_name
|
|
946
|
+
if self.customer_name is not None:
|
|
947
|
+
body["customer_name"] = self.customer_name
|
|
830
948
|
return body
|
|
831
949
|
|
|
832
950
|
@classmethod
|
|
833
|
-
def from_dict(cls, d: Dict[str,
|
|
951
|
+
def from_dict(cls, d: Dict[str, Any]) -> ExternalCustomerInfo:
|
|
834
952
|
"""Deserializes the ExternalCustomerInfo from a dictionary."""
|
|
835
|
-
return cls(
|
|
836
|
-
|
|
837
|
-
|
|
953
|
+
return cls(
|
|
954
|
+
authoritative_user_email=d.get("authoritative_user_email", None),
|
|
955
|
+
authoritative_user_full_name=d.get("authoritative_user_full_name", None),
|
|
956
|
+
customer_name=d.get("customer_name", None),
|
|
957
|
+
)
|
|
838
958
|
|
|
839
959
|
|
|
840
960
|
@dataclass
|
|
@@ -845,19 +965,21 @@ class GcpKeyInfo:
|
|
|
845
965
|
def as_dict(self) -> dict:
|
|
846
966
|
"""Serializes the GcpKeyInfo into a dictionary suitable for use as a JSON request body."""
|
|
847
967
|
body = {}
|
|
848
|
-
if self.kms_key_id is not None:
|
|
968
|
+
if self.kms_key_id is not None:
|
|
969
|
+
body["kms_key_id"] = self.kms_key_id
|
|
849
970
|
return body
|
|
850
971
|
|
|
851
972
|
def as_shallow_dict(self) -> dict:
|
|
852
973
|
"""Serializes the GcpKeyInfo into a shallow dictionary of its immediate attributes."""
|
|
853
974
|
body = {}
|
|
854
|
-
if self.kms_key_id is not None:
|
|
975
|
+
if self.kms_key_id is not None:
|
|
976
|
+
body["kms_key_id"] = self.kms_key_id
|
|
855
977
|
return body
|
|
856
978
|
|
|
857
979
|
@classmethod
|
|
858
|
-
def from_dict(cls, d: Dict[str,
|
|
980
|
+
def from_dict(cls, d: Dict[str, Any]) -> GcpKeyInfo:
|
|
859
981
|
"""Deserializes the GcpKeyInfo from a dictionary."""
|
|
860
|
-
return cls(kms_key_id=d.get(
|
|
982
|
+
return cls(kms_key_id=d.get("kms_key_id", None))
|
|
861
983
|
|
|
862
984
|
|
|
863
985
|
@dataclass
|
|
@@ -866,20 +988,21 @@ class GcpManagedNetworkConfig:
|
|
|
866
988
|
It is ignored if you specify a customer-managed VPC in the `network_id` field.", All the IP
|
|
867
989
|
range configurations must be mutually exclusive. An attempt to create a workspace fails if
|
|
868
990
|
Databricks detects an IP range overlap.
|
|
869
|
-
|
|
991
|
+
|
|
870
992
|
Specify custom IP ranges in CIDR format. The IP ranges for these fields must not overlap, and
|
|
871
993
|
all IP addresses must be entirely within the following ranges: `10.0.0.0/8`, `100.64.0.0/10`,
|
|
872
994
|
`172.16.0.0/12`, `192.168.0.0/16`, and `240.0.0.0/4`.
|
|
873
|
-
|
|
995
|
+
|
|
874
996
|
The sizes of these IP ranges affect the maximum number of nodes for the workspace.
|
|
875
|
-
|
|
997
|
+
|
|
876
998
|
**Important**: Confirm the IP ranges used by your Databricks workspace before creating the
|
|
877
999
|
workspace. You cannot change them after your workspace is deployed. If the IP address ranges for
|
|
878
1000
|
your Databricks are too small, IP exhaustion can occur, causing your Databricks jobs to fail. To
|
|
879
1001
|
determine the address range sizes that you need, Databricks provides a calculator as a Microsoft
|
|
880
1002
|
Excel spreadsheet. See [calculate subnet sizes for a new workspace].
|
|
881
|
-
|
|
882
|
-
[calculate subnet sizes for a new workspace]: https://docs.gcp.databricks.com/administration-guide/cloud-configurations/gcp/network-sizing.html
|
|
1003
|
+
|
|
1004
|
+
[calculate subnet sizes for a new workspace]: https://docs.gcp.databricks.com/administration-guide/cloud-configurations/gcp/network-sizing.html
|
|
1005
|
+
"""
|
|
883
1006
|
|
|
884
1007
|
gke_cluster_pod_ip_range: Optional[str] = None
|
|
885
1008
|
"""The IP range from which to allocate GKE cluster pods. No bigger than `/9` and no smaller than
|
|
@@ -897,28 +1020,32 @@ class GcpManagedNetworkConfig:
|
|
|
897
1020
|
"""Serializes the GcpManagedNetworkConfig into a dictionary suitable for use as a JSON request body."""
|
|
898
1021
|
body = {}
|
|
899
1022
|
if self.gke_cluster_pod_ip_range is not None:
|
|
900
|
-
body[
|
|
1023
|
+
body["gke_cluster_pod_ip_range"] = self.gke_cluster_pod_ip_range
|
|
901
1024
|
if self.gke_cluster_service_ip_range is not None:
|
|
902
|
-
body[
|
|
903
|
-
if self.subnet_cidr is not None:
|
|
1025
|
+
body["gke_cluster_service_ip_range"] = self.gke_cluster_service_ip_range
|
|
1026
|
+
if self.subnet_cidr is not None:
|
|
1027
|
+
body["subnet_cidr"] = self.subnet_cidr
|
|
904
1028
|
return body
|
|
905
1029
|
|
|
906
1030
|
def as_shallow_dict(self) -> dict:
|
|
907
1031
|
"""Serializes the GcpManagedNetworkConfig into a shallow dictionary of its immediate attributes."""
|
|
908
1032
|
body = {}
|
|
909
1033
|
if self.gke_cluster_pod_ip_range is not None:
|
|
910
|
-
body[
|
|
1034
|
+
body["gke_cluster_pod_ip_range"] = self.gke_cluster_pod_ip_range
|
|
911
1035
|
if self.gke_cluster_service_ip_range is not None:
|
|
912
|
-
body[
|
|
913
|
-
if self.subnet_cidr is not None:
|
|
1036
|
+
body["gke_cluster_service_ip_range"] = self.gke_cluster_service_ip_range
|
|
1037
|
+
if self.subnet_cidr is not None:
|
|
1038
|
+
body["subnet_cidr"] = self.subnet_cidr
|
|
914
1039
|
return body
|
|
915
1040
|
|
|
916
1041
|
@classmethod
|
|
917
|
-
def from_dict(cls, d: Dict[str,
|
|
1042
|
+
def from_dict(cls, d: Dict[str, Any]) -> GcpManagedNetworkConfig:
|
|
918
1043
|
"""Deserializes the GcpManagedNetworkConfig from a dictionary."""
|
|
919
|
-
return cls(
|
|
920
|
-
|
|
921
|
-
|
|
1044
|
+
return cls(
|
|
1045
|
+
gke_cluster_pod_ip_range=d.get("gke_cluster_pod_ip_range", None),
|
|
1046
|
+
gke_cluster_service_ip_range=d.get("gke_cluster_service_ip_range", None),
|
|
1047
|
+
subnet_cidr=d.get("subnet_cidr", None),
|
|
1048
|
+
)
|
|
922
1049
|
|
|
923
1050
|
|
|
924
1051
|
@dataclass
|
|
@@ -950,34 +1077,48 @@ class GcpNetworkInfo:
|
|
|
950
1077
|
def as_dict(self) -> dict:
|
|
951
1078
|
"""Serializes the GcpNetworkInfo into a dictionary suitable for use as a JSON request body."""
|
|
952
1079
|
body = {}
|
|
953
|
-
if self.network_project_id is not None:
|
|
954
|
-
|
|
955
|
-
if self.
|
|
956
|
-
|
|
957
|
-
if self.
|
|
958
|
-
|
|
1080
|
+
if self.network_project_id is not None:
|
|
1081
|
+
body["network_project_id"] = self.network_project_id
|
|
1082
|
+
if self.pod_ip_range_name is not None:
|
|
1083
|
+
body["pod_ip_range_name"] = self.pod_ip_range_name
|
|
1084
|
+
if self.service_ip_range_name is not None:
|
|
1085
|
+
body["service_ip_range_name"] = self.service_ip_range_name
|
|
1086
|
+
if self.subnet_id is not None:
|
|
1087
|
+
body["subnet_id"] = self.subnet_id
|
|
1088
|
+
if self.subnet_region is not None:
|
|
1089
|
+
body["subnet_region"] = self.subnet_region
|
|
1090
|
+
if self.vpc_id is not None:
|
|
1091
|
+
body["vpc_id"] = self.vpc_id
|
|
959
1092
|
return body
|
|
960
1093
|
|
|
961
1094
|
def as_shallow_dict(self) -> dict:
|
|
962
1095
|
"""Serializes the GcpNetworkInfo into a shallow dictionary of its immediate attributes."""
|
|
963
1096
|
body = {}
|
|
964
|
-
if self.network_project_id is not None:
|
|
965
|
-
|
|
966
|
-
if self.
|
|
967
|
-
|
|
968
|
-
if self.
|
|
969
|
-
|
|
1097
|
+
if self.network_project_id is not None:
|
|
1098
|
+
body["network_project_id"] = self.network_project_id
|
|
1099
|
+
if self.pod_ip_range_name is not None:
|
|
1100
|
+
body["pod_ip_range_name"] = self.pod_ip_range_name
|
|
1101
|
+
if self.service_ip_range_name is not None:
|
|
1102
|
+
body["service_ip_range_name"] = self.service_ip_range_name
|
|
1103
|
+
if self.subnet_id is not None:
|
|
1104
|
+
body["subnet_id"] = self.subnet_id
|
|
1105
|
+
if self.subnet_region is not None:
|
|
1106
|
+
body["subnet_region"] = self.subnet_region
|
|
1107
|
+
if self.vpc_id is not None:
|
|
1108
|
+
body["vpc_id"] = self.vpc_id
|
|
970
1109
|
return body
|
|
971
1110
|
|
|
972
1111
|
@classmethod
|
|
973
|
-
def from_dict(cls, d: Dict[str,
|
|
1112
|
+
def from_dict(cls, d: Dict[str, Any]) -> GcpNetworkInfo:
|
|
974
1113
|
"""Deserializes the GcpNetworkInfo from a dictionary."""
|
|
975
|
-
return cls(
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1114
|
+
return cls(
|
|
1115
|
+
network_project_id=d.get("network_project_id", None),
|
|
1116
|
+
pod_ip_range_name=d.get("pod_ip_range_name", None),
|
|
1117
|
+
service_ip_range_name=d.get("service_ip_range_name", None),
|
|
1118
|
+
subnet_id=d.get("subnet_id", None),
|
|
1119
|
+
subnet_region=d.get("subnet_region", None),
|
|
1120
|
+
vpc_id=d.get("vpc_id", None),
|
|
1121
|
+
)
|
|
981
1122
|
|
|
982
1123
|
|
|
983
1124
|
@dataclass
|
|
@@ -1002,31 +1143,43 @@ class GcpVpcEndpointInfo:
|
|
|
1002
1143
|
def as_dict(self) -> dict:
|
|
1003
1144
|
"""Serializes the GcpVpcEndpointInfo into a dictionary suitable for use as a JSON request body."""
|
|
1004
1145
|
body = {}
|
|
1005
|
-
if self.endpoint_region is not None:
|
|
1006
|
-
|
|
1007
|
-
if self.
|
|
1008
|
-
|
|
1009
|
-
if self.
|
|
1146
|
+
if self.endpoint_region is not None:
|
|
1147
|
+
body["endpoint_region"] = self.endpoint_region
|
|
1148
|
+
if self.project_id is not None:
|
|
1149
|
+
body["project_id"] = self.project_id
|
|
1150
|
+
if self.psc_connection_id is not None:
|
|
1151
|
+
body["psc_connection_id"] = self.psc_connection_id
|
|
1152
|
+
if self.psc_endpoint_name is not None:
|
|
1153
|
+
body["psc_endpoint_name"] = self.psc_endpoint_name
|
|
1154
|
+
if self.service_attachment_id is not None:
|
|
1155
|
+
body["service_attachment_id"] = self.service_attachment_id
|
|
1010
1156
|
return body
|
|
1011
1157
|
|
|
1012
1158
|
def as_shallow_dict(self) -> dict:
|
|
1013
1159
|
"""Serializes the GcpVpcEndpointInfo into a shallow dictionary of its immediate attributes."""
|
|
1014
1160
|
body = {}
|
|
1015
|
-
if self.endpoint_region is not None:
|
|
1016
|
-
|
|
1017
|
-
if self.
|
|
1018
|
-
|
|
1019
|
-
if self.
|
|
1161
|
+
if self.endpoint_region is not None:
|
|
1162
|
+
body["endpoint_region"] = self.endpoint_region
|
|
1163
|
+
if self.project_id is not None:
|
|
1164
|
+
body["project_id"] = self.project_id
|
|
1165
|
+
if self.psc_connection_id is not None:
|
|
1166
|
+
body["psc_connection_id"] = self.psc_connection_id
|
|
1167
|
+
if self.psc_endpoint_name is not None:
|
|
1168
|
+
body["psc_endpoint_name"] = self.psc_endpoint_name
|
|
1169
|
+
if self.service_attachment_id is not None:
|
|
1170
|
+
body["service_attachment_id"] = self.service_attachment_id
|
|
1020
1171
|
return body
|
|
1021
1172
|
|
|
1022
1173
|
@classmethod
|
|
1023
|
-
def from_dict(cls, d: Dict[str,
|
|
1174
|
+
def from_dict(cls, d: Dict[str, Any]) -> GcpVpcEndpointInfo:
|
|
1024
1175
|
"""Deserializes the GcpVpcEndpointInfo from a dictionary."""
|
|
1025
|
-
return cls(
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1176
|
+
return cls(
|
|
1177
|
+
endpoint_region=d.get("endpoint_region", None),
|
|
1178
|
+
project_id=d.get("project_id", None),
|
|
1179
|
+
psc_connection_id=d.get("psc_connection_id", None),
|
|
1180
|
+
psc_endpoint_name=d.get("psc_endpoint_name", None),
|
|
1181
|
+
service_attachment_id=d.get("service_attachment_id", None),
|
|
1182
|
+
)
|
|
1030
1183
|
|
|
1031
1184
|
|
|
1032
1185
|
@dataclass
|
|
@@ -1051,35 +1204,41 @@ class GkeConfig:
|
|
|
1051
1204
|
def as_dict(self) -> dict:
|
|
1052
1205
|
"""Serializes the GkeConfig into a dictionary suitable for use as a JSON request body."""
|
|
1053
1206
|
body = {}
|
|
1054
|
-
if self.connectivity_type is not None:
|
|
1055
|
-
|
|
1207
|
+
if self.connectivity_type is not None:
|
|
1208
|
+
body["connectivity_type"] = self.connectivity_type.value
|
|
1209
|
+
if self.master_ip_range is not None:
|
|
1210
|
+
body["master_ip_range"] = self.master_ip_range
|
|
1056
1211
|
return body
|
|
1057
1212
|
|
|
1058
1213
|
def as_shallow_dict(self) -> dict:
|
|
1059
1214
|
"""Serializes the GkeConfig into a shallow dictionary of its immediate attributes."""
|
|
1060
1215
|
body = {}
|
|
1061
|
-
if self.connectivity_type is not None:
|
|
1062
|
-
|
|
1216
|
+
if self.connectivity_type is not None:
|
|
1217
|
+
body["connectivity_type"] = self.connectivity_type
|
|
1218
|
+
if self.master_ip_range is not None:
|
|
1219
|
+
body["master_ip_range"] = self.master_ip_range
|
|
1063
1220
|
return body
|
|
1064
1221
|
|
|
1065
1222
|
@classmethod
|
|
1066
|
-
def from_dict(cls, d: Dict[str,
|
|
1223
|
+
def from_dict(cls, d: Dict[str, Any]) -> GkeConfig:
|
|
1067
1224
|
"""Deserializes the GkeConfig from a dictionary."""
|
|
1068
|
-
return cls(
|
|
1069
|
-
|
|
1225
|
+
return cls(
|
|
1226
|
+
connectivity_type=_enum(d, "connectivity_type", GkeConfigConnectivityType),
|
|
1227
|
+
master_ip_range=d.get("master_ip_range", None),
|
|
1228
|
+
)
|
|
1070
1229
|
|
|
1071
1230
|
|
|
1072
1231
|
class GkeConfigConnectivityType(Enum):
|
|
1073
1232
|
"""Specifies the network connectivity types for the GKE nodes and the GKE master network.
|
|
1074
|
-
|
|
1233
|
+
|
|
1075
1234
|
Set to `PRIVATE_NODE_PUBLIC_MASTER` for a private GKE cluster for the workspace. The GKE nodes
|
|
1076
1235
|
will not have public IPs.
|
|
1077
|
-
|
|
1236
|
+
|
|
1078
1237
|
Set to `PUBLIC_NODE_PUBLIC_MASTER` for a public GKE cluster. The nodes of a public GKE cluster
|
|
1079
1238
|
have public IP addresses."""
|
|
1080
1239
|
|
|
1081
|
-
PRIVATE_NODE_PUBLIC_MASTER =
|
|
1082
|
-
PUBLIC_NODE_PUBLIC_MASTER =
|
|
1240
|
+
PRIVATE_NODE_PUBLIC_MASTER = "PRIVATE_NODE_PUBLIC_MASTER"
|
|
1241
|
+
PUBLIC_NODE_PUBLIC_MASTER = "PUBLIC_NODE_PUBLIC_MASTER"
|
|
1083
1242
|
|
|
1084
1243
|
|
|
1085
1244
|
class KeyUseCase(Enum):
|
|
@@ -1087,8 +1246,8 @@ class KeyUseCase(Enum):
|
|
|
1087
1246
|
plane * `STORAGE`: Encrypts the workspace's root S3 bucket (root DBFS and system data) and,
|
|
1088
1247
|
optionally, cluster EBS volumes."""
|
|
1089
1248
|
|
|
1090
|
-
MANAGED_SERVICES =
|
|
1091
|
-
STORAGE =
|
|
1249
|
+
MANAGED_SERVICES = "MANAGED_SERVICES"
|
|
1250
|
+
STORAGE = "STORAGE"
|
|
1092
1251
|
|
|
1093
1252
|
|
|
1094
1253
|
@dataclass
|
|
@@ -1139,55 +1298,83 @@ class Network:
|
|
|
1139
1298
|
def as_dict(self) -> dict:
|
|
1140
1299
|
"""Serializes the Network into a dictionary suitable for use as a JSON request body."""
|
|
1141
1300
|
body = {}
|
|
1142
|
-
if self.account_id is not None:
|
|
1143
|
-
|
|
1144
|
-
if self.
|
|
1145
|
-
|
|
1146
|
-
if self.
|
|
1147
|
-
|
|
1148
|
-
if self.
|
|
1149
|
-
|
|
1150
|
-
if self.
|
|
1151
|
-
|
|
1152
|
-
if self.
|
|
1153
|
-
|
|
1154
|
-
if self.
|
|
1301
|
+
if self.account_id is not None:
|
|
1302
|
+
body["account_id"] = self.account_id
|
|
1303
|
+
if self.creation_time is not None:
|
|
1304
|
+
body["creation_time"] = self.creation_time
|
|
1305
|
+
if self.error_messages:
|
|
1306
|
+
body["error_messages"] = [v.as_dict() for v in self.error_messages]
|
|
1307
|
+
if self.gcp_network_info:
|
|
1308
|
+
body["gcp_network_info"] = self.gcp_network_info.as_dict()
|
|
1309
|
+
if self.network_id is not None:
|
|
1310
|
+
body["network_id"] = self.network_id
|
|
1311
|
+
if self.network_name is not None:
|
|
1312
|
+
body["network_name"] = self.network_name
|
|
1313
|
+
if self.security_group_ids:
|
|
1314
|
+
body["security_group_ids"] = [v for v in self.security_group_ids]
|
|
1315
|
+
if self.subnet_ids:
|
|
1316
|
+
body["subnet_ids"] = [v for v in self.subnet_ids]
|
|
1317
|
+
if self.vpc_endpoints:
|
|
1318
|
+
body["vpc_endpoints"] = self.vpc_endpoints.as_dict()
|
|
1319
|
+
if self.vpc_id is not None:
|
|
1320
|
+
body["vpc_id"] = self.vpc_id
|
|
1321
|
+
if self.vpc_status is not None:
|
|
1322
|
+
body["vpc_status"] = self.vpc_status.value
|
|
1323
|
+
if self.warning_messages:
|
|
1324
|
+
body["warning_messages"] = [v.as_dict() for v in self.warning_messages]
|
|
1325
|
+
if self.workspace_id is not None:
|
|
1326
|
+
body["workspace_id"] = self.workspace_id
|
|
1155
1327
|
return body
|
|
1156
1328
|
|
|
1157
1329
|
def as_shallow_dict(self) -> dict:
|
|
1158
1330
|
"""Serializes the Network into a shallow dictionary of its immediate attributes."""
|
|
1159
1331
|
body = {}
|
|
1160
|
-
if self.account_id is not None:
|
|
1161
|
-
|
|
1162
|
-
if self.
|
|
1163
|
-
|
|
1164
|
-
if self.
|
|
1165
|
-
|
|
1166
|
-
if self.
|
|
1167
|
-
|
|
1168
|
-
if self.
|
|
1169
|
-
|
|
1170
|
-
if self.
|
|
1171
|
-
|
|
1172
|
-
if self.
|
|
1332
|
+
if self.account_id is not None:
|
|
1333
|
+
body["account_id"] = self.account_id
|
|
1334
|
+
if self.creation_time is not None:
|
|
1335
|
+
body["creation_time"] = self.creation_time
|
|
1336
|
+
if self.error_messages:
|
|
1337
|
+
body["error_messages"] = self.error_messages
|
|
1338
|
+
if self.gcp_network_info:
|
|
1339
|
+
body["gcp_network_info"] = self.gcp_network_info
|
|
1340
|
+
if self.network_id is not None:
|
|
1341
|
+
body["network_id"] = self.network_id
|
|
1342
|
+
if self.network_name is not None:
|
|
1343
|
+
body["network_name"] = self.network_name
|
|
1344
|
+
if self.security_group_ids:
|
|
1345
|
+
body["security_group_ids"] = self.security_group_ids
|
|
1346
|
+
if self.subnet_ids:
|
|
1347
|
+
body["subnet_ids"] = self.subnet_ids
|
|
1348
|
+
if self.vpc_endpoints:
|
|
1349
|
+
body["vpc_endpoints"] = self.vpc_endpoints
|
|
1350
|
+
if self.vpc_id is not None:
|
|
1351
|
+
body["vpc_id"] = self.vpc_id
|
|
1352
|
+
if self.vpc_status is not None:
|
|
1353
|
+
body["vpc_status"] = self.vpc_status
|
|
1354
|
+
if self.warning_messages:
|
|
1355
|
+
body["warning_messages"] = self.warning_messages
|
|
1356
|
+
if self.workspace_id is not None:
|
|
1357
|
+
body["workspace_id"] = self.workspace_id
|
|
1173
1358
|
return body
|
|
1174
1359
|
|
|
1175
1360
|
@classmethod
|
|
1176
|
-
def from_dict(cls, d: Dict[str,
|
|
1361
|
+
def from_dict(cls, d: Dict[str, Any]) -> Network:
|
|
1177
1362
|
"""Deserializes the Network from a dictionary."""
|
|
1178
|
-
return cls(
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1363
|
+
return cls(
|
|
1364
|
+
account_id=d.get("account_id", None),
|
|
1365
|
+
creation_time=d.get("creation_time", None),
|
|
1366
|
+
error_messages=_repeated_dict(d, "error_messages", NetworkHealth),
|
|
1367
|
+
gcp_network_info=_from_dict(d, "gcp_network_info", GcpNetworkInfo),
|
|
1368
|
+
network_id=d.get("network_id", None),
|
|
1369
|
+
network_name=d.get("network_name", None),
|
|
1370
|
+
security_group_ids=d.get("security_group_ids", None),
|
|
1371
|
+
subnet_ids=d.get("subnet_ids", None),
|
|
1372
|
+
vpc_endpoints=_from_dict(d, "vpc_endpoints", NetworkVpcEndpoints),
|
|
1373
|
+
vpc_id=d.get("vpc_id", None),
|
|
1374
|
+
vpc_status=_enum(d, "vpc_status", VpcStatus),
|
|
1375
|
+
warning_messages=_repeated_dict(d, "warning_messages", NetworkWarning),
|
|
1376
|
+
workspace_id=d.get("workspace_id", None),
|
|
1377
|
+
)
|
|
1191
1378
|
|
|
1192
1379
|
|
|
1193
1380
|
@dataclass
|
|
@@ -1202,28 +1389,32 @@ class NetworkHealth:
|
|
|
1202
1389
|
def as_dict(self) -> dict:
|
|
1203
1390
|
"""Serializes the NetworkHealth into a dictionary suitable for use as a JSON request body."""
|
|
1204
1391
|
body = {}
|
|
1205
|
-
if self.error_message is not None:
|
|
1206
|
-
|
|
1392
|
+
if self.error_message is not None:
|
|
1393
|
+
body["error_message"] = self.error_message
|
|
1394
|
+
if self.error_type is not None:
|
|
1395
|
+
body["error_type"] = self.error_type.value
|
|
1207
1396
|
return body
|
|
1208
1397
|
|
|
1209
1398
|
def as_shallow_dict(self) -> dict:
|
|
1210
1399
|
"""Serializes the NetworkHealth into a shallow dictionary of its immediate attributes."""
|
|
1211
1400
|
body = {}
|
|
1212
|
-
if self.error_message is not None:
|
|
1213
|
-
|
|
1401
|
+
if self.error_message is not None:
|
|
1402
|
+
body["error_message"] = self.error_message
|
|
1403
|
+
if self.error_type is not None:
|
|
1404
|
+
body["error_type"] = self.error_type
|
|
1214
1405
|
return body
|
|
1215
1406
|
|
|
1216
1407
|
@classmethod
|
|
1217
|
-
def from_dict(cls, d: Dict[str,
|
|
1408
|
+
def from_dict(cls, d: Dict[str, Any]) -> NetworkHealth:
|
|
1218
1409
|
"""Deserializes the NetworkHealth from a dictionary."""
|
|
1219
|
-
return cls(error_message=d.get(
|
|
1410
|
+
return cls(error_message=d.get("error_message", None), error_type=_enum(d, "error_type", ErrorType))
|
|
1220
1411
|
|
|
1221
1412
|
|
|
1222
1413
|
@dataclass
|
|
1223
1414
|
class NetworkVpcEndpoints:
|
|
1224
1415
|
"""If specified, contains the VPC endpoints used to allow cluster communication from this VPC over
|
|
1225
1416
|
[AWS PrivateLink].
|
|
1226
|
-
|
|
1417
|
+
|
|
1227
1418
|
[AWS PrivateLink]: https://aws.amazon.com/privatelink/"""
|
|
1228
1419
|
|
|
1229
1420
|
rest_api: List[str]
|
|
@@ -1236,21 +1427,25 @@ class NetworkVpcEndpoints:
|
|
|
1236
1427
|
def as_dict(self) -> dict:
|
|
1237
1428
|
"""Serializes the NetworkVpcEndpoints into a dictionary suitable for use as a JSON request body."""
|
|
1238
1429
|
body = {}
|
|
1239
|
-
if self.dataplane_relay:
|
|
1240
|
-
|
|
1430
|
+
if self.dataplane_relay:
|
|
1431
|
+
body["dataplane_relay"] = [v for v in self.dataplane_relay]
|
|
1432
|
+
if self.rest_api:
|
|
1433
|
+
body["rest_api"] = [v for v in self.rest_api]
|
|
1241
1434
|
return body
|
|
1242
1435
|
|
|
1243
1436
|
def as_shallow_dict(self) -> dict:
|
|
1244
1437
|
"""Serializes the NetworkVpcEndpoints into a shallow dictionary of its immediate attributes."""
|
|
1245
1438
|
body = {}
|
|
1246
|
-
if self.dataplane_relay:
|
|
1247
|
-
|
|
1439
|
+
if self.dataplane_relay:
|
|
1440
|
+
body["dataplane_relay"] = self.dataplane_relay
|
|
1441
|
+
if self.rest_api:
|
|
1442
|
+
body["rest_api"] = self.rest_api
|
|
1248
1443
|
return body
|
|
1249
1444
|
|
|
1250
1445
|
@classmethod
|
|
1251
|
-
def from_dict(cls, d: Dict[str,
|
|
1446
|
+
def from_dict(cls, d: Dict[str, Any]) -> NetworkVpcEndpoints:
|
|
1252
1447
|
"""Deserializes the NetworkVpcEndpoints from a dictionary."""
|
|
1253
|
-
return cls(dataplane_relay=d.get(
|
|
1448
|
+
return cls(dataplane_relay=d.get("dataplane_relay", None), rest_api=d.get("rest_api", None))
|
|
1254
1449
|
|
|
1255
1450
|
|
|
1256
1451
|
@dataclass
|
|
@@ -1264,35 +1459,38 @@ class NetworkWarning:
|
|
|
1264
1459
|
def as_dict(self) -> dict:
|
|
1265
1460
|
"""Serializes the NetworkWarning into a dictionary suitable for use as a JSON request body."""
|
|
1266
1461
|
body = {}
|
|
1267
|
-
if self.warning_message is not None:
|
|
1268
|
-
|
|
1462
|
+
if self.warning_message is not None:
|
|
1463
|
+
body["warning_message"] = self.warning_message
|
|
1464
|
+
if self.warning_type is not None:
|
|
1465
|
+
body["warning_type"] = self.warning_type.value
|
|
1269
1466
|
return body
|
|
1270
1467
|
|
|
1271
1468
|
def as_shallow_dict(self) -> dict:
|
|
1272
1469
|
"""Serializes the NetworkWarning into a shallow dictionary of its immediate attributes."""
|
|
1273
1470
|
body = {}
|
|
1274
|
-
if self.warning_message is not None:
|
|
1275
|
-
|
|
1471
|
+
if self.warning_message is not None:
|
|
1472
|
+
body["warning_message"] = self.warning_message
|
|
1473
|
+
if self.warning_type is not None:
|
|
1474
|
+
body["warning_type"] = self.warning_type
|
|
1276
1475
|
return body
|
|
1277
1476
|
|
|
1278
1477
|
@classmethod
|
|
1279
|
-
def from_dict(cls, d: Dict[str,
|
|
1478
|
+
def from_dict(cls, d: Dict[str, Any]) -> NetworkWarning:
|
|
1280
1479
|
"""Deserializes the NetworkWarning from a dictionary."""
|
|
1281
|
-
return cls(warning_message=d.get(
|
|
1282
|
-
warning_type=_enum(d, 'warning_type', WarningType))
|
|
1480
|
+
return cls(warning_message=d.get("warning_message", None), warning_type=_enum(d, "warning_type", WarningType))
|
|
1283
1481
|
|
|
1284
1482
|
|
|
1285
1483
|
class PricingTier(Enum):
|
|
1286
1484
|
"""The pricing tier of the workspace. For pricing tier information, see [AWS Pricing].
|
|
1287
|
-
|
|
1485
|
+
|
|
1288
1486
|
[AWS Pricing]: https://databricks.com/product/aws-pricing"""
|
|
1289
1487
|
|
|
1290
|
-
COMMUNITY_EDITION =
|
|
1291
|
-
DEDICATED =
|
|
1292
|
-
ENTERPRISE =
|
|
1293
|
-
PREMIUM =
|
|
1294
|
-
STANDARD =
|
|
1295
|
-
UNKNOWN =
|
|
1488
|
+
COMMUNITY_EDITION = "COMMUNITY_EDITION"
|
|
1489
|
+
DEDICATED = "DEDICATED"
|
|
1490
|
+
ENTERPRISE = "ENTERPRISE"
|
|
1491
|
+
PREMIUM = "PREMIUM"
|
|
1492
|
+
STANDARD = "STANDARD"
|
|
1493
|
+
UNKNOWN = "UNKNOWN"
|
|
1296
1494
|
|
|
1297
1495
|
|
|
1298
1496
|
class PrivateAccessLevel(Enum):
|
|
@@ -1302,8 +1500,8 @@ class PrivateAccessLevel(Enum):
|
|
|
1302
1500
|
your workspace. * `ENDPOINT` level access allows only specified VPC endpoints connect to your
|
|
1303
1501
|
workspace. For details, see `allowed_vpc_endpoint_ids`."""
|
|
1304
1502
|
|
|
1305
|
-
ACCOUNT =
|
|
1306
|
-
ENDPOINT =
|
|
1503
|
+
ACCOUNT = "ACCOUNT"
|
|
1504
|
+
ENDPOINT = "ENDPOINT"
|
|
1307
1505
|
|
|
1308
1506
|
|
|
1309
1507
|
@dataclass
|
|
@@ -1339,48 +1537,57 @@ class PrivateAccessSettings:
|
|
|
1339
1537
|
def as_dict(self) -> dict:
|
|
1340
1538
|
"""Serializes the PrivateAccessSettings into a dictionary suitable for use as a JSON request body."""
|
|
1341
1539
|
body = {}
|
|
1342
|
-
if self.account_id is not None:
|
|
1540
|
+
if self.account_id is not None:
|
|
1541
|
+
body["account_id"] = self.account_id
|
|
1343
1542
|
if self.allowed_vpc_endpoint_ids:
|
|
1344
|
-
body[
|
|
1543
|
+
body["allowed_vpc_endpoint_ids"] = [v for v in self.allowed_vpc_endpoint_ids]
|
|
1345
1544
|
if self.private_access_level is not None:
|
|
1346
|
-
body[
|
|
1545
|
+
body["private_access_level"] = self.private_access_level.value
|
|
1347
1546
|
if self.private_access_settings_id is not None:
|
|
1348
|
-
body[
|
|
1547
|
+
body["private_access_settings_id"] = self.private_access_settings_id
|
|
1349
1548
|
if self.private_access_settings_name is not None:
|
|
1350
|
-
body[
|
|
1351
|
-
if self.public_access_enabled is not None:
|
|
1352
|
-
|
|
1549
|
+
body["private_access_settings_name"] = self.private_access_settings_name
|
|
1550
|
+
if self.public_access_enabled is not None:
|
|
1551
|
+
body["public_access_enabled"] = self.public_access_enabled
|
|
1552
|
+
if self.region is not None:
|
|
1553
|
+
body["region"] = self.region
|
|
1353
1554
|
return body
|
|
1354
1555
|
|
|
1355
1556
|
def as_shallow_dict(self) -> dict:
|
|
1356
1557
|
"""Serializes the PrivateAccessSettings into a shallow dictionary of its immediate attributes."""
|
|
1357
1558
|
body = {}
|
|
1358
|
-
if self.account_id is not None:
|
|
1359
|
-
|
|
1360
|
-
if self.
|
|
1559
|
+
if self.account_id is not None:
|
|
1560
|
+
body["account_id"] = self.account_id
|
|
1561
|
+
if self.allowed_vpc_endpoint_ids:
|
|
1562
|
+
body["allowed_vpc_endpoint_ids"] = self.allowed_vpc_endpoint_ids
|
|
1563
|
+
if self.private_access_level is not None:
|
|
1564
|
+
body["private_access_level"] = self.private_access_level
|
|
1361
1565
|
if self.private_access_settings_id is not None:
|
|
1362
|
-
body[
|
|
1566
|
+
body["private_access_settings_id"] = self.private_access_settings_id
|
|
1363
1567
|
if self.private_access_settings_name is not None:
|
|
1364
|
-
body[
|
|
1365
|
-
if self.public_access_enabled is not None:
|
|
1366
|
-
|
|
1568
|
+
body["private_access_settings_name"] = self.private_access_settings_name
|
|
1569
|
+
if self.public_access_enabled is not None:
|
|
1570
|
+
body["public_access_enabled"] = self.public_access_enabled
|
|
1571
|
+
if self.region is not None:
|
|
1572
|
+
body["region"] = self.region
|
|
1367
1573
|
return body
|
|
1368
1574
|
|
|
1369
1575
|
@classmethod
|
|
1370
|
-
def from_dict(cls, d: Dict[str,
|
|
1576
|
+
def from_dict(cls, d: Dict[str, Any]) -> PrivateAccessSettings:
|
|
1371
1577
|
"""Deserializes the PrivateAccessSettings from a dictionary."""
|
|
1372
|
-
return cls(
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1578
|
+
return cls(
|
|
1579
|
+
account_id=d.get("account_id", None),
|
|
1580
|
+
allowed_vpc_endpoint_ids=d.get("allowed_vpc_endpoint_ids", None),
|
|
1581
|
+
private_access_level=_enum(d, "private_access_level", PrivateAccessLevel),
|
|
1582
|
+
private_access_settings_id=d.get("private_access_settings_id", None),
|
|
1583
|
+
private_access_settings_name=d.get("private_access_settings_name", None),
|
|
1584
|
+
public_access_enabled=d.get("public_access_enabled", None),
|
|
1585
|
+
region=d.get("region", None),
|
|
1586
|
+
)
|
|
1379
1587
|
|
|
1380
1588
|
|
|
1381
1589
|
@dataclass
|
|
1382
1590
|
class ReplaceResponse:
|
|
1383
|
-
|
|
1384
1591
|
def as_dict(self) -> dict:
|
|
1385
1592
|
"""Serializes the ReplaceResponse into a dictionary suitable for use as a JSON request body."""
|
|
1386
1593
|
body = {}
|
|
@@ -1392,7 +1599,7 @@ class ReplaceResponse:
|
|
|
1392
1599
|
return body
|
|
1393
1600
|
|
|
1394
1601
|
@classmethod
|
|
1395
|
-
def from_dict(cls, d: Dict[str,
|
|
1602
|
+
def from_dict(cls, d: Dict[str, Any]) -> ReplaceResponse:
|
|
1396
1603
|
"""Deserializes the ReplaceResponse from a dictionary."""
|
|
1397
1604
|
return cls()
|
|
1398
1605
|
|
|
@@ -1407,19 +1614,21 @@ class RootBucketInfo:
|
|
|
1407
1614
|
def as_dict(self) -> dict:
|
|
1408
1615
|
"""Serializes the RootBucketInfo into a dictionary suitable for use as a JSON request body."""
|
|
1409
1616
|
body = {}
|
|
1410
|
-
if self.bucket_name is not None:
|
|
1617
|
+
if self.bucket_name is not None:
|
|
1618
|
+
body["bucket_name"] = self.bucket_name
|
|
1411
1619
|
return body
|
|
1412
1620
|
|
|
1413
1621
|
def as_shallow_dict(self) -> dict:
|
|
1414
1622
|
"""Serializes the RootBucketInfo into a shallow dictionary of its immediate attributes."""
|
|
1415
1623
|
body = {}
|
|
1416
|
-
if self.bucket_name is not None:
|
|
1624
|
+
if self.bucket_name is not None:
|
|
1625
|
+
body["bucket_name"] = self.bucket_name
|
|
1417
1626
|
return body
|
|
1418
1627
|
|
|
1419
1628
|
@classmethod
|
|
1420
|
-
def from_dict(cls, d: Dict[str,
|
|
1629
|
+
def from_dict(cls, d: Dict[str, Any]) -> RootBucketInfo:
|
|
1421
1630
|
"""Deserializes the RootBucketInfo from a dictionary."""
|
|
1422
|
-
return cls(bucket_name=d.get(
|
|
1631
|
+
return cls(bucket_name=d.get("bucket_name", None))
|
|
1423
1632
|
|
|
1424
1633
|
|
|
1425
1634
|
@dataclass
|
|
@@ -1442,35 +1651,43 @@ class StorageConfiguration:
|
|
|
1442
1651
|
def as_dict(self) -> dict:
|
|
1443
1652
|
"""Serializes the StorageConfiguration into a dictionary suitable for use as a JSON request body."""
|
|
1444
1653
|
body = {}
|
|
1445
|
-
if self.account_id is not None:
|
|
1446
|
-
|
|
1447
|
-
if self.
|
|
1654
|
+
if self.account_id is not None:
|
|
1655
|
+
body["account_id"] = self.account_id
|
|
1656
|
+
if self.creation_time is not None:
|
|
1657
|
+
body["creation_time"] = self.creation_time
|
|
1658
|
+
if self.root_bucket_info:
|
|
1659
|
+
body["root_bucket_info"] = self.root_bucket_info.as_dict()
|
|
1448
1660
|
if self.storage_configuration_id is not None:
|
|
1449
|
-
body[
|
|
1661
|
+
body["storage_configuration_id"] = self.storage_configuration_id
|
|
1450
1662
|
if self.storage_configuration_name is not None:
|
|
1451
|
-
body[
|
|
1663
|
+
body["storage_configuration_name"] = self.storage_configuration_name
|
|
1452
1664
|
return body
|
|
1453
1665
|
|
|
1454
1666
|
def as_shallow_dict(self) -> dict:
|
|
1455
1667
|
"""Serializes the StorageConfiguration into a shallow dictionary of its immediate attributes."""
|
|
1456
1668
|
body = {}
|
|
1457
|
-
if self.account_id is not None:
|
|
1458
|
-
|
|
1459
|
-
if self.
|
|
1669
|
+
if self.account_id is not None:
|
|
1670
|
+
body["account_id"] = self.account_id
|
|
1671
|
+
if self.creation_time is not None:
|
|
1672
|
+
body["creation_time"] = self.creation_time
|
|
1673
|
+
if self.root_bucket_info:
|
|
1674
|
+
body["root_bucket_info"] = self.root_bucket_info
|
|
1460
1675
|
if self.storage_configuration_id is not None:
|
|
1461
|
-
body[
|
|
1676
|
+
body["storage_configuration_id"] = self.storage_configuration_id
|
|
1462
1677
|
if self.storage_configuration_name is not None:
|
|
1463
|
-
body[
|
|
1678
|
+
body["storage_configuration_name"] = self.storage_configuration_name
|
|
1464
1679
|
return body
|
|
1465
1680
|
|
|
1466
1681
|
@classmethod
|
|
1467
|
-
def from_dict(cls, d: Dict[str,
|
|
1682
|
+
def from_dict(cls, d: Dict[str, Any]) -> StorageConfiguration:
|
|
1468
1683
|
"""Deserializes the StorageConfiguration from a dictionary."""
|
|
1469
|
-
return cls(
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1684
|
+
return cls(
|
|
1685
|
+
account_id=d.get("account_id", None),
|
|
1686
|
+
creation_time=d.get("creation_time", None),
|
|
1687
|
+
root_bucket_info=_from_dict(d, "root_bucket_info", RootBucketInfo),
|
|
1688
|
+
storage_configuration_id=d.get("storage_configuration_id", None),
|
|
1689
|
+
storage_configuration_name=d.get("storage_configuration_name", None),
|
|
1690
|
+
)
|
|
1474
1691
|
|
|
1475
1692
|
|
|
1476
1693
|
@dataclass
|
|
@@ -1485,26 +1702,29 @@ class StsRole:
|
|
|
1485
1702
|
def as_dict(self) -> dict:
|
|
1486
1703
|
"""Serializes the StsRole into a dictionary suitable for use as a JSON request body."""
|
|
1487
1704
|
body = {}
|
|
1488
|
-
if self.external_id is not None:
|
|
1489
|
-
|
|
1705
|
+
if self.external_id is not None:
|
|
1706
|
+
body["external_id"] = self.external_id
|
|
1707
|
+
if self.role_arn is not None:
|
|
1708
|
+
body["role_arn"] = self.role_arn
|
|
1490
1709
|
return body
|
|
1491
1710
|
|
|
1492
1711
|
def as_shallow_dict(self) -> dict:
|
|
1493
1712
|
"""Serializes the StsRole into a shallow dictionary of its immediate attributes."""
|
|
1494
1713
|
body = {}
|
|
1495
|
-
if self.external_id is not None:
|
|
1496
|
-
|
|
1714
|
+
if self.external_id is not None:
|
|
1715
|
+
body["external_id"] = self.external_id
|
|
1716
|
+
if self.role_arn is not None:
|
|
1717
|
+
body["role_arn"] = self.role_arn
|
|
1497
1718
|
return body
|
|
1498
1719
|
|
|
1499
1720
|
@classmethod
|
|
1500
|
-
def from_dict(cls, d: Dict[str,
|
|
1721
|
+
def from_dict(cls, d: Dict[str, Any]) -> StsRole:
|
|
1501
1722
|
"""Deserializes the StsRole from a dictionary."""
|
|
1502
|
-
return cls(external_id=d.get(
|
|
1723
|
+
return cls(external_id=d.get("external_id", None), role_arn=d.get("role_arn", None))
|
|
1503
1724
|
|
|
1504
1725
|
|
|
1505
1726
|
@dataclass
|
|
1506
1727
|
class UpdateResponse:
|
|
1507
|
-
|
|
1508
1728
|
def as_dict(self) -> dict:
|
|
1509
1729
|
"""Serializes the UpdateResponse into a dictionary suitable for use as a JSON request body."""
|
|
1510
1730
|
body = {}
|
|
@@ -1516,7 +1736,7 @@ class UpdateResponse:
|
|
|
1516
1736
|
return body
|
|
1517
1737
|
|
|
1518
1738
|
@classmethod
|
|
1519
|
-
def from_dict(cls, d: Dict[str,
|
|
1739
|
+
def from_dict(cls, d: Dict[str, Any]) -> UpdateResponse:
|
|
1520
1740
|
"""Deserializes the UpdateResponse from a dictionary."""
|
|
1521
1741
|
return cls()
|
|
1522
1742
|
|
|
@@ -1565,57 +1785,68 @@ class UpdateWorkspaceRequest:
|
|
|
1565
1785
|
def as_dict(self) -> dict:
|
|
1566
1786
|
"""Serializes the UpdateWorkspaceRequest into a dictionary suitable for use as a JSON request body."""
|
|
1567
1787
|
body = {}
|
|
1568
|
-
if self.aws_region is not None:
|
|
1569
|
-
|
|
1570
|
-
if self.
|
|
1788
|
+
if self.aws_region is not None:
|
|
1789
|
+
body["aws_region"] = self.aws_region
|
|
1790
|
+
if self.credentials_id is not None:
|
|
1791
|
+
body["credentials_id"] = self.credentials_id
|
|
1792
|
+
if self.custom_tags:
|
|
1793
|
+
body["custom_tags"] = self.custom_tags
|
|
1571
1794
|
if self.managed_services_customer_managed_key_id is not None:
|
|
1572
|
-
body[
|
|
1795
|
+
body["managed_services_customer_managed_key_id"] = self.managed_services_customer_managed_key_id
|
|
1573
1796
|
if self.network_connectivity_config_id is not None:
|
|
1574
|
-
body[
|
|
1575
|
-
if self.network_id is not None:
|
|
1797
|
+
body["network_connectivity_config_id"] = self.network_connectivity_config_id
|
|
1798
|
+
if self.network_id is not None:
|
|
1799
|
+
body["network_id"] = self.network_id
|
|
1576
1800
|
if self.private_access_settings_id is not None:
|
|
1577
|
-
body[
|
|
1801
|
+
body["private_access_settings_id"] = self.private_access_settings_id
|
|
1578
1802
|
if self.storage_configuration_id is not None:
|
|
1579
|
-
body[
|
|
1803
|
+
body["storage_configuration_id"] = self.storage_configuration_id
|
|
1580
1804
|
if self.storage_customer_managed_key_id is not None:
|
|
1581
|
-
body[
|
|
1582
|
-
if self.workspace_id is not None:
|
|
1805
|
+
body["storage_customer_managed_key_id"] = self.storage_customer_managed_key_id
|
|
1806
|
+
if self.workspace_id is not None:
|
|
1807
|
+
body["workspace_id"] = self.workspace_id
|
|
1583
1808
|
return body
|
|
1584
1809
|
|
|
1585
1810
|
def as_shallow_dict(self) -> dict:
|
|
1586
1811
|
"""Serializes the UpdateWorkspaceRequest into a shallow dictionary of its immediate attributes."""
|
|
1587
1812
|
body = {}
|
|
1588
|
-
if self.aws_region is not None:
|
|
1589
|
-
|
|
1590
|
-
if self.
|
|
1813
|
+
if self.aws_region is not None:
|
|
1814
|
+
body["aws_region"] = self.aws_region
|
|
1815
|
+
if self.credentials_id is not None:
|
|
1816
|
+
body["credentials_id"] = self.credentials_id
|
|
1817
|
+
if self.custom_tags:
|
|
1818
|
+
body["custom_tags"] = self.custom_tags
|
|
1591
1819
|
if self.managed_services_customer_managed_key_id is not None:
|
|
1592
|
-
body[
|
|
1820
|
+
body["managed_services_customer_managed_key_id"] = self.managed_services_customer_managed_key_id
|
|
1593
1821
|
if self.network_connectivity_config_id is not None:
|
|
1594
|
-
body[
|
|
1595
|
-
if self.network_id is not None:
|
|
1822
|
+
body["network_connectivity_config_id"] = self.network_connectivity_config_id
|
|
1823
|
+
if self.network_id is not None:
|
|
1824
|
+
body["network_id"] = self.network_id
|
|
1596
1825
|
if self.private_access_settings_id is not None:
|
|
1597
|
-
body[
|
|
1826
|
+
body["private_access_settings_id"] = self.private_access_settings_id
|
|
1598
1827
|
if self.storage_configuration_id is not None:
|
|
1599
|
-
body[
|
|
1828
|
+
body["storage_configuration_id"] = self.storage_configuration_id
|
|
1600
1829
|
if self.storage_customer_managed_key_id is not None:
|
|
1601
|
-
body[
|
|
1602
|
-
if self.workspace_id is not None:
|
|
1830
|
+
body["storage_customer_managed_key_id"] = self.storage_customer_managed_key_id
|
|
1831
|
+
if self.workspace_id is not None:
|
|
1832
|
+
body["workspace_id"] = self.workspace_id
|
|
1603
1833
|
return body
|
|
1604
1834
|
|
|
1605
1835
|
@classmethod
|
|
1606
|
-
def from_dict(cls, d: Dict[str,
|
|
1836
|
+
def from_dict(cls, d: Dict[str, Any]) -> UpdateWorkspaceRequest:
|
|
1607
1837
|
"""Deserializes the UpdateWorkspaceRequest from a dictionary."""
|
|
1608
|
-
return cls(
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1838
|
+
return cls(
|
|
1839
|
+
aws_region=d.get("aws_region", None),
|
|
1840
|
+
credentials_id=d.get("credentials_id", None),
|
|
1841
|
+
custom_tags=d.get("custom_tags", None),
|
|
1842
|
+
managed_services_customer_managed_key_id=d.get("managed_services_customer_managed_key_id", None),
|
|
1843
|
+
network_connectivity_config_id=d.get("network_connectivity_config_id", None),
|
|
1844
|
+
network_id=d.get("network_id", None),
|
|
1845
|
+
private_access_settings_id=d.get("private_access_settings_id", None),
|
|
1846
|
+
storage_configuration_id=d.get("storage_configuration_id", None),
|
|
1847
|
+
storage_customer_managed_key_id=d.get("storage_customer_managed_key_id", None),
|
|
1848
|
+
workspace_id=d.get("workspace_id", None),
|
|
1849
|
+
)
|
|
1619
1850
|
|
|
1620
1851
|
|
|
1621
1852
|
@dataclass
|
|
@@ -1660,39 +1891,47 @@ class UpsertPrivateAccessSettingsRequest:
|
|
|
1660
1891
|
"""Serializes the UpsertPrivateAccessSettingsRequest into a dictionary suitable for use as a JSON request body."""
|
|
1661
1892
|
body = {}
|
|
1662
1893
|
if self.allowed_vpc_endpoint_ids:
|
|
1663
|
-
body[
|
|
1894
|
+
body["allowed_vpc_endpoint_ids"] = [v for v in self.allowed_vpc_endpoint_ids]
|
|
1664
1895
|
if self.private_access_level is not None:
|
|
1665
|
-
body[
|
|
1896
|
+
body["private_access_level"] = self.private_access_level.value
|
|
1666
1897
|
if self.private_access_settings_id is not None:
|
|
1667
|
-
body[
|
|
1898
|
+
body["private_access_settings_id"] = self.private_access_settings_id
|
|
1668
1899
|
if self.private_access_settings_name is not None:
|
|
1669
|
-
body[
|
|
1670
|
-
if self.public_access_enabled is not None:
|
|
1671
|
-
|
|
1900
|
+
body["private_access_settings_name"] = self.private_access_settings_name
|
|
1901
|
+
if self.public_access_enabled is not None:
|
|
1902
|
+
body["public_access_enabled"] = self.public_access_enabled
|
|
1903
|
+
if self.region is not None:
|
|
1904
|
+
body["region"] = self.region
|
|
1672
1905
|
return body
|
|
1673
1906
|
|
|
1674
1907
|
def as_shallow_dict(self) -> dict:
|
|
1675
1908
|
"""Serializes the UpsertPrivateAccessSettingsRequest into a shallow dictionary of its immediate attributes."""
|
|
1676
1909
|
body = {}
|
|
1677
|
-
if self.allowed_vpc_endpoint_ids:
|
|
1678
|
-
|
|
1910
|
+
if self.allowed_vpc_endpoint_ids:
|
|
1911
|
+
body["allowed_vpc_endpoint_ids"] = self.allowed_vpc_endpoint_ids
|
|
1912
|
+
if self.private_access_level is not None:
|
|
1913
|
+
body["private_access_level"] = self.private_access_level
|
|
1679
1914
|
if self.private_access_settings_id is not None:
|
|
1680
|
-
body[
|
|
1915
|
+
body["private_access_settings_id"] = self.private_access_settings_id
|
|
1681
1916
|
if self.private_access_settings_name is not None:
|
|
1682
|
-
body[
|
|
1683
|
-
if self.public_access_enabled is not None:
|
|
1684
|
-
|
|
1917
|
+
body["private_access_settings_name"] = self.private_access_settings_name
|
|
1918
|
+
if self.public_access_enabled is not None:
|
|
1919
|
+
body["public_access_enabled"] = self.public_access_enabled
|
|
1920
|
+
if self.region is not None:
|
|
1921
|
+
body["region"] = self.region
|
|
1685
1922
|
return body
|
|
1686
1923
|
|
|
1687
1924
|
@classmethod
|
|
1688
|
-
def from_dict(cls, d: Dict[str,
|
|
1925
|
+
def from_dict(cls, d: Dict[str, Any]) -> UpsertPrivateAccessSettingsRequest:
|
|
1689
1926
|
"""Deserializes the UpsertPrivateAccessSettingsRequest from a dictionary."""
|
|
1690
|
-
return cls(
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1927
|
+
return cls(
|
|
1928
|
+
allowed_vpc_endpoint_ids=d.get("allowed_vpc_endpoint_ids", None),
|
|
1929
|
+
private_access_level=_enum(d, "private_access_level", PrivateAccessLevel),
|
|
1930
|
+
private_access_settings_id=d.get("private_access_settings_id", None),
|
|
1931
|
+
private_access_settings_name=d.get("private_access_settings_name", None),
|
|
1932
|
+
public_access_enabled=d.get("public_access_enabled", None),
|
|
1933
|
+
region=d.get("region", None),
|
|
1934
|
+
)
|
|
1696
1935
|
|
|
1697
1936
|
|
|
1698
1937
|
@dataclass
|
|
@@ -1742,65 +1981,85 @@ class VpcEndpoint:
|
|
|
1742
1981
|
def as_dict(self) -> dict:
|
|
1743
1982
|
"""Serializes the VpcEndpoint into a dictionary suitable for use as a JSON request body."""
|
|
1744
1983
|
body = {}
|
|
1745
|
-
if self.account_id is not None:
|
|
1746
|
-
|
|
1984
|
+
if self.account_id is not None:
|
|
1985
|
+
body["account_id"] = self.account_id
|
|
1986
|
+
if self.aws_account_id is not None:
|
|
1987
|
+
body["aws_account_id"] = self.aws_account_id
|
|
1747
1988
|
if self.aws_endpoint_service_id is not None:
|
|
1748
|
-
body[
|
|
1749
|
-
if self.aws_vpc_endpoint_id is not None:
|
|
1750
|
-
|
|
1751
|
-
if self.
|
|
1752
|
-
|
|
1753
|
-
if self.
|
|
1754
|
-
|
|
1755
|
-
if self.
|
|
1989
|
+
body["aws_endpoint_service_id"] = self.aws_endpoint_service_id
|
|
1990
|
+
if self.aws_vpc_endpoint_id is not None:
|
|
1991
|
+
body["aws_vpc_endpoint_id"] = self.aws_vpc_endpoint_id
|
|
1992
|
+
if self.gcp_vpc_endpoint_info:
|
|
1993
|
+
body["gcp_vpc_endpoint_info"] = self.gcp_vpc_endpoint_info.as_dict()
|
|
1994
|
+
if self.region is not None:
|
|
1995
|
+
body["region"] = self.region
|
|
1996
|
+
if self.state is not None:
|
|
1997
|
+
body["state"] = self.state
|
|
1998
|
+
if self.use_case is not None:
|
|
1999
|
+
body["use_case"] = self.use_case.value
|
|
2000
|
+
if self.vpc_endpoint_id is not None:
|
|
2001
|
+
body["vpc_endpoint_id"] = self.vpc_endpoint_id
|
|
2002
|
+
if self.vpc_endpoint_name is not None:
|
|
2003
|
+
body["vpc_endpoint_name"] = self.vpc_endpoint_name
|
|
1756
2004
|
return body
|
|
1757
2005
|
|
|
1758
2006
|
def as_shallow_dict(self) -> dict:
|
|
1759
2007
|
"""Serializes the VpcEndpoint into a shallow dictionary of its immediate attributes."""
|
|
1760
2008
|
body = {}
|
|
1761
|
-
if self.account_id is not None:
|
|
1762
|
-
|
|
2009
|
+
if self.account_id is not None:
|
|
2010
|
+
body["account_id"] = self.account_id
|
|
2011
|
+
if self.aws_account_id is not None:
|
|
2012
|
+
body["aws_account_id"] = self.aws_account_id
|
|
1763
2013
|
if self.aws_endpoint_service_id is not None:
|
|
1764
|
-
body[
|
|
1765
|
-
if self.aws_vpc_endpoint_id is not None:
|
|
1766
|
-
|
|
1767
|
-
if self.
|
|
1768
|
-
|
|
1769
|
-
if self.
|
|
1770
|
-
|
|
1771
|
-
if self.
|
|
2014
|
+
body["aws_endpoint_service_id"] = self.aws_endpoint_service_id
|
|
2015
|
+
if self.aws_vpc_endpoint_id is not None:
|
|
2016
|
+
body["aws_vpc_endpoint_id"] = self.aws_vpc_endpoint_id
|
|
2017
|
+
if self.gcp_vpc_endpoint_info:
|
|
2018
|
+
body["gcp_vpc_endpoint_info"] = self.gcp_vpc_endpoint_info
|
|
2019
|
+
if self.region is not None:
|
|
2020
|
+
body["region"] = self.region
|
|
2021
|
+
if self.state is not None:
|
|
2022
|
+
body["state"] = self.state
|
|
2023
|
+
if self.use_case is not None:
|
|
2024
|
+
body["use_case"] = self.use_case
|
|
2025
|
+
if self.vpc_endpoint_id is not None:
|
|
2026
|
+
body["vpc_endpoint_id"] = self.vpc_endpoint_id
|
|
2027
|
+
if self.vpc_endpoint_name is not None:
|
|
2028
|
+
body["vpc_endpoint_name"] = self.vpc_endpoint_name
|
|
1772
2029
|
return body
|
|
1773
2030
|
|
|
1774
2031
|
@classmethod
|
|
1775
|
-
def from_dict(cls, d: Dict[str,
|
|
2032
|
+
def from_dict(cls, d: Dict[str, Any]) -> VpcEndpoint:
|
|
1776
2033
|
"""Deserializes the VpcEndpoint from a dictionary."""
|
|
1777
|
-
return cls(
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
2034
|
+
return cls(
|
|
2035
|
+
account_id=d.get("account_id", None),
|
|
2036
|
+
aws_account_id=d.get("aws_account_id", None),
|
|
2037
|
+
aws_endpoint_service_id=d.get("aws_endpoint_service_id", None),
|
|
2038
|
+
aws_vpc_endpoint_id=d.get("aws_vpc_endpoint_id", None),
|
|
2039
|
+
gcp_vpc_endpoint_info=_from_dict(d, "gcp_vpc_endpoint_info", GcpVpcEndpointInfo),
|
|
2040
|
+
region=d.get("region", None),
|
|
2041
|
+
state=d.get("state", None),
|
|
2042
|
+
use_case=_enum(d, "use_case", EndpointUseCase),
|
|
2043
|
+
vpc_endpoint_id=d.get("vpc_endpoint_id", None),
|
|
2044
|
+
vpc_endpoint_name=d.get("vpc_endpoint_name", None),
|
|
2045
|
+
)
|
|
1787
2046
|
|
|
1788
2047
|
|
|
1789
2048
|
class VpcStatus(Enum):
|
|
1790
2049
|
"""The status of this network configuration object in terms of its use in a workspace: *
|
|
1791
2050
|
`UNATTACHED`: Unattached. * `VALID`: Valid. * `BROKEN`: Broken. * `WARNED`: Warned."""
|
|
1792
2051
|
|
|
1793
|
-
BROKEN =
|
|
1794
|
-
UNATTACHED =
|
|
1795
|
-
VALID =
|
|
1796
|
-
WARNED =
|
|
2052
|
+
BROKEN = "BROKEN"
|
|
2053
|
+
UNATTACHED = "UNATTACHED"
|
|
2054
|
+
VALID = "VALID"
|
|
2055
|
+
WARNED = "WARNED"
|
|
1797
2056
|
|
|
1798
2057
|
|
|
1799
2058
|
class WarningType(Enum):
|
|
1800
2059
|
"""The AWS resource associated with this warning: a subnet or a security group."""
|
|
1801
2060
|
|
|
1802
|
-
SECURITY_GROUP =
|
|
1803
|
-
SUBNET =
|
|
2061
|
+
SECURITY_GROUP = "securityGroup"
|
|
2062
|
+
SUBNET = "subnet"
|
|
1804
2063
|
|
|
1805
2064
|
|
|
1806
2065
|
@dataclass
|
|
@@ -1914,117 +2173,150 @@ class Workspace:
|
|
|
1914
2173
|
def as_dict(self) -> dict:
|
|
1915
2174
|
"""Serializes the Workspace into a dictionary suitable for use as a JSON request body."""
|
|
1916
2175
|
body = {}
|
|
1917
|
-
if self.account_id is not None:
|
|
1918
|
-
|
|
1919
|
-
if self.
|
|
1920
|
-
|
|
2176
|
+
if self.account_id is not None:
|
|
2177
|
+
body["account_id"] = self.account_id
|
|
2178
|
+
if self.aws_region is not None:
|
|
2179
|
+
body["aws_region"] = self.aws_region
|
|
2180
|
+
if self.azure_workspace_info:
|
|
2181
|
+
body["azure_workspace_info"] = self.azure_workspace_info.as_dict()
|
|
2182
|
+
if self.cloud is not None:
|
|
2183
|
+
body["cloud"] = self.cloud
|
|
1921
2184
|
if self.cloud_resource_container:
|
|
1922
|
-
body[
|
|
1923
|
-
if self.creation_time is not None:
|
|
1924
|
-
|
|
1925
|
-
if self.
|
|
1926
|
-
|
|
1927
|
-
if self.
|
|
2185
|
+
body["cloud_resource_container"] = self.cloud_resource_container.as_dict()
|
|
2186
|
+
if self.creation_time is not None:
|
|
2187
|
+
body["creation_time"] = self.creation_time
|
|
2188
|
+
if self.credentials_id is not None:
|
|
2189
|
+
body["credentials_id"] = self.credentials_id
|
|
2190
|
+
if self.custom_tags:
|
|
2191
|
+
body["custom_tags"] = self.custom_tags
|
|
2192
|
+
if self.deployment_name is not None:
|
|
2193
|
+
body["deployment_name"] = self.deployment_name
|
|
2194
|
+
if self.external_customer_info:
|
|
2195
|
+
body["external_customer_info"] = self.external_customer_info.as_dict()
|
|
1928
2196
|
if self.gcp_managed_network_config:
|
|
1929
|
-
body[
|
|
1930
|
-
if self.gke_config:
|
|
2197
|
+
body["gcp_managed_network_config"] = self.gcp_managed_network_config.as_dict()
|
|
2198
|
+
if self.gke_config:
|
|
2199
|
+
body["gke_config"] = self.gke_config.as_dict()
|
|
1931
2200
|
if self.is_no_public_ip_enabled is not None:
|
|
1932
|
-
body[
|
|
1933
|
-
if self.location is not None:
|
|
2201
|
+
body["is_no_public_ip_enabled"] = self.is_no_public_ip_enabled
|
|
2202
|
+
if self.location is not None:
|
|
2203
|
+
body["location"] = self.location
|
|
1934
2204
|
if self.managed_services_customer_managed_key_id is not None:
|
|
1935
|
-
body[
|
|
1936
|
-
if self.network_id is not None:
|
|
1937
|
-
|
|
2205
|
+
body["managed_services_customer_managed_key_id"] = self.managed_services_customer_managed_key_id
|
|
2206
|
+
if self.network_id is not None:
|
|
2207
|
+
body["network_id"] = self.network_id
|
|
2208
|
+
if self.pricing_tier is not None:
|
|
2209
|
+
body["pricing_tier"] = self.pricing_tier.value
|
|
1938
2210
|
if self.private_access_settings_id is not None:
|
|
1939
|
-
body[
|
|
2211
|
+
body["private_access_settings_id"] = self.private_access_settings_id
|
|
1940
2212
|
if self.storage_configuration_id is not None:
|
|
1941
|
-
body[
|
|
2213
|
+
body["storage_configuration_id"] = self.storage_configuration_id
|
|
1942
2214
|
if self.storage_customer_managed_key_id is not None:
|
|
1943
|
-
body[
|
|
1944
|
-
if self.workspace_id is not None:
|
|
1945
|
-
|
|
1946
|
-
if self.
|
|
2215
|
+
body["storage_customer_managed_key_id"] = self.storage_customer_managed_key_id
|
|
2216
|
+
if self.workspace_id is not None:
|
|
2217
|
+
body["workspace_id"] = self.workspace_id
|
|
2218
|
+
if self.workspace_name is not None:
|
|
2219
|
+
body["workspace_name"] = self.workspace_name
|
|
2220
|
+
if self.workspace_status is not None:
|
|
2221
|
+
body["workspace_status"] = self.workspace_status.value
|
|
1947
2222
|
if self.workspace_status_message is not None:
|
|
1948
|
-
body[
|
|
2223
|
+
body["workspace_status_message"] = self.workspace_status_message
|
|
1949
2224
|
return body
|
|
1950
2225
|
|
|
1951
2226
|
def as_shallow_dict(self) -> dict:
|
|
1952
2227
|
"""Serializes the Workspace into a shallow dictionary of its immediate attributes."""
|
|
1953
2228
|
body = {}
|
|
1954
|
-
if self.account_id is not None:
|
|
1955
|
-
|
|
1956
|
-
if self.
|
|
1957
|
-
|
|
1958
|
-
if self.
|
|
1959
|
-
|
|
1960
|
-
if self.
|
|
1961
|
-
|
|
1962
|
-
if self.
|
|
1963
|
-
|
|
2229
|
+
if self.account_id is not None:
|
|
2230
|
+
body["account_id"] = self.account_id
|
|
2231
|
+
if self.aws_region is not None:
|
|
2232
|
+
body["aws_region"] = self.aws_region
|
|
2233
|
+
if self.azure_workspace_info:
|
|
2234
|
+
body["azure_workspace_info"] = self.azure_workspace_info
|
|
2235
|
+
if self.cloud is not None:
|
|
2236
|
+
body["cloud"] = self.cloud
|
|
2237
|
+
if self.cloud_resource_container:
|
|
2238
|
+
body["cloud_resource_container"] = self.cloud_resource_container
|
|
2239
|
+
if self.creation_time is not None:
|
|
2240
|
+
body["creation_time"] = self.creation_time
|
|
2241
|
+
if self.credentials_id is not None:
|
|
2242
|
+
body["credentials_id"] = self.credentials_id
|
|
2243
|
+
if self.custom_tags:
|
|
2244
|
+
body["custom_tags"] = self.custom_tags
|
|
2245
|
+
if self.deployment_name is not None:
|
|
2246
|
+
body["deployment_name"] = self.deployment_name
|
|
2247
|
+
if self.external_customer_info:
|
|
2248
|
+
body["external_customer_info"] = self.external_customer_info
|
|
1964
2249
|
if self.gcp_managed_network_config:
|
|
1965
|
-
body[
|
|
1966
|
-
if self.gke_config:
|
|
2250
|
+
body["gcp_managed_network_config"] = self.gcp_managed_network_config
|
|
2251
|
+
if self.gke_config:
|
|
2252
|
+
body["gke_config"] = self.gke_config
|
|
1967
2253
|
if self.is_no_public_ip_enabled is not None:
|
|
1968
|
-
body[
|
|
1969
|
-
if self.location is not None:
|
|
2254
|
+
body["is_no_public_ip_enabled"] = self.is_no_public_ip_enabled
|
|
2255
|
+
if self.location is not None:
|
|
2256
|
+
body["location"] = self.location
|
|
1970
2257
|
if self.managed_services_customer_managed_key_id is not None:
|
|
1971
|
-
body[
|
|
1972
|
-
if self.network_id is not None:
|
|
1973
|
-
|
|
2258
|
+
body["managed_services_customer_managed_key_id"] = self.managed_services_customer_managed_key_id
|
|
2259
|
+
if self.network_id is not None:
|
|
2260
|
+
body["network_id"] = self.network_id
|
|
2261
|
+
if self.pricing_tier is not None:
|
|
2262
|
+
body["pricing_tier"] = self.pricing_tier
|
|
1974
2263
|
if self.private_access_settings_id is not None:
|
|
1975
|
-
body[
|
|
2264
|
+
body["private_access_settings_id"] = self.private_access_settings_id
|
|
1976
2265
|
if self.storage_configuration_id is not None:
|
|
1977
|
-
body[
|
|
2266
|
+
body["storage_configuration_id"] = self.storage_configuration_id
|
|
1978
2267
|
if self.storage_customer_managed_key_id is not None:
|
|
1979
|
-
body[
|
|
1980
|
-
if self.workspace_id is not None:
|
|
1981
|
-
|
|
1982
|
-
if self.
|
|
2268
|
+
body["storage_customer_managed_key_id"] = self.storage_customer_managed_key_id
|
|
2269
|
+
if self.workspace_id is not None:
|
|
2270
|
+
body["workspace_id"] = self.workspace_id
|
|
2271
|
+
if self.workspace_name is not None:
|
|
2272
|
+
body["workspace_name"] = self.workspace_name
|
|
2273
|
+
if self.workspace_status is not None:
|
|
2274
|
+
body["workspace_status"] = self.workspace_status
|
|
1983
2275
|
if self.workspace_status_message is not None:
|
|
1984
|
-
body[
|
|
2276
|
+
body["workspace_status_message"] = self.workspace_status_message
|
|
1985
2277
|
return body
|
|
1986
2278
|
|
|
1987
2279
|
@classmethod
|
|
1988
|
-
def from_dict(cls, d: Dict[str,
|
|
2280
|
+
def from_dict(cls, d: Dict[str, Any]) -> Workspace:
|
|
1989
2281
|
"""Deserializes the Workspace from a dictionary."""
|
|
1990
|
-
return cls(
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2282
|
+
return cls(
|
|
2283
|
+
account_id=d.get("account_id", None),
|
|
2284
|
+
aws_region=d.get("aws_region", None),
|
|
2285
|
+
azure_workspace_info=_from_dict(d, "azure_workspace_info", AzureWorkspaceInfo),
|
|
2286
|
+
cloud=d.get("cloud", None),
|
|
2287
|
+
cloud_resource_container=_from_dict(d, "cloud_resource_container", CloudResourceContainer),
|
|
2288
|
+
creation_time=d.get("creation_time", None),
|
|
2289
|
+
credentials_id=d.get("credentials_id", None),
|
|
2290
|
+
custom_tags=d.get("custom_tags", None),
|
|
2291
|
+
deployment_name=d.get("deployment_name", None),
|
|
2292
|
+
external_customer_info=_from_dict(d, "external_customer_info", ExternalCustomerInfo),
|
|
2293
|
+
gcp_managed_network_config=_from_dict(d, "gcp_managed_network_config", GcpManagedNetworkConfig),
|
|
2294
|
+
gke_config=_from_dict(d, "gke_config", GkeConfig),
|
|
2295
|
+
is_no_public_ip_enabled=d.get("is_no_public_ip_enabled", None),
|
|
2296
|
+
location=d.get("location", None),
|
|
2297
|
+
managed_services_customer_managed_key_id=d.get("managed_services_customer_managed_key_id", None),
|
|
2298
|
+
network_id=d.get("network_id", None),
|
|
2299
|
+
pricing_tier=_enum(d, "pricing_tier", PricingTier),
|
|
2300
|
+
private_access_settings_id=d.get("private_access_settings_id", None),
|
|
2301
|
+
storage_configuration_id=d.get("storage_configuration_id", None),
|
|
2302
|
+
storage_customer_managed_key_id=d.get("storage_customer_managed_key_id", None),
|
|
2303
|
+
workspace_id=d.get("workspace_id", None),
|
|
2304
|
+
workspace_name=d.get("workspace_name", None),
|
|
2305
|
+
workspace_status=_enum(d, "workspace_status", WorkspaceStatus),
|
|
2306
|
+
workspace_status_message=d.get("workspace_status_message", None),
|
|
2307
|
+
)
|
|
2016
2308
|
|
|
2017
2309
|
|
|
2018
2310
|
class WorkspaceStatus(Enum):
|
|
2019
2311
|
"""The status of the workspace. For workspace creation, usually it is set to `PROVISIONING`
|
|
2020
2312
|
initially. Continue to check the status until the status is `RUNNING`."""
|
|
2021
2313
|
|
|
2022
|
-
BANNED =
|
|
2023
|
-
CANCELLING =
|
|
2024
|
-
FAILED =
|
|
2025
|
-
NOT_PROVISIONED =
|
|
2026
|
-
PROVISIONING =
|
|
2027
|
-
RUNNING =
|
|
2314
|
+
BANNED = "BANNED"
|
|
2315
|
+
CANCELLING = "CANCELLING"
|
|
2316
|
+
FAILED = "FAILED"
|
|
2317
|
+
NOT_PROVISIONED = "NOT_PROVISIONED"
|
|
2318
|
+
PROVISIONING = "PROVISIONING"
|
|
2319
|
+
RUNNING = "RUNNING"
|
|
2028
2320
|
|
|
2029
2321
|
|
|
2030
2322
|
class CredentialsAPI:
|
|
@@ -2038,84 +2330,92 @@ class CredentialsAPI:
|
|
|
2038
2330
|
|
|
2039
2331
|
def create(self, credentials_name: str, aws_credentials: CreateCredentialAwsCredentials) -> Credential:
|
|
2040
2332
|
"""Create credential configuration.
|
|
2041
|
-
|
|
2333
|
+
|
|
2042
2334
|
Creates a Databricks credential configuration that represents cloud cross-account credentials for a
|
|
2043
2335
|
specified account. Databricks uses this to set up network infrastructure properly to host Databricks
|
|
2044
2336
|
clusters. For your AWS IAM role, you need to trust the External ID (the Databricks Account API account
|
|
2045
2337
|
ID) in the returned credential object, and configure the required access policy.
|
|
2046
|
-
|
|
2338
|
+
|
|
2047
2339
|
Save the response's `credentials_id` field, which is the ID for your new credential configuration
|
|
2048
2340
|
object.
|
|
2049
|
-
|
|
2341
|
+
|
|
2050
2342
|
For information about how to create a new workspace with this API, see [Create a new workspace using
|
|
2051
2343
|
the Account API]
|
|
2052
|
-
|
|
2344
|
+
|
|
2053
2345
|
[Create a new workspace using the Account API]: http://docs.databricks.com/administration-guide/account-api/new-workspace.html
|
|
2054
|
-
|
|
2346
|
+
|
|
2055
2347
|
:param credentials_name: str
|
|
2056
2348
|
The human-readable name of the credential configuration object.
|
|
2057
2349
|
:param aws_credentials: :class:`CreateCredentialAwsCredentials`
|
|
2058
|
-
|
|
2350
|
+
|
|
2059
2351
|
:returns: :class:`Credential`
|
|
2060
2352
|
"""
|
|
2061
2353
|
body = {}
|
|
2062
|
-
if aws_credentials is not None:
|
|
2063
|
-
|
|
2064
|
-
|
|
2354
|
+
if aws_credentials is not None:
|
|
2355
|
+
body["aws_credentials"] = aws_credentials.as_dict()
|
|
2356
|
+
if credentials_name is not None:
|
|
2357
|
+
body["credentials_name"] = credentials_name
|
|
2358
|
+
headers = {
|
|
2359
|
+
"Accept": "application/json",
|
|
2360
|
+
"Content-Type": "application/json",
|
|
2361
|
+
}
|
|
2065
2362
|
|
|
2066
|
-
res = self._api.do(
|
|
2067
|
-
f'/api/2.0/accounts/{self._api.account_id}/credentials',
|
|
2068
|
-
body=body,
|
|
2069
|
-
headers=headers)
|
|
2363
|
+
res = self._api.do("POST", f"/api/2.0/accounts/{self._api.account_id}/credentials", body=body, headers=headers)
|
|
2070
2364
|
return Credential.from_dict(res)
|
|
2071
2365
|
|
|
2072
2366
|
def delete(self, credentials_id: str):
|
|
2073
2367
|
"""Delete credential configuration.
|
|
2074
|
-
|
|
2368
|
+
|
|
2075
2369
|
Deletes a Databricks credential configuration object for an account, both specified by ID. You cannot
|
|
2076
2370
|
delete a credential that is associated with any workspace.
|
|
2077
|
-
|
|
2371
|
+
|
|
2078
2372
|
:param credentials_id: str
|
|
2079
2373
|
Databricks Account API credential configuration ID
|
|
2080
|
-
|
|
2081
|
-
|
|
2374
|
+
|
|
2375
|
+
|
|
2082
2376
|
"""
|
|
2083
2377
|
|
|
2084
|
-
headers = {
|
|
2378
|
+
headers = {
|
|
2379
|
+
"Accept": "application/json",
|
|
2380
|
+
}
|
|
2085
2381
|
|
|
2086
|
-
self._api.do(
|
|
2087
|
-
|
|
2088
|
-
|
|
2382
|
+
self._api.do(
|
|
2383
|
+
"DELETE", f"/api/2.0/accounts/{self._api.account_id}/credentials/{credentials_id}", headers=headers
|
|
2384
|
+
)
|
|
2089
2385
|
|
|
2090
2386
|
def get(self, credentials_id: str) -> Credential:
|
|
2091
2387
|
"""Get credential configuration.
|
|
2092
|
-
|
|
2388
|
+
|
|
2093
2389
|
Gets a Databricks credential configuration object for an account, both specified by ID.
|
|
2094
|
-
|
|
2390
|
+
|
|
2095
2391
|
:param credentials_id: str
|
|
2096
2392
|
Databricks Account API credential configuration ID
|
|
2097
|
-
|
|
2393
|
+
|
|
2098
2394
|
:returns: :class:`Credential`
|
|
2099
2395
|
"""
|
|
2100
2396
|
|
|
2101
|
-
headers = {
|
|
2397
|
+
headers = {
|
|
2398
|
+
"Accept": "application/json",
|
|
2399
|
+
}
|
|
2102
2400
|
|
|
2103
|
-
res = self._api.do(
|
|
2104
|
-
|
|
2105
|
-
|
|
2401
|
+
res = self._api.do(
|
|
2402
|
+
"GET", f"/api/2.0/accounts/{self._api.account_id}/credentials/{credentials_id}", headers=headers
|
|
2403
|
+
)
|
|
2106
2404
|
return Credential.from_dict(res)
|
|
2107
2405
|
|
|
2108
2406
|
def list(self) -> Iterator[Credential]:
|
|
2109
2407
|
"""Get all credential configurations.
|
|
2110
|
-
|
|
2408
|
+
|
|
2111
2409
|
Gets all Databricks credential configurations associated with an account specified by ID.
|
|
2112
|
-
|
|
2410
|
+
|
|
2113
2411
|
:returns: Iterator over :class:`Credential`
|
|
2114
2412
|
"""
|
|
2115
2413
|
|
|
2116
|
-
headers = {
|
|
2414
|
+
headers = {
|
|
2415
|
+
"Accept": "application/json",
|
|
2416
|
+
}
|
|
2117
2417
|
|
|
2118
|
-
res = self._api.do(
|
|
2418
|
+
res = self._api.do("GET", f"/api/2.0/accounts/{self._api.account_id}/credentials", headers=headers)
|
|
2119
2419
|
return [Credential.from_dict(v) for v in res]
|
|
2120
2420
|
|
|
2121
2421
|
|
|
@@ -2123,11 +2423,11 @@ class EncryptionKeysAPI:
|
|
|
2123
2423
|
"""These APIs manage encryption key configurations for this workspace (optional). A key configuration
|
|
2124
2424
|
encapsulates the AWS KMS key information and some information about how the key configuration can be used.
|
|
2125
2425
|
There are two possible uses for key configurations:
|
|
2126
|
-
|
|
2426
|
+
|
|
2127
2427
|
* Managed services: A key configuration can be used to encrypt a workspace's notebook and secret data in
|
|
2128
2428
|
the control plane, as well as Databricks SQL queries and query history. * Storage: A key configuration can
|
|
2129
2429
|
be used to encrypt a workspace's DBFS and EBS data in the data plane.
|
|
2130
|
-
|
|
2430
|
+
|
|
2131
2431
|
In both of these cases, the key configuration's ID is used when creating a new workspace. This Preview
|
|
2132
2432
|
feature is available if your account is on the E2 version of the platform. Updating a running workspace
|
|
2133
2433
|
with workspace storage encryption requires that the workspace is on the E2 version of the platform. If you
|
|
@@ -2137,13 +2437,15 @@ class EncryptionKeysAPI:
|
|
|
2137
2437
|
def __init__(self, api_client):
|
|
2138
2438
|
self._api = api_client
|
|
2139
2439
|
|
|
2140
|
-
def create(
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2440
|
+
def create(
|
|
2441
|
+
self,
|
|
2442
|
+
use_cases: List[KeyUseCase],
|
|
2443
|
+
*,
|
|
2444
|
+
aws_key_info: Optional[CreateAwsKeyInfo] = None,
|
|
2445
|
+
gcp_key_info: Optional[CreateGcpKeyInfo] = None,
|
|
2446
|
+
) -> CustomerManagedKey:
|
|
2145
2447
|
"""Create encryption key configuration.
|
|
2146
|
-
|
|
2448
|
+
|
|
2147
2449
|
Creates a customer-managed key configuration object for an account, specified by ID. This operation
|
|
2148
2450
|
uploads a reference to a customer-managed key to Databricks. If the key is assigned as a workspace's
|
|
2149
2451
|
customer-managed key for managed services, Databricks uses the key to encrypt the workspaces notebooks
|
|
@@ -2151,54 +2453,62 @@ class EncryptionKeysAPI:
|
|
|
2151
2453
|
specified as a workspace's customer-managed key for workspace storage, the key encrypts the
|
|
2152
2454
|
workspace's root S3 bucket (which contains the workspace's root DBFS and system data) and, optionally,
|
|
2153
2455
|
cluster EBS volume data.
|
|
2154
|
-
|
|
2456
|
+
|
|
2155
2457
|
**Important**: Customer-managed keys are supported only for some deployment types, subscription types,
|
|
2156
2458
|
and AWS regions that currently support creation of Databricks workspaces.
|
|
2157
|
-
|
|
2459
|
+
|
|
2158
2460
|
This operation is available only if your account is on the E2 version of the platform or on a select
|
|
2159
2461
|
custom plan that allows multiple workspaces per account.
|
|
2160
|
-
|
|
2462
|
+
|
|
2161
2463
|
:param use_cases: List[:class:`KeyUseCase`]
|
|
2162
2464
|
The cases that the key can be used for.
|
|
2163
2465
|
:param aws_key_info: :class:`CreateAwsKeyInfo` (optional)
|
|
2164
2466
|
:param gcp_key_info: :class:`CreateGcpKeyInfo` (optional)
|
|
2165
|
-
|
|
2467
|
+
|
|
2166
2468
|
:returns: :class:`CustomerManagedKey`
|
|
2167
2469
|
"""
|
|
2168
2470
|
body = {}
|
|
2169
|
-
if aws_key_info is not None:
|
|
2170
|
-
|
|
2171
|
-
if
|
|
2172
|
-
|
|
2471
|
+
if aws_key_info is not None:
|
|
2472
|
+
body["aws_key_info"] = aws_key_info.as_dict()
|
|
2473
|
+
if gcp_key_info is not None:
|
|
2474
|
+
body["gcp_key_info"] = gcp_key_info.as_dict()
|
|
2475
|
+
if use_cases is not None:
|
|
2476
|
+
body["use_cases"] = [v.value for v in use_cases]
|
|
2477
|
+
headers = {
|
|
2478
|
+
"Accept": "application/json",
|
|
2479
|
+
"Content-Type": "application/json",
|
|
2480
|
+
}
|
|
2173
2481
|
|
|
2174
|
-
res = self._api.do(
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
headers=headers)
|
|
2482
|
+
res = self._api.do(
|
|
2483
|
+
"POST", f"/api/2.0/accounts/{self._api.account_id}/customer-managed-keys", body=body, headers=headers
|
|
2484
|
+
)
|
|
2178
2485
|
return CustomerManagedKey.from_dict(res)
|
|
2179
2486
|
|
|
2180
2487
|
def delete(self, customer_managed_key_id: str):
|
|
2181
2488
|
"""Delete encryption key configuration.
|
|
2182
|
-
|
|
2489
|
+
|
|
2183
2490
|
Deletes a customer-managed key configuration object for an account. You cannot delete a configuration
|
|
2184
2491
|
that is associated with a running workspace.
|
|
2185
|
-
|
|
2492
|
+
|
|
2186
2493
|
:param customer_managed_key_id: str
|
|
2187
2494
|
Databricks encryption key configuration ID.
|
|
2188
|
-
|
|
2189
|
-
|
|
2495
|
+
|
|
2496
|
+
|
|
2190
2497
|
"""
|
|
2191
2498
|
|
|
2192
|
-
headers = {
|
|
2499
|
+
headers = {
|
|
2500
|
+
"Accept": "application/json",
|
|
2501
|
+
}
|
|
2193
2502
|
|
|
2194
2503
|
self._api.do(
|
|
2195
|
-
|
|
2196
|
-
f
|
|
2197
|
-
headers=headers
|
|
2504
|
+
"DELETE",
|
|
2505
|
+
f"/api/2.0/accounts/{self._api.account_id}/customer-managed-keys/{customer_managed_key_id}",
|
|
2506
|
+
headers=headers,
|
|
2507
|
+
)
|
|
2198
2508
|
|
|
2199
2509
|
def get(self, customer_managed_key_id: str) -> CustomerManagedKey:
|
|
2200
2510
|
"""Get encryption key configuration.
|
|
2201
|
-
|
|
2511
|
+
|
|
2202
2512
|
Gets a customer-managed key configuration object for an account, specified by ID. This operation
|
|
2203
2513
|
uploads a reference to a customer-managed key to Databricks. If assigned as a workspace's
|
|
2204
2514
|
customer-managed key for managed services, Databricks uses the key to encrypt the workspaces notebooks
|
|
@@ -2206,48 +2516,51 @@ class EncryptionKeysAPI:
|
|
|
2206
2516
|
specified as a workspace's customer-managed key for storage, the key encrypts the workspace's root S3
|
|
2207
2517
|
bucket (which contains the workspace's root DBFS and system data) and, optionally, cluster EBS volume
|
|
2208
2518
|
data.
|
|
2209
|
-
|
|
2519
|
+
|
|
2210
2520
|
**Important**: Customer-managed keys are supported only for some deployment types, subscription types,
|
|
2211
2521
|
and AWS regions.
|
|
2212
|
-
|
|
2522
|
+
|
|
2213
2523
|
This operation is available only if your account is on the E2 version of the platform.",
|
|
2214
|
-
|
|
2524
|
+
|
|
2215
2525
|
:param customer_managed_key_id: str
|
|
2216
2526
|
Databricks encryption key configuration ID.
|
|
2217
|
-
|
|
2527
|
+
|
|
2218
2528
|
:returns: :class:`CustomerManagedKey`
|
|
2219
2529
|
"""
|
|
2220
2530
|
|
|
2221
|
-
headers = {
|
|
2531
|
+
headers = {
|
|
2532
|
+
"Accept": "application/json",
|
|
2533
|
+
}
|
|
2222
2534
|
|
|
2223
2535
|
res = self._api.do(
|
|
2224
|
-
|
|
2225
|
-
f
|
|
2226
|
-
headers=headers
|
|
2536
|
+
"GET",
|
|
2537
|
+
f"/api/2.0/accounts/{self._api.account_id}/customer-managed-keys/{customer_managed_key_id}",
|
|
2538
|
+
headers=headers,
|
|
2539
|
+
)
|
|
2227
2540
|
return CustomerManagedKey.from_dict(res)
|
|
2228
2541
|
|
|
2229
2542
|
def list(self) -> Iterator[CustomerManagedKey]:
|
|
2230
2543
|
"""Get all encryption key configurations.
|
|
2231
|
-
|
|
2544
|
+
|
|
2232
2545
|
Gets all customer-managed key configuration objects for an account. If the key is specified as a
|
|
2233
2546
|
workspace's managed services customer-managed key, Databricks uses the key to encrypt the workspace's
|
|
2234
2547
|
notebooks and secrets in the control plane, in addition to Databricks SQL queries and query history.
|
|
2235
2548
|
If the key is specified as a workspace's storage customer-managed key, the key is used to encrypt the
|
|
2236
2549
|
workspace's root S3 bucket and optionally can encrypt cluster EBS volumes data in the data plane.
|
|
2237
|
-
|
|
2550
|
+
|
|
2238
2551
|
**Important**: Customer-managed keys are supported only for some deployment types, subscription types,
|
|
2239
2552
|
and AWS regions.
|
|
2240
|
-
|
|
2553
|
+
|
|
2241
2554
|
This operation is available only if your account is on the E2 version of the platform.
|
|
2242
|
-
|
|
2555
|
+
|
|
2243
2556
|
:returns: Iterator over :class:`CustomerManagedKey`
|
|
2244
2557
|
"""
|
|
2245
2558
|
|
|
2246
|
-
headers = {
|
|
2559
|
+
headers = {
|
|
2560
|
+
"Accept": "application/json",
|
|
2561
|
+
}
|
|
2247
2562
|
|
|
2248
|
-
res = self._api.do(
|
|
2249
|
-
f'/api/2.0/accounts/{self._api.account_id}/customer-managed-keys',
|
|
2250
|
-
headers=headers)
|
|
2563
|
+
res = self._api.do("GET", f"/api/2.0/accounts/{self._api.account_id}/customer-managed-keys", headers=headers)
|
|
2251
2564
|
return [CustomerManagedKey.from_dict(v) for v in res]
|
|
2252
2565
|
|
|
2253
2566
|
|
|
@@ -2258,19 +2571,21 @@ class NetworksAPI:
|
|
|
2258
2571
|
def __init__(self, api_client):
|
|
2259
2572
|
self._api = api_client
|
|
2260
2573
|
|
|
2261
|
-
def create(
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2574
|
+
def create(
|
|
2575
|
+
self,
|
|
2576
|
+
network_name: str,
|
|
2577
|
+
*,
|
|
2578
|
+
gcp_network_info: Optional[GcpNetworkInfo] = None,
|
|
2579
|
+
security_group_ids: Optional[List[str]] = None,
|
|
2580
|
+
subnet_ids: Optional[List[str]] = None,
|
|
2581
|
+
vpc_endpoints: Optional[NetworkVpcEndpoints] = None,
|
|
2582
|
+
vpc_id: Optional[str] = None,
|
|
2583
|
+
) -> Network:
|
|
2269
2584
|
"""Create network configuration.
|
|
2270
|
-
|
|
2585
|
+
|
|
2271
2586
|
Creates a Databricks network configuration that represents an VPC and its resources. The VPC will be
|
|
2272
2587
|
used for new Databricks clusters. This requires a pre-existing VPC and subnets.
|
|
2273
|
-
|
|
2588
|
+
|
|
2274
2589
|
:param network_name: str
|
|
2275
2590
|
The human-readable name of the network configuration.
|
|
2276
2591
|
:param gcp_network_info: :class:`GcpNetworkInfo` (optional)
|
|
@@ -2285,80 +2600,88 @@ class NetworksAPI:
|
|
|
2285
2600
|
:param vpc_endpoints: :class:`NetworkVpcEndpoints` (optional)
|
|
2286
2601
|
If specified, contains the VPC endpoints used to allow cluster communication from this VPC over [AWS
|
|
2287
2602
|
PrivateLink].
|
|
2288
|
-
|
|
2603
|
+
|
|
2289
2604
|
[AWS PrivateLink]: https://aws.amazon.com/privatelink/
|
|
2290
2605
|
:param vpc_id: str (optional)
|
|
2291
2606
|
The ID of the VPC associated with this network. VPC IDs can be used in multiple network
|
|
2292
2607
|
configurations.
|
|
2293
|
-
|
|
2608
|
+
|
|
2294
2609
|
:returns: :class:`Network`
|
|
2295
2610
|
"""
|
|
2296
2611
|
body = {}
|
|
2297
|
-
if gcp_network_info is not None:
|
|
2298
|
-
|
|
2299
|
-
if
|
|
2300
|
-
|
|
2301
|
-
if
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2612
|
+
if gcp_network_info is not None:
|
|
2613
|
+
body["gcp_network_info"] = gcp_network_info.as_dict()
|
|
2614
|
+
if network_name is not None:
|
|
2615
|
+
body["network_name"] = network_name
|
|
2616
|
+
if security_group_ids is not None:
|
|
2617
|
+
body["security_group_ids"] = [v for v in security_group_ids]
|
|
2618
|
+
if subnet_ids is not None:
|
|
2619
|
+
body["subnet_ids"] = [v for v in subnet_ids]
|
|
2620
|
+
if vpc_endpoints is not None:
|
|
2621
|
+
body["vpc_endpoints"] = vpc_endpoints.as_dict()
|
|
2622
|
+
if vpc_id is not None:
|
|
2623
|
+
body["vpc_id"] = vpc_id
|
|
2624
|
+
headers = {
|
|
2625
|
+
"Accept": "application/json",
|
|
2626
|
+
"Content-Type": "application/json",
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2629
|
+
res = self._api.do("POST", f"/api/2.0/accounts/{self._api.account_id}/networks", body=body, headers=headers)
|
|
2309
2630
|
return Network.from_dict(res)
|
|
2310
2631
|
|
|
2311
2632
|
def delete(self, network_id: str):
|
|
2312
2633
|
"""Delete a network configuration.
|
|
2313
|
-
|
|
2634
|
+
|
|
2314
2635
|
Deletes a Databricks network configuration, which represents a cloud VPC and its resources. You cannot
|
|
2315
2636
|
delete a network that is associated with a workspace.
|
|
2316
|
-
|
|
2637
|
+
|
|
2317
2638
|
This operation is available only if your account is on the E2 version of the platform.
|
|
2318
|
-
|
|
2639
|
+
|
|
2319
2640
|
:param network_id: str
|
|
2320
2641
|
Databricks Account API network configuration ID.
|
|
2321
|
-
|
|
2322
|
-
|
|
2642
|
+
|
|
2643
|
+
|
|
2323
2644
|
"""
|
|
2324
2645
|
|
|
2325
|
-
headers = {
|
|
2646
|
+
headers = {
|
|
2647
|
+
"Accept": "application/json",
|
|
2648
|
+
}
|
|
2326
2649
|
|
|
2327
|
-
self._api.do(
|
|
2328
|
-
f'/api/2.0/accounts/{self._api.account_id}/networks/{network_id}',
|
|
2329
|
-
headers=headers)
|
|
2650
|
+
self._api.do("DELETE", f"/api/2.0/accounts/{self._api.account_id}/networks/{network_id}", headers=headers)
|
|
2330
2651
|
|
|
2331
2652
|
def get(self, network_id: str) -> Network:
|
|
2332
2653
|
"""Get a network configuration.
|
|
2333
|
-
|
|
2654
|
+
|
|
2334
2655
|
Gets a Databricks network configuration, which represents a cloud VPC and its resources.
|
|
2335
|
-
|
|
2656
|
+
|
|
2336
2657
|
:param network_id: str
|
|
2337
2658
|
Databricks Account API network configuration ID.
|
|
2338
|
-
|
|
2659
|
+
|
|
2339
2660
|
:returns: :class:`Network`
|
|
2340
2661
|
"""
|
|
2341
2662
|
|
|
2342
|
-
headers = {
|
|
2663
|
+
headers = {
|
|
2664
|
+
"Accept": "application/json",
|
|
2665
|
+
}
|
|
2343
2666
|
|
|
2344
|
-
res = self._api.do(
|
|
2345
|
-
f'/api/2.0/accounts/{self._api.account_id}/networks/{network_id}',
|
|
2346
|
-
headers=headers)
|
|
2667
|
+
res = self._api.do("GET", f"/api/2.0/accounts/{self._api.account_id}/networks/{network_id}", headers=headers)
|
|
2347
2668
|
return Network.from_dict(res)
|
|
2348
2669
|
|
|
2349
2670
|
def list(self) -> Iterator[Network]:
|
|
2350
2671
|
"""Get all network configurations.
|
|
2351
|
-
|
|
2672
|
+
|
|
2352
2673
|
Gets a list of all Databricks network configurations for an account, specified by ID.
|
|
2353
|
-
|
|
2674
|
+
|
|
2354
2675
|
This operation is available only if your account is on the E2 version of the platform.
|
|
2355
|
-
|
|
2676
|
+
|
|
2356
2677
|
:returns: Iterator over :class:`Network`
|
|
2357
2678
|
"""
|
|
2358
2679
|
|
|
2359
|
-
headers = {
|
|
2680
|
+
headers = {
|
|
2681
|
+
"Accept": "application/json",
|
|
2682
|
+
}
|
|
2360
2683
|
|
|
2361
|
-
res = self._api.do(
|
|
2684
|
+
res = self._api.do("GET", f"/api/2.0/accounts/{self._api.account_id}/networks", headers=headers)
|
|
2362
2685
|
return [Network.from_dict(v) for v in res]
|
|
2363
2686
|
|
|
2364
2687
|
|
|
@@ -2368,28 +2691,30 @@ class PrivateAccessAPI:
|
|
|
2368
2691
|
def __init__(self, api_client):
|
|
2369
2692
|
self._api = api_client
|
|
2370
2693
|
|
|
2371
|
-
def create(
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2694
|
+
def create(
|
|
2695
|
+
self,
|
|
2696
|
+
private_access_settings_name: str,
|
|
2697
|
+
region: str,
|
|
2698
|
+
*,
|
|
2699
|
+
allowed_vpc_endpoint_ids: Optional[List[str]] = None,
|
|
2700
|
+
private_access_level: Optional[PrivateAccessLevel] = None,
|
|
2701
|
+
public_access_enabled: Optional[bool] = None,
|
|
2702
|
+
) -> PrivateAccessSettings:
|
|
2378
2703
|
"""Create private access settings.
|
|
2379
|
-
|
|
2704
|
+
|
|
2380
2705
|
Creates a private access settings object, which specifies how your workspace is accessed over [AWS
|
|
2381
2706
|
PrivateLink]. To use AWS PrivateLink, a workspace must have a private access settings object
|
|
2382
2707
|
referenced by ID in the workspace's `private_access_settings_id` property.
|
|
2383
|
-
|
|
2708
|
+
|
|
2384
2709
|
You can share one private access settings with multiple workspaces in a single account. However,
|
|
2385
2710
|
private access settings are specific to AWS regions, so only workspaces in the same AWS region can use
|
|
2386
2711
|
a given private access settings object.
|
|
2387
|
-
|
|
2712
|
+
|
|
2388
2713
|
Before configuring PrivateLink, read the [Databricks article about PrivateLink].
|
|
2389
|
-
|
|
2714
|
+
|
|
2390
2715
|
[AWS PrivateLink]: https://aws.amazon.com/privatelink
|
|
2391
2716
|
[Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html
|
|
2392
|
-
|
|
2717
|
+
|
|
2393
2718
|
:param private_access_settings_name: str
|
|
2394
2719
|
The human-readable name of the private access settings object.
|
|
2395
2720
|
:param region: str
|
|
@@ -2398,14 +2723,14 @@ class PrivateAccessAPI:
|
|
|
2398
2723
|
An array of Databricks VPC endpoint IDs. This is the Databricks ID that is returned when registering
|
|
2399
2724
|
the VPC endpoint configuration in your Databricks account. This is not the ID of the VPC endpoint in
|
|
2400
2725
|
AWS.
|
|
2401
|
-
|
|
2726
|
+
|
|
2402
2727
|
Only used when `private_access_level` is set to `ENDPOINT`. This is an allow list of VPC endpoints
|
|
2403
2728
|
that in your account that can connect to your workspace over AWS PrivateLink.
|
|
2404
|
-
|
|
2729
|
+
|
|
2405
2730
|
If hybrid access to your workspace is enabled by setting `public_access_enabled` to `true`, this
|
|
2406
2731
|
control only works for PrivateLink connections. To control how your workspace is accessed via public
|
|
2407
2732
|
internet, see [IP access lists].
|
|
2408
|
-
|
|
2733
|
+
|
|
2409
2734
|
[IP access lists]: https://docs.databricks.com/security/network/ip-access-list.html
|
|
2410
2735
|
:param private_access_level: :class:`PrivateAccessLevel` (optional)
|
|
2411
2736
|
The private access level controls which VPC endpoints can connect to the UI or API of any workspace
|
|
@@ -2417,117 +2742,130 @@ class PrivateAccessAPI:
|
|
|
2417
2742
|
Determines if the workspace can be accessed over public internet. For fully private workspaces, you
|
|
2418
2743
|
can optionally specify `false`, but only if you implement both the front-end and the back-end
|
|
2419
2744
|
PrivateLink connections. Otherwise, specify `true`, which means that public access is enabled.
|
|
2420
|
-
|
|
2745
|
+
|
|
2421
2746
|
:returns: :class:`PrivateAccessSettings`
|
|
2422
2747
|
"""
|
|
2423
2748
|
body = {}
|
|
2424
2749
|
if allowed_vpc_endpoint_ids is not None:
|
|
2425
|
-
body[
|
|
2426
|
-
if private_access_level is not None:
|
|
2750
|
+
body["allowed_vpc_endpoint_ids"] = [v for v in allowed_vpc_endpoint_ids]
|
|
2751
|
+
if private_access_level is not None:
|
|
2752
|
+
body["private_access_level"] = private_access_level.value
|
|
2427
2753
|
if private_access_settings_name is not None:
|
|
2428
|
-
body[
|
|
2429
|
-
if public_access_enabled is not None:
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2754
|
+
body["private_access_settings_name"] = private_access_settings_name
|
|
2755
|
+
if public_access_enabled is not None:
|
|
2756
|
+
body["public_access_enabled"] = public_access_enabled
|
|
2757
|
+
if region is not None:
|
|
2758
|
+
body["region"] = region
|
|
2759
|
+
headers = {
|
|
2760
|
+
"Accept": "application/json",
|
|
2761
|
+
"Content-Type": "application/json",
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2764
|
+
res = self._api.do(
|
|
2765
|
+
"POST", f"/api/2.0/accounts/{self._api.account_id}/private-access-settings", body=body, headers=headers
|
|
2766
|
+
)
|
|
2437
2767
|
return PrivateAccessSettings.from_dict(res)
|
|
2438
2768
|
|
|
2439
2769
|
def delete(self, private_access_settings_id: str):
|
|
2440
2770
|
"""Delete a private access settings object.
|
|
2441
|
-
|
|
2771
|
+
|
|
2442
2772
|
Deletes a private access settings object, which determines how your workspace is accessed over [AWS
|
|
2443
2773
|
PrivateLink].
|
|
2444
|
-
|
|
2774
|
+
|
|
2445
2775
|
Before configuring PrivateLink, read the [Databricks article about PrivateLink].",
|
|
2446
|
-
|
|
2776
|
+
|
|
2447
2777
|
[AWS PrivateLink]: https://aws.amazon.com/privatelink
|
|
2448
2778
|
[Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html
|
|
2449
|
-
|
|
2779
|
+
|
|
2450
2780
|
:param private_access_settings_id: str
|
|
2451
2781
|
Databricks Account API private access settings ID.
|
|
2452
|
-
|
|
2453
|
-
|
|
2782
|
+
|
|
2783
|
+
|
|
2454
2784
|
"""
|
|
2455
2785
|
|
|
2456
|
-
headers = {
|
|
2786
|
+
headers = {
|
|
2787
|
+
"Accept": "application/json",
|
|
2788
|
+
}
|
|
2457
2789
|
|
|
2458
2790
|
self._api.do(
|
|
2459
|
-
|
|
2460
|
-
f
|
|
2461
|
-
headers=headers
|
|
2791
|
+
"DELETE",
|
|
2792
|
+
f"/api/2.0/accounts/{self._api.account_id}/private-access-settings/{private_access_settings_id}",
|
|
2793
|
+
headers=headers,
|
|
2794
|
+
)
|
|
2462
2795
|
|
|
2463
2796
|
def get(self, private_access_settings_id: str) -> PrivateAccessSettings:
|
|
2464
2797
|
"""Get a private access settings object.
|
|
2465
|
-
|
|
2798
|
+
|
|
2466
2799
|
Gets a private access settings object, which specifies how your workspace is accessed over [AWS
|
|
2467
2800
|
PrivateLink].
|
|
2468
|
-
|
|
2801
|
+
|
|
2469
2802
|
Before configuring PrivateLink, read the [Databricks article about PrivateLink].",
|
|
2470
|
-
|
|
2803
|
+
|
|
2471
2804
|
[AWS PrivateLink]: https://aws.amazon.com/privatelink
|
|
2472
2805
|
[Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html
|
|
2473
|
-
|
|
2806
|
+
|
|
2474
2807
|
:param private_access_settings_id: str
|
|
2475
2808
|
Databricks Account API private access settings ID.
|
|
2476
|
-
|
|
2809
|
+
|
|
2477
2810
|
:returns: :class:`PrivateAccessSettings`
|
|
2478
2811
|
"""
|
|
2479
2812
|
|
|
2480
|
-
headers = {
|
|
2813
|
+
headers = {
|
|
2814
|
+
"Accept": "application/json",
|
|
2815
|
+
}
|
|
2481
2816
|
|
|
2482
2817
|
res = self._api.do(
|
|
2483
|
-
|
|
2484
|
-
f
|
|
2485
|
-
headers=headers
|
|
2818
|
+
"GET",
|
|
2819
|
+
f"/api/2.0/accounts/{self._api.account_id}/private-access-settings/{private_access_settings_id}",
|
|
2820
|
+
headers=headers,
|
|
2821
|
+
)
|
|
2486
2822
|
return PrivateAccessSettings.from_dict(res)
|
|
2487
2823
|
|
|
2488
2824
|
def list(self) -> Iterator[PrivateAccessSettings]:
|
|
2489
2825
|
"""Get all private access settings objects.
|
|
2490
|
-
|
|
2826
|
+
|
|
2491
2827
|
Gets a list of all private access settings objects for an account, specified by ID.
|
|
2492
|
-
|
|
2828
|
+
|
|
2493
2829
|
:returns: Iterator over :class:`PrivateAccessSettings`
|
|
2494
2830
|
"""
|
|
2495
2831
|
|
|
2496
|
-
headers = {
|
|
2832
|
+
headers = {
|
|
2833
|
+
"Accept": "application/json",
|
|
2834
|
+
}
|
|
2497
2835
|
|
|
2498
|
-
res = self._api.do(
|
|
2499
|
-
f'/api/2.0/accounts/{self._api.account_id}/private-access-settings',
|
|
2500
|
-
headers=headers)
|
|
2836
|
+
res = self._api.do("GET", f"/api/2.0/accounts/{self._api.account_id}/private-access-settings", headers=headers)
|
|
2501
2837
|
return [PrivateAccessSettings.from_dict(v) for v in res]
|
|
2502
2838
|
|
|
2503
|
-
def replace(
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2839
|
+
def replace(
|
|
2840
|
+
self,
|
|
2841
|
+
private_access_settings_id: str,
|
|
2842
|
+
private_access_settings_name: str,
|
|
2843
|
+
region: str,
|
|
2844
|
+
*,
|
|
2845
|
+
allowed_vpc_endpoint_ids: Optional[List[str]] = None,
|
|
2846
|
+
private_access_level: Optional[PrivateAccessLevel] = None,
|
|
2847
|
+
public_access_enabled: Optional[bool] = None,
|
|
2848
|
+
):
|
|
2511
2849
|
"""Replace private access settings.
|
|
2512
|
-
|
|
2850
|
+
|
|
2513
2851
|
Updates an existing private access settings object, which specifies how your workspace is accessed
|
|
2514
2852
|
over [AWS PrivateLink]. To use AWS PrivateLink, a workspace must have a private access settings object
|
|
2515
2853
|
referenced by ID in the workspace's `private_access_settings_id` property.
|
|
2516
|
-
|
|
2854
|
+
|
|
2517
2855
|
This operation completely overwrites your existing private access settings object attached to your
|
|
2518
2856
|
workspaces. All workspaces attached to the private access settings are affected by any change. If
|
|
2519
2857
|
`public_access_enabled`, `private_access_level`, or `allowed_vpc_endpoint_ids` are updated, effects of
|
|
2520
2858
|
these changes might take several minutes to propagate to the workspace API.
|
|
2521
|
-
|
|
2859
|
+
|
|
2522
2860
|
You can share one private access settings object with multiple workspaces in a single account.
|
|
2523
2861
|
However, private access settings are specific to AWS regions, so only workspaces in the same AWS
|
|
2524
2862
|
region can use a given private access settings object.
|
|
2525
|
-
|
|
2863
|
+
|
|
2526
2864
|
Before configuring PrivateLink, read the [Databricks article about PrivateLink].
|
|
2527
|
-
|
|
2865
|
+
|
|
2528
2866
|
[AWS PrivateLink]: https://aws.amazon.com/privatelink
|
|
2529
2867
|
[Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html
|
|
2530
|
-
|
|
2868
|
+
|
|
2531
2869
|
:param private_access_settings_id: str
|
|
2532
2870
|
Databricks Account API private access settings ID.
|
|
2533
2871
|
:param private_access_settings_name: str
|
|
@@ -2538,14 +2876,14 @@ class PrivateAccessAPI:
|
|
|
2538
2876
|
An array of Databricks VPC endpoint IDs. This is the Databricks ID that is returned when registering
|
|
2539
2877
|
the VPC endpoint configuration in your Databricks account. This is not the ID of the VPC endpoint in
|
|
2540
2878
|
AWS.
|
|
2541
|
-
|
|
2879
|
+
|
|
2542
2880
|
Only used when `private_access_level` is set to `ENDPOINT`. This is an allow list of VPC endpoints
|
|
2543
2881
|
that in your account that can connect to your workspace over AWS PrivateLink.
|
|
2544
|
-
|
|
2882
|
+
|
|
2545
2883
|
If hybrid access to your workspace is enabled by setting `public_access_enabled` to `true`, this
|
|
2546
2884
|
control only works for PrivateLink connections. To control how your workspace is accessed via public
|
|
2547
2885
|
internet, see [IP access lists].
|
|
2548
|
-
|
|
2886
|
+
|
|
2549
2887
|
[IP access lists]: https://docs.databricks.com/security/network/ip-access-list.html
|
|
2550
2888
|
:param private_access_level: :class:`PrivateAccessLevel` (optional)
|
|
2551
2889
|
The private access level controls which VPC endpoints can connect to the UI or API of any workspace
|
|
@@ -2557,24 +2895,31 @@ class PrivateAccessAPI:
|
|
|
2557
2895
|
Determines if the workspace can be accessed over public internet. For fully private workspaces, you
|
|
2558
2896
|
can optionally specify `false`, but only if you implement both the front-end and the back-end
|
|
2559
2897
|
PrivateLink connections. Otherwise, specify `true`, which means that public access is enabled.
|
|
2560
|
-
|
|
2561
|
-
|
|
2898
|
+
|
|
2899
|
+
|
|
2562
2900
|
"""
|
|
2563
2901
|
body = {}
|
|
2564
2902
|
if allowed_vpc_endpoint_ids is not None:
|
|
2565
|
-
body[
|
|
2566
|
-
if private_access_level is not None:
|
|
2903
|
+
body["allowed_vpc_endpoint_ids"] = [v for v in allowed_vpc_endpoint_ids]
|
|
2904
|
+
if private_access_level is not None:
|
|
2905
|
+
body["private_access_level"] = private_access_level.value
|
|
2567
2906
|
if private_access_settings_name is not None:
|
|
2568
|
-
body[
|
|
2569
|
-
if public_access_enabled is not None:
|
|
2570
|
-
|
|
2571
|
-
|
|
2907
|
+
body["private_access_settings_name"] = private_access_settings_name
|
|
2908
|
+
if public_access_enabled is not None:
|
|
2909
|
+
body["public_access_enabled"] = public_access_enabled
|
|
2910
|
+
if region is not None:
|
|
2911
|
+
body["region"] = region
|
|
2912
|
+
headers = {
|
|
2913
|
+
"Accept": "application/json",
|
|
2914
|
+
"Content-Type": "application/json",
|
|
2915
|
+
}
|
|
2572
2916
|
|
|
2573
2917
|
self._api.do(
|
|
2574
|
-
|
|
2575
|
-
f
|
|
2918
|
+
"PUT",
|
|
2919
|
+
f"/api/2.0/accounts/{self._api.account_id}/private-access-settings/{private_access_settings_id}",
|
|
2576
2920
|
body=body,
|
|
2577
|
-
headers=headers
|
|
2921
|
+
headers=headers,
|
|
2922
|
+
)
|
|
2578
2923
|
|
|
2579
2924
|
|
|
2580
2925
|
class StorageAPI:
|
|
@@ -2586,90 +2931,98 @@ class StorageAPI:
|
|
|
2586
2931
|
def __init__(self, api_client):
|
|
2587
2932
|
self._api = api_client
|
|
2588
2933
|
|
|
2589
|
-
def create(self, storage_configuration_name: str,
|
|
2590
|
-
root_bucket_info: RootBucketInfo) -> StorageConfiguration:
|
|
2934
|
+
def create(self, storage_configuration_name: str, root_bucket_info: RootBucketInfo) -> StorageConfiguration:
|
|
2591
2935
|
"""Create new storage configuration.
|
|
2592
|
-
|
|
2936
|
+
|
|
2593
2937
|
Creates new storage configuration for an account, specified by ID. Uploads a storage configuration
|
|
2594
2938
|
object that represents the root AWS S3 bucket in your account. Databricks stores related workspace
|
|
2595
2939
|
assets including DBFS, cluster logs, and job results. For the AWS S3 bucket, you need to configure the
|
|
2596
2940
|
required bucket policy.
|
|
2597
|
-
|
|
2941
|
+
|
|
2598
2942
|
For information about how to create a new workspace with this API, see [Create a new workspace using
|
|
2599
2943
|
the Account API]
|
|
2600
|
-
|
|
2944
|
+
|
|
2601
2945
|
[Create a new workspace using the Account API]: http://docs.databricks.com/administration-guide/account-api/new-workspace.html
|
|
2602
|
-
|
|
2946
|
+
|
|
2603
2947
|
:param storage_configuration_name: str
|
|
2604
2948
|
The human-readable name of the storage configuration.
|
|
2605
2949
|
:param root_bucket_info: :class:`RootBucketInfo`
|
|
2606
2950
|
Root S3 bucket information.
|
|
2607
|
-
|
|
2951
|
+
|
|
2608
2952
|
:returns: :class:`StorageConfiguration`
|
|
2609
2953
|
"""
|
|
2610
2954
|
body = {}
|
|
2611
|
-
if root_bucket_info is not None:
|
|
2955
|
+
if root_bucket_info is not None:
|
|
2956
|
+
body["root_bucket_info"] = root_bucket_info.as_dict()
|
|
2612
2957
|
if storage_configuration_name is not None:
|
|
2613
|
-
body[
|
|
2614
|
-
headers = {
|
|
2958
|
+
body["storage_configuration_name"] = storage_configuration_name
|
|
2959
|
+
headers = {
|
|
2960
|
+
"Accept": "application/json",
|
|
2961
|
+
"Content-Type": "application/json",
|
|
2962
|
+
}
|
|
2615
2963
|
|
|
2616
|
-
res = self._api.do(
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
headers=headers)
|
|
2964
|
+
res = self._api.do(
|
|
2965
|
+
"POST", f"/api/2.0/accounts/{self._api.account_id}/storage-configurations", body=body, headers=headers
|
|
2966
|
+
)
|
|
2620
2967
|
return StorageConfiguration.from_dict(res)
|
|
2621
2968
|
|
|
2622
2969
|
def delete(self, storage_configuration_id: str):
|
|
2623
2970
|
"""Delete storage configuration.
|
|
2624
|
-
|
|
2971
|
+
|
|
2625
2972
|
Deletes a Databricks storage configuration. You cannot delete a storage configuration that is
|
|
2626
2973
|
associated with any workspace.
|
|
2627
|
-
|
|
2974
|
+
|
|
2628
2975
|
:param storage_configuration_id: str
|
|
2629
2976
|
Databricks Account API storage configuration ID.
|
|
2630
|
-
|
|
2631
|
-
|
|
2977
|
+
|
|
2978
|
+
|
|
2632
2979
|
"""
|
|
2633
2980
|
|
|
2634
|
-
headers = {
|
|
2981
|
+
headers = {
|
|
2982
|
+
"Accept": "application/json",
|
|
2983
|
+
}
|
|
2635
2984
|
|
|
2636
2985
|
self._api.do(
|
|
2637
|
-
|
|
2638
|
-
f
|
|
2639
|
-
headers=headers
|
|
2986
|
+
"DELETE",
|
|
2987
|
+
f"/api/2.0/accounts/{self._api.account_id}/storage-configurations/{storage_configuration_id}",
|
|
2988
|
+
headers=headers,
|
|
2989
|
+
)
|
|
2640
2990
|
|
|
2641
2991
|
def get(self, storage_configuration_id: str) -> StorageConfiguration:
|
|
2642
2992
|
"""Get storage configuration.
|
|
2643
|
-
|
|
2993
|
+
|
|
2644
2994
|
Gets a Databricks storage configuration for an account, both specified by ID.
|
|
2645
|
-
|
|
2995
|
+
|
|
2646
2996
|
:param storage_configuration_id: str
|
|
2647
2997
|
Databricks Account API storage configuration ID.
|
|
2648
|
-
|
|
2998
|
+
|
|
2649
2999
|
:returns: :class:`StorageConfiguration`
|
|
2650
3000
|
"""
|
|
2651
3001
|
|
|
2652
|
-
headers = {
|
|
3002
|
+
headers = {
|
|
3003
|
+
"Accept": "application/json",
|
|
3004
|
+
}
|
|
2653
3005
|
|
|
2654
3006
|
res = self._api.do(
|
|
2655
|
-
|
|
2656
|
-
f
|
|
2657
|
-
headers=headers
|
|
3007
|
+
"GET",
|
|
3008
|
+
f"/api/2.0/accounts/{self._api.account_id}/storage-configurations/{storage_configuration_id}",
|
|
3009
|
+
headers=headers,
|
|
3010
|
+
)
|
|
2658
3011
|
return StorageConfiguration.from_dict(res)
|
|
2659
3012
|
|
|
2660
3013
|
def list(self) -> Iterator[StorageConfiguration]:
|
|
2661
3014
|
"""Get all storage configurations.
|
|
2662
|
-
|
|
3015
|
+
|
|
2663
3016
|
Gets a list of all Databricks storage configurations for your account, specified by ID.
|
|
2664
|
-
|
|
3017
|
+
|
|
2665
3018
|
:returns: Iterator over :class:`StorageConfiguration`
|
|
2666
3019
|
"""
|
|
2667
3020
|
|
|
2668
|
-
headers = {
|
|
3021
|
+
headers = {
|
|
3022
|
+
"Accept": "application/json",
|
|
3023
|
+
}
|
|
2669
3024
|
|
|
2670
|
-
res = self._api.do(
|
|
2671
|
-
f'/api/2.0/accounts/{self._api.account_id}/storage-configurations',
|
|
2672
|
-
headers=headers)
|
|
3025
|
+
res = self._api.do("GET", f"/api/2.0/accounts/{self._api.account_id}/storage-configurations", headers=headers)
|
|
2673
3026
|
return [StorageConfiguration.from_dict(v) for v in res]
|
|
2674
3027
|
|
|
2675
3028
|
|
|
@@ -2679,27 +3032,29 @@ class VpcEndpointsAPI:
|
|
|
2679
3032
|
def __init__(self, api_client):
|
|
2680
3033
|
self._api = api_client
|
|
2681
3034
|
|
|
2682
|
-
def create(
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
3035
|
+
def create(
|
|
3036
|
+
self,
|
|
3037
|
+
vpc_endpoint_name: str,
|
|
3038
|
+
*,
|
|
3039
|
+
aws_vpc_endpoint_id: Optional[str] = None,
|
|
3040
|
+
gcp_vpc_endpoint_info: Optional[GcpVpcEndpointInfo] = None,
|
|
3041
|
+
region: Optional[str] = None,
|
|
3042
|
+
) -> VpcEndpoint:
|
|
2688
3043
|
"""Create VPC endpoint configuration.
|
|
2689
|
-
|
|
3044
|
+
|
|
2690
3045
|
Creates a VPC endpoint configuration, which represents a [VPC endpoint] object in AWS used to
|
|
2691
3046
|
communicate privately with Databricks over [AWS PrivateLink].
|
|
2692
|
-
|
|
3047
|
+
|
|
2693
3048
|
After you create the VPC endpoint configuration, the Databricks [endpoint service] automatically
|
|
2694
3049
|
accepts the VPC endpoint.
|
|
2695
|
-
|
|
3050
|
+
|
|
2696
3051
|
Before configuring PrivateLink, read the [Databricks article about PrivateLink].
|
|
2697
|
-
|
|
3052
|
+
|
|
2698
3053
|
[AWS PrivateLink]: https://aws.amazon.com/privatelink
|
|
2699
3054
|
[Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html
|
|
2700
3055
|
[VPC endpoint]: https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints.html
|
|
2701
3056
|
[endpoint service]: https://docs.aws.amazon.com/vpc/latest/privatelink/privatelink-share-your-services.html
|
|
2702
|
-
|
|
3057
|
+
|
|
2703
3058
|
:param vpc_endpoint_name: str
|
|
2704
3059
|
The human-readable name of the storage configuration.
|
|
2705
3060
|
:param aws_vpc_endpoint_id: str (optional)
|
|
@@ -2708,83 +3063,95 @@ class VpcEndpointsAPI:
|
|
|
2708
3063
|
The Google Cloud specific information for this Private Service Connect endpoint.
|
|
2709
3064
|
:param region: str (optional)
|
|
2710
3065
|
The AWS region in which this VPC endpoint object exists.
|
|
2711
|
-
|
|
3066
|
+
|
|
2712
3067
|
:returns: :class:`VpcEndpoint`
|
|
2713
3068
|
"""
|
|
2714
3069
|
body = {}
|
|
2715
|
-
if aws_vpc_endpoint_id is not None:
|
|
2716
|
-
|
|
2717
|
-
if
|
|
2718
|
-
|
|
2719
|
-
|
|
3070
|
+
if aws_vpc_endpoint_id is not None:
|
|
3071
|
+
body["aws_vpc_endpoint_id"] = aws_vpc_endpoint_id
|
|
3072
|
+
if gcp_vpc_endpoint_info is not None:
|
|
3073
|
+
body["gcp_vpc_endpoint_info"] = gcp_vpc_endpoint_info.as_dict()
|
|
3074
|
+
if region is not None:
|
|
3075
|
+
body["region"] = region
|
|
3076
|
+
if vpc_endpoint_name is not None:
|
|
3077
|
+
body["vpc_endpoint_name"] = vpc_endpoint_name
|
|
3078
|
+
headers = {
|
|
3079
|
+
"Accept": "application/json",
|
|
3080
|
+
"Content-Type": "application/json",
|
|
3081
|
+
}
|
|
2720
3082
|
|
|
2721
|
-
res = self._api.do(
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
headers=headers)
|
|
3083
|
+
res = self._api.do(
|
|
3084
|
+
"POST", f"/api/2.0/accounts/{self._api.account_id}/vpc-endpoints", body=body, headers=headers
|
|
3085
|
+
)
|
|
2725
3086
|
return VpcEndpoint.from_dict(res)
|
|
2726
3087
|
|
|
2727
3088
|
def delete(self, vpc_endpoint_id: str):
|
|
2728
3089
|
"""Delete VPC endpoint configuration.
|
|
2729
|
-
|
|
3090
|
+
|
|
2730
3091
|
Deletes a VPC endpoint configuration, which represents an [AWS VPC endpoint] that can communicate
|
|
2731
3092
|
privately with Databricks over [AWS PrivateLink].
|
|
2732
|
-
|
|
3093
|
+
|
|
2733
3094
|
Before configuring PrivateLink, read the [Databricks article about PrivateLink].
|
|
2734
|
-
|
|
3095
|
+
|
|
2735
3096
|
[AWS PrivateLink]: https://aws.amazon.com/privatelink
|
|
2736
3097
|
[AWS VPC endpoint]: https://docs.aws.amazon.com/vpc/latest/privatelink/concepts.html
|
|
2737
3098
|
[Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html
|
|
2738
|
-
|
|
3099
|
+
|
|
2739
3100
|
:param vpc_endpoint_id: str
|
|
2740
3101
|
Databricks VPC endpoint ID.
|
|
2741
|
-
|
|
2742
|
-
|
|
3102
|
+
|
|
3103
|
+
|
|
2743
3104
|
"""
|
|
2744
3105
|
|
|
2745
|
-
headers = {
|
|
3106
|
+
headers = {
|
|
3107
|
+
"Accept": "application/json",
|
|
3108
|
+
}
|
|
2746
3109
|
|
|
2747
|
-
self._api.do(
|
|
2748
|
-
|
|
2749
|
-
|
|
3110
|
+
self._api.do(
|
|
3111
|
+
"DELETE", f"/api/2.0/accounts/{self._api.account_id}/vpc-endpoints/{vpc_endpoint_id}", headers=headers
|
|
3112
|
+
)
|
|
2750
3113
|
|
|
2751
3114
|
def get(self, vpc_endpoint_id: str) -> VpcEndpoint:
|
|
2752
3115
|
"""Get a VPC endpoint configuration.
|
|
2753
|
-
|
|
3116
|
+
|
|
2754
3117
|
Gets a VPC endpoint configuration, which represents a [VPC endpoint] object in AWS used to communicate
|
|
2755
3118
|
privately with Databricks over [AWS PrivateLink].
|
|
2756
|
-
|
|
3119
|
+
|
|
2757
3120
|
[AWS PrivateLink]: https://aws.amazon.com/privatelink
|
|
2758
3121
|
[VPC endpoint]: https://docs.aws.amazon.com/vpc/latest/privatelink/concepts.html
|
|
2759
|
-
|
|
3122
|
+
|
|
2760
3123
|
:param vpc_endpoint_id: str
|
|
2761
3124
|
Databricks VPC endpoint ID.
|
|
2762
|
-
|
|
3125
|
+
|
|
2763
3126
|
:returns: :class:`VpcEndpoint`
|
|
2764
3127
|
"""
|
|
2765
3128
|
|
|
2766
|
-
headers = {
|
|
3129
|
+
headers = {
|
|
3130
|
+
"Accept": "application/json",
|
|
3131
|
+
}
|
|
2767
3132
|
|
|
2768
|
-
res = self._api.do(
|
|
2769
|
-
|
|
2770
|
-
|
|
3133
|
+
res = self._api.do(
|
|
3134
|
+
"GET", f"/api/2.0/accounts/{self._api.account_id}/vpc-endpoints/{vpc_endpoint_id}", headers=headers
|
|
3135
|
+
)
|
|
2771
3136
|
return VpcEndpoint.from_dict(res)
|
|
2772
3137
|
|
|
2773
3138
|
def list(self) -> Iterator[VpcEndpoint]:
|
|
2774
3139
|
"""Get all VPC endpoint configurations.
|
|
2775
|
-
|
|
3140
|
+
|
|
2776
3141
|
Gets a list of all VPC endpoints for an account, specified by ID.
|
|
2777
|
-
|
|
3142
|
+
|
|
2778
3143
|
Before configuring PrivateLink, read the [Databricks article about PrivateLink].
|
|
2779
|
-
|
|
3144
|
+
|
|
2780
3145
|
[Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html
|
|
2781
|
-
|
|
3146
|
+
|
|
2782
3147
|
:returns: Iterator over :class:`VpcEndpoint`
|
|
2783
3148
|
"""
|
|
2784
3149
|
|
|
2785
|
-
headers = {
|
|
3150
|
+
headers = {
|
|
3151
|
+
"Accept": "application/json",
|
|
3152
|
+
}
|
|
2786
3153
|
|
|
2787
|
-
res = self._api.do(
|
|
3154
|
+
res = self._api.do("GET", f"/api/2.0/accounts/{self._api.account_id}/vpc-endpoints", headers=headers)
|
|
2788
3155
|
return [VpcEndpoint.from_dict(v) for v in res]
|
|
2789
3156
|
|
|
2790
3157
|
|
|
@@ -2792,21 +3159,23 @@ class WorkspacesAPI:
|
|
|
2792
3159
|
"""These APIs manage workspaces for this account. A Databricks workspace is an environment for accessing all
|
|
2793
3160
|
of your Databricks assets. The workspace organizes objects (notebooks, libraries, and experiments) into
|
|
2794
3161
|
folders, and provides access to data and computational resources such as clusters and jobs.
|
|
2795
|
-
|
|
3162
|
+
|
|
2796
3163
|
These endpoints are available if your account is on the E2 version of the platform or on a select custom
|
|
2797
3164
|
plan that allows multiple workspaces per account."""
|
|
2798
3165
|
|
|
2799
3166
|
def __init__(self, api_client):
|
|
2800
3167
|
self._api = api_client
|
|
2801
3168
|
|
|
2802
|
-
def wait_get_workspace_running(
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
callback: Optional[Callable[[Workspace], None]] = None) -> Workspace:
|
|
3169
|
+
def wait_get_workspace_running(
|
|
3170
|
+
self, workspace_id: int, timeout=timedelta(minutes=20), callback: Optional[Callable[[Workspace], None]] = None
|
|
3171
|
+
) -> Workspace:
|
|
2806
3172
|
deadline = time.time() + timeout.total_seconds()
|
|
2807
|
-
target_states = (WorkspaceStatus.RUNNING,
|
|
2808
|
-
failure_states = (
|
|
2809
|
-
|
|
3173
|
+
target_states = (WorkspaceStatus.RUNNING,)
|
|
3174
|
+
failure_states = (
|
|
3175
|
+
WorkspaceStatus.BANNED,
|
|
3176
|
+
WorkspaceStatus.FAILED,
|
|
3177
|
+
)
|
|
3178
|
+
status_message = "polling..."
|
|
2810
3179
|
attempt = 1
|
|
2811
3180
|
while time.time() < deadline:
|
|
2812
3181
|
poll = self.get(workspace_id=workspace_id)
|
|
@@ -2817,48 +3186,50 @@ class WorkspacesAPI:
|
|
|
2817
3186
|
if callback:
|
|
2818
3187
|
callback(poll)
|
|
2819
3188
|
if status in failure_states:
|
|
2820
|
-
msg = f
|
|
3189
|
+
msg = f"failed to reach RUNNING, got {status}: {status_message}"
|
|
2821
3190
|
raise OperationFailed(msg)
|
|
2822
3191
|
prefix = f"workspace_id={workspace_id}"
|
|
2823
3192
|
sleep = attempt
|
|
2824
3193
|
if sleep > 10:
|
|
2825
3194
|
# sleep 10s max per attempt
|
|
2826
3195
|
sleep = 10
|
|
2827
|
-
_LOG.debug(f
|
|
3196
|
+
_LOG.debug(f"{prefix}: ({status}) {status_message} (sleeping ~{sleep}s)")
|
|
2828
3197
|
time.sleep(sleep + random.random())
|
|
2829
3198
|
attempt += 1
|
|
2830
|
-
raise TimeoutError(f
|
|
2831
|
-
|
|
2832
|
-
def create(
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
3199
|
+
raise TimeoutError(f"timed out after {timeout}: {status_message}")
|
|
3200
|
+
|
|
3201
|
+
def create(
|
|
3202
|
+
self,
|
|
3203
|
+
workspace_name: str,
|
|
3204
|
+
*,
|
|
3205
|
+
aws_region: Optional[str] = None,
|
|
3206
|
+
cloud: Optional[str] = None,
|
|
3207
|
+
cloud_resource_container: Optional[CloudResourceContainer] = None,
|
|
3208
|
+
credentials_id: Optional[str] = None,
|
|
3209
|
+
custom_tags: Optional[Dict[str, str]] = None,
|
|
3210
|
+
deployment_name: Optional[str] = None,
|
|
3211
|
+
gcp_managed_network_config: Optional[GcpManagedNetworkConfig] = None,
|
|
3212
|
+
gke_config: Optional[GkeConfig] = None,
|
|
3213
|
+
is_no_public_ip_enabled: Optional[bool] = None,
|
|
3214
|
+
location: Optional[str] = None,
|
|
3215
|
+
managed_services_customer_managed_key_id: Optional[str] = None,
|
|
3216
|
+
network_id: Optional[str] = None,
|
|
3217
|
+
pricing_tier: Optional[PricingTier] = None,
|
|
3218
|
+
private_access_settings_id: Optional[str] = None,
|
|
3219
|
+
storage_configuration_id: Optional[str] = None,
|
|
3220
|
+
storage_customer_managed_key_id: Optional[str] = None,
|
|
3221
|
+
) -> Wait[Workspace]:
|
|
2851
3222
|
"""Create a new workspace.
|
|
2852
|
-
|
|
3223
|
+
|
|
2853
3224
|
Creates a new workspace.
|
|
2854
|
-
|
|
3225
|
+
|
|
2855
3226
|
**Important**: This operation is asynchronous. A response with HTTP status code 200 means the request
|
|
2856
3227
|
has been accepted and is in progress, but does not mean that the workspace deployed successfully and
|
|
2857
3228
|
is running. The initial workspace status is typically `PROVISIONING`. Use the workspace ID
|
|
2858
3229
|
(`workspace_id`) field in the response to identify the new workspace and make repeated `GET` requests
|
|
2859
3230
|
with the workspace ID and check its status. The workspace becomes available when the status changes to
|
|
2860
3231
|
`RUNNING`.
|
|
2861
|
-
|
|
3232
|
+
|
|
2862
3233
|
:param workspace_name: str
|
|
2863
3234
|
The workspace's human-readable name.
|
|
2864
3235
|
:param aws_region: str (optional)
|
|
@@ -2880,22 +3251,22 @@ class WorkspacesAPI:
|
|
|
2880
3251
|
deployment name is `abcsales`, your workspace URL will be `https://abcsales.cloud.databricks.com`.
|
|
2881
3252
|
Hyphens are allowed. This property supports only the set of characters that are allowed in a
|
|
2882
3253
|
subdomain.
|
|
2883
|
-
|
|
3254
|
+
|
|
2884
3255
|
To set this value, you must have a deployment name prefix. Contact your Databricks account team to
|
|
2885
3256
|
add an account deployment name prefix to your account.
|
|
2886
|
-
|
|
3257
|
+
|
|
2887
3258
|
Workspace deployment names follow the account prefix and a hyphen. For example, if your account's
|
|
2888
3259
|
deployment prefix is `acme` and the workspace deployment name is `workspace-1`, the JSON response
|
|
2889
3260
|
for the `deployment_name` field becomes `acme-workspace-1`. The workspace URL would be
|
|
2890
3261
|
`acme-workspace-1.cloud.databricks.com`.
|
|
2891
|
-
|
|
3262
|
+
|
|
2892
3263
|
You can also set the `deployment_name` to the reserved keyword `EMPTY` if you want the deployment
|
|
2893
3264
|
name to only include the deployment prefix. For example, if your account's deployment prefix is
|
|
2894
3265
|
`acme` and the workspace deployment name is `EMPTY`, the `deployment_name` becomes `acme` only and
|
|
2895
3266
|
the workspace URL is `acme.cloud.databricks.com`.
|
|
2896
|
-
|
|
3267
|
+
|
|
2897
3268
|
This value must be unique across all non-deleted deployments across all AWS regions.
|
|
2898
|
-
|
|
3269
|
+
|
|
2899
3270
|
If a new workspace omits this property, the server generates a unique deployment name for you with
|
|
2900
3271
|
the pattern `dbc-xxxxxxxx-xxxx`.
|
|
2901
3272
|
:param gcp_managed_network_config: :class:`GcpManagedNetworkConfig` (optional)
|
|
@@ -2903,19 +3274,19 @@ class WorkspacesAPI:
|
|
|
2903
3274
|
is ignored if you specify a customer-managed VPC in the `network_id` field.", All the IP range
|
|
2904
3275
|
configurations must be mutually exclusive. An attempt to create a workspace fails if Databricks
|
|
2905
3276
|
detects an IP range overlap.
|
|
2906
|
-
|
|
3277
|
+
|
|
2907
3278
|
Specify custom IP ranges in CIDR format. The IP ranges for these fields must not overlap, and all IP
|
|
2908
3279
|
addresses must be entirely within the following ranges: `10.0.0.0/8`, `100.64.0.0/10`,
|
|
2909
3280
|
`172.16.0.0/12`, `192.168.0.0/16`, and `240.0.0.0/4`.
|
|
2910
|
-
|
|
3281
|
+
|
|
2911
3282
|
The sizes of these IP ranges affect the maximum number of nodes for the workspace.
|
|
2912
|
-
|
|
3283
|
+
|
|
2913
3284
|
**Important**: Confirm the IP ranges used by your Databricks workspace before creating the
|
|
2914
3285
|
workspace. You cannot change them after your workspace is deployed. If the IP address ranges for
|
|
2915
3286
|
your Databricks are too small, IP exhaustion can occur, causing your Databricks jobs to fail. To
|
|
2916
3287
|
determine the address range sizes that you need, Databricks provides a calculator as a Microsoft
|
|
2917
3288
|
Excel spreadsheet. See [calculate subnet sizes for a new workspace].
|
|
2918
|
-
|
|
3289
|
+
|
|
2919
3290
|
[calculate subnet sizes for a new workspace]: https://docs.gcp.databricks.com/administration-guide/cloud-configurations/gcp/network-sizing.html
|
|
2920
3291
|
:param gke_config: :class:`GkeConfig` (optional)
|
|
2921
3292
|
The configurations for the GKE cluster of a Databricks workspace.
|
|
@@ -2930,15 +3301,15 @@ class WorkspacesAPI:
|
|
|
2930
3301
|
:param network_id: str (optional)
|
|
2931
3302
|
:param pricing_tier: :class:`PricingTier` (optional)
|
|
2932
3303
|
The pricing tier of the workspace. For pricing tier information, see [AWS Pricing].
|
|
2933
|
-
|
|
3304
|
+
|
|
2934
3305
|
[AWS Pricing]: https://databricks.com/product/aws-pricing
|
|
2935
3306
|
:param private_access_settings_id: str (optional)
|
|
2936
3307
|
ID of the workspace's private access settings object. Only used for PrivateLink. This ID must be
|
|
2937
3308
|
specified for customers using [AWS PrivateLink] for either front-end (user-to-workspace connection),
|
|
2938
3309
|
back-end (data plane to control plane connection), or both connection types.
|
|
2939
|
-
|
|
3310
|
+
|
|
2940
3311
|
Before configuring PrivateLink, read the [Databricks article about PrivateLink].",
|
|
2941
|
-
|
|
3312
|
+
|
|
2942
3313
|
[AWS PrivateLink]: https://aws.amazon.com/privatelink/
|
|
2943
3314
|
[Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html
|
|
2944
3315
|
:param storage_configuration_id: str (optional)
|
|
@@ -2947,43 +3318,59 @@ class WorkspacesAPI:
|
|
|
2947
3318
|
The ID of the workspace's storage encryption key configuration object. This is used to encrypt the
|
|
2948
3319
|
workspace's root S3 bucket (root DBFS and system data) and, optionally, cluster EBS volumes. The
|
|
2949
3320
|
provided key configuration object property `use_cases` must contain `STORAGE`.
|
|
2950
|
-
|
|
3321
|
+
|
|
2951
3322
|
:returns:
|
|
2952
3323
|
Long-running operation waiter for :class:`Workspace`.
|
|
2953
3324
|
See :method:wait_get_workspace_running for more details.
|
|
2954
3325
|
"""
|
|
2955
3326
|
body = {}
|
|
2956
|
-
if aws_region is not None:
|
|
2957
|
-
|
|
3327
|
+
if aws_region is not None:
|
|
3328
|
+
body["aws_region"] = aws_region
|
|
3329
|
+
if cloud is not None:
|
|
3330
|
+
body["cloud"] = cloud
|
|
2958
3331
|
if cloud_resource_container is not None:
|
|
2959
|
-
body[
|
|
2960
|
-
if credentials_id is not None:
|
|
2961
|
-
|
|
2962
|
-
if
|
|
3332
|
+
body["cloud_resource_container"] = cloud_resource_container.as_dict()
|
|
3333
|
+
if credentials_id is not None:
|
|
3334
|
+
body["credentials_id"] = credentials_id
|
|
3335
|
+
if custom_tags is not None:
|
|
3336
|
+
body["custom_tags"] = custom_tags
|
|
3337
|
+
if deployment_name is not None:
|
|
3338
|
+
body["deployment_name"] = deployment_name
|
|
2963
3339
|
if gcp_managed_network_config is not None:
|
|
2964
|
-
body[
|
|
2965
|
-
if gke_config is not None:
|
|
2966
|
-
|
|
2967
|
-
if
|
|
3340
|
+
body["gcp_managed_network_config"] = gcp_managed_network_config.as_dict()
|
|
3341
|
+
if gke_config is not None:
|
|
3342
|
+
body["gke_config"] = gke_config.as_dict()
|
|
3343
|
+
if is_no_public_ip_enabled is not None:
|
|
3344
|
+
body["is_no_public_ip_enabled"] = is_no_public_ip_enabled
|
|
3345
|
+
if location is not None:
|
|
3346
|
+
body["location"] = location
|
|
2968
3347
|
if managed_services_customer_managed_key_id is not None:
|
|
2969
|
-
body[
|
|
2970
|
-
if network_id is not None:
|
|
2971
|
-
|
|
3348
|
+
body["managed_services_customer_managed_key_id"] = managed_services_customer_managed_key_id
|
|
3349
|
+
if network_id is not None:
|
|
3350
|
+
body["network_id"] = network_id
|
|
3351
|
+
if pricing_tier is not None:
|
|
3352
|
+
body["pricing_tier"] = pricing_tier.value
|
|
2972
3353
|
if private_access_settings_id is not None:
|
|
2973
|
-
body[
|
|
2974
|
-
if storage_configuration_id is not None:
|
|
3354
|
+
body["private_access_settings_id"] = private_access_settings_id
|
|
3355
|
+
if storage_configuration_id is not None:
|
|
3356
|
+
body["storage_configuration_id"] = storage_configuration_id
|
|
2975
3357
|
if storage_customer_managed_key_id is not None:
|
|
2976
|
-
body[
|
|
2977
|
-
if workspace_name is not None:
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
3358
|
+
body["storage_customer_managed_key_id"] = storage_customer_managed_key_id
|
|
3359
|
+
if workspace_name is not None:
|
|
3360
|
+
body["workspace_name"] = workspace_name
|
|
3361
|
+
headers = {
|
|
3362
|
+
"Accept": "application/json",
|
|
3363
|
+
"Content-Type": "application/json",
|
|
3364
|
+
}
|
|
3365
|
+
|
|
3366
|
+
op_response = self._api.do(
|
|
3367
|
+
"POST", f"/api/2.0/accounts/{self._api.account_id}/workspaces", body=body, headers=headers
|
|
3368
|
+
)
|
|
3369
|
+
return Wait(
|
|
3370
|
+
self.wait_get_workspace_running,
|
|
3371
|
+
response=Workspace.from_dict(op_response),
|
|
3372
|
+
workspace_id=op_response["workspace_id"],
|
|
3373
|
+
)
|
|
2987
3374
|
|
|
2988
3375
|
def create_and_wait(
|
|
2989
3376
|
self,
|
|
@@ -3005,109 +3392,118 @@ class WorkspacesAPI:
|
|
|
3005
3392
|
private_access_settings_id: Optional[str] = None,
|
|
3006
3393
|
storage_configuration_id: Optional[str] = None,
|
|
3007
3394
|
storage_customer_managed_key_id: Optional[str] = None,
|
|
3008
|
-
timeout=timedelta(minutes=20)
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3395
|
+
timeout=timedelta(minutes=20),
|
|
3396
|
+
) -> Workspace:
|
|
3397
|
+
return self.create(
|
|
3398
|
+
aws_region=aws_region,
|
|
3399
|
+
cloud=cloud,
|
|
3400
|
+
cloud_resource_container=cloud_resource_container,
|
|
3401
|
+
credentials_id=credentials_id,
|
|
3402
|
+
custom_tags=custom_tags,
|
|
3403
|
+
deployment_name=deployment_name,
|
|
3404
|
+
gcp_managed_network_config=gcp_managed_network_config,
|
|
3405
|
+
gke_config=gke_config,
|
|
3406
|
+
is_no_public_ip_enabled=is_no_public_ip_enabled,
|
|
3407
|
+
location=location,
|
|
3408
|
+
managed_services_customer_managed_key_id=managed_services_customer_managed_key_id,
|
|
3409
|
+
network_id=network_id,
|
|
3410
|
+
pricing_tier=pricing_tier,
|
|
3411
|
+
private_access_settings_id=private_access_settings_id,
|
|
3412
|
+
storage_configuration_id=storage_configuration_id,
|
|
3413
|
+
storage_customer_managed_key_id=storage_customer_managed_key_id,
|
|
3414
|
+
workspace_name=workspace_name,
|
|
3415
|
+
).result(timeout=timeout)
|
|
3026
3416
|
|
|
3027
3417
|
def delete(self, workspace_id: int):
|
|
3028
3418
|
"""Delete a workspace.
|
|
3029
|
-
|
|
3419
|
+
|
|
3030
3420
|
Terminates and deletes a Databricks workspace. From an API perspective, deletion is immediate.
|
|
3031
3421
|
However, it might take a few minutes for all workspaces resources to be deleted, depending on the size
|
|
3032
3422
|
and number of workspace resources.
|
|
3033
|
-
|
|
3423
|
+
|
|
3034
3424
|
This operation is available only if your account is on the E2 version of the platform or on a select
|
|
3035
3425
|
custom plan that allows multiple workspaces per account.
|
|
3036
|
-
|
|
3426
|
+
|
|
3037
3427
|
:param workspace_id: int
|
|
3038
3428
|
Workspace ID.
|
|
3039
|
-
|
|
3040
|
-
|
|
3429
|
+
|
|
3430
|
+
|
|
3041
3431
|
"""
|
|
3042
3432
|
|
|
3043
|
-
headers = {
|
|
3433
|
+
headers = {
|
|
3434
|
+
"Accept": "application/json",
|
|
3435
|
+
}
|
|
3044
3436
|
|
|
3045
|
-
self._api.do(
|
|
3046
|
-
f'/api/2.0/accounts/{self._api.account_id}/workspaces/{workspace_id}',
|
|
3047
|
-
headers=headers)
|
|
3437
|
+
self._api.do("DELETE", f"/api/2.0/accounts/{self._api.account_id}/workspaces/{workspace_id}", headers=headers)
|
|
3048
3438
|
|
|
3049
3439
|
def get(self, workspace_id: int) -> Workspace:
|
|
3050
3440
|
"""Get a workspace.
|
|
3051
|
-
|
|
3441
|
+
|
|
3052
3442
|
Gets information including status for a Databricks workspace, specified by ID. In the response, the
|
|
3053
3443
|
`workspace_status` field indicates the current status. After initial workspace creation (which is
|
|
3054
3444
|
asynchronous), make repeated `GET` requests with the workspace ID and check its status. The workspace
|
|
3055
3445
|
becomes available when the status changes to `RUNNING`.
|
|
3056
|
-
|
|
3446
|
+
|
|
3057
3447
|
For information about how to create a new workspace with this API **including error handling**, see
|
|
3058
3448
|
[Create a new workspace using the Account API].
|
|
3059
|
-
|
|
3449
|
+
|
|
3060
3450
|
This operation is available only if your account is on the E2 version of the platform or on a select
|
|
3061
3451
|
custom plan that allows multiple workspaces per account.
|
|
3062
|
-
|
|
3452
|
+
|
|
3063
3453
|
[Create a new workspace using the Account API]: http://docs.databricks.com/administration-guide/account-api/new-workspace.html
|
|
3064
|
-
|
|
3454
|
+
|
|
3065
3455
|
:param workspace_id: int
|
|
3066
3456
|
Workspace ID.
|
|
3067
|
-
|
|
3457
|
+
|
|
3068
3458
|
:returns: :class:`Workspace`
|
|
3069
3459
|
"""
|
|
3070
3460
|
|
|
3071
|
-
headers = {
|
|
3461
|
+
headers = {
|
|
3462
|
+
"Accept": "application/json",
|
|
3463
|
+
}
|
|
3072
3464
|
|
|
3073
|
-
res = self._api.do(
|
|
3074
|
-
|
|
3075
|
-
|
|
3465
|
+
res = self._api.do(
|
|
3466
|
+
"GET", f"/api/2.0/accounts/{self._api.account_id}/workspaces/{workspace_id}", headers=headers
|
|
3467
|
+
)
|
|
3076
3468
|
return Workspace.from_dict(res)
|
|
3077
3469
|
|
|
3078
3470
|
def list(self) -> Iterator[Workspace]:
|
|
3079
3471
|
"""Get all workspaces.
|
|
3080
|
-
|
|
3472
|
+
|
|
3081
3473
|
Gets a list of all workspaces associated with an account, specified by ID.
|
|
3082
|
-
|
|
3474
|
+
|
|
3083
3475
|
This operation is available only if your account is on the E2 version of the platform or on a select
|
|
3084
3476
|
custom plan that allows multiple workspaces per account.
|
|
3085
|
-
|
|
3477
|
+
|
|
3086
3478
|
:returns: Iterator over :class:`Workspace`
|
|
3087
3479
|
"""
|
|
3088
3480
|
|
|
3089
|
-
headers = {
|
|
3481
|
+
headers = {
|
|
3482
|
+
"Accept": "application/json",
|
|
3483
|
+
}
|
|
3090
3484
|
|
|
3091
|
-
res = self._api.do(
|
|
3485
|
+
res = self._api.do("GET", f"/api/2.0/accounts/{self._api.account_id}/workspaces", headers=headers)
|
|
3092
3486
|
return [Workspace.from_dict(v) for v in res]
|
|
3093
3487
|
|
|
3094
|
-
def update(
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3488
|
+
def update(
|
|
3489
|
+
self,
|
|
3490
|
+
workspace_id: int,
|
|
3491
|
+
*,
|
|
3492
|
+
aws_region: Optional[str] = None,
|
|
3493
|
+
credentials_id: Optional[str] = None,
|
|
3494
|
+
custom_tags: Optional[Dict[str, str]] = None,
|
|
3495
|
+
managed_services_customer_managed_key_id: Optional[str] = None,
|
|
3496
|
+
network_connectivity_config_id: Optional[str] = None,
|
|
3497
|
+
network_id: Optional[str] = None,
|
|
3498
|
+
private_access_settings_id: Optional[str] = None,
|
|
3499
|
+
storage_configuration_id: Optional[str] = None,
|
|
3500
|
+
storage_customer_managed_key_id: Optional[str] = None,
|
|
3501
|
+
) -> Wait[Workspace]:
|
|
3106
3502
|
"""Update workspace configuration.
|
|
3107
|
-
|
|
3503
|
+
|
|
3108
3504
|
Updates a workspace configuration for either a running workspace or a failed workspace. The elements
|
|
3109
3505
|
that can be updated varies between these two use cases.
|
|
3110
|
-
|
|
3506
|
+
|
|
3111
3507
|
### Update a failed workspace You can update a Databricks workspace configuration for failed workspace
|
|
3112
3508
|
deployment for some fields, but not all fields. For a failed workspace, this request supports updates
|
|
3113
3509
|
to the following fields only: - Credential configuration ID - Storage configuration ID - Network
|
|
@@ -3129,14 +3525,14 @@ class WorkspacesAPI:
|
|
|
3129
3525
|
update the network connectivity configuration ID to ensure the workspace uses the same set of stable
|
|
3130
3526
|
IP CIDR blocks to access your resources. You cannot remove a network connectivity configuration from
|
|
3131
3527
|
the workspace once attached, you can only switch to another one.
|
|
3132
|
-
|
|
3528
|
+
|
|
3133
3529
|
After calling the `PATCH` operation to update the workspace configuration, make repeated `GET`
|
|
3134
3530
|
requests with the workspace ID and check the workspace status. The workspace is successful if the
|
|
3135
3531
|
status changes to `RUNNING`.
|
|
3136
|
-
|
|
3532
|
+
|
|
3137
3533
|
For information about how to create a new workspace with this API **including error handling**, see
|
|
3138
3534
|
[Create a new workspace using the Account API].
|
|
3139
|
-
|
|
3535
|
+
|
|
3140
3536
|
### Update a running workspace You can update a Databricks workspace configuration for running
|
|
3141
3537
|
workspaces for some fields, but not all fields. For a running workspace, this request supports
|
|
3142
3538
|
updating the following fields only: - Credential configuration ID - Network configuration ID. Used
|
|
@@ -3162,12 +3558,12 @@ class WorkspacesAPI:
|
|
|
3162
3558
|
network connectivity configuration ID to ensure the workspace uses the same set of stable IP CIDR
|
|
3163
3559
|
blocks to access your resources. You cannot remove a network connectivity configuration from the
|
|
3164
3560
|
workspace once attached, you can only switch to another one.
|
|
3165
|
-
|
|
3561
|
+
|
|
3166
3562
|
**Important**: To update a running workspace, your workspace must have no running compute resources
|
|
3167
3563
|
that run in your workspace's VPC in the Classic data plane. For example, stop all all-purpose
|
|
3168
3564
|
clusters, job clusters, pools with running clusters, and Classic SQL warehouses. If you do not
|
|
3169
3565
|
terminate all cluster instances in the workspace before calling this API, the request will fail.
|
|
3170
|
-
|
|
3566
|
+
|
|
3171
3567
|
### Wait until changes take effect. After calling the `PATCH` operation to update the workspace
|
|
3172
3568
|
configuration, make repeated `GET` requests with the workspace ID and check the workspace status and
|
|
3173
3569
|
the status of the fields. * For workspaces with a Databricks-managed VPC, the workspace status becomes
|
|
@@ -3183,22 +3579,22 @@ class WorkspacesAPI:
|
|
|
3183
3579
|
silently to its original configuration. After the workspace has been updated, you cannot use or create
|
|
3184
3580
|
clusters for another 20 minutes. If you create or use clusters before this time interval elapses,
|
|
3185
3581
|
clusters do not launch successfully, fail, or could cause other unexpected behavior.
|
|
3186
|
-
|
|
3582
|
+
|
|
3187
3583
|
If you update the _storage_ customer-managed key configurations, it takes 20 minutes for the changes
|
|
3188
3584
|
to fully take effect. During the 20 minute wait, it is important that you stop all REST API calls to
|
|
3189
3585
|
the DBFS API. If you are modifying _only the managed services key configuration_, you can omit the 20
|
|
3190
3586
|
minute wait.
|
|
3191
|
-
|
|
3587
|
+
|
|
3192
3588
|
**Important**: Customer-managed keys and customer-managed VPCs are supported by only some deployment
|
|
3193
3589
|
types and subscription types. If you have questions about availability, contact your Databricks
|
|
3194
3590
|
representative.
|
|
3195
|
-
|
|
3591
|
+
|
|
3196
3592
|
This operation is available only if your account is on the E2 version of the platform or on a select
|
|
3197
3593
|
custom plan that allows multiple workspaces per account.
|
|
3198
|
-
|
|
3594
|
+
|
|
3199
3595
|
[Account Console]: https://docs.databricks.com/administration-guide/account-settings-e2/account-console-e2.html
|
|
3200
3596
|
[Create a new workspace using the Account API]: http://docs.databricks.com/administration-guide/account-api/new-workspace.html
|
|
3201
|
-
|
|
3597
|
+
|
|
3202
3598
|
:param workspace_id: int
|
|
3203
3599
|
Workspace ID.
|
|
3204
3600
|
:param aws_region: str (optional)
|
|
@@ -3228,34 +3624,41 @@ class WorkspacesAPI:
|
|
|
3228
3624
|
:param storage_customer_managed_key_id: str (optional)
|
|
3229
3625
|
The ID of the key configuration object for workspace storage. This parameter is available for
|
|
3230
3626
|
updating both failed and running workspaces.
|
|
3231
|
-
|
|
3627
|
+
|
|
3232
3628
|
:returns:
|
|
3233
3629
|
Long-running operation waiter for :class:`Workspace`.
|
|
3234
3630
|
See :method:wait_get_workspace_running for more details.
|
|
3235
3631
|
"""
|
|
3236
3632
|
body = {}
|
|
3237
|
-
if aws_region is not None:
|
|
3238
|
-
|
|
3239
|
-
if
|
|
3633
|
+
if aws_region is not None:
|
|
3634
|
+
body["aws_region"] = aws_region
|
|
3635
|
+
if credentials_id is not None:
|
|
3636
|
+
body["credentials_id"] = credentials_id
|
|
3637
|
+
if custom_tags is not None:
|
|
3638
|
+
body["custom_tags"] = custom_tags
|
|
3240
3639
|
if managed_services_customer_managed_key_id is not None:
|
|
3241
|
-
body[
|
|
3640
|
+
body["managed_services_customer_managed_key_id"] = managed_services_customer_managed_key_id
|
|
3242
3641
|
if network_connectivity_config_id is not None:
|
|
3243
|
-
body[
|
|
3244
|
-
if network_id is not None:
|
|
3642
|
+
body["network_connectivity_config_id"] = network_connectivity_config_id
|
|
3643
|
+
if network_id is not None:
|
|
3644
|
+
body["network_id"] = network_id
|
|
3245
3645
|
if private_access_settings_id is not None:
|
|
3246
|
-
body[
|
|
3247
|
-
if storage_configuration_id is not None:
|
|
3646
|
+
body["private_access_settings_id"] = private_access_settings_id
|
|
3647
|
+
if storage_configuration_id is not None:
|
|
3648
|
+
body["storage_configuration_id"] = storage_configuration_id
|
|
3248
3649
|
if storage_customer_managed_key_id is not None:
|
|
3249
|
-
body[
|
|
3250
|
-
headers = {
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3650
|
+
body["storage_customer_managed_key_id"] = storage_customer_managed_key_id
|
|
3651
|
+
headers = {
|
|
3652
|
+
"Accept": "application/json",
|
|
3653
|
+
"Content-Type": "application/json",
|
|
3654
|
+
}
|
|
3655
|
+
|
|
3656
|
+
op_response = self._api.do(
|
|
3657
|
+
"PATCH", f"/api/2.0/accounts/{self._api.account_id}/workspaces/{workspace_id}", body=body, headers=headers
|
|
3658
|
+
)
|
|
3659
|
+
return Wait(
|
|
3660
|
+
self.wait_get_workspace_running, response=UpdateResponse.from_dict(op_response), workspace_id=workspace_id
|
|
3661
|
+
)
|
|
3259
3662
|
|
|
3260
3663
|
def update_and_wait(
|
|
3261
3664
|
self,
|
|
@@ -3270,14 +3673,17 @@ class WorkspacesAPI:
|
|
|
3270
3673
|
private_access_settings_id: Optional[str] = None,
|
|
3271
3674
|
storage_configuration_id: Optional[str] = None,
|
|
3272
3675
|
storage_customer_managed_key_id: Optional[str] = None,
|
|
3273
|
-
timeout=timedelta(minutes=20)
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3676
|
+
timeout=timedelta(minutes=20),
|
|
3677
|
+
) -> Workspace:
|
|
3678
|
+
return self.update(
|
|
3679
|
+
aws_region=aws_region,
|
|
3680
|
+
credentials_id=credentials_id,
|
|
3681
|
+
custom_tags=custom_tags,
|
|
3682
|
+
managed_services_customer_managed_key_id=managed_services_customer_managed_key_id,
|
|
3683
|
+
network_connectivity_config_id=network_connectivity_config_id,
|
|
3684
|
+
network_id=network_id,
|
|
3685
|
+
private_access_settings_id=private_access_settings_id,
|
|
3686
|
+
storage_configuration_id=storage_configuration_id,
|
|
3687
|
+
storage_customer_managed_key_id=storage_customer_managed_key_id,
|
|
3688
|
+
workspace_id=workspace_id,
|
|
3689
|
+
).result(timeout=timeout)
|