databricks-sdk 0.38.0__py3-none-any.whl → 0.40.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 +36 -1
- databricks/sdk/mixins/open_ai_client.py +2 -2
- databricks/sdk/service/apps.py +175 -0
- databricks/sdk/service/billing.py +247 -0
- databricks/sdk/service/catalog.py +1795 -62
- databricks/sdk/service/cleanrooms.py +1281 -0
- databricks/sdk/service/compute.py +1843 -67
- databricks/sdk/service/dashboards.py +342 -3
- databricks/sdk/service/files.py +162 -2
- databricks/sdk/service/iam.py +351 -0
- databricks/sdk/service/jobs.py +1355 -24
- databricks/sdk/service/marketplace.py +688 -0
- databricks/sdk/service/ml.py +1038 -2
- databricks/sdk/service/oauth2.py +636 -0
- databricks/sdk/service/pipelines.py +524 -4
- databricks/sdk/service/provisioning.py +387 -0
- databricks/sdk/service/serving.py +615 -0
- databricks/sdk/service/settings.py +1186 -1
- databricks/sdk/service/sharing.py +326 -2
- databricks/sdk/service/sql.py +1186 -2
- databricks/sdk/service/vectorsearch.py +290 -0
- databricks/sdk/service/workspace.py +451 -0
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/METADATA +26 -26
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/RECORD +29 -28
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/WHEEL +1 -1
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.38.0.dist-info → databricks_sdk-0.40.0.dist-info}/top_level.txt +0 -0
|
@@ -55,6 +55,16 @@ class AddInstanceProfile:
|
|
|
55
55
|
if self.skip_validation is not None: body['skip_validation'] = self.skip_validation
|
|
56
56
|
return body
|
|
57
57
|
|
|
58
|
+
def as_shallow_dict(self) -> dict:
|
|
59
|
+
"""Serializes the AddInstanceProfile into a shallow dictionary of its immediate attributes."""
|
|
60
|
+
body = {}
|
|
61
|
+
if self.iam_role_arn is not None: body['iam_role_arn'] = self.iam_role_arn
|
|
62
|
+
if self.instance_profile_arn is not None: body['instance_profile_arn'] = self.instance_profile_arn
|
|
63
|
+
if self.is_meta_instance_profile is not None:
|
|
64
|
+
body['is_meta_instance_profile'] = self.is_meta_instance_profile
|
|
65
|
+
if self.skip_validation is not None: body['skip_validation'] = self.skip_validation
|
|
66
|
+
return body
|
|
67
|
+
|
|
58
68
|
@classmethod
|
|
59
69
|
def from_dict(cls, d: Dict[str, any]) -> AddInstanceProfile:
|
|
60
70
|
"""Deserializes the AddInstanceProfile from a dictionary."""
|
|
@@ -72,6 +82,11 @@ class AddResponse:
|
|
|
72
82
|
body = {}
|
|
73
83
|
return body
|
|
74
84
|
|
|
85
|
+
def as_shallow_dict(self) -> dict:
|
|
86
|
+
"""Serializes the AddResponse into a shallow dictionary of its immediate attributes."""
|
|
87
|
+
body = {}
|
|
88
|
+
return body
|
|
89
|
+
|
|
75
90
|
@classmethod
|
|
76
91
|
def from_dict(cls, d: Dict[str, any]) -> AddResponse:
|
|
77
92
|
"""Deserializes the AddResponse from a dictionary."""
|
|
@@ -90,6 +105,12 @@ class Adlsgen2Info:
|
|
|
90
105
|
if self.destination is not None: body['destination'] = self.destination
|
|
91
106
|
return body
|
|
92
107
|
|
|
108
|
+
def as_shallow_dict(self) -> dict:
|
|
109
|
+
"""Serializes the Adlsgen2Info into a shallow dictionary of its immediate attributes."""
|
|
110
|
+
body = {}
|
|
111
|
+
if self.destination is not None: body['destination'] = self.destination
|
|
112
|
+
return body
|
|
113
|
+
|
|
93
114
|
@classmethod
|
|
94
115
|
def from_dict(cls, d: Dict[str, any]) -> Adlsgen2Info:
|
|
95
116
|
"""Deserializes the Adlsgen2Info from a dictionary."""
|
|
@@ -113,6 +134,13 @@ class AutoScale:
|
|
|
113
134
|
if self.min_workers is not None: body['min_workers'] = self.min_workers
|
|
114
135
|
return body
|
|
115
136
|
|
|
137
|
+
def as_shallow_dict(self) -> dict:
|
|
138
|
+
"""Serializes the AutoScale into a shallow dictionary of its immediate attributes."""
|
|
139
|
+
body = {}
|
|
140
|
+
if self.max_workers is not None: body['max_workers'] = self.max_workers
|
|
141
|
+
if self.min_workers is not None: body['min_workers'] = self.min_workers
|
|
142
|
+
return body
|
|
143
|
+
|
|
116
144
|
@classmethod
|
|
117
145
|
def from_dict(cls, d: Dict[str, any]) -> AutoScale:
|
|
118
146
|
"""Deserializes the AutoScale from a dictionary."""
|
|
@@ -216,6 +244,22 @@ class AwsAttributes:
|
|
|
216
244
|
if self.zone_id is not None: body['zone_id'] = self.zone_id
|
|
217
245
|
return body
|
|
218
246
|
|
|
247
|
+
def as_shallow_dict(self) -> dict:
|
|
248
|
+
"""Serializes the AwsAttributes into a shallow dictionary of its immediate attributes."""
|
|
249
|
+
body = {}
|
|
250
|
+
if self.availability is not None: body['availability'] = self.availability
|
|
251
|
+
if self.ebs_volume_count is not None: body['ebs_volume_count'] = self.ebs_volume_count
|
|
252
|
+
if self.ebs_volume_iops is not None: body['ebs_volume_iops'] = self.ebs_volume_iops
|
|
253
|
+
if self.ebs_volume_size is not None: body['ebs_volume_size'] = self.ebs_volume_size
|
|
254
|
+
if self.ebs_volume_throughput is not None: body['ebs_volume_throughput'] = self.ebs_volume_throughput
|
|
255
|
+
if self.ebs_volume_type is not None: body['ebs_volume_type'] = self.ebs_volume_type
|
|
256
|
+
if self.first_on_demand is not None: body['first_on_demand'] = self.first_on_demand
|
|
257
|
+
if self.instance_profile_arn is not None: body['instance_profile_arn'] = self.instance_profile_arn
|
|
258
|
+
if self.spot_bid_price_percent is not None:
|
|
259
|
+
body['spot_bid_price_percent'] = self.spot_bid_price_percent
|
|
260
|
+
if self.zone_id is not None: body['zone_id'] = self.zone_id
|
|
261
|
+
return body
|
|
262
|
+
|
|
219
263
|
@classmethod
|
|
220
264
|
def from_dict(cls, d: Dict[str, any]) -> AwsAttributes:
|
|
221
265
|
"""Deserializes the AwsAttributes from a dictionary."""
|
|
@@ -275,6 +319,15 @@ class AzureAttributes:
|
|
|
275
319
|
if self.spot_bid_max_price is not None: body['spot_bid_max_price'] = self.spot_bid_max_price
|
|
276
320
|
return body
|
|
277
321
|
|
|
322
|
+
def as_shallow_dict(self) -> dict:
|
|
323
|
+
"""Serializes the AzureAttributes into a shallow dictionary of its immediate attributes."""
|
|
324
|
+
body = {}
|
|
325
|
+
if self.availability is not None: body['availability'] = self.availability
|
|
326
|
+
if self.first_on_demand is not None: body['first_on_demand'] = self.first_on_demand
|
|
327
|
+
if self.log_analytics_info: body['log_analytics_info'] = self.log_analytics_info
|
|
328
|
+
if self.spot_bid_max_price is not None: body['spot_bid_max_price'] = self.spot_bid_max_price
|
|
329
|
+
return body
|
|
330
|
+
|
|
278
331
|
@classmethod
|
|
279
332
|
def from_dict(cls, d: Dict[str, any]) -> AzureAttributes:
|
|
280
333
|
"""Deserializes the AzureAttributes from a dictionary."""
|
|
@@ -310,6 +363,14 @@ class CancelCommand:
|
|
|
310
363
|
if self.context_id is not None: body['contextId'] = self.context_id
|
|
311
364
|
return body
|
|
312
365
|
|
|
366
|
+
def as_shallow_dict(self) -> dict:
|
|
367
|
+
"""Serializes the CancelCommand into a shallow dictionary of its immediate attributes."""
|
|
368
|
+
body = {}
|
|
369
|
+
if self.cluster_id is not None: body['clusterId'] = self.cluster_id
|
|
370
|
+
if self.command_id is not None: body['commandId'] = self.command_id
|
|
371
|
+
if self.context_id is not None: body['contextId'] = self.context_id
|
|
372
|
+
return body
|
|
373
|
+
|
|
313
374
|
@classmethod
|
|
314
375
|
def from_dict(cls, d: Dict[str, any]) -> CancelCommand:
|
|
315
376
|
"""Deserializes the CancelCommand from a dictionary."""
|
|
@@ -326,6 +387,11 @@ class CancelResponse:
|
|
|
326
387
|
body = {}
|
|
327
388
|
return body
|
|
328
389
|
|
|
390
|
+
def as_shallow_dict(self) -> dict:
|
|
391
|
+
"""Serializes the CancelResponse into a shallow dictionary of its immediate attributes."""
|
|
392
|
+
body = {}
|
|
393
|
+
return body
|
|
394
|
+
|
|
329
395
|
@classmethod
|
|
330
396
|
def from_dict(cls, d: Dict[str, any]) -> CancelResponse:
|
|
331
397
|
"""Deserializes the CancelResponse from a dictionary."""
|
|
@@ -347,6 +413,13 @@ class ChangeClusterOwner:
|
|
|
347
413
|
if self.owner_username is not None: body['owner_username'] = self.owner_username
|
|
348
414
|
return body
|
|
349
415
|
|
|
416
|
+
def as_shallow_dict(self) -> dict:
|
|
417
|
+
"""Serializes the ChangeClusterOwner into a shallow dictionary of its immediate attributes."""
|
|
418
|
+
body = {}
|
|
419
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
420
|
+
if self.owner_username is not None: body['owner_username'] = self.owner_username
|
|
421
|
+
return body
|
|
422
|
+
|
|
350
423
|
@classmethod
|
|
351
424
|
def from_dict(cls, d: Dict[str, any]) -> ChangeClusterOwner:
|
|
352
425
|
"""Deserializes the ChangeClusterOwner from a dictionary."""
|
|
@@ -361,6 +434,11 @@ class ChangeClusterOwnerResponse:
|
|
|
361
434
|
body = {}
|
|
362
435
|
return body
|
|
363
436
|
|
|
437
|
+
def as_shallow_dict(self) -> dict:
|
|
438
|
+
"""Serializes the ChangeClusterOwnerResponse into a shallow dictionary of its immediate attributes."""
|
|
439
|
+
body = {}
|
|
440
|
+
return body
|
|
441
|
+
|
|
364
442
|
@classmethod
|
|
365
443
|
def from_dict(cls, d: Dict[str, any]) -> ChangeClusterOwnerResponse:
|
|
366
444
|
"""Deserializes the ChangeClusterOwnerResponse from a dictionary."""
|
|
@@ -382,6 +460,13 @@ class ClientsTypes:
|
|
|
382
460
|
if self.notebooks is not None: body['notebooks'] = self.notebooks
|
|
383
461
|
return body
|
|
384
462
|
|
|
463
|
+
def as_shallow_dict(self) -> dict:
|
|
464
|
+
"""Serializes the ClientsTypes into a shallow dictionary of its immediate attributes."""
|
|
465
|
+
body = {}
|
|
466
|
+
if self.jobs is not None: body['jobs'] = self.jobs
|
|
467
|
+
if self.notebooks is not None: body['notebooks'] = self.notebooks
|
|
468
|
+
return body
|
|
469
|
+
|
|
385
470
|
@classmethod
|
|
386
471
|
def from_dict(cls, d: Dict[str, any]) -> ClientsTypes:
|
|
387
472
|
"""Deserializes the ClientsTypes from a dictionary."""
|
|
@@ -399,6 +484,12 @@ class CloneCluster:
|
|
|
399
484
|
if self.source_cluster_id is not None: body['source_cluster_id'] = self.source_cluster_id
|
|
400
485
|
return body
|
|
401
486
|
|
|
487
|
+
def as_shallow_dict(self) -> dict:
|
|
488
|
+
"""Serializes the CloneCluster into a shallow dictionary of its immediate attributes."""
|
|
489
|
+
body = {}
|
|
490
|
+
if self.source_cluster_id is not None: body['source_cluster_id'] = self.source_cluster_id
|
|
491
|
+
return body
|
|
492
|
+
|
|
402
493
|
@classmethod
|
|
403
494
|
def from_dict(cls, d: Dict[str, any]) -> CloneCluster:
|
|
404
495
|
"""Deserializes the CloneCluster from a dictionary."""
|
|
@@ -415,6 +506,12 @@ class CloudProviderNodeInfo:
|
|
|
415
506
|
if self.status: body['status'] = [v.value for v in self.status]
|
|
416
507
|
return body
|
|
417
508
|
|
|
509
|
+
def as_shallow_dict(self) -> dict:
|
|
510
|
+
"""Serializes the CloudProviderNodeInfo into a shallow dictionary of its immediate attributes."""
|
|
511
|
+
body = {}
|
|
512
|
+
if self.status: body['status'] = self.status
|
|
513
|
+
return body
|
|
514
|
+
|
|
418
515
|
@classmethod
|
|
419
516
|
def from_dict(cls, d: Dict[str, any]) -> CloudProviderNodeInfo:
|
|
420
517
|
"""Deserializes the CloudProviderNodeInfo from a dictionary."""
|
|
@@ -451,6 +548,16 @@ class ClusterAccessControlRequest:
|
|
|
451
548
|
if self.user_name is not None: body['user_name'] = self.user_name
|
|
452
549
|
return body
|
|
453
550
|
|
|
551
|
+
def as_shallow_dict(self) -> dict:
|
|
552
|
+
"""Serializes the ClusterAccessControlRequest into a shallow dictionary of its immediate attributes."""
|
|
553
|
+
body = {}
|
|
554
|
+
if self.group_name is not None: body['group_name'] = self.group_name
|
|
555
|
+
if self.permission_level is not None: body['permission_level'] = self.permission_level
|
|
556
|
+
if self.service_principal_name is not None:
|
|
557
|
+
body['service_principal_name'] = self.service_principal_name
|
|
558
|
+
if self.user_name is not None: body['user_name'] = self.user_name
|
|
559
|
+
return body
|
|
560
|
+
|
|
454
561
|
@classmethod
|
|
455
562
|
def from_dict(cls, d: Dict[str, any]) -> ClusterAccessControlRequest:
|
|
456
563
|
"""Deserializes the ClusterAccessControlRequest from a dictionary."""
|
|
@@ -488,6 +595,17 @@ class ClusterAccessControlResponse:
|
|
|
488
595
|
if self.user_name is not None: body['user_name'] = self.user_name
|
|
489
596
|
return body
|
|
490
597
|
|
|
598
|
+
def as_shallow_dict(self) -> dict:
|
|
599
|
+
"""Serializes the ClusterAccessControlResponse into a shallow dictionary of its immediate attributes."""
|
|
600
|
+
body = {}
|
|
601
|
+
if self.all_permissions: body['all_permissions'] = self.all_permissions
|
|
602
|
+
if self.display_name is not None: body['display_name'] = self.display_name
|
|
603
|
+
if self.group_name is not None: body['group_name'] = self.group_name
|
|
604
|
+
if self.service_principal_name is not None:
|
|
605
|
+
body['service_principal_name'] = self.service_principal_name
|
|
606
|
+
if self.user_name is not None: body['user_name'] = self.user_name
|
|
607
|
+
return body
|
|
608
|
+
|
|
491
609
|
@classmethod
|
|
492
610
|
def from_dict(cls, d: Dict[str, any]) -> ClusterAccessControlResponse:
|
|
493
611
|
"""Deserializes the ClusterAccessControlResponse from a dictionary."""
|
|
@@ -541,13 +659,19 @@ class ClusterAttributes:
|
|
|
541
659
|
data_security_mode: Optional[DataSecurityMode] = None
|
|
542
660
|
"""Data security mode decides what data governance model to use when accessing data from a cluster.
|
|
543
661
|
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
662
|
+
The following modes can only be used with `kind`. * `DATA_SECURITY_MODE_AUTO`: Databricks will
|
|
663
|
+
choose the most appropriate access mode depending on your compute configuration. *
|
|
664
|
+
`DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * `DATA_SECURITY_MODE_DEDICATED`:
|
|
665
|
+
Alias for `SINGLE_USER`.
|
|
666
|
+
|
|
667
|
+
The following modes can be used regardless of `kind`. * `NONE`: No security isolation for
|
|
668
|
+
multiple users sharing the cluster. Data governance features are not available in this mode. *
|
|
669
|
+
`SINGLE_USER`: A secure cluster that can only be exclusively used by a single user specified in
|
|
670
|
+
`single_user_name`. Most programming languages, cluster features and data governance features
|
|
671
|
+
are available in this mode. * `USER_ISOLATION`: A secure cluster that can be shared by multiple
|
|
672
|
+
users. Cluster users are fully isolated so that they cannot see each other's data and
|
|
673
|
+
credentials. Most data governance features are supported in this mode. But programming languages
|
|
674
|
+
and cluster features might be limited.
|
|
551
675
|
|
|
552
676
|
The following modes are deprecated starting with Databricks Runtime 15.0 and will be removed for
|
|
553
677
|
future Databricks Runtime versions:
|
|
@@ -588,6 +712,20 @@ class ClusterAttributes:
|
|
|
588
712
|
instance_pool_id: Optional[str] = None
|
|
589
713
|
"""The optional ID of the instance pool to which the cluster belongs."""
|
|
590
714
|
|
|
715
|
+
is_single_node: Optional[bool] = None
|
|
716
|
+
"""This field can only be used with `kind`.
|
|
717
|
+
|
|
718
|
+
When set to true, Databricks will automatically set single node related `custom_tags`,
|
|
719
|
+
`spark_conf`, and `num_workers`"""
|
|
720
|
+
|
|
721
|
+
kind: Optional[Kind] = None
|
|
722
|
+
"""The kind of compute described by this compute specification.
|
|
723
|
+
|
|
724
|
+
Depending on `kind`, different validations and default values will be applied.
|
|
725
|
+
|
|
726
|
+
The first usage of this value is for the simple cluster form where it sets `kind =
|
|
727
|
+
CLASSIC_PREVIEW`."""
|
|
728
|
+
|
|
591
729
|
node_type_id: Optional[str] = None
|
|
592
730
|
"""This field encodes, through a single value, the resources available to each of the Spark nodes
|
|
593
731
|
in this cluster. For example, the Spark nodes can be provisioned and optimized for memory or
|
|
@@ -632,6 +770,12 @@ class ClusterAttributes:
|
|
|
632
770
|
private keys can be used to login with the user name `ubuntu` on port `2200`. Up to 10 keys can
|
|
633
771
|
be specified."""
|
|
634
772
|
|
|
773
|
+
use_ml_runtime: Optional[bool] = None
|
|
774
|
+
"""This field can only be used with `kind`.
|
|
775
|
+
|
|
776
|
+
`effective_spark_version` is determined by `spark_version` (DBR release), this field
|
|
777
|
+
`use_ml_runtime`, and whether `node_type_id` is gpu node or not."""
|
|
778
|
+
|
|
635
779
|
workload_type: Optional[WorkloadType] = None
|
|
636
780
|
|
|
637
781
|
def as_dict(self) -> dict:
|
|
@@ -655,6 +799,8 @@ class ClusterAttributes:
|
|
|
655
799
|
if self.gcp_attributes: body['gcp_attributes'] = self.gcp_attributes.as_dict()
|
|
656
800
|
if self.init_scripts: body['init_scripts'] = [v.as_dict() for v in self.init_scripts]
|
|
657
801
|
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
802
|
+
if self.is_single_node is not None: body['is_single_node'] = self.is_single_node
|
|
803
|
+
if self.kind is not None: body['kind'] = self.kind.value
|
|
658
804
|
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
659
805
|
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
660
806
|
if self.runtime_engine is not None: body['runtime_engine'] = self.runtime_engine.value
|
|
@@ -663,9 +809,45 @@ class ClusterAttributes:
|
|
|
663
809
|
if self.spark_env_vars: body['spark_env_vars'] = self.spark_env_vars
|
|
664
810
|
if self.spark_version is not None: body['spark_version'] = self.spark_version
|
|
665
811
|
if self.ssh_public_keys: body['ssh_public_keys'] = [v for v in self.ssh_public_keys]
|
|
812
|
+
if self.use_ml_runtime is not None: body['use_ml_runtime'] = self.use_ml_runtime
|
|
666
813
|
if self.workload_type: body['workload_type'] = self.workload_type.as_dict()
|
|
667
814
|
return body
|
|
668
815
|
|
|
816
|
+
def as_shallow_dict(self) -> dict:
|
|
817
|
+
"""Serializes the ClusterAttributes into a shallow dictionary of its immediate attributes."""
|
|
818
|
+
body = {}
|
|
819
|
+
if self.autotermination_minutes is not None:
|
|
820
|
+
body['autotermination_minutes'] = self.autotermination_minutes
|
|
821
|
+
if self.aws_attributes: body['aws_attributes'] = self.aws_attributes
|
|
822
|
+
if self.azure_attributes: body['azure_attributes'] = self.azure_attributes
|
|
823
|
+
if self.cluster_log_conf: body['cluster_log_conf'] = self.cluster_log_conf
|
|
824
|
+
if self.cluster_name is not None: body['cluster_name'] = self.cluster_name
|
|
825
|
+
if self.custom_tags: body['custom_tags'] = self.custom_tags
|
|
826
|
+
if self.data_security_mode is not None: body['data_security_mode'] = self.data_security_mode
|
|
827
|
+
if self.docker_image: body['docker_image'] = self.docker_image
|
|
828
|
+
if self.driver_instance_pool_id is not None:
|
|
829
|
+
body['driver_instance_pool_id'] = self.driver_instance_pool_id
|
|
830
|
+
if self.driver_node_type_id is not None: body['driver_node_type_id'] = self.driver_node_type_id
|
|
831
|
+
if self.enable_elastic_disk is not None: body['enable_elastic_disk'] = self.enable_elastic_disk
|
|
832
|
+
if self.enable_local_disk_encryption is not None:
|
|
833
|
+
body['enable_local_disk_encryption'] = self.enable_local_disk_encryption
|
|
834
|
+
if self.gcp_attributes: body['gcp_attributes'] = self.gcp_attributes
|
|
835
|
+
if self.init_scripts: body['init_scripts'] = self.init_scripts
|
|
836
|
+
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
837
|
+
if self.is_single_node is not None: body['is_single_node'] = self.is_single_node
|
|
838
|
+
if self.kind is not None: body['kind'] = self.kind
|
|
839
|
+
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
840
|
+
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
841
|
+
if self.runtime_engine is not None: body['runtime_engine'] = self.runtime_engine
|
|
842
|
+
if self.single_user_name is not None: body['single_user_name'] = self.single_user_name
|
|
843
|
+
if self.spark_conf: body['spark_conf'] = self.spark_conf
|
|
844
|
+
if self.spark_env_vars: body['spark_env_vars'] = self.spark_env_vars
|
|
845
|
+
if self.spark_version is not None: body['spark_version'] = self.spark_version
|
|
846
|
+
if self.ssh_public_keys: body['ssh_public_keys'] = self.ssh_public_keys
|
|
847
|
+
if self.use_ml_runtime is not None: body['use_ml_runtime'] = self.use_ml_runtime
|
|
848
|
+
if self.workload_type: body['workload_type'] = self.workload_type
|
|
849
|
+
return body
|
|
850
|
+
|
|
669
851
|
@classmethod
|
|
670
852
|
def from_dict(cls, d: Dict[str, any]) -> ClusterAttributes:
|
|
671
853
|
"""Deserializes the ClusterAttributes from a dictionary."""
|
|
@@ -684,6 +866,8 @@ class ClusterAttributes:
|
|
|
684
866
|
gcp_attributes=_from_dict(d, 'gcp_attributes', GcpAttributes),
|
|
685
867
|
init_scripts=_repeated_dict(d, 'init_scripts', InitScriptInfo),
|
|
686
868
|
instance_pool_id=d.get('instance_pool_id', None),
|
|
869
|
+
is_single_node=d.get('is_single_node', None),
|
|
870
|
+
kind=_enum(d, 'kind', Kind),
|
|
687
871
|
node_type_id=d.get('node_type_id', None),
|
|
688
872
|
policy_id=d.get('policy_id', None),
|
|
689
873
|
runtime_engine=_enum(d, 'runtime_engine', RuntimeEngine),
|
|
@@ -692,6 +876,7 @@ class ClusterAttributes:
|
|
|
692
876
|
spark_env_vars=d.get('spark_env_vars', None),
|
|
693
877
|
spark_version=d.get('spark_version', None),
|
|
694
878
|
ssh_public_keys=d.get('ssh_public_keys', None),
|
|
879
|
+
use_ml_runtime=d.get('use_ml_runtime', None),
|
|
695
880
|
workload_type=_from_dict(d, 'workload_type', WorkloadType))
|
|
696
881
|
|
|
697
882
|
|
|
@@ -716,6 +901,14 @@ class ClusterCompliance:
|
|
|
716
901
|
if self.violations: body['violations'] = self.violations
|
|
717
902
|
return body
|
|
718
903
|
|
|
904
|
+
def as_shallow_dict(self) -> dict:
|
|
905
|
+
"""Serializes the ClusterCompliance into a shallow dictionary of its immediate attributes."""
|
|
906
|
+
body = {}
|
|
907
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
908
|
+
if self.is_compliant is not None: body['is_compliant'] = self.is_compliant
|
|
909
|
+
if self.violations: body['violations'] = self.violations
|
|
910
|
+
return body
|
|
911
|
+
|
|
719
912
|
@classmethod
|
|
720
913
|
def from_dict(cls, d: Dict[str, any]) -> ClusterCompliance:
|
|
721
914
|
"""Deserializes the ClusterCompliance from a dictionary."""
|
|
@@ -790,13 +983,19 @@ class ClusterDetails:
|
|
|
790
983
|
data_security_mode: Optional[DataSecurityMode] = None
|
|
791
984
|
"""Data security mode decides what data governance model to use when accessing data from a cluster.
|
|
792
985
|
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
986
|
+
The following modes can only be used with `kind`. * `DATA_SECURITY_MODE_AUTO`: Databricks will
|
|
987
|
+
choose the most appropriate access mode depending on your compute configuration. *
|
|
988
|
+
`DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * `DATA_SECURITY_MODE_DEDICATED`:
|
|
989
|
+
Alias for `SINGLE_USER`.
|
|
990
|
+
|
|
991
|
+
The following modes can be used regardless of `kind`. * `NONE`: No security isolation for
|
|
992
|
+
multiple users sharing the cluster. Data governance features are not available in this mode. *
|
|
993
|
+
`SINGLE_USER`: A secure cluster that can only be exclusively used by a single user specified in
|
|
994
|
+
`single_user_name`. Most programming languages, cluster features and data governance features
|
|
995
|
+
are available in this mode. * `USER_ISOLATION`: A secure cluster that can be shared by multiple
|
|
996
|
+
users. Cluster users are fully isolated so that they cannot see each other's data and
|
|
997
|
+
credentials. Most data governance features are supported in this mode. But programming languages
|
|
998
|
+
and cluster features might be limited.
|
|
800
999
|
|
|
801
1000
|
The following modes are deprecated starting with Databricks Runtime 15.0 and will be removed for
|
|
802
1001
|
future Databricks Runtime versions:
|
|
@@ -857,10 +1056,24 @@ class ClusterDetails:
|
|
|
857
1056
|
instance_pool_id: Optional[str] = None
|
|
858
1057
|
"""The optional ID of the instance pool to which the cluster belongs."""
|
|
859
1058
|
|
|
1059
|
+
is_single_node: Optional[bool] = None
|
|
1060
|
+
"""This field can only be used with `kind`.
|
|
1061
|
+
|
|
1062
|
+
When set to true, Databricks will automatically set single node related `custom_tags`,
|
|
1063
|
+
`spark_conf`, and `num_workers`"""
|
|
1064
|
+
|
|
860
1065
|
jdbc_port: Optional[int] = None
|
|
861
1066
|
"""Port on which Spark JDBC server is listening, in the driver nod. No service will be listeningon
|
|
862
1067
|
on this port in executor nodes."""
|
|
863
1068
|
|
|
1069
|
+
kind: Optional[Kind] = None
|
|
1070
|
+
"""The kind of compute described by this compute specification.
|
|
1071
|
+
|
|
1072
|
+
Depending on `kind`, different validations and default values will be applied.
|
|
1073
|
+
|
|
1074
|
+
The first usage of this value is for the simple cluster form where it sets `kind =
|
|
1075
|
+
CLASSIC_PREVIEW`."""
|
|
1076
|
+
|
|
864
1077
|
last_restarted_time: Optional[int] = None
|
|
865
1078
|
"""the timestamp that the cluster was started/restarted"""
|
|
866
1079
|
|
|
@@ -953,6 +1166,12 @@ class ClusterDetails:
|
|
|
953
1166
|
"""Information about why the cluster was terminated. This field only appears when the cluster is in
|
|
954
1167
|
a `TERMINATING` or `TERMINATED` state."""
|
|
955
1168
|
|
|
1169
|
+
use_ml_runtime: Optional[bool] = None
|
|
1170
|
+
"""This field can only be used with `kind`.
|
|
1171
|
+
|
|
1172
|
+
`effective_spark_version` is determined by `spark_version` (DBR release), this field
|
|
1173
|
+
`use_ml_runtime`, and whether `node_type_id` is gpu node or not."""
|
|
1174
|
+
|
|
956
1175
|
workload_type: Optional[WorkloadType] = None
|
|
957
1176
|
|
|
958
1177
|
def as_dict(self) -> dict:
|
|
@@ -986,7 +1205,9 @@ class ClusterDetails:
|
|
|
986
1205
|
if self.gcp_attributes: body['gcp_attributes'] = self.gcp_attributes.as_dict()
|
|
987
1206
|
if self.init_scripts: body['init_scripts'] = [v.as_dict() for v in self.init_scripts]
|
|
988
1207
|
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
1208
|
+
if self.is_single_node is not None: body['is_single_node'] = self.is_single_node
|
|
989
1209
|
if self.jdbc_port is not None: body['jdbc_port'] = self.jdbc_port
|
|
1210
|
+
if self.kind is not None: body['kind'] = self.kind.value
|
|
990
1211
|
if self.last_restarted_time is not None: body['last_restarted_time'] = self.last_restarted_time
|
|
991
1212
|
if self.last_state_loss_time is not None: body['last_state_loss_time'] = self.last_state_loss_time
|
|
992
1213
|
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
@@ -1005,9 +1226,66 @@ class ClusterDetails:
|
|
|
1005
1226
|
if self.state_message is not None: body['state_message'] = self.state_message
|
|
1006
1227
|
if self.terminated_time is not None: body['terminated_time'] = self.terminated_time
|
|
1007
1228
|
if self.termination_reason: body['termination_reason'] = self.termination_reason.as_dict()
|
|
1229
|
+
if self.use_ml_runtime is not None: body['use_ml_runtime'] = self.use_ml_runtime
|
|
1008
1230
|
if self.workload_type: body['workload_type'] = self.workload_type.as_dict()
|
|
1009
1231
|
return body
|
|
1010
1232
|
|
|
1233
|
+
def as_shallow_dict(self) -> dict:
|
|
1234
|
+
"""Serializes the ClusterDetails into a shallow dictionary of its immediate attributes."""
|
|
1235
|
+
body = {}
|
|
1236
|
+
if self.autoscale: body['autoscale'] = self.autoscale
|
|
1237
|
+
if self.autotermination_minutes is not None:
|
|
1238
|
+
body['autotermination_minutes'] = self.autotermination_minutes
|
|
1239
|
+
if self.aws_attributes: body['aws_attributes'] = self.aws_attributes
|
|
1240
|
+
if self.azure_attributes: body['azure_attributes'] = self.azure_attributes
|
|
1241
|
+
if self.cluster_cores is not None: body['cluster_cores'] = self.cluster_cores
|
|
1242
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
1243
|
+
if self.cluster_log_conf: body['cluster_log_conf'] = self.cluster_log_conf
|
|
1244
|
+
if self.cluster_log_status: body['cluster_log_status'] = self.cluster_log_status
|
|
1245
|
+
if self.cluster_memory_mb is not None: body['cluster_memory_mb'] = self.cluster_memory_mb
|
|
1246
|
+
if self.cluster_name is not None: body['cluster_name'] = self.cluster_name
|
|
1247
|
+
if self.cluster_source is not None: body['cluster_source'] = self.cluster_source
|
|
1248
|
+
if self.creator_user_name is not None: body['creator_user_name'] = self.creator_user_name
|
|
1249
|
+
if self.custom_tags: body['custom_tags'] = self.custom_tags
|
|
1250
|
+
if self.data_security_mode is not None: body['data_security_mode'] = self.data_security_mode
|
|
1251
|
+
if self.default_tags: body['default_tags'] = self.default_tags
|
|
1252
|
+
if self.docker_image: body['docker_image'] = self.docker_image
|
|
1253
|
+
if self.driver: body['driver'] = self.driver
|
|
1254
|
+
if self.driver_instance_pool_id is not None:
|
|
1255
|
+
body['driver_instance_pool_id'] = self.driver_instance_pool_id
|
|
1256
|
+
if self.driver_node_type_id is not None: body['driver_node_type_id'] = self.driver_node_type_id
|
|
1257
|
+
if self.enable_elastic_disk is not None: body['enable_elastic_disk'] = self.enable_elastic_disk
|
|
1258
|
+
if self.enable_local_disk_encryption is not None:
|
|
1259
|
+
body['enable_local_disk_encryption'] = self.enable_local_disk_encryption
|
|
1260
|
+
if self.executors: body['executors'] = self.executors
|
|
1261
|
+
if self.gcp_attributes: body['gcp_attributes'] = self.gcp_attributes
|
|
1262
|
+
if self.init_scripts: body['init_scripts'] = self.init_scripts
|
|
1263
|
+
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
1264
|
+
if self.is_single_node is not None: body['is_single_node'] = self.is_single_node
|
|
1265
|
+
if self.jdbc_port is not None: body['jdbc_port'] = self.jdbc_port
|
|
1266
|
+
if self.kind is not None: body['kind'] = self.kind
|
|
1267
|
+
if self.last_restarted_time is not None: body['last_restarted_time'] = self.last_restarted_time
|
|
1268
|
+
if self.last_state_loss_time is not None: body['last_state_loss_time'] = self.last_state_loss_time
|
|
1269
|
+
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
1270
|
+
if self.num_workers is not None: body['num_workers'] = self.num_workers
|
|
1271
|
+
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
1272
|
+
if self.runtime_engine is not None: body['runtime_engine'] = self.runtime_engine
|
|
1273
|
+
if self.single_user_name is not None: body['single_user_name'] = self.single_user_name
|
|
1274
|
+
if self.spark_conf: body['spark_conf'] = self.spark_conf
|
|
1275
|
+
if self.spark_context_id is not None: body['spark_context_id'] = self.spark_context_id
|
|
1276
|
+
if self.spark_env_vars: body['spark_env_vars'] = self.spark_env_vars
|
|
1277
|
+
if self.spark_version is not None: body['spark_version'] = self.spark_version
|
|
1278
|
+
if self.spec: body['spec'] = self.spec
|
|
1279
|
+
if self.ssh_public_keys: body['ssh_public_keys'] = self.ssh_public_keys
|
|
1280
|
+
if self.start_time is not None: body['start_time'] = self.start_time
|
|
1281
|
+
if self.state is not None: body['state'] = self.state
|
|
1282
|
+
if self.state_message is not None: body['state_message'] = self.state_message
|
|
1283
|
+
if self.terminated_time is not None: body['terminated_time'] = self.terminated_time
|
|
1284
|
+
if self.termination_reason: body['termination_reason'] = self.termination_reason
|
|
1285
|
+
if self.use_ml_runtime is not None: body['use_ml_runtime'] = self.use_ml_runtime
|
|
1286
|
+
if self.workload_type: body['workload_type'] = self.workload_type
|
|
1287
|
+
return body
|
|
1288
|
+
|
|
1011
1289
|
@classmethod
|
|
1012
1290
|
def from_dict(cls, d: Dict[str, any]) -> ClusterDetails:
|
|
1013
1291
|
"""Deserializes the ClusterDetails from a dictionary."""
|
|
@@ -1036,7 +1314,9 @@ class ClusterDetails:
|
|
|
1036
1314
|
gcp_attributes=_from_dict(d, 'gcp_attributes', GcpAttributes),
|
|
1037
1315
|
init_scripts=_repeated_dict(d, 'init_scripts', InitScriptInfo),
|
|
1038
1316
|
instance_pool_id=d.get('instance_pool_id', None),
|
|
1317
|
+
is_single_node=d.get('is_single_node', None),
|
|
1039
1318
|
jdbc_port=d.get('jdbc_port', None),
|
|
1319
|
+
kind=_enum(d, 'kind', Kind),
|
|
1040
1320
|
last_restarted_time=d.get('last_restarted_time', None),
|
|
1041
1321
|
last_state_loss_time=d.get('last_state_loss_time', None),
|
|
1042
1322
|
node_type_id=d.get('node_type_id', None),
|
|
@@ -1055,6 +1335,7 @@ class ClusterDetails:
|
|
|
1055
1335
|
state_message=d.get('state_message', None),
|
|
1056
1336
|
terminated_time=d.get('terminated_time', None),
|
|
1057
1337
|
termination_reason=_from_dict(d, 'termination_reason', TerminationReason),
|
|
1338
|
+
use_ml_runtime=d.get('use_ml_runtime', None),
|
|
1058
1339
|
workload_type=_from_dict(d, 'workload_type', WorkloadType))
|
|
1059
1340
|
|
|
1060
1341
|
|
|
@@ -1086,6 +1367,16 @@ class ClusterEvent:
|
|
|
1086
1367
|
if self.type is not None: body['type'] = self.type.value
|
|
1087
1368
|
return body
|
|
1088
1369
|
|
|
1370
|
+
def as_shallow_dict(self) -> dict:
|
|
1371
|
+
"""Serializes the ClusterEvent into a shallow dictionary of its immediate attributes."""
|
|
1372
|
+
body = {}
|
|
1373
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
1374
|
+
if self.data_plane_event_details: body['data_plane_event_details'] = self.data_plane_event_details
|
|
1375
|
+
if self.details: body['details'] = self.details
|
|
1376
|
+
if self.timestamp is not None: body['timestamp'] = self.timestamp
|
|
1377
|
+
if self.type is not None: body['type'] = self.type
|
|
1378
|
+
return body
|
|
1379
|
+
|
|
1089
1380
|
@classmethod
|
|
1090
1381
|
def from_dict(cls, d: Dict[str, any]) -> ClusterEvent:
|
|
1091
1382
|
"""Deserializes the ClusterEvent from a dictionary."""
|
|
@@ -1111,6 +1402,13 @@ class ClusterLibraryStatuses:
|
|
|
1111
1402
|
if self.library_statuses: body['library_statuses'] = [v.as_dict() for v in self.library_statuses]
|
|
1112
1403
|
return body
|
|
1113
1404
|
|
|
1405
|
+
def as_shallow_dict(self) -> dict:
|
|
1406
|
+
"""Serializes the ClusterLibraryStatuses into a shallow dictionary of its immediate attributes."""
|
|
1407
|
+
body = {}
|
|
1408
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
1409
|
+
if self.library_statuses: body['library_statuses'] = self.library_statuses
|
|
1410
|
+
return body
|
|
1411
|
+
|
|
1114
1412
|
@classmethod
|
|
1115
1413
|
def from_dict(cls, d: Dict[str, any]) -> ClusterLibraryStatuses:
|
|
1116
1414
|
"""Deserializes the ClusterLibraryStatuses from a dictionary."""
|
|
@@ -1137,6 +1435,13 @@ class ClusterLogConf:
|
|
|
1137
1435
|
if self.s3: body['s3'] = self.s3.as_dict()
|
|
1138
1436
|
return body
|
|
1139
1437
|
|
|
1438
|
+
def as_shallow_dict(self) -> dict:
|
|
1439
|
+
"""Serializes the ClusterLogConf into a shallow dictionary of its immediate attributes."""
|
|
1440
|
+
body = {}
|
|
1441
|
+
if self.dbfs: body['dbfs'] = self.dbfs
|
|
1442
|
+
if self.s3: body['s3'] = self.s3
|
|
1443
|
+
return body
|
|
1444
|
+
|
|
1140
1445
|
@classmethod
|
|
1141
1446
|
def from_dict(cls, d: Dict[str, any]) -> ClusterLogConf:
|
|
1142
1447
|
"""Deserializes the ClusterLogConf from a dictionary."""
|
|
@@ -1160,6 +1465,14 @@ class ClusterPermission:
|
|
|
1160
1465
|
if self.permission_level is not None: body['permission_level'] = self.permission_level.value
|
|
1161
1466
|
return body
|
|
1162
1467
|
|
|
1468
|
+
def as_shallow_dict(self) -> dict:
|
|
1469
|
+
"""Serializes the ClusterPermission into a shallow dictionary of its immediate attributes."""
|
|
1470
|
+
body = {}
|
|
1471
|
+
if self.inherited is not None: body['inherited'] = self.inherited
|
|
1472
|
+
if self.inherited_from_object: body['inherited_from_object'] = self.inherited_from_object
|
|
1473
|
+
if self.permission_level is not None: body['permission_level'] = self.permission_level
|
|
1474
|
+
return body
|
|
1475
|
+
|
|
1163
1476
|
@classmethod
|
|
1164
1477
|
def from_dict(cls, d: Dict[str, any]) -> ClusterPermission:
|
|
1165
1478
|
"""Deserializes the ClusterPermission from a dictionary."""
|
|
@@ -1193,6 +1506,14 @@ class ClusterPermissions:
|
|
|
1193
1506
|
if self.object_type is not None: body['object_type'] = self.object_type
|
|
1194
1507
|
return body
|
|
1195
1508
|
|
|
1509
|
+
def as_shallow_dict(self) -> dict:
|
|
1510
|
+
"""Serializes the ClusterPermissions into a shallow dictionary of its immediate attributes."""
|
|
1511
|
+
body = {}
|
|
1512
|
+
if self.access_control_list: body['access_control_list'] = self.access_control_list
|
|
1513
|
+
if self.object_id is not None: body['object_id'] = self.object_id
|
|
1514
|
+
if self.object_type is not None: body['object_type'] = self.object_type
|
|
1515
|
+
return body
|
|
1516
|
+
|
|
1196
1517
|
@classmethod
|
|
1197
1518
|
def from_dict(cls, d: Dict[str, any]) -> ClusterPermissions:
|
|
1198
1519
|
"""Deserializes the ClusterPermissions from a dictionary."""
|
|
@@ -1215,6 +1536,13 @@ class ClusterPermissionsDescription:
|
|
|
1215
1536
|
if self.permission_level is not None: body['permission_level'] = self.permission_level.value
|
|
1216
1537
|
return body
|
|
1217
1538
|
|
|
1539
|
+
def as_shallow_dict(self) -> dict:
|
|
1540
|
+
"""Serializes the ClusterPermissionsDescription into a shallow dictionary of its immediate attributes."""
|
|
1541
|
+
body = {}
|
|
1542
|
+
if self.description is not None: body['description'] = self.description
|
|
1543
|
+
if self.permission_level is not None: body['permission_level'] = self.permission_level
|
|
1544
|
+
return body
|
|
1545
|
+
|
|
1218
1546
|
@classmethod
|
|
1219
1547
|
def from_dict(cls, d: Dict[str, any]) -> ClusterPermissionsDescription:
|
|
1220
1548
|
"""Deserializes the ClusterPermissionsDescription from a dictionary."""
|
|
@@ -1237,6 +1565,13 @@ class ClusterPermissionsRequest:
|
|
|
1237
1565
|
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
1238
1566
|
return body
|
|
1239
1567
|
|
|
1568
|
+
def as_shallow_dict(self) -> dict:
|
|
1569
|
+
"""Serializes the ClusterPermissionsRequest into a shallow dictionary of its immediate attributes."""
|
|
1570
|
+
body = {}
|
|
1571
|
+
if self.access_control_list: body['access_control_list'] = self.access_control_list
|
|
1572
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
1573
|
+
return body
|
|
1574
|
+
|
|
1240
1575
|
@classmethod
|
|
1241
1576
|
def from_dict(cls, d: Dict[str, any]) -> ClusterPermissionsRequest:
|
|
1242
1577
|
"""Deserializes the ClusterPermissionsRequest from a dictionary."""
|
|
@@ -1268,6 +1603,16 @@ class ClusterPolicyAccessControlRequest:
|
|
|
1268
1603
|
if self.user_name is not None: body['user_name'] = self.user_name
|
|
1269
1604
|
return body
|
|
1270
1605
|
|
|
1606
|
+
def as_shallow_dict(self) -> dict:
|
|
1607
|
+
"""Serializes the ClusterPolicyAccessControlRequest into a shallow dictionary of its immediate attributes."""
|
|
1608
|
+
body = {}
|
|
1609
|
+
if self.group_name is not None: body['group_name'] = self.group_name
|
|
1610
|
+
if self.permission_level is not None: body['permission_level'] = self.permission_level
|
|
1611
|
+
if self.service_principal_name is not None:
|
|
1612
|
+
body['service_principal_name'] = self.service_principal_name
|
|
1613
|
+
if self.user_name is not None: body['user_name'] = self.user_name
|
|
1614
|
+
return body
|
|
1615
|
+
|
|
1271
1616
|
@classmethod
|
|
1272
1617
|
def from_dict(cls, d: Dict[str, any]) -> ClusterPolicyAccessControlRequest:
|
|
1273
1618
|
"""Deserializes the ClusterPolicyAccessControlRequest from a dictionary."""
|
|
@@ -1305,6 +1650,17 @@ class ClusterPolicyAccessControlResponse:
|
|
|
1305
1650
|
if self.user_name is not None: body['user_name'] = self.user_name
|
|
1306
1651
|
return body
|
|
1307
1652
|
|
|
1653
|
+
def as_shallow_dict(self) -> dict:
|
|
1654
|
+
"""Serializes the ClusterPolicyAccessControlResponse into a shallow dictionary of its immediate attributes."""
|
|
1655
|
+
body = {}
|
|
1656
|
+
if self.all_permissions: body['all_permissions'] = self.all_permissions
|
|
1657
|
+
if self.display_name is not None: body['display_name'] = self.display_name
|
|
1658
|
+
if self.group_name is not None: body['group_name'] = self.group_name
|
|
1659
|
+
if self.service_principal_name is not None:
|
|
1660
|
+
body['service_principal_name'] = self.service_principal_name
|
|
1661
|
+
if self.user_name is not None: body['user_name'] = self.user_name
|
|
1662
|
+
return body
|
|
1663
|
+
|
|
1308
1664
|
@classmethod
|
|
1309
1665
|
def from_dict(cls, d: Dict[str, any]) -> ClusterPolicyAccessControlResponse:
|
|
1310
1666
|
"""Deserializes the ClusterPolicyAccessControlResponse from a dictionary."""
|
|
@@ -1332,6 +1688,14 @@ class ClusterPolicyPermission:
|
|
|
1332
1688
|
if self.permission_level is not None: body['permission_level'] = self.permission_level.value
|
|
1333
1689
|
return body
|
|
1334
1690
|
|
|
1691
|
+
def as_shallow_dict(self) -> dict:
|
|
1692
|
+
"""Serializes the ClusterPolicyPermission into a shallow dictionary of its immediate attributes."""
|
|
1693
|
+
body = {}
|
|
1694
|
+
if self.inherited is not None: body['inherited'] = self.inherited
|
|
1695
|
+
if self.inherited_from_object: body['inherited_from_object'] = self.inherited_from_object
|
|
1696
|
+
if self.permission_level is not None: body['permission_level'] = self.permission_level
|
|
1697
|
+
return body
|
|
1698
|
+
|
|
1335
1699
|
@classmethod
|
|
1336
1700
|
def from_dict(cls, d: Dict[str, any]) -> ClusterPolicyPermission:
|
|
1337
1701
|
"""Deserializes the ClusterPolicyPermission from a dictionary."""
|
|
@@ -1363,6 +1727,14 @@ class ClusterPolicyPermissions:
|
|
|
1363
1727
|
if self.object_type is not None: body['object_type'] = self.object_type
|
|
1364
1728
|
return body
|
|
1365
1729
|
|
|
1730
|
+
def as_shallow_dict(self) -> dict:
|
|
1731
|
+
"""Serializes the ClusterPolicyPermissions into a shallow dictionary of its immediate attributes."""
|
|
1732
|
+
body = {}
|
|
1733
|
+
if self.access_control_list: body['access_control_list'] = self.access_control_list
|
|
1734
|
+
if self.object_id is not None: body['object_id'] = self.object_id
|
|
1735
|
+
if self.object_type is not None: body['object_type'] = self.object_type
|
|
1736
|
+
return body
|
|
1737
|
+
|
|
1366
1738
|
@classmethod
|
|
1367
1739
|
def from_dict(cls, d: Dict[str, any]) -> ClusterPolicyPermissions:
|
|
1368
1740
|
"""Deserializes the ClusterPolicyPermissions from a dictionary."""
|
|
@@ -1386,6 +1758,13 @@ class ClusterPolicyPermissionsDescription:
|
|
|
1386
1758
|
if self.permission_level is not None: body['permission_level'] = self.permission_level.value
|
|
1387
1759
|
return body
|
|
1388
1760
|
|
|
1761
|
+
def as_shallow_dict(self) -> dict:
|
|
1762
|
+
"""Serializes the ClusterPolicyPermissionsDescription into a shallow dictionary of its immediate attributes."""
|
|
1763
|
+
body = {}
|
|
1764
|
+
if self.description is not None: body['description'] = self.description
|
|
1765
|
+
if self.permission_level is not None: body['permission_level'] = self.permission_level
|
|
1766
|
+
return body
|
|
1767
|
+
|
|
1389
1768
|
@classmethod
|
|
1390
1769
|
def from_dict(cls, d: Dict[str, any]) -> ClusterPolicyPermissionsDescription:
|
|
1391
1770
|
"""Deserializes the ClusterPolicyPermissionsDescription from a dictionary."""
|
|
@@ -1408,6 +1787,13 @@ class ClusterPolicyPermissionsRequest:
|
|
|
1408
1787
|
if self.cluster_policy_id is not None: body['cluster_policy_id'] = self.cluster_policy_id
|
|
1409
1788
|
return body
|
|
1410
1789
|
|
|
1790
|
+
def as_shallow_dict(self) -> dict:
|
|
1791
|
+
"""Serializes the ClusterPolicyPermissionsRequest into a shallow dictionary of its immediate attributes."""
|
|
1792
|
+
body = {}
|
|
1793
|
+
if self.access_control_list: body['access_control_list'] = self.access_control_list
|
|
1794
|
+
if self.cluster_policy_id is not None: body['cluster_policy_id'] = self.cluster_policy_id
|
|
1795
|
+
return body
|
|
1796
|
+
|
|
1411
1797
|
@classmethod
|
|
1412
1798
|
def from_dict(cls, d: Dict[str, any]) -> ClusterPolicyPermissionsRequest:
|
|
1413
1799
|
"""Deserializes the ClusterPolicyPermissionsRequest from a dictionary."""
|
|
@@ -1442,6 +1828,14 @@ class ClusterSettingsChange:
|
|
|
1442
1828
|
if self.previous_value is not None: body['previous_value'] = self.previous_value
|
|
1443
1829
|
return body
|
|
1444
1830
|
|
|
1831
|
+
def as_shallow_dict(self) -> dict:
|
|
1832
|
+
"""Serializes the ClusterSettingsChange into a shallow dictionary of its immediate attributes."""
|
|
1833
|
+
body = {}
|
|
1834
|
+
if self.field is not None: body['field'] = self.field
|
|
1835
|
+
if self.new_value is not None: body['new_value'] = self.new_value
|
|
1836
|
+
if self.previous_value is not None: body['previous_value'] = self.previous_value
|
|
1837
|
+
return body
|
|
1838
|
+
|
|
1445
1839
|
@classmethod
|
|
1446
1840
|
def from_dict(cls, d: Dict[str, any]) -> ClusterSettingsChange:
|
|
1447
1841
|
"""Deserializes the ClusterSettingsChange from a dictionary."""
|
|
@@ -1473,6 +1867,13 @@ class ClusterSize:
|
|
|
1473
1867
|
if self.num_workers is not None: body['num_workers'] = self.num_workers
|
|
1474
1868
|
return body
|
|
1475
1869
|
|
|
1870
|
+
def as_shallow_dict(self) -> dict:
|
|
1871
|
+
"""Serializes the ClusterSize into a shallow dictionary of its immediate attributes."""
|
|
1872
|
+
body = {}
|
|
1873
|
+
if self.autoscale: body['autoscale'] = self.autoscale
|
|
1874
|
+
if self.num_workers is not None: body['num_workers'] = self.num_workers
|
|
1875
|
+
return body
|
|
1876
|
+
|
|
1476
1877
|
@classmethod
|
|
1477
1878
|
def from_dict(cls, d: Dict[str, any]) -> ClusterSize:
|
|
1478
1879
|
"""Deserializes the ClusterSize from a dictionary."""
|
|
@@ -1539,13 +1940,19 @@ class ClusterSpec:
|
|
|
1539
1940
|
data_security_mode: Optional[DataSecurityMode] = None
|
|
1540
1941
|
"""Data security mode decides what data governance model to use when accessing data from a cluster.
|
|
1541
1942
|
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1943
|
+
The following modes can only be used with `kind`. * `DATA_SECURITY_MODE_AUTO`: Databricks will
|
|
1944
|
+
choose the most appropriate access mode depending on your compute configuration. *
|
|
1945
|
+
`DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * `DATA_SECURITY_MODE_DEDICATED`:
|
|
1946
|
+
Alias for `SINGLE_USER`.
|
|
1947
|
+
|
|
1948
|
+
The following modes can be used regardless of `kind`. * `NONE`: No security isolation for
|
|
1949
|
+
multiple users sharing the cluster. Data governance features are not available in this mode. *
|
|
1950
|
+
`SINGLE_USER`: A secure cluster that can only be exclusively used by a single user specified in
|
|
1951
|
+
`single_user_name`. Most programming languages, cluster features and data governance features
|
|
1952
|
+
are available in this mode. * `USER_ISOLATION`: A secure cluster that can be shared by multiple
|
|
1953
|
+
users. Cluster users are fully isolated so that they cannot see each other's data and
|
|
1954
|
+
credentials. Most data governance features are supported in this mode. But programming languages
|
|
1955
|
+
and cluster features might be limited.
|
|
1549
1956
|
|
|
1550
1957
|
The following modes are deprecated starting with Databricks Runtime 15.0 and will be removed for
|
|
1551
1958
|
future Databricks Runtime versions:
|
|
@@ -1586,6 +1993,20 @@ class ClusterSpec:
|
|
|
1586
1993
|
instance_pool_id: Optional[str] = None
|
|
1587
1994
|
"""The optional ID of the instance pool to which the cluster belongs."""
|
|
1588
1995
|
|
|
1996
|
+
is_single_node: Optional[bool] = None
|
|
1997
|
+
"""This field can only be used with `kind`.
|
|
1998
|
+
|
|
1999
|
+
When set to true, Databricks will automatically set single node related `custom_tags`,
|
|
2000
|
+
`spark_conf`, and `num_workers`"""
|
|
2001
|
+
|
|
2002
|
+
kind: Optional[Kind] = None
|
|
2003
|
+
"""The kind of compute described by this compute specification.
|
|
2004
|
+
|
|
2005
|
+
Depending on `kind`, different validations and default values will be applied.
|
|
2006
|
+
|
|
2007
|
+
The first usage of this value is for the simple cluster form where it sets `kind =
|
|
2008
|
+
CLASSIC_PREVIEW`."""
|
|
2009
|
+
|
|
1589
2010
|
node_type_id: Optional[str] = None
|
|
1590
2011
|
"""This field encodes, through a single value, the resources available to each of the Spark nodes
|
|
1591
2012
|
in this cluster. For example, the Spark nodes can be provisioned and optimized for memory or
|
|
@@ -1644,6 +2065,12 @@ class ClusterSpec:
|
|
|
1644
2065
|
private keys can be used to login with the user name `ubuntu` on port `2200`. Up to 10 keys can
|
|
1645
2066
|
be specified."""
|
|
1646
2067
|
|
|
2068
|
+
use_ml_runtime: Optional[bool] = None
|
|
2069
|
+
"""This field can only be used with `kind`.
|
|
2070
|
+
|
|
2071
|
+
`effective_spark_version` is determined by `spark_version` (DBR release), this field
|
|
2072
|
+
`use_ml_runtime`, and whether `node_type_id` is gpu node or not."""
|
|
2073
|
+
|
|
1647
2074
|
workload_type: Optional[WorkloadType] = None
|
|
1648
2075
|
|
|
1649
2076
|
def as_dict(self) -> dict:
|
|
@@ -1670,6 +2097,8 @@ class ClusterSpec:
|
|
|
1670
2097
|
if self.gcp_attributes: body['gcp_attributes'] = self.gcp_attributes.as_dict()
|
|
1671
2098
|
if self.init_scripts: body['init_scripts'] = [v.as_dict() for v in self.init_scripts]
|
|
1672
2099
|
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
2100
|
+
if self.is_single_node is not None: body['is_single_node'] = self.is_single_node
|
|
2101
|
+
if self.kind is not None: body['kind'] = self.kind.value
|
|
1673
2102
|
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
1674
2103
|
if self.num_workers is not None: body['num_workers'] = self.num_workers
|
|
1675
2104
|
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
@@ -1679,9 +2108,49 @@ class ClusterSpec:
|
|
|
1679
2108
|
if self.spark_env_vars: body['spark_env_vars'] = self.spark_env_vars
|
|
1680
2109
|
if self.spark_version is not None: body['spark_version'] = self.spark_version
|
|
1681
2110
|
if self.ssh_public_keys: body['ssh_public_keys'] = [v for v in self.ssh_public_keys]
|
|
2111
|
+
if self.use_ml_runtime is not None: body['use_ml_runtime'] = self.use_ml_runtime
|
|
1682
2112
|
if self.workload_type: body['workload_type'] = self.workload_type.as_dict()
|
|
1683
2113
|
return body
|
|
1684
2114
|
|
|
2115
|
+
def as_shallow_dict(self) -> dict:
|
|
2116
|
+
"""Serializes the ClusterSpec into a shallow dictionary of its immediate attributes."""
|
|
2117
|
+
body = {}
|
|
2118
|
+
if self.apply_policy_default_values is not None:
|
|
2119
|
+
body['apply_policy_default_values'] = self.apply_policy_default_values
|
|
2120
|
+
if self.autoscale: body['autoscale'] = self.autoscale
|
|
2121
|
+
if self.autotermination_minutes is not None:
|
|
2122
|
+
body['autotermination_minutes'] = self.autotermination_minutes
|
|
2123
|
+
if self.aws_attributes: body['aws_attributes'] = self.aws_attributes
|
|
2124
|
+
if self.azure_attributes: body['azure_attributes'] = self.azure_attributes
|
|
2125
|
+
if self.cluster_log_conf: body['cluster_log_conf'] = self.cluster_log_conf
|
|
2126
|
+
if self.cluster_name is not None: body['cluster_name'] = self.cluster_name
|
|
2127
|
+
if self.custom_tags: body['custom_tags'] = self.custom_tags
|
|
2128
|
+
if self.data_security_mode is not None: body['data_security_mode'] = self.data_security_mode
|
|
2129
|
+
if self.docker_image: body['docker_image'] = self.docker_image
|
|
2130
|
+
if self.driver_instance_pool_id is not None:
|
|
2131
|
+
body['driver_instance_pool_id'] = self.driver_instance_pool_id
|
|
2132
|
+
if self.driver_node_type_id is not None: body['driver_node_type_id'] = self.driver_node_type_id
|
|
2133
|
+
if self.enable_elastic_disk is not None: body['enable_elastic_disk'] = self.enable_elastic_disk
|
|
2134
|
+
if self.enable_local_disk_encryption is not None:
|
|
2135
|
+
body['enable_local_disk_encryption'] = self.enable_local_disk_encryption
|
|
2136
|
+
if self.gcp_attributes: body['gcp_attributes'] = self.gcp_attributes
|
|
2137
|
+
if self.init_scripts: body['init_scripts'] = self.init_scripts
|
|
2138
|
+
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
2139
|
+
if self.is_single_node is not None: body['is_single_node'] = self.is_single_node
|
|
2140
|
+
if self.kind is not None: body['kind'] = self.kind
|
|
2141
|
+
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
2142
|
+
if self.num_workers is not None: body['num_workers'] = self.num_workers
|
|
2143
|
+
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
2144
|
+
if self.runtime_engine is not None: body['runtime_engine'] = self.runtime_engine
|
|
2145
|
+
if self.single_user_name is not None: body['single_user_name'] = self.single_user_name
|
|
2146
|
+
if self.spark_conf: body['spark_conf'] = self.spark_conf
|
|
2147
|
+
if self.spark_env_vars: body['spark_env_vars'] = self.spark_env_vars
|
|
2148
|
+
if self.spark_version is not None: body['spark_version'] = self.spark_version
|
|
2149
|
+
if self.ssh_public_keys: body['ssh_public_keys'] = self.ssh_public_keys
|
|
2150
|
+
if self.use_ml_runtime is not None: body['use_ml_runtime'] = self.use_ml_runtime
|
|
2151
|
+
if self.workload_type: body['workload_type'] = self.workload_type
|
|
2152
|
+
return body
|
|
2153
|
+
|
|
1685
2154
|
@classmethod
|
|
1686
2155
|
def from_dict(cls, d: Dict[str, any]) -> ClusterSpec:
|
|
1687
2156
|
"""Deserializes the ClusterSpec from a dictionary."""
|
|
@@ -1702,6 +2171,8 @@ class ClusterSpec:
|
|
|
1702
2171
|
gcp_attributes=_from_dict(d, 'gcp_attributes', GcpAttributes),
|
|
1703
2172
|
init_scripts=_repeated_dict(d, 'init_scripts', InitScriptInfo),
|
|
1704
2173
|
instance_pool_id=d.get('instance_pool_id', None),
|
|
2174
|
+
is_single_node=d.get('is_single_node', None),
|
|
2175
|
+
kind=_enum(d, 'kind', Kind),
|
|
1705
2176
|
node_type_id=d.get('node_type_id', None),
|
|
1706
2177
|
num_workers=d.get('num_workers', None),
|
|
1707
2178
|
policy_id=d.get('policy_id', None),
|
|
@@ -1711,6 +2182,7 @@ class ClusterSpec:
|
|
|
1711
2182
|
spark_env_vars=d.get('spark_env_vars', None),
|
|
1712
2183
|
spark_version=d.get('spark_version', None),
|
|
1713
2184
|
ssh_public_keys=d.get('ssh_public_keys', None),
|
|
2185
|
+
use_ml_runtime=d.get('use_ml_runtime', None),
|
|
1714
2186
|
workload_type=_from_dict(d, 'workload_type', WorkloadType))
|
|
1715
2187
|
|
|
1716
2188
|
|
|
@@ -1736,6 +2208,15 @@ class Command:
|
|
|
1736
2208
|
if self.language is not None: body['language'] = self.language.value
|
|
1737
2209
|
return body
|
|
1738
2210
|
|
|
2211
|
+
def as_shallow_dict(self) -> dict:
|
|
2212
|
+
"""Serializes the Command into a shallow dictionary of its immediate attributes."""
|
|
2213
|
+
body = {}
|
|
2214
|
+
if self.cluster_id is not None: body['clusterId'] = self.cluster_id
|
|
2215
|
+
if self.command is not None: body['command'] = self.command
|
|
2216
|
+
if self.context_id is not None: body['contextId'] = self.context_id
|
|
2217
|
+
if self.language is not None: body['language'] = self.language
|
|
2218
|
+
return body
|
|
2219
|
+
|
|
1739
2220
|
@classmethod
|
|
1740
2221
|
def from_dict(cls, d: Dict[str, any]) -> Command:
|
|
1741
2222
|
"""Deserializes the Command from a dictionary."""
|
|
@@ -1771,6 +2252,14 @@ class CommandStatusResponse:
|
|
|
1771
2252
|
if self.status is not None: body['status'] = self.status.value
|
|
1772
2253
|
return body
|
|
1773
2254
|
|
|
2255
|
+
def as_shallow_dict(self) -> dict:
|
|
2256
|
+
"""Serializes the CommandStatusResponse into a shallow dictionary of its immediate attributes."""
|
|
2257
|
+
body = {}
|
|
2258
|
+
if self.id is not None: body['id'] = self.id
|
|
2259
|
+
if self.results: body['results'] = self.results
|
|
2260
|
+
if self.status is not None: body['status'] = self.status
|
|
2261
|
+
return body
|
|
2262
|
+
|
|
1774
2263
|
@classmethod
|
|
1775
2264
|
def from_dict(cls, d: Dict[str, any]) -> CommandStatusResponse:
|
|
1776
2265
|
"""Deserializes the CommandStatusResponse from a dictionary."""
|
|
@@ -1799,6 +2288,13 @@ class ContextStatusResponse:
|
|
|
1799
2288
|
if self.status is not None: body['status'] = self.status.value
|
|
1800
2289
|
return body
|
|
1801
2290
|
|
|
2291
|
+
def as_shallow_dict(self) -> dict:
|
|
2292
|
+
"""Serializes the ContextStatusResponse into a shallow dictionary of its immediate attributes."""
|
|
2293
|
+
body = {}
|
|
2294
|
+
if self.id is not None: body['id'] = self.id
|
|
2295
|
+
if self.status is not None: body['status'] = self.status
|
|
2296
|
+
return body
|
|
2297
|
+
|
|
1802
2298
|
@classmethod
|
|
1803
2299
|
def from_dict(cls, d: Dict[str, any]) -> ContextStatusResponse:
|
|
1804
2300
|
"""Deserializes the ContextStatusResponse from a dictionary."""
|
|
@@ -1860,13 +2356,19 @@ class CreateCluster:
|
|
|
1860
2356
|
data_security_mode: Optional[DataSecurityMode] = None
|
|
1861
2357
|
"""Data security mode decides what data governance model to use when accessing data from a cluster.
|
|
1862
2358
|
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
2359
|
+
The following modes can only be used with `kind`. * `DATA_SECURITY_MODE_AUTO`: Databricks will
|
|
2360
|
+
choose the most appropriate access mode depending on your compute configuration. *
|
|
2361
|
+
`DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * `DATA_SECURITY_MODE_DEDICATED`:
|
|
2362
|
+
Alias for `SINGLE_USER`.
|
|
2363
|
+
|
|
2364
|
+
The following modes can be used regardless of `kind`. * `NONE`: No security isolation for
|
|
2365
|
+
multiple users sharing the cluster. Data governance features are not available in this mode. *
|
|
2366
|
+
`SINGLE_USER`: A secure cluster that can only be exclusively used by a single user specified in
|
|
2367
|
+
`single_user_name`. Most programming languages, cluster features and data governance features
|
|
2368
|
+
are available in this mode. * `USER_ISOLATION`: A secure cluster that can be shared by multiple
|
|
2369
|
+
users. Cluster users are fully isolated so that they cannot see each other's data and
|
|
2370
|
+
credentials. Most data governance features are supported in this mode. But programming languages
|
|
2371
|
+
and cluster features might be limited.
|
|
1870
2372
|
|
|
1871
2373
|
The following modes are deprecated starting with Databricks Runtime 15.0 and will be removed for
|
|
1872
2374
|
future Databricks Runtime versions:
|
|
@@ -1907,6 +2409,20 @@ class CreateCluster:
|
|
|
1907
2409
|
instance_pool_id: Optional[str] = None
|
|
1908
2410
|
"""The optional ID of the instance pool to which the cluster belongs."""
|
|
1909
2411
|
|
|
2412
|
+
is_single_node: Optional[bool] = None
|
|
2413
|
+
"""This field can only be used with `kind`.
|
|
2414
|
+
|
|
2415
|
+
When set to true, Databricks will automatically set single node related `custom_tags`,
|
|
2416
|
+
`spark_conf`, and `num_workers`"""
|
|
2417
|
+
|
|
2418
|
+
kind: Optional[Kind] = None
|
|
2419
|
+
"""The kind of compute described by this compute specification.
|
|
2420
|
+
|
|
2421
|
+
Depending on `kind`, different validations and default values will be applied.
|
|
2422
|
+
|
|
2423
|
+
The first usage of this value is for the simple cluster form where it sets `kind =
|
|
2424
|
+
CLASSIC_PREVIEW`."""
|
|
2425
|
+
|
|
1910
2426
|
node_type_id: Optional[str] = None
|
|
1911
2427
|
"""This field encodes, through a single value, the resources available to each of the Spark nodes
|
|
1912
2428
|
in this cluster. For example, the Spark nodes can be provisioned and optimized for memory or
|
|
@@ -1961,6 +2477,12 @@ class CreateCluster:
|
|
|
1961
2477
|
private keys can be used to login with the user name `ubuntu` on port `2200`. Up to 10 keys can
|
|
1962
2478
|
be specified."""
|
|
1963
2479
|
|
|
2480
|
+
use_ml_runtime: Optional[bool] = None
|
|
2481
|
+
"""This field can only be used with `kind`.
|
|
2482
|
+
|
|
2483
|
+
`effective_spark_version` is determined by `spark_version` (DBR release), this field
|
|
2484
|
+
`use_ml_runtime`, and whether `node_type_id` is gpu node or not."""
|
|
2485
|
+
|
|
1964
2486
|
workload_type: Optional[WorkloadType] = None
|
|
1965
2487
|
|
|
1966
2488
|
def as_dict(self) -> dict:
|
|
@@ -1988,6 +2510,8 @@ class CreateCluster:
|
|
|
1988
2510
|
if self.gcp_attributes: body['gcp_attributes'] = self.gcp_attributes.as_dict()
|
|
1989
2511
|
if self.init_scripts: body['init_scripts'] = [v.as_dict() for v in self.init_scripts]
|
|
1990
2512
|
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
2513
|
+
if self.is_single_node is not None: body['is_single_node'] = self.is_single_node
|
|
2514
|
+
if self.kind is not None: body['kind'] = self.kind.value
|
|
1991
2515
|
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
1992
2516
|
if self.num_workers is not None: body['num_workers'] = self.num_workers
|
|
1993
2517
|
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
@@ -1997,9 +2521,50 @@ class CreateCluster:
|
|
|
1997
2521
|
if self.spark_env_vars: body['spark_env_vars'] = self.spark_env_vars
|
|
1998
2522
|
if self.spark_version is not None: body['spark_version'] = self.spark_version
|
|
1999
2523
|
if self.ssh_public_keys: body['ssh_public_keys'] = [v for v in self.ssh_public_keys]
|
|
2524
|
+
if self.use_ml_runtime is not None: body['use_ml_runtime'] = self.use_ml_runtime
|
|
2000
2525
|
if self.workload_type: body['workload_type'] = self.workload_type.as_dict()
|
|
2001
2526
|
return body
|
|
2002
2527
|
|
|
2528
|
+
def as_shallow_dict(self) -> dict:
|
|
2529
|
+
"""Serializes the CreateCluster into a shallow dictionary of its immediate attributes."""
|
|
2530
|
+
body = {}
|
|
2531
|
+
if self.apply_policy_default_values is not None:
|
|
2532
|
+
body['apply_policy_default_values'] = self.apply_policy_default_values
|
|
2533
|
+
if self.autoscale: body['autoscale'] = self.autoscale
|
|
2534
|
+
if self.autotermination_minutes is not None:
|
|
2535
|
+
body['autotermination_minutes'] = self.autotermination_minutes
|
|
2536
|
+
if self.aws_attributes: body['aws_attributes'] = self.aws_attributes
|
|
2537
|
+
if self.azure_attributes: body['azure_attributes'] = self.azure_attributes
|
|
2538
|
+
if self.clone_from: body['clone_from'] = self.clone_from
|
|
2539
|
+
if self.cluster_log_conf: body['cluster_log_conf'] = self.cluster_log_conf
|
|
2540
|
+
if self.cluster_name is not None: body['cluster_name'] = self.cluster_name
|
|
2541
|
+
if self.custom_tags: body['custom_tags'] = self.custom_tags
|
|
2542
|
+
if self.data_security_mode is not None: body['data_security_mode'] = self.data_security_mode
|
|
2543
|
+
if self.docker_image: body['docker_image'] = self.docker_image
|
|
2544
|
+
if self.driver_instance_pool_id is not None:
|
|
2545
|
+
body['driver_instance_pool_id'] = self.driver_instance_pool_id
|
|
2546
|
+
if self.driver_node_type_id is not None: body['driver_node_type_id'] = self.driver_node_type_id
|
|
2547
|
+
if self.enable_elastic_disk is not None: body['enable_elastic_disk'] = self.enable_elastic_disk
|
|
2548
|
+
if self.enable_local_disk_encryption is not None:
|
|
2549
|
+
body['enable_local_disk_encryption'] = self.enable_local_disk_encryption
|
|
2550
|
+
if self.gcp_attributes: body['gcp_attributes'] = self.gcp_attributes
|
|
2551
|
+
if self.init_scripts: body['init_scripts'] = self.init_scripts
|
|
2552
|
+
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
2553
|
+
if self.is_single_node is not None: body['is_single_node'] = self.is_single_node
|
|
2554
|
+
if self.kind is not None: body['kind'] = self.kind
|
|
2555
|
+
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
2556
|
+
if self.num_workers is not None: body['num_workers'] = self.num_workers
|
|
2557
|
+
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
2558
|
+
if self.runtime_engine is not None: body['runtime_engine'] = self.runtime_engine
|
|
2559
|
+
if self.single_user_name is not None: body['single_user_name'] = self.single_user_name
|
|
2560
|
+
if self.spark_conf: body['spark_conf'] = self.spark_conf
|
|
2561
|
+
if self.spark_env_vars: body['spark_env_vars'] = self.spark_env_vars
|
|
2562
|
+
if self.spark_version is not None: body['spark_version'] = self.spark_version
|
|
2563
|
+
if self.ssh_public_keys: body['ssh_public_keys'] = self.ssh_public_keys
|
|
2564
|
+
if self.use_ml_runtime is not None: body['use_ml_runtime'] = self.use_ml_runtime
|
|
2565
|
+
if self.workload_type: body['workload_type'] = self.workload_type
|
|
2566
|
+
return body
|
|
2567
|
+
|
|
2003
2568
|
@classmethod
|
|
2004
2569
|
def from_dict(cls, d: Dict[str, any]) -> CreateCluster:
|
|
2005
2570
|
"""Deserializes the CreateCluster from a dictionary."""
|
|
@@ -2021,6 +2586,8 @@ class CreateCluster:
|
|
|
2021
2586
|
gcp_attributes=_from_dict(d, 'gcp_attributes', GcpAttributes),
|
|
2022
2587
|
init_scripts=_repeated_dict(d, 'init_scripts', InitScriptInfo),
|
|
2023
2588
|
instance_pool_id=d.get('instance_pool_id', None),
|
|
2589
|
+
is_single_node=d.get('is_single_node', None),
|
|
2590
|
+
kind=_enum(d, 'kind', Kind),
|
|
2024
2591
|
node_type_id=d.get('node_type_id', None),
|
|
2025
2592
|
num_workers=d.get('num_workers', None),
|
|
2026
2593
|
policy_id=d.get('policy_id', None),
|
|
@@ -2030,6 +2597,7 @@ class CreateCluster:
|
|
|
2030
2597
|
spark_env_vars=d.get('spark_env_vars', None),
|
|
2031
2598
|
spark_version=d.get('spark_version', None),
|
|
2032
2599
|
ssh_public_keys=d.get('ssh_public_keys', None),
|
|
2600
|
+
use_ml_runtime=d.get('use_ml_runtime', None),
|
|
2033
2601
|
workload_type=_from_dict(d, 'workload_type', WorkloadType))
|
|
2034
2602
|
|
|
2035
2603
|
|
|
@@ -2043,6 +2611,12 @@ class CreateClusterResponse:
|
|
|
2043
2611
|
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
2044
2612
|
return body
|
|
2045
2613
|
|
|
2614
|
+
def as_shallow_dict(self) -> dict:
|
|
2615
|
+
"""Serializes the CreateClusterResponse into a shallow dictionary of its immediate attributes."""
|
|
2616
|
+
body = {}
|
|
2617
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
2618
|
+
return body
|
|
2619
|
+
|
|
2046
2620
|
@classmethod
|
|
2047
2621
|
def from_dict(cls, d: Dict[str, any]) -> CreateClusterResponse:
|
|
2048
2622
|
"""Deserializes the CreateClusterResponse from a dictionary."""
|
|
@@ -2063,6 +2637,13 @@ class CreateContext:
|
|
|
2063
2637
|
if self.language is not None: body['language'] = self.language.value
|
|
2064
2638
|
return body
|
|
2065
2639
|
|
|
2640
|
+
def as_shallow_dict(self) -> dict:
|
|
2641
|
+
"""Serializes the CreateContext into a shallow dictionary of its immediate attributes."""
|
|
2642
|
+
body = {}
|
|
2643
|
+
if self.cluster_id is not None: body['clusterId'] = self.cluster_id
|
|
2644
|
+
if self.language is not None: body['language'] = self.language
|
|
2645
|
+
return body
|
|
2646
|
+
|
|
2066
2647
|
@classmethod
|
|
2067
2648
|
def from_dict(cls, d: Dict[str, any]) -> CreateContext:
|
|
2068
2649
|
"""Deserializes the CreateContext from a dictionary."""
|
|
@@ -2152,6 +2733,25 @@ class CreateInstancePool:
|
|
|
2152
2733
|
body['preloaded_spark_versions'] = [v for v in self.preloaded_spark_versions]
|
|
2153
2734
|
return body
|
|
2154
2735
|
|
|
2736
|
+
def as_shallow_dict(self) -> dict:
|
|
2737
|
+
"""Serializes the CreateInstancePool into a shallow dictionary of its immediate attributes."""
|
|
2738
|
+
body = {}
|
|
2739
|
+
if self.aws_attributes: body['aws_attributes'] = self.aws_attributes
|
|
2740
|
+
if self.azure_attributes: body['azure_attributes'] = self.azure_attributes
|
|
2741
|
+
if self.custom_tags: body['custom_tags'] = self.custom_tags
|
|
2742
|
+
if self.disk_spec: body['disk_spec'] = self.disk_spec
|
|
2743
|
+
if self.enable_elastic_disk is not None: body['enable_elastic_disk'] = self.enable_elastic_disk
|
|
2744
|
+
if self.gcp_attributes: body['gcp_attributes'] = self.gcp_attributes
|
|
2745
|
+
if self.idle_instance_autotermination_minutes is not None:
|
|
2746
|
+
body['idle_instance_autotermination_minutes'] = self.idle_instance_autotermination_minutes
|
|
2747
|
+
if self.instance_pool_name is not None: body['instance_pool_name'] = self.instance_pool_name
|
|
2748
|
+
if self.max_capacity is not None: body['max_capacity'] = self.max_capacity
|
|
2749
|
+
if self.min_idle_instances is not None: body['min_idle_instances'] = self.min_idle_instances
|
|
2750
|
+
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
2751
|
+
if self.preloaded_docker_images: body['preloaded_docker_images'] = self.preloaded_docker_images
|
|
2752
|
+
if self.preloaded_spark_versions: body['preloaded_spark_versions'] = self.preloaded_spark_versions
|
|
2753
|
+
return body
|
|
2754
|
+
|
|
2155
2755
|
@classmethod
|
|
2156
2756
|
def from_dict(cls, d: Dict[str, any]) -> CreateInstancePool:
|
|
2157
2757
|
"""Deserializes the CreateInstancePool from a dictionary."""
|
|
@@ -2181,6 +2781,12 @@ class CreateInstancePoolResponse:
|
|
|
2181
2781
|
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
2182
2782
|
return body
|
|
2183
2783
|
|
|
2784
|
+
def as_shallow_dict(self) -> dict:
|
|
2785
|
+
"""Serializes the CreateInstancePoolResponse into a shallow dictionary of its immediate attributes."""
|
|
2786
|
+
body = {}
|
|
2787
|
+
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
2788
|
+
return body
|
|
2789
|
+
|
|
2184
2790
|
@classmethod
|
|
2185
2791
|
def from_dict(cls, d: Dict[str, any]) -> CreateInstancePoolResponse:
|
|
2186
2792
|
"""Deserializes the CreateInstancePoolResponse from a dictionary."""
|
|
@@ -2238,6 +2844,19 @@ class CreatePolicy:
|
|
|
2238
2844
|
if self.policy_family_id is not None: body['policy_family_id'] = self.policy_family_id
|
|
2239
2845
|
return body
|
|
2240
2846
|
|
|
2847
|
+
def as_shallow_dict(self) -> dict:
|
|
2848
|
+
"""Serializes the CreatePolicy into a shallow dictionary of its immediate attributes."""
|
|
2849
|
+
body = {}
|
|
2850
|
+
if self.definition is not None: body['definition'] = self.definition
|
|
2851
|
+
if self.description is not None: body['description'] = self.description
|
|
2852
|
+
if self.libraries: body['libraries'] = self.libraries
|
|
2853
|
+
if self.max_clusters_per_user is not None: body['max_clusters_per_user'] = self.max_clusters_per_user
|
|
2854
|
+
if self.name is not None: body['name'] = self.name
|
|
2855
|
+
if self.policy_family_definition_overrides is not None:
|
|
2856
|
+
body['policy_family_definition_overrides'] = self.policy_family_definition_overrides
|
|
2857
|
+
if self.policy_family_id is not None: body['policy_family_id'] = self.policy_family_id
|
|
2858
|
+
return body
|
|
2859
|
+
|
|
2241
2860
|
@classmethod
|
|
2242
2861
|
def from_dict(cls, d: Dict[str, any]) -> CreatePolicy:
|
|
2243
2862
|
"""Deserializes the CreatePolicy from a dictionary."""
|
|
@@ -2261,6 +2880,12 @@ class CreatePolicyResponse:
|
|
|
2261
2880
|
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
2262
2881
|
return body
|
|
2263
2882
|
|
|
2883
|
+
def as_shallow_dict(self) -> dict:
|
|
2884
|
+
"""Serializes the CreatePolicyResponse into a shallow dictionary of its immediate attributes."""
|
|
2885
|
+
body = {}
|
|
2886
|
+
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
2887
|
+
return body
|
|
2888
|
+
|
|
2264
2889
|
@classmethod
|
|
2265
2890
|
def from_dict(cls, d: Dict[str, any]) -> CreatePolicyResponse:
|
|
2266
2891
|
"""Deserializes the CreatePolicyResponse from a dictionary."""
|
|
@@ -2278,6 +2903,12 @@ class CreateResponse:
|
|
|
2278
2903
|
if self.script_id is not None: body['script_id'] = self.script_id
|
|
2279
2904
|
return body
|
|
2280
2905
|
|
|
2906
|
+
def as_shallow_dict(self) -> dict:
|
|
2907
|
+
"""Serializes the CreateResponse into a shallow dictionary of its immediate attributes."""
|
|
2908
|
+
body = {}
|
|
2909
|
+
if self.script_id is not None: body['script_id'] = self.script_id
|
|
2910
|
+
return body
|
|
2911
|
+
|
|
2281
2912
|
@classmethod
|
|
2282
2913
|
def from_dict(cls, d: Dict[str, any]) -> CreateResponse:
|
|
2283
2914
|
"""Deserializes the CreateResponse from a dictionary."""
|
|
@@ -2294,6 +2925,12 @@ class Created:
|
|
|
2294
2925
|
if self.id is not None: body['id'] = self.id
|
|
2295
2926
|
return body
|
|
2296
2927
|
|
|
2928
|
+
def as_shallow_dict(self) -> dict:
|
|
2929
|
+
"""Serializes the Created into a shallow dictionary of its immediate attributes."""
|
|
2930
|
+
body = {}
|
|
2931
|
+
if self.id is not None: body['id'] = self.id
|
|
2932
|
+
return body
|
|
2933
|
+
|
|
2297
2934
|
@classmethod
|
|
2298
2935
|
def from_dict(cls, d: Dict[str, any]) -> Created:
|
|
2299
2936
|
"""Deserializes the Created from a dictionary."""
|
|
@@ -2323,6 +2960,15 @@ class DataPlaneEventDetails:
|
|
|
2323
2960
|
if self.timestamp is not None: body['timestamp'] = self.timestamp
|
|
2324
2961
|
return body
|
|
2325
2962
|
|
|
2963
|
+
def as_shallow_dict(self) -> dict:
|
|
2964
|
+
"""Serializes the DataPlaneEventDetails into a shallow dictionary of its immediate attributes."""
|
|
2965
|
+
body = {}
|
|
2966
|
+
if self.event_type is not None: body['event_type'] = self.event_type
|
|
2967
|
+
if self.executor_failures is not None: body['executor_failures'] = self.executor_failures
|
|
2968
|
+
if self.host_id is not None: body['host_id'] = self.host_id
|
|
2969
|
+
if self.timestamp is not None: body['timestamp'] = self.timestamp
|
|
2970
|
+
return body
|
|
2971
|
+
|
|
2326
2972
|
@classmethod
|
|
2327
2973
|
def from_dict(cls, d: Dict[str, any]) -> DataPlaneEventDetails:
|
|
2328
2974
|
"""Deserializes the DataPlaneEventDetails from a dictionary."""
|
|
@@ -2342,13 +2988,19 @@ class DataPlaneEventDetailsEventType(Enum):
|
|
|
2342
2988
|
class DataSecurityMode(Enum):
|
|
2343
2989
|
"""Data security mode decides what data governance model to use when accessing data from a cluster.
|
|
2344
2990
|
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2991
|
+
The following modes can only be used with `kind`. * `DATA_SECURITY_MODE_AUTO`: Databricks will
|
|
2992
|
+
choose the most appropriate access mode depending on your compute configuration. *
|
|
2993
|
+
`DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * `DATA_SECURITY_MODE_DEDICATED`:
|
|
2994
|
+
Alias for `SINGLE_USER`.
|
|
2995
|
+
|
|
2996
|
+
The following modes can be used regardless of `kind`. * `NONE`: No security isolation for
|
|
2997
|
+
multiple users sharing the cluster. Data governance features are not available in this mode. *
|
|
2998
|
+
`SINGLE_USER`: A secure cluster that can only be exclusively used by a single user specified in
|
|
2999
|
+
`single_user_name`. Most programming languages, cluster features and data governance features
|
|
3000
|
+
are available in this mode. * `USER_ISOLATION`: A secure cluster that can be shared by multiple
|
|
3001
|
+
users. Cluster users are fully isolated so that they cannot see each other's data and
|
|
3002
|
+
credentials. Most data governance features are supported in this mode. But programming languages
|
|
3003
|
+
and cluster features might be limited.
|
|
2352
3004
|
|
|
2353
3005
|
The following modes are deprecated starting with Databricks Runtime 15.0 and will be removed for
|
|
2354
3006
|
future Databricks Runtime versions:
|
|
@@ -2359,6 +3011,9 @@ class DataSecurityMode(Enum):
|
|
|
2359
3011
|
Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This mode provides a way that
|
|
2360
3012
|
doesn’t have UC nor passthrough enabled."""
|
|
2361
3013
|
|
|
3014
|
+
DATA_SECURITY_MODE_AUTO = 'DATA_SECURITY_MODE_AUTO'
|
|
3015
|
+
DATA_SECURITY_MODE_DEDICATED = 'DATA_SECURITY_MODE_DEDICATED'
|
|
3016
|
+
DATA_SECURITY_MODE_STANDARD = 'DATA_SECURITY_MODE_STANDARD'
|
|
2362
3017
|
LEGACY_PASSTHROUGH = 'LEGACY_PASSTHROUGH'
|
|
2363
3018
|
LEGACY_SINGLE_USER = 'LEGACY_SINGLE_USER'
|
|
2364
3019
|
LEGACY_SINGLE_USER_STANDARD = 'LEGACY_SINGLE_USER_STANDARD'
|
|
@@ -2379,6 +3034,12 @@ class DbfsStorageInfo:
|
|
|
2379
3034
|
if self.destination is not None: body['destination'] = self.destination
|
|
2380
3035
|
return body
|
|
2381
3036
|
|
|
3037
|
+
def as_shallow_dict(self) -> dict:
|
|
3038
|
+
"""Serializes the DbfsStorageInfo into a shallow dictionary of its immediate attributes."""
|
|
3039
|
+
body = {}
|
|
3040
|
+
if self.destination is not None: body['destination'] = self.destination
|
|
3041
|
+
return body
|
|
3042
|
+
|
|
2382
3043
|
@classmethod
|
|
2383
3044
|
def from_dict(cls, d: Dict[str, any]) -> DbfsStorageInfo:
|
|
2384
3045
|
"""Deserializes the DbfsStorageInfo from a dictionary."""
|
|
@@ -2396,6 +3057,12 @@ class DeleteCluster:
|
|
|
2396
3057
|
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
2397
3058
|
return body
|
|
2398
3059
|
|
|
3060
|
+
def as_shallow_dict(self) -> dict:
|
|
3061
|
+
"""Serializes the DeleteCluster into a shallow dictionary of its immediate attributes."""
|
|
3062
|
+
body = {}
|
|
3063
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
3064
|
+
return body
|
|
3065
|
+
|
|
2399
3066
|
@classmethod
|
|
2400
3067
|
def from_dict(cls, d: Dict[str, any]) -> DeleteCluster:
|
|
2401
3068
|
"""Deserializes the DeleteCluster from a dictionary."""
|
|
@@ -2410,6 +3077,11 @@ class DeleteClusterResponse:
|
|
|
2410
3077
|
body = {}
|
|
2411
3078
|
return body
|
|
2412
3079
|
|
|
3080
|
+
def as_shallow_dict(self) -> dict:
|
|
3081
|
+
"""Serializes the DeleteClusterResponse into a shallow dictionary of its immediate attributes."""
|
|
3082
|
+
body = {}
|
|
3083
|
+
return body
|
|
3084
|
+
|
|
2413
3085
|
@classmethod
|
|
2414
3086
|
def from_dict(cls, d: Dict[str, any]) -> DeleteClusterResponse:
|
|
2415
3087
|
"""Deserializes the DeleteClusterResponse from a dictionary."""
|
|
@@ -2427,6 +3099,12 @@ class DeleteInstancePool:
|
|
|
2427
3099
|
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
2428
3100
|
return body
|
|
2429
3101
|
|
|
3102
|
+
def as_shallow_dict(self) -> dict:
|
|
3103
|
+
"""Serializes the DeleteInstancePool into a shallow dictionary of its immediate attributes."""
|
|
3104
|
+
body = {}
|
|
3105
|
+
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
3106
|
+
return body
|
|
3107
|
+
|
|
2430
3108
|
@classmethod
|
|
2431
3109
|
def from_dict(cls, d: Dict[str, any]) -> DeleteInstancePool:
|
|
2432
3110
|
"""Deserializes the DeleteInstancePool from a dictionary."""
|
|
@@ -2441,6 +3119,11 @@ class DeleteInstancePoolResponse:
|
|
|
2441
3119
|
body = {}
|
|
2442
3120
|
return body
|
|
2443
3121
|
|
|
3122
|
+
def as_shallow_dict(self) -> dict:
|
|
3123
|
+
"""Serializes the DeleteInstancePoolResponse into a shallow dictionary of its immediate attributes."""
|
|
3124
|
+
body = {}
|
|
3125
|
+
return body
|
|
3126
|
+
|
|
2444
3127
|
@classmethod
|
|
2445
3128
|
def from_dict(cls, d: Dict[str, any]) -> DeleteInstancePoolResponse:
|
|
2446
3129
|
"""Deserializes the DeleteInstancePoolResponse from a dictionary."""
|
|
@@ -2458,6 +3141,12 @@ class DeletePolicy:
|
|
|
2458
3141
|
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
2459
3142
|
return body
|
|
2460
3143
|
|
|
3144
|
+
def as_shallow_dict(self) -> dict:
|
|
3145
|
+
"""Serializes the DeletePolicy into a shallow dictionary of its immediate attributes."""
|
|
3146
|
+
body = {}
|
|
3147
|
+
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
3148
|
+
return body
|
|
3149
|
+
|
|
2461
3150
|
@classmethod
|
|
2462
3151
|
def from_dict(cls, d: Dict[str, any]) -> DeletePolicy:
|
|
2463
3152
|
"""Deserializes the DeletePolicy from a dictionary."""
|
|
@@ -2472,6 +3161,11 @@ class DeletePolicyResponse:
|
|
|
2472
3161
|
body = {}
|
|
2473
3162
|
return body
|
|
2474
3163
|
|
|
3164
|
+
def as_shallow_dict(self) -> dict:
|
|
3165
|
+
"""Serializes the DeletePolicyResponse into a shallow dictionary of its immediate attributes."""
|
|
3166
|
+
body = {}
|
|
3167
|
+
return body
|
|
3168
|
+
|
|
2475
3169
|
@classmethod
|
|
2476
3170
|
def from_dict(cls, d: Dict[str, any]) -> DeletePolicyResponse:
|
|
2477
3171
|
"""Deserializes the DeletePolicyResponse from a dictionary."""
|
|
@@ -2486,6 +3180,11 @@ class DeleteResponse:
|
|
|
2486
3180
|
body = {}
|
|
2487
3181
|
return body
|
|
2488
3182
|
|
|
3183
|
+
def as_shallow_dict(self) -> dict:
|
|
3184
|
+
"""Serializes the DeleteResponse into a shallow dictionary of its immediate attributes."""
|
|
3185
|
+
body = {}
|
|
3186
|
+
return body
|
|
3187
|
+
|
|
2489
3188
|
@classmethod
|
|
2490
3189
|
def from_dict(cls, d: Dict[str, any]) -> DeleteResponse:
|
|
2491
3190
|
"""Deserializes the DeleteResponse from a dictionary."""
|
|
@@ -2505,6 +3204,13 @@ class DestroyContext:
|
|
|
2505
3204
|
if self.context_id is not None: body['contextId'] = self.context_id
|
|
2506
3205
|
return body
|
|
2507
3206
|
|
|
3207
|
+
def as_shallow_dict(self) -> dict:
|
|
3208
|
+
"""Serializes the DestroyContext into a shallow dictionary of its immediate attributes."""
|
|
3209
|
+
body = {}
|
|
3210
|
+
if self.cluster_id is not None: body['clusterId'] = self.cluster_id
|
|
3211
|
+
if self.context_id is not None: body['contextId'] = self.context_id
|
|
3212
|
+
return body
|
|
3213
|
+
|
|
2508
3214
|
@classmethod
|
|
2509
3215
|
def from_dict(cls, d: Dict[str, any]) -> DestroyContext:
|
|
2510
3216
|
"""Deserializes the DestroyContext from a dictionary."""
|
|
@@ -2519,6 +3225,11 @@ class DestroyResponse:
|
|
|
2519
3225
|
body = {}
|
|
2520
3226
|
return body
|
|
2521
3227
|
|
|
3228
|
+
def as_shallow_dict(self) -> dict:
|
|
3229
|
+
"""Serializes the DestroyResponse into a shallow dictionary of its immediate attributes."""
|
|
3230
|
+
body = {}
|
|
3231
|
+
return body
|
|
3232
|
+
|
|
2522
3233
|
@classmethod
|
|
2523
3234
|
def from_dict(cls, d: Dict[str, any]) -> DestroyResponse:
|
|
2524
3235
|
"""Deserializes the DestroyResponse from a dictionary."""
|
|
@@ -2567,6 +3278,16 @@ class DiskSpec:
|
|
|
2567
3278
|
if self.disk_type: body['disk_type'] = self.disk_type.as_dict()
|
|
2568
3279
|
return body
|
|
2569
3280
|
|
|
3281
|
+
def as_shallow_dict(self) -> dict:
|
|
3282
|
+
"""Serializes the DiskSpec into a shallow dictionary of its immediate attributes."""
|
|
3283
|
+
body = {}
|
|
3284
|
+
if self.disk_count is not None: body['disk_count'] = self.disk_count
|
|
3285
|
+
if self.disk_iops is not None: body['disk_iops'] = self.disk_iops
|
|
3286
|
+
if self.disk_size is not None: body['disk_size'] = self.disk_size
|
|
3287
|
+
if self.disk_throughput is not None: body['disk_throughput'] = self.disk_throughput
|
|
3288
|
+
if self.disk_type: body['disk_type'] = self.disk_type
|
|
3289
|
+
return body
|
|
3290
|
+
|
|
2570
3291
|
@classmethod
|
|
2571
3292
|
def from_dict(cls, d: Dict[str, any]) -> DiskSpec:
|
|
2572
3293
|
"""Deserializes the DiskSpec from a dictionary."""
|
|
@@ -2591,6 +3312,14 @@ class DiskType:
|
|
|
2591
3312
|
if self.ebs_volume_type is not None: body['ebs_volume_type'] = self.ebs_volume_type.value
|
|
2592
3313
|
return body
|
|
2593
3314
|
|
|
3315
|
+
def as_shallow_dict(self) -> dict:
|
|
3316
|
+
"""Serializes the DiskType into a shallow dictionary of its immediate attributes."""
|
|
3317
|
+
body = {}
|
|
3318
|
+
if self.azure_disk_volume_type is not None:
|
|
3319
|
+
body['azure_disk_volume_type'] = self.azure_disk_volume_type
|
|
3320
|
+
if self.ebs_volume_type is not None: body['ebs_volume_type'] = self.ebs_volume_type
|
|
3321
|
+
return body
|
|
3322
|
+
|
|
2594
3323
|
@classmethod
|
|
2595
3324
|
def from_dict(cls, d: Dict[str, any]) -> DiskType:
|
|
2596
3325
|
"""Deserializes the DiskType from a dictionary."""
|
|
@@ -2625,6 +3354,13 @@ class DockerBasicAuth:
|
|
|
2625
3354
|
if self.username is not None: body['username'] = self.username
|
|
2626
3355
|
return body
|
|
2627
3356
|
|
|
3357
|
+
def as_shallow_dict(self) -> dict:
|
|
3358
|
+
"""Serializes the DockerBasicAuth into a shallow dictionary of its immediate attributes."""
|
|
3359
|
+
body = {}
|
|
3360
|
+
if self.password is not None: body['password'] = self.password
|
|
3361
|
+
if self.username is not None: body['username'] = self.username
|
|
3362
|
+
return body
|
|
3363
|
+
|
|
2628
3364
|
@classmethod
|
|
2629
3365
|
def from_dict(cls, d: Dict[str, any]) -> DockerBasicAuth:
|
|
2630
3366
|
"""Deserializes the DockerBasicAuth from a dictionary."""
|
|
@@ -2645,6 +3381,13 @@ class DockerImage:
|
|
|
2645
3381
|
if self.url is not None: body['url'] = self.url
|
|
2646
3382
|
return body
|
|
2647
3383
|
|
|
3384
|
+
def as_shallow_dict(self) -> dict:
|
|
3385
|
+
"""Serializes the DockerImage into a shallow dictionary of its immediate attributes."""
|
|
3386
|
+
body = {}
|
|
3387
|
+
if self.basic_auth: body['basic_auth'] = self.basic_auth
|
|
3388
|
+
if self.url is not None: body['url'] = self.url
|
|
3389
|
+
return body
|
|
3390
|
+
|
|
2648
3391
|
@classmethod
|
|
2649
3392
|
def from_dict(cls, d: Dict[str, any]) -> DockerImage:
|
|
2650
3393
|
"""Deserializes the DockerImage from a dictionary."""
|
|
@@ -2712,13 +3455,19 @@ class EditCluster:
|
|
|
2712
3455
|
data_security_mode: Optional[DataSecurityMode] = None
|
|
2713
3456
|
"""Data security mode decides what data governance model to use when accessing data from a cluster.
|
|
2714
3457
|
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
3458
|
+
The following modes can only be used with `kind`. * `DATA_SECURITY_MODE_AUTO`: Databricks will
|
|
3459
|
+
choose the most appropriate access mode depending on your compute configuration. *
|
|
3460
|
+
`DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * `DATA_SECURITY_MODE_DEDICATED`:
|
|
3461
|
+
Alias for `SINGLE_USER`.
|
|
3462
|
+
|
|
3463
|
+
The following modes can be used regardless of `kind`. * `NONE`: No security isolation for
|
|
3464
|
+
multiple users sharing the cluster. Data governance features are not available in this mode. *
|
|
3465
|
+
`SINGLE_USER`: A secure cluster that can only be exclusively used by a single user specified in
|
|
3466
|
+
`single_user_name`. Most programming languages, cluster features and data governance features
|
|
3467
|
+
are available in this mode. * `USER_ISOLATION`: A secure cluster that can be shared by multiple
|
|
3468
|
+
users. Cluster users are fully isolated so that they cannot see each other's data and
|
|
3469
|
+
credentials. Most data governance features are supported in this mode. But programming languages
|
|
3470
|
+
and cluster features might be limited.
|
|
2722
3471
|
|
|
2723
3472
|
The following modes are deprecated starting with Databricks Runtime 15.0 and will be removed for
|
|
2724
3473
|
future Databricks Runtime versions:
|
|
@@ -2759,6 +3508,20 @@ class EditCluster:
|
|
|
2759
3508
|
instance_pool_id: Optional[str] = None
|
|
2760
3509
|
"""The optional ID of the instance pool to which the cluster belongs."""
|
|
2761
3510
|
|
|
3511
|
+
is_single_node: Optional[bool] = None
|
|
3512
|
+
"""This field can only be used with `kind`.
|
|
3513
|
+
|
|
3514
|
+
When set to true, Databricks will automatically set single node related `custom_tags`,
|
|
3515
|
+
`spark_conf`, and `num_workers`"""
|
|
3516
|
+
|
|
3517
|
+
kind: Optional[Kind] = None
|
|
3518
|
+
"""The kind of compute described by this compute specification.
|
|
3519
|
+
|
|
3520
|
+
Depending on `kind`, different validations and default values will be applied.
|
|
3521
|
+
|
|
3522
|
+
The first usage of this value is for the simple cluster form where it sets `kind =
|
|
3523
|
+
CLASSIC_PREVIEW`."""
|
|
3524
|
+
|
|
2762
3525
|
node_type_id: Optional[str] = None
|
|
2763
3526
|
"""This field encodes, through a single value, the resources available to each of the Spark nodes
|
|
2764
3527
|
in this cluster. For example, the Spark nodes can be provisioned and optimized for memory or
|
|
@@ -2813,6 +3576,12 @@ class EditCluster:
|
|
|
2813
3576
|
private keys can be used to login with the user name `ubuntu` on port `2200`. Up to 10 keys can
|
|
2814
3577
|
be specified."""
|
|
2815
3578
|
|
|
3579
|
+
use_ml_runtime: Optional[bool] = None
|
|
3580
|
+
"""This field can only be used with `kind`.
|
|
3581
|
+
|
|
3582
|
+
`effective_spark_version` is determined by `spark_version` (DBR release), this field
|
|
3583
|
+
`use_ml_runtime`, and whether `node_type_id` is gpu node or not."""
|
|
3584
|
+
|
|
2816
3585
|
workload_type: Optional[WorkloadType] = None
|
|
2817
3586
|
|
|
2818
3587
|
def as_dict(self) -> dict:
|
|
@@ -2840,6 +3609,8 @@ class EditCluster:
|
|
|
2840
3609
|
if self.gcp_attributes: body['gcp_attributes'] = self.gcp_attributes.as_dict()
|
|
2841
3610
|
if self.init_scripts: body['init_scripts'] = [v.as_dict() for v in self.init_scripts]
|
|
2842
3611
|
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
3612
|
+
if self.is_single_node is not None: body['is_single_node'] = self.is_single_node
|
|
3613
|
+
if self.kind is not None: body['kind'] = self.kind.value
|
|
2843
3614
|
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
2844
3615
|
if self.num_workers is not None: body['num_workers'] = self.num_workers
|
|
2845
3616
|
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
@@ -2849,9 +3620,50 @@ class EditCluster:
|
|
|
2849
3620
|
if self.spark_env_vars: body['spark_env_vars'] = self.spark_env_vars
|
|
2850
3621
|
if self.spark_version is not None: body['spark_version'] = self.spark_version
|
|
2851
3622
|
if self.ssh_public_keys: body['ssh_public_keys'] = [v for v in self.ssh_public_keys]
|
|
3623
|
+
if self.use_ml_runtime is not None: body['use_ml_runtime'] = self.use_ml_runtime
|
|
2852
3624
|
if self.workload_type: body['workload_type'] = self.workload_type.as_dict()
|
|
2853
3625
|
return body
|
|
2854
3626
|
|
|
3627
|
+
def as_shallow_dict(self) -> dict:
|
|
3628
|
+
"""Serializes the EditCluster into a shallow dictionary of its immediate attributes."""
|
|
3629
|
+
body = {}
|
|
3630
|
+
if self.apply_policy_default_values is not None:
|
|
3631
|
+
body['apply_policy_default_values'] = self.apply_policy_default_values
|
|
3632
|
+
if self.autoscale: body['autoscale'] = self.autoscale
|
|
3633
|
+
if self.autotermination_minutes is not None:
|
|
3634
|
+
body['autotermination_minutes'] = self.autotermination_minutes
|
|
3635
|
+
if self.aws_attributes: body['aws_attributes'] = self.aws_attributes
|
|
3636
|
+
if self.azure_attributes: body['azure_attributes'] = self.azure_attributes
|
|
3637
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
3638
|
+
if self.cluster_log_conf: body['cluster_log_conf'] = self.cluster_log_conf
|
|
3639
|
+
if self.cluster_name is not None: body['cluster_name'] = self.cluster_name
|
|
3640
|
+
if self.custom_tags: body['custom_tags'] = self.custom_tags
|
|
3641
|
+
if self.data_security_mode is not None: body['data_security_mode'] = self.data_security_mode
|
|
3642
|
+
if self.docker_image: body['docker_image'] = self.docker_image
|
|
3643
|
+
if self.driver_instance_pool_id is not None:
|
|
3644
|
+
body['driver_instance_pool_id'] = self.driver_instance_pool_id
|
|
3645
|
+
if self.driver_node_type_id is not None: body['driver_node_type_id'] = self.driver_node_type_id
|
|
3646
|
+
if self.enable_elastic_disk is not None: body['enable_elastic_disk'] = self.enable_elastic_disk
|
|
3647
|
+
if self.enable_local_disk_encryption is not None:
|
|
3648
|
+
body['enable_local_disk_encryption'] = self.enable_local_disk_encryption
|
|
3649
|
+
if self.gcp_attributes: body['gcp_attributes'] = self.gcp_attributes
|
|
3650
|
+
if self.init_scripts: body['init_scripts'] = self.init_scripts
|
|
3651
|
+
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
3652
|
+
if self.is_single_node is not None: body['is_single_node'] = self.is_single_node
|
|
3653
|
+
if self.kind is not None: body['kind'] = self.kind
|
|
3654
|
+
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
3655
|
+
if self.num_workers is not None: body['num_workers'] = self.num_workers
|
|
3656
|
+
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
3657
|
+
if self.runtime_engine is not None: body['runtime_engine'] = self.runtime_engine
|
|
3658
|
+
if self.single_user_name is not None: body['single_user_name'] = self.single_user_name
|
|
3659
|
+
if self.spark_conf: body['spark_conf'] = self.spark_conf
|
|
3660
|
+
if self.spark_env_vars: body['spark_env_vars'] = self.spark_env_vars
|
|
3661
|
+
if self.spark_version is not None: body['spark_version'] = self.spark_version
|
|
3662
|
+
if self.ssh_public_keys: body['ssh_public_keys'] = self.ssh_public_keys
|
|
3663
|
+
if self.use_ml_runtime is not None: body['use_ml_runtime'] = self.use_ml_runtime
|
|
3664
|
+
if self.workload_type: body['workload_type'] = self.workload_type
|
|
3665
|
+
return body
|
|
3666
|
+
|
|
2855
3667
|
@classmethod
|
|
2856
3668
|
def from_dict(cls, d: Dict[str, any]) -> EditCluster:
|
|
2857
3669
|
"""Deserializes the EditCluster from a dictionary."""
|
|
@@ -2873,6 +3685,8 @@ class EditCluster:
|
|
|
2873
3685
|
gcp_attributes=_from_dict(d, 'gcp_attributes', GcpAttributes),
|
|
2874
3686
|
init_scripts=_repeated_dict(d, 'init_scripts', InitScriptInfo),
|
|
2875
3687
|
instance_pool_id=d.get('instance_pool_id', None),
|
|
3688
|
+
is_single_node=d.get('is_single_node', None),
|
|
3689
|
+
kind=_enum(d, 'kind', Kind),
|
|
2876
3690
|
node_type_id=d.get('node_type_id', None),
|
|
2877
3691
|
num_workers=d.get('num_workers', None),
|
|
2878
3692
|
policy_id=d.get('policy_id', None),
|
|
@@ -2882,6 +3696,7 @@ class EditCluster:
|
|
|
2882
3696
|
spark_env_vars=d.get('spark_env_vars', None),
|
|
2883
3697
|
spark_version=d.get('spark_version', None),
|
|
2884
3698
|
ssh_public_keys=d.get('ssh_public_keys', None),
|
|
3699
|
+
use_ml_runtime=d.get('use_ml_runtime', None),
|
|
2885
3700
|
workload_type=_from_dict(d, 'workload_type', WorkloadType))
|
|
2886
3701
|
|
|
2887
3702
|
|
|
@@ -2893,6 +3708,11 @@ class EditClusterResponse:
|
|
|
2893
3708
|
body = {}
|
|
2894
3709
|
return body
|
|
2895
3710
|
|
|
3711
|
+
def as_shallow_dict(self) -> dict:
|
|
3712
|
+
"""Serializes the EditClusterResponse into a shallow dictionary of its immediate attributes."""
|
|
3713
|
+
body = {}
|
|
3714
|
+
return body
|
|
3715
|
+
|
|
2896
3716
|
@classmethod
|
|
2897
3717
|
def from_dict(cls, d: Dict[str, any]) -> EditClusterResponse:
|
|
2898
3718
|
"""Deserializes the EditClusterResponse from a dictionary."""
|
|
@@ -2948,6 +3768,19 @@ class EditInstancePool:
|
|
|
2948
3768
|
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
2949
3769
|
return body
|
|
2950
3770
|
|
|
3771
|
+
def as_shallow_dict(self) -> dict:
|
|
3772
|
+
"""Serializes the EditInstancePool into a shallow dictionary of its immediate attributes."""
|
|
3773
|
+
body = {}
|
|
3774
|
+
if self.custom_tags: body['custom_tags'] = self.custom_tags
|
|
3775
|
+
if self.idle_instance_autotermination_minutes is not None:
|
|
3776
|
+
body['idle_instance_autotermination_minutes'] = self.idle_instance_autotermination_minutes
|
|
3777
|
+
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
3778
|
+
if self.instance_pool_name is not None: body['instance_pool_name'] = self.instance_pool_name
|
|
3779
|
+
if self.max_capacity is not None: body['max_capacity'] = self.max_capacity
|
|
3780
|
+
if self.min_idle_instances is not None: body['min_idle_instances'] = self.min_idle_instances
|
|
3781
|
+
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
3782
|
+
return body
|
|
3783
|
+
|
|
2951
3784
|
@classmethod
|
|
2952
3785
|
def from_dict(cls, d: Dict[str, any]) -> EditInstancePool:
|
|
2953
3786
|
"""Deserializes the EditInstancePool from a dictionary."""
|
|
@@ -2968,6 +3801,11 @@ class EditInstancePoolResponse:
|
|
|
2968
3801
|
body = {}
|
|
2969
3802
|
return body
|
|
2970
3803
|
|
|
3804
|
+
def as_shallow_dict(self) -> dict:
|
|
3805
|
+
"""Serializes the EditInstancePoolResponse into a shallow dictionary of its immediate attributes."""
|
|
3806
|
+
body = {}
|
|
3807
|
+
return body
|
|
3808
|
+
|
|
2971
3809
|
@classmethod
|
|
2972
3810
|
def from_dict(cls, d: Dict[str, any]) -> EditInstancePoolResponse:
|
|
2973
3811
|
"""Deserializes the EditInstancePoolResponse from a dictionary."""
|
|
@@ -3029,6 +3867,20 @@ class EditPolicy:
|
|
|
3029
3867
|
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
3030
3868
|
return body
|
|
3031
3869
|
|
|
3870
|
+
def as_shallow_dict(self) -> dict:
|
|
3871
|
+
"""Serializes the EditPolicy into a shallow dictionary of its immediate attributes."""
|
|
3872
|
+
body = {}
|
|
3873
|
+
if self.definition is not None: body['definition'] = self.definition
|
|
3874
|
+
if self.description is not None: body['description'] = self.description
|
|
3875
|
+
if self.libraries: body['libraries'] = self.libraries
|
|
3876
|
+
if self.max_clusters_per_user is not None: body['max_clusters_per_user'] = self.max_clusters_per_user
|
|
3877
|
+
if self.name is not None: body['name'] = self.name
|
|
3878
|
+
if self.policy_family_definition_overrides is not None:
|
|
3879
|
+
body['policy_family_definition_overrides'] = self.policy_family_definition_overrides
|
|
3880
|
+
if self.policy_family_id is not None: body['policy_family_id'] = self.policy_family_id
|
|
3881
|
+
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
3882
|
+
return body
|
|
3883
|
+
|
|
3032
3884
|
@classmethod
|
|
3033
3885
|
def from_dict(cls, d: Dict[str, any]) -> EditPolicy:
|
|
3034
3886
|
"""Deserializes the EditPolicy from a dictionary."""
|
|
@@ -3050,6 +3902,11 @@ class EditPolicyResponse:
|
|
|
3050
3902
|
body = {}
|
|
3051
3903
|
return body
|
|
3052
3904
|
|
|
3905
|
+
def as_shallow_dict(self) -> dict:
|
|
3906
|
+
"""Serializes the EditPolicyResponse into a shallow dictionary of its immediate attributes."""
|
|
3907
|
+
body = {}
|
|
3908
|
+
return body
|
|
3909
|
+
|
|
3053
3910
|
@classmethod
|
|
3054
3911
|
def from_dict(cls, d: Dict[str, any]) -> EditPolicyResponse:
|
|
3055
3912
|
"""Deserializes the EditPolicyResponse from a dictionary."""
|
|
@@ -3064,6 +3921,11 @@ class EditResponse:
|
|
|
3064
3921
|
body = {}
|
|
3065
3922
|
return body
|
|
3066
3923
|
|
|
3924
|
+
def as_shallow_dict(self) -> dict:
|
|
3925
|
+
"""Serializes the EditResponse into a shallow dictionary of its immediate attributes."""
|
|
3926
|
+
body = {}
|
|
3927
|
+
return body
|
|
3928
|
+
|
|
3067
3929
|
@classmethod
|
|
3068
3930
|
def from_dict(cls, d: Dict[str, any]) -> EditResponse:
|
|
3069
3931
|
"""Deserializes the EditResponse from a dictionary."""
|
|
@@ -3086,6 +3948,13 @@ class EnforceClusterComplianceRequest:
|
|
|
3086
3948
|
if self.validate_only is not None: body['validate_only'] = self.validate_only
|
|
3087
3949
|
return body
|
|
3088
3950
|
|
|
3951
|
+
def as_shallow_dict(self) -> dict:
|
|
3952
|
+
"""Serializes the EnforceClusterComplianceRequest into a shallow dictionary of its immediate attributes."""
|
|
3953
|
+
body = {}
|
|
3954
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
3955
|
+
if self.validate_only is not None: body['validate_only'] = self.validate_only
|
|
3956
|
+
return body
|
|
3957
|
+
|
|
3089
3958
|
@classmethod
|
|
3090
3959
|
def from_dict(cls, d: Dict[str, any]) -> EnforceClusterComplianceRequest:
|
|
3091
3960
|
"""Deserializes the EnforceClusterComplianceRequest from a dictionary."""
|
|
@@ -3109,6 +3978,13 @@ class EnforceClusterComplianceResponse:
|
|
|
3109
3978
|
if self.has_changes is not None: body['has_changes'] = self.has_changes
|
|
3110
3979
|
return body
|
|
3111
3980
|
|
|
3981
|
+
def as_shallow_dict(self) -> dict:
|
|
3982
|
+
"""Serializes the EnforceClusterComplianceResponse into a shallow dictionary of its immediate attributes."""
|
|
3983
|
+
body = {}
|
|
3984
|
+
if self.changes: body['changes'] = self.changes
|
|
3985
|
+
if self.has_changes is not None: body['has_changes'] = self.has_changes
|
|
3986
|
+
return body
|
|
3987
|
+
|
|
3112
3988
|
@classmethod
|
|
3113
3989
|
def from_dict(cls, d: Dict[str, any]) -> EnforceClusterComplianceResponse:
|
|
3114
3990
|
"""Deserializes the EnforceClusterComplianceResponse from a dictionary."""
|
|
@@ -3141,6 +4017,13 @@ class Environment:
|
|
|
3141
4017
|
if self.dependencies: body['dependencies'] = [v for v in self.dependencies]
|
|
3142
4018
|
return body
|
|
3143
4019
|
|
|
4020
|
+
def as_shallow_dict(self) -> dict:
|
|
4021
|
+
"""Serializes the Environment into a shallow dictionary of its immediate attributes."""
|
|
4022
|
+
body = {}
|
|
4023
|
+
if self.client is not None: body['client'] = self.client
|
|
4024
|
+
if self.dependencies: body['dependencies'] = self.dependencies
|
|
4025
|
+
return body
|
|
4026
|
+
|
|
3144
4027
|
@classmethod
|
|
3145
4028
|
def from_dict(cls, d: Dict[str, any]) -> Environment:
|
|
3146
4029
|
"""Deserializes the Environment from a dictionary."""
|
|
@@ -3229,10 +4112,36 @@ class EventDetails:
|
|
|
3229
4112
|
if self.init_scripts: body['init_scripts'] = self.init_scripts.as_dict()
|
|
3230
4113
|
if self.instance_id is not None: body['instance_id'] = self.instance_id
|
|
3231
4114
|
if self.job_run_name is not None: body['job_run_name'] = self.job_run_name
|
|
3232
|
-
if self.previous_attributes: body['previous_attributes'] = self.previous_attributes.as_dict()
|
|
3233
|
-
if self.previous_cluster_size: body['previous_cluster_size'] = self.previous_cluster_size.as_dict()
|
|
4115
|
+
if self.previous_attributes: body['previous_attributes'] = self.previous_attributes.as_dict()
|
|
4116
|
+
if self.previous_cluster_size: body['previous_cluster_size'] = self.previous_cluster_size.as_dict()
|
|
4117
|
+
if self.previous_disk_size is not None: body['previous_disk_size'] = self.previous_disk_size
|
|
4118
|
+
if self.reason: body['reason'] = self.reason.as_dict()
|
|
4119
|
+
if self.target_num_vcpus is not None: body['target_num_vcpus'] = self.target_num_vcpus
|
|
4120
|
+
if self.target_num_workers is not None: body['target_num_workers'] = self.target_num_workers
|
|
4121
|
+
if self.user is not None: body['user'] = self.user
|
|
4122
|
+
return body
|
|
4123
|
+
|
|
4124
|
+
def as_shallow_dict(self) -> dict:
|
|
4125
|
+
"""Serializes the EventDetails into a shallow dictionary of its immediate attributes."""
|
|
4126
|
+
body = {}
|
|
4127
|
+
if self.attributes: body['attributes'] = self.attributes
|
|
4128
|
+
if self.cause is not None: body['cause'] = self.cause
|
|
4129
|
+
if self.cluster_size: body['cluster_size'] = self.cluster_size
|
|
4130
|
+
if self.current_num_vcpus is not None: body['current_num_vcpus'] = self.current_num_vcpus
|
|
4131
|
+
if self.current_num_workers is not None: body['current_num_workers'] = self.current_num_workers
|
|
4132
|
+
if self.did_not_expand_reason is not None: body['did_not_expand_reason'] = self.did_not_expand_reason
|
|
4133
|
+
if self.disk_size is not None: body['disk_size'] = self.disk_size
|
|
4134
|
+
if self.driver_state_message is not None: body['driver_state_message'] = self.driver_state_message
|
|
4135
|
+
if self.enable_termination_for_node_blocklisted is not None:
|
|
4136
|
+
body['enable_termination_for_node_blocklisted'] = self.enable_termination_for_node_blocklisted
|
|
4137
|
+
if self.free_space is not None: body['free_space'] = self.free_space
|
|
4138
|
+
if self.init_scripts: body['init_scripts'] = self.init_scripts
|
|
4139
|
+
if self.instance_id is not None: body['instance_id'] = self.instance_id
|
|
4140
|
+
if self.job_run_name is not None: body['job_run_name'] = self.job_run_name
|
|
4141
|
+
if self.previous_attributes: body['previous_attributes'] = self.previous_attributes
|
|
4142
|
+
if self.previous_cluster_size: body['previous_cluster_size'] = self.previous_cluster_size
|
|
3234
4143
|
if self.previous_disk_size is not None: body['previous_disk_size'] = self.previous_disk_size
|
|
3235
|
-
if self.reason: body['reason'] = self.reason
|
|
4144
|
+
if self.reason: body['reason'] = self.reason
|
|
3236
4145
|
if self.target_num_vcpus is not None: body['target_num_vcpus'] = self.target_num_vcpus
|
|
3237
4146
|
if self.target_num_workers is not None: body['target_num_workers'] = self.target_num_workers
|
|
3238
4147
|
if self.user is not None: body['user'] = self.user
|
|
@@ -3348,6 +4257,19 @@ class GcpAttributes:
|
|
|
3348
4257
|
if self.zone_id is not None: body['zone_id'] = self.zone_id
|
|
3349
4258
|
return body
|
|
3350
4259
|
|
|
4260
|
+
def as_shallow_dict(self) -> dict:
|
|
4261
|
+
"""Serializes the GcpAttributes into a shallow dictionary of its immediate attributes."""
|
|
4262
|
+
body = {}
|
|
4263
|
+
if self.availability is not None: body['availability'] = self.availability
|
|
4264
|
+
if self.boot_disk_size is not None: body['boot_disk_size'] = self.boot_disk_size
|
|
4265
|
+
if self.google_service_account is not None:
|
|
4266
|
+
body['google_service_account'] = self.google_service_account
|
|
4267
|
+
if self.local_ssd_count is not None: body['local_ssd_count'] = self.local_ssd_count
|
|
4268
|
+
if self.use_preemptible_executors is not None:
|
|
4269
|
+
body['use_preemptible_executors'] = self.use_preemptible_executors
|
|
4270
|
+
if self.zone_id is not None: body['zone_id'] = self.zone_id
|
|
4271
|
+
return body
|
|
4272
|
+
|
|
3351
4273
|
@classmethod
|
|
3352
4274
|
def from_dict(cls, d: Dict[str, any]) -> GcpAttributes:
|
|
3353
4275
|
"""Deserializes the GcpAttributes from a dictionary."""
|
|
@@ -3379,6 +4301,12 @@ class GcsStorageInfo:
|
|
|
3379
4301
|
if self.destination is not None: body['destination'] = self.destination
|
|
3380
4302
|
return body
|
|
3381
4303
|
|
|
4304
|
+
def as_shallow_dict(self) -> dict:
|
|
4305
|
+
"""Serializes the GcsStorageInfo into a shallow dictionary of its immediate attributes."""
|
|
4306
|
+
body = {}
|
|
4307
|
+
if self.destination is not None: body['destination'] = self.destination
|
|
4308
|
+
return body
|
|
4309
|
+
|
|
3382
4310
|
@classmethod
|
|
3383
4311
|
def from_dict(cls, d: Dict[str, any]) -> GcsStorageInfo:
|
|
3384
4312
|
"""Deserializes the GcsStorageInfo from a dictionary."""
|
|
@@ -3403,6 +4331,13 @@ class GetClusterComplianceResponse:
|
|
|
3403
4331
|
if self.violations: body['violations'] = self.violations
|
|
3404
4332
|
return body
|
|
3405
4333
|
|
|
4334
|
+
def as_shallow_dict(self) -> dict:
|
|
4335
|
+
"""Serializes the GetClusterComplianceResponse into a shallow dictionary of its immediate attributes."""
|
|
4336
|
+
body = {}
|
|
4337
|
+
if self.is_compliant is not None: body['is_compliant'] = self.is_compliant
|
|
4338
|
+
if self.violations: body['violations'] = self.violations
|
|
4339
|
+
return body
|
|
4340
|
+
|
|
3406
4341
|
@classmethod
|
|
3407
4342
|
def from_dict(cls, d: Dict[str, any]) -> GetClusterComplianceResponse:
|
|
3408
4343
|
"""Deserializes the GetClusterComplianceResponse from a dictionary."""
|
|
@@ -3420,6 +4355,12 @@ class GetClusterPermissionLevelsResponse:
|
|
|
3420
4355
|
if self.permission_levels: body['permission_levels'] = [v.as_dict() for v in self.permission_levels]
|
|
3421
4356
|
return body
|
|
3422
4357
|
|
|
4358
|
+
def as_shallow_dict(self) -> dict:
|
|
4359
|
+
"""Serializes the GetClusterPermissionLevelsResponse into a shallow dictionary of its immediate attributes."""
|
|
4360
|
+
body = {}
|
|
4361
|
+
if self.permission_levels: body['permission_levels'] = self.permission_levels
|
|
4362
|
+
return body
|
|
4363
|
+
|
|
3423
4364
|
@classmethod
|
|
3424
4365
|
def from_dict(cls, d: Dict[str, any]) -> GetClusterPermissionLevelsResponse:
|
|
3425
4366
|
"""Deserializes the GetClusterPermissionLevelsResponse from a dictionary."""
|
|
@@ -3437,6 +4378,12 @@ class GetClusterPolicyPermissionLevelsResponse:
|
|
|
3437
4378
|
if self.permission_levels: body['permission_levels'] = [v.as_dict() for v in self.permission_levels]
|
|
3438
4379
|
return body
|
|
3439
4380
|
|
|
4381
|
+
def as_shallow_dict(self) -> dict:
|
|
4382
|
+
"""Serializes the GetClusterPolicyPermissionLevelsResponse into a shallow dictionary of its immediate attributes."""
|
|
4383
|
+
body = {}
|
|
4384
|
+
if self.permission_levels: body['permission_levels'] = self.permission_levels
|
|
4385
|
+
return body
|
|
4386
|
+
|
|
3440
4387
|
@classmethod
|
|
3441
4388
|
def from_dict(cls, d: Dict[str, any]) -> GetClusterPolicyPermissionLevelsResponse:
|
|
3442
4389
|
"""Deserializes the GetClusterPolicyPermissionLevelsResponse from a dictionary."""
|
|
@@ -3482,6 +4429,18 @@ class GetEvents:
|
|
|
3482
4429
|
if self.start_time is not None: body['start_time'] = self.start_time
|
|
3483
4430
|
return body
|
|
3484
4431
|
|
|
4432
|
+
def as_shallow_dict(self) -> dict:
|
|
4433
|
+
"""Serializes the GetEvents into a shallow dictionary of its immediate attributes."""
|
|
4434
|
+
body = {}
|
|
4435
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
4436
|
+
if self.end_time is not None: body['end_time'] = self.end_time
|
|
4437
|
+
if self.event_types: body['event_types'] = self.event_types
|
|
4438
|
+
if self.limit is not None: body['limit'] = self.limit
|
|
4439
|
+
if self.offset is not None: body['offset'] = self.offset
|
|
4440
|
+
if self.order is not None: body['order'] = self.order
|
|
4441
|
+
if self.start_time is not None: body['start_time'] = self.start_time
|
|
4442
|
+
return body
|
|
4443
|
+
|
|
3485
4444
|
@classmethod
|
|
3486
4445
|
def from_dict(cls, d: Dict[str, any]) -> GetEvents:
|
|
3487
4446
|
"""Deserializes the GetEvents from a dictionary."""
|
|
@@ -3521,6 +4480,14 @@ class GetEventsResponse:
|
|
|
3521
4480
|
if self.total_count is not None: body['total_count'] = self.total_count
|
|
3522
4481
|
return body
|
|
3523
4482
|
|
|
4483
|
+
def as_shallow_dict(self) -> dict:
|
|
4484
|
+
"""Serializes the GetEventsResponse into a shallow dictionary of its immediate attributes."""
|
|
4485
|
+
body = {}
|
|
4486
|
+
if self.events: body['events'] = self.events
|
|
4487
|
+
if self.next_page: body['next_page'] = self.next_page
|
|
4488
|
+
if self.total_count is not None: body['total_count'] = self.total_count
|
|
4489
|
+
return body
|
|
4490
|
+
|
|
3524
4491
|
@classmethod
|
|
3525
4492
|
def from_dict(cls, d: Dict[str, any]) -> GetEventsResponse:
|
|
3526
4493
|
"""Deserializes the GetEventsResponse from a dictionary."""
|
|
@@ -3640,6 +4607,30 @@ class GetInstancePool:
|
|
|
3640
4607
|
if self.status: body['status'] = self.status.as_dict()
|
|
3641
4608
|
return body
|
|
3642
4609
|
|
|
4610
|
+
def as_shallow_dict(self) -> dict:
|
|
4611
|
+
"""Serializes the GetInstancePool into a shallow dictionary of its immediate attributes."""
|
|
4612
|
+
body = {}
|
|
4613
|
+
if self.aws_attributes: body['aws_attributes'] = self.aws_attributes
|
|
4614
|
+
if self.azure_attributes: body['azure_attributes'] = self.azure_attributes
|
|
4615
|
+
if self.custom_tags: body['custom_tags'] = self.custom_tags
|
|
4616
|
+
if self.default_tags: body['default_tags'] = self.default_tags
|
|
4617
|
+
if self.disk_spec: body['disk_spec'] = self.disk_spec
|
|
4618
|
+
if self.enable_elastic_disk is not None: body['enable_elastic_disk'] = self.enable_elastic_disk
|
|
4619
|
+
if self.gcp_attributes: body['gcp_attributes'] = self.gcp_attributes
|
|
4620
|
+
if self.idle_instance_autotermination_minutes is not None:
|
|
4621
|
+
body['idle_instance_autotermination_minutes'] = self.idle_instance_autotermination_minutes
|
|
4622
|
+
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
4623
|
+
if self.instance_pool_name is not None: body['instance_pool_name'] = self.instance_pool_name
|
|
4624
|
+
if self.max_capacity is not None: body['max_capacity'] = self.max_capacity
|
|
4625
|
+
if self.min_idle_instances is not None: body['min_idle_instances'] = self.min_idle_instances
|
|
4626
|
+
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
4627
|
+
if self.preloaded_docker_images: body['preloaded_docker_images'] = self.preloaded_docker_images
|
|
4628
|
+
if self.preloaded_spark_versions: body['preloaded_spark_versions'] = self.preloaded_spark_versions
|
|
4629
|
+
if self.state is not None: body['state'] = self.state
|
|
4630
|
+
if self.stats: body['stats'] = self.stats
|
|
4631
|
+
if self.status: body['status'] = self.status
|
|
4632
|
+
return body
|
|
4633
|
+
|
|
3643
4634
|
@classmethod
|
|
3644
4635
|
def from_dict(cls, d: Dict[str, any]) -> GetInstancePool:
|
|
3645
4636
|
"""Deserializes the GetInstancePool from a dictionary."""
|
|
@@ -3674,6 +4665,12 @@ class GetInstancePoolPermissionLevelsResponse:
|
|
|
3674
4665
|
if self.permission_levels: body['permission_levels'] = [v.as_dict() for v in self.permission_levels]
|
|
3675
4666
|
return body
|
|
3676
4667
|
|
|
4668
|
+
def as_shallow_dict(self) -> dict:
|
|
4669
|
+
"""Serializes the GetInstancePoolPermissionLevelsResponse into a shallow dictionary of its immediate attributes."""
|
|
4670
|
+
body = {}
|
|
4671
|
+
if self.permission_levels: body['permission_levels'] = self.permission_levels
|
|
4672
|
+
return body
|
|
4673
|
+
|
|
3677
4674
|
@classmethod
|
|
3678
4675
|
def from_dict(cls, d: Dict[str, any]) -> GetInstancePoolPermissionLevelsResponse:
|
|
3679
4676
|
"""Deserializes the GetInstancePoolPermissionLevelsResponse from a dictionary."""
|
|
@@ -3692,6 +4689,12 @@ class GetSparkVersionsResponse:
|
|
|
3692
4689
|
if self.versions: body['versions'] = [v.as_dict() for v in self.versions]
|
|
3693
4690
|
return body
|
|
3694
4691
|
|
|
4692
|
+
def as_shallow_dict(self) -> dict:
|
|
4693
|
+
"""Serializes the GetSparkVersionsResponse into a shallow dictionary of its immediate attributes."""
|
|
4694
|
+
body = {}
|
|
4695
|
+
if self.versions: body['versions'] = self.versions
|
|
4696
|
+
return body
|
|
4697
|
+
|
|
3695
4698
|
@classmethod
|
|
3696
4699
|
def from_dict(cls, d: Dict[str, any]) -> GetSparkVersionsResponse:
|
|
3697
4700
|
"""Deserializes the GetSparkVersionsResponse from a dictionary."""
|
|
@@ -3729,6 +4732,15 @@ class GlobalInitScriptCreateRequest:
|
|
|
3729
4732
|
if self.script is not None: body['script'] = self.script
|
|
3730
4733
|
return body
|
|
3731
4734
|
|
|
4735
|
+
def as_shallow_dict(self) -> dict:
|
|
4736
|
+
"""Serializes the GlobalInitScriptCreateRequest into a shallow dictionary of its immediate attributes."""
|
|
4737
|
+
body = {}
|
|
4738
|
+
if self.enabled is not None: body['enabled'] = self.enabled
|
|
4739
|
+
if self.name is not None: body['name'] = self.name
|
|
4740
|
+
if self.position is not None: body['position'] = self.position
|
|
4741
|
+
if self.script is not None: body['script'] = self.script
|
|
4742
|
+
return body
|
|
4743
|
+
|
|
3732
4744
|
@classmethod
|
|
3733
4745
|
def from_dict(cls, d: Dict[str, any]) -> GlobalInitScriptCreateRequest:
|
|
3734
4746
|
"""Deserializes the GlobalInitScriptCreateRequest from a dictionary."""
|
|
@@ -3778,6 +4790,19 @@ class GlobalInitScriptDetails:
|
|
|
3778
4790
|
if self.updated_by is not None: body['updated_by'] = self.updated_by
|
|
3779
4791
|
return body
|
|
3780
4792
|
|
|
4793
|
+
def as_shallow_dict(self) -> dict:
|
|
4794
|
+
"""Serializes the GlobalInitScriptDetails into a shallow dictionary of its immediate attributes."""
|
|
4795
|
+
body = {}
|
|
4796
|
+
if self.created_at is not None: body['created_at'] = self.created_at
|
|
4797
|
+
if self.created_by is not None: body['created_by'] = self.created_by
|
|
4798
|
+
if self.enabled is not None: body['enabled'] = self.enabled
|
|
4799
|
+
if self.name is not None: body['name'] = self.name
|
|
4800
|
+
if self.position is not None: body['position'] = self.position
|
|
4801
|
+
if self.script_id is not None: body['script_id'] = self.script_id
|
|
4802
|
+
if self.updated_at is not None: body['updated_at'] = self.updated_at
|
|
4803
|
+
if self.updated_by is not None: body['updated_by'] = self.updated_by
|
|
4804
|
+
return body
|
|
4805
|
+
|
|
3781
4806
|
@classmethod
|
|
3782
4807
|
def from_dict(cls, d: Dict[str, any]) -> GlobalInitScriptDetails:
|
|
3783
4808
|
"""Deserializes the GlobalInitScriptDetails from a dictionary."""
|
|
@@ -3835,6 +4860,20 @@ class GlobalInitScriptDetailsWithContent:
|
|
|
3835
4860
|
if self.updated_by is not None: body['updated_by'] = self.updated_by
|
|
3836
4861
|
return body
|
|
3837
4862
|
|
|
4863
|
+
def as_shallow_dict(self) -> dict:
|
|
4864
|
+
"""Serializes the GlobalInitScriptDetailsWithContent into a shallow dictionary of its immediate attributes."""
|
|
4865
|
+
body = {}
|
|
4866
|
+
if self.created_at is not None: body['created_at'] = self.created_at
|
|
4867
|
+
if self.created_by is not None: body['created_by'] = self.created_by
|
|
4868
|
+
if self.enabled is not None: body['enabled'] = self.enabled
|
|
4869
|
+
if self.name is not None: body['name'] = self.name
|
|
4870
|
+
if self.position is not None: body['position'] = self.position
|
|
4871
|
+
if self.script is not None: body['script'] = self.script
|
|
4872
|
+
if self.script_id is not None: body['script_id'] = self.script_id
|
|
4873
|
+
if self.updated_at is not None: body['updated_at'] = self.updated_at
|
|
4874
|
+
if self.updated_by is not None: body['updated_by'] = self.updated_by
|
|
4875
|
+
return body
|
|
4876
|
+
|
|
3838
4877
|
@classmethod
|
|
3839
4878
|
def from_dict(cls, d: Dict[str, any]) -> GlobalInitScriptDetailsWithContent:
|
|
3840
4879
|
"""Deserializes the GlobalInitScriptDetailsWithContent from a dictionary."""
|
|
@@ -3884,6 +4923,16 @@ class GlobalInitScriptUpdateRequest:
|
|
|
3884
4923
|
if self.script_id is not None: body['script_id'] = self.script_id
|
|
3885
4924
|
return body
|
|
3886
4925
|
|
|
4926
|
+
def as_shallow_dict(self) -> dict:
|
|
4927
|
+
"""Serializes the GlobalInitScriptUpdateRequest into a shallow dictionary of its immediate attributes."""
|
|
4928
|
+
body = {}
|
|
4929
|
+
if self.enabled is not None: body['enabled'] = self.enabled
|
|
4930
|
+
if self.name is not None: body['name'] = self.name
|
|
4931
|
+
if self.position is not None: body['position'] = self.position
|
|
4932
|
+
if self.script is not None: body['script'] = self.script
|
|
4933
|
+
if self.script_id is not None: body['script_id'] = self.script_id
|
|
4934
|
+
return body
|
|
4935
|
+
|
|
3887
4936
|
@classmethod
|
|
3888
4937
|
def from_dict(cls, d: Dict[str, any]) -> GlobalInitScriptUpdateRequest:
|
|
3889
4938
|
"""Deserializes the GlobalInitScriptUpdateRequest from a dictionary."""
|
|
@@ -3913,6 +4962,14 @@ class InitScriptEventDetails:
|
|
|
3913
4962
|
if self.reported_for_node is not None: body['reported_for_node'] = self.reported_for_node
|
|
3914
4963
|
return body
|
|
3915
4964
|
|
|
4965
|
+
def as_shallow_dict(self) -> dict:
|
|
4966
|
+
"""Serializes the InitScriptEventDetails into a shallow dictionary of its immediate attributes."""
|
|
4967
|
+
body = {}
|
|
4968
|
+
if self.cluster: body['cluster'] = self.cluster
|
|
4969
|
+
if self.global_: body['global'] = self.global_
|
|
4970
|
+
if self.reported_for_node is not None: body['reported_for_node'] = self.reported_for_node
|
|
4971
|
+
return body
|
|
4972
|
+
|
|
3916
4973
|
@classmethod
|
|
3917
4974
|
def from_dict(cls, d: Dict[str, any]) -> InitScriptEventDetails:
|
|
3918
4975
|
"""Deserializes the InitScriptEventDetails from a dictionary."""
|
|
@@ -3941,6 +4998,15 @@ class InitScriptExecutionDetails:
|
|
|
3941
4998
|
if self.status is not None: body['status'] = self.status.value
|
|
3942
4999
|
return body
|
|
3943
5000
|
|
|
5001
|
+
def as_shallow_dict(self) -> dict:
|
|
5002
|
+
"""Serializes the InitScriptExecutionDetails into a shallow dictionary of its immediate attributes."""
|
|
5003
|
+
body = {}
|
|
5004
|
+
if self.error_message is not None: body['error_message'] = self.error_message
|
|
5005
|
+
if self.execution_duration_seconds is not None:
|
|
5006
|
+
body['execution_duration_seconds'] = self.execution_duration_seconds
|
|
5007
|
+
if self.status is not None: body['status'] = self.status
|
|
5008
|
+
return body
|
|
5009
|
+
|
|
3944
5010
|
@classmethod
|
|
3945
5011
|
def from_dict(cls, d: Dict[str, any]) -> InitScriptExecutionDetails:
|
|
3946
5012
|
"""Deserializes the InitScriptExecutionDetails from a dictionary."""
|
|
@@ -4003,6 +5069,18 @@ class InitScriptInfo:
|
|
|
4003
5069
|
if self.workspace: body['workspace'] = self.workspace.as_dict()
|
|
4004
5070
|
return body
|
|
4005
5071
|
|
|
5072
|
+
def as_shallow_dict(self) -> dict:
|
|
5073
|
+
"""Serializes the InitScriptInfo into a shallow dictionary of its immediate attributes."""
|
|
5074
|
+
body = {}
|
|
5075
|
+
if self.abfss: body['abfss'] = self.abfss
|
|
5076
|
+
if self.dbfs: body['dbfs'] = self.dbfs
|
|
5077
|
+
if self.file: body['file'] = self.file
|
|
5078
|
+
if self.gcs: body['gcs'] = self.gcs
|
|
5079
|
+
if self.s3: body['s3'] = self.s3
|
|
5080
|
+
if self.volumes: body['volumes'] = self.volumes
|
|
5081
|
+
if self.workspace: body['workspace'] = self.workspace
|
|
5082
|
+
return body
|
|
5083
|
+
|
|
4006
5084
|
@classmethod
|
|
4007
5085
|
def from_dict(cls, d: Dict[str, any]) -> InitScriptInfo:
|
|
4008
5086
|
"""Deserializes the InitScriptInfo from a dictionary."""
|
|
@@ -4030,6 +5108,13 @@ class InitScriptInfoAndExecutionDetails:
|
|
|
4030
5108
|
if self.script: body['script'] = self.script.as_dict()
|
|
4031
5109
|
return body
|
|
4032
5110
|
|
|
5111
|
+
def as_shallow_dict(self) -> dict:
|
|
5112
|
+
"""Serializes the InitScriptInfoAndExecutionDetails into a shallow dictionary of its immediate attributes."""
|
|
5113
|
+
body = {}
|
|
5114
|
+
if self.execution_details: body['execution_details'] = self.execution_details
|
|
5115
|
+
if self.script: body['script'] = self.script
|
|
5116
|
+
return body
|
|
5117
|
+
|
|
4033
5118
|
@classmethod
|
|
4034
5119
|
def from_dict(cls, d: Dict[str, any]) -> InitScriptInfoAndExecutionDetails:
|
|
4035
5120
|
"""Deserializes the InitScriptInfoAndExecutionDetails from a dictionary."""
|
|
@@ -4052,6 +5137,13 @@ class InstallLibraries:
|
|
|
4052
5137
|
if self.libraries: body['libraries'] = [v.as_dict() for v in self.libraries]
|
|
4053
5138
|
return body
|
|
4054
5139
|
|
|
5140
|
+
def as_shallow_dict(self) -> dict:
|
|
5141
|
+
"""Serializes the InstallLibraries into a shallow dictionary of its immediate attributes."""
|
|
5142
|
+
body = {}
|
|
5143
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
5144
|
+
if self.libraries: body['libraries'] = self.libraries
|
|
5145
|
+
return body
|
|
5146
|
+
|
|
4055
5147
|
@classmethod
|
|
4056
5148
|
def from_dict(cls, d: Dict[str, any]) -> InstallLibraries:
|
|
4057
5149
|
"""Deserializes the InstallLibraries from a dictionary."""
|
|
@@ -4066,6 +5158,11 @@ class InstallLibrariesResponse:
|
|
|
4066
5158
|
body = {}
|
|
4067
5159
|
return body
|
|
4068
5160
|
|
|
5161
|
+
def as_shallow_dict(self) -> dict:
|
|
5162
|
+
"""Serializes the InstallLibrariesResponse into a shallow dictionary of its immediate attributes."""
|
|
5163
|
+
body = {}
|
|
5164
|
+
return body
|
|
5165
|
+
|
|
4069
5166
|
@classmethod
|
|
4070
5167
|
def from_dict(cls, d: Dict[str, any]) -> InstallLibrariesResponse:
|
|
4071
5168
|
"""Deserializes the InstallLibrariesResponse from a dictionary."""
|
|
@@ -4096,6 +5193,16 @@ class InstancePoolAccessControlRequest:
|
|
|
4096
5193
|
if self.user_name is not None: body['user_name'] = self.user_name
|
|
4097
5194
|
return body
|
|
4098
5195
|
|
|
5196
|
+
def as_shallow_dict(self) -> dict:
|
|
5197
|
+
"""Serializes the InstancePoolAccessControlRequest into a shallow dictionary of its immediate attributes."""
|
|
5198
|
+
body = {}
|
|
5199
|
+
if self.group_name is not None: body['group_name'] = self.group_name
|
|
5200
|
+
if self.permission_level is not None: body['permission_level'] = self.permission_level
|
|
5201
|
+
if self.service_principal_name is not None:
|
|
5202
|
+
body['service_principal_name'] = self.service_principal_name
|
|
5203
|
+
if self.user_name is not None: body['user_name'] = self.user_name
|
|
5204
|
+
return body
|
|
5205
|
+
|
|
4099
5206
|
@classmethod
|
|
4100
5207
|
def from_dict(cls, d: Dict[str, any]) -> InstancePoolAccessControlRequest:
|
|
4101
5208
|
"""Deserializes the InstancePoolAccessControlRequest from a dictionary."""
|
|
@@ -4133,6 +5240,17 @@ class InstancePoolAccessControlResponse:
|
|
|
4133
5240
|
if self.user_name is not None: body['user_name'] = self.user_name
|
|
4134
5241
|
return body
|
|
4135
5242
|
|
|
5243
|
+
def as_shallow_dict(self) -> dict:
|
|
5244
|
+
"""Serializes the InstancePoolAccessControlResponse into a shallow dictionary of its immediate attributes."""
|
|
5245
|
+
body = {}
|
|
5246
|
+
if self.all_permissions: body['all_permissions'] = self.all_permissions
|
|
5247
|
+
if self.display_name is not None: body['display_name'] = self.display_name
|
|
5248
|
+
if self.group_name is not None: body['group_name'] = self.group_name
|
|
5249
|
+
if self.service_principal_name is not None:
|
|
5250
|
+
body['service_principal_name'] = self.service_principal_name
|
|
5251
|
+
if self.user_name is not None: body['user_name'] = self.user_name
|
|
5252
|
+
return body
|
|
5253
|
+
|
|
4136
5254
|
@classmethod
|
|
4137
5255
|
def from_dict(cls, d: Dict[str, any]) -> InstancePoolAccessControlResponse:
|
|
4138
5256
|
"""Deserializes the InstancePoolAccessControlResponse from a dictionary."""
|
|
@@ -4254,6 +5372,30 @@ class InstancePoolAndStats:
|
|
|
4254
5372
|
if self.status: body['status'] = self.status.as_dict()
|
|
4255
5373
|
return body
|
|
4256
5374
|
|
|
5375
|
+
def as_shallow_dict(self) -> dict:
|
|
5376
|
+
"""Serializes the InstancePoolAndStats into a shallow dictionary of its immediate attributes."""
|
|
5377
|
+
body = {}
|
|
5378
|
+
if self.aws_attributes: body['aws_attributes'] = self.aws_attributes
|
|
5379
|
+
if self.azure_attributes: body['azure_attributes'] = self.azure_attributes
|
|
5380
|
+
if self.custom_tags: body['custom_tags'] = self.custom_tags
|
|
5381
|
+
if self.default_tags: body['default_tags'] = self.default_tags
|
|
5382
|
+
if self.disk_spec: body['disk_spec'] = self.disk_spec
|
|
5383
|
+
if self.enable_elastic_disk is not None: body['enable_elastic_disk'] = self.enable_elastic_disk
|
|
5384
|
+
if self.gcp_attributes: body['gcp_attributes'] = self.gcp_attributes
|
|
5385
|
+
if self.idle_instance_autotermination_minutes is not None:
|
|
5386
|
+
body['idle_instance_autotermination_minutes'] = self.idle_instance_autotermination_minutes
|
|
5387
|
+
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
5388
|
+
if self.instance_pool_name is not None: body['instance_pool_name'] = self.instance_pool_name
|
|
5389
|
+
if self.max_capacity is not None: body['max_capacity'] = self.max_capacity
|
|
5390
|
+
if self.min_idle_instances is not None: body['min_idle_instances'] = self.min_idle_instances
|
|
5391
|
+
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
5392
|
+
if self.preloaded_docker_images: body['preloaded_docker_images'] = self.preloaded_docker_images
|
|
5393
|
+
if self.preloaded_spark_versions: body['preloaded_spark_versions'] = self.preloaded_spark_versions
|
|
5394
|
+
if self.state is not None: body['state'] = self.state
|
|
5395
|
+
if self.stats: body['stats'] = self.stats
|
|
5396
|
+
if self.status: body['status'] = self.status
|
|
5397
|
+
return body
|
|
5398
|
+
|
|
4257
5399
|
@classmethod
|
|
4258
5400
|
def from_dict(cls, d: Dict[str, any]) -> InstancePoolAndStats:
|
|
4259
5401
|
"""Deserializes the InstancePoolAndStats from a dictionary."""
|
|
@@ -4313,6 +5455,15 @@ class InstancePoolAwsAttributes:
|
|
|
4313
5455
|
if self.zone_id is not None: body['zone_id'] = self.zone_id
|
|
4314
5456
|
return body
|
|
4315
5457
|
|
|
5458
|
+
def as_shallow_dict(self) -> dict:
|
|
5459
|
+
"""Serializes the InstancePoolAwsAttributes into a shallow dictionary of its immediate attributes."""
|
|
5460
|
+
body = {}
|
|
5461
|
+
if self.availability is not None: body['availability'] = self.availability
|
|
5462
|
+
if self.spot_bid_price_percent is not None:
|
|
5463
|
+
body['spot_bid_price_percent'] = self.spot_bid_price_percent
|
|
5464
|
+
if self.zone_id is not None: body['zone_id'] = self.zone_id
|
|
5465
|
+
return body
|
|
5466
|
+
|
|
4316
5467
|
@classmethod
|
|
4317
5468
|
def from_dict(cls, d: Dict[str, any]) -> InstancePoolAwsAttributes:
|
|
4318
5469
|
"""Deserializes the InstancePoolAwsAttributes from a dictionary."""
|
|
@@ -4348,6 +5499,13 @@ class InstancePoolAzureAttributes:
|
|
|
4348
5499
|
if self.spot_bid_max_price is not None: body['spot_bid_max_price'] = self.spot_bid_max_price
|
|
4349
5500
|
return body
|
|
4350
5501
|
|
|
5502
|
+
def as_shallow_dict(self) -> dict:
|
|
5503
|
+
"""Serializes the InstancePoolAzureAttributes into a shallow dictionary of its immediate attributes."""
|
|
5504
|
+
body = {}
|
|
5505
|
+
if self.availability is not None: body['availability'] = self.availability
|
|
5506
|
+
if self.spot_bid_max_price is not None: body['spot_bid_max_price'] = self.spot_bid_max_price
|
|
5507
|
+
return body
|
|
5508
|
+
|
|
4351
5509
|
@classmethod
|
|
4352
5510
|
def from_dict(cls, d: Dict[str, any]) -> InstancePoolAzureAttributes:
|
|
4353
5511
|
"""Deserializes the InstancePoolAzureAttributes from a dictionary."""
|
|
@@ -4399,6 +5557,14 @@ class InstancePoolGcpAttributes:
|
|
|
4399
5557
|
if self.zone_id is not None: body['zone_id'] = self.zone_id
|
|
4400
5558
|
return body
|
|
4401
5559
|
|
|
5560
|
+
def as_shallow_dict(self) -> dict:
|
|
5561
|
+
"""Serializes the InstancePoolGcpAttributes into a shallow dictionary of its immediate attributes."""
|
|
5562
|
+
body = {}
|
|
5563
|
+
if self.gcp_availability is not None: body['gcp_availability'] = self.gcp_availability
|
|
5564
|
+
if self.local_ssd_count is not None: body['local_ssd_count'] = self.local_ssd_count
|
|
5565
|
+
if self.zone_id is not None: body['zone_id'] = self.zone_id
|
|
5566
|
+
return body
|
|
5567
|
+
|
|
4402
5568
|
@classmethod
|
|
4403
5569
|
def from_dict(cls, d: Dict[str, any]) -> InstancePoolGcpAttributes:
|
|
4404
5570
|
"""Deserializes the InstancePoolGcpAttributes from a dictionary."""
|
|
@@ -4424,6 +5590,14 @@ class InstancePoolPermission:
|
|
|
4424
5590
|
if self.permission_level is not None: body['permission_level'] = self.permission_level.value
|
|
4425
5591
|
return body
|
|
4426
5592
|
|
|
5593
|
+
def as_shallow_dict(self) -> dict:
|
|
5594
|
+
"""Serializes the InstancePoolPermission into a shallow dictionary of its immediate attributes."""
|
|
5595
|
+
body = {}
|
|
5596
|
+
if self.inherited is not None: body['inherited'] = self.inherited
|
|
5597
|
+
if self.inherited_from_object: body['inherited_from_object'] = self.inherited_from_object
|
|
5598
|
+
if self.permission_level is not None: body['permission_level'] = self.permission_level
|
|
5599
|
+
return body
|
|
5600
|
+
|
|
4427
5601
|
@classmethod
|
|
4428
5602
|
def from_dict(cls, d: Dict[str, any]) -> InstancePoolPermission:
|
|
4429
5603
|
"""Deserializes the InstancePoolPermission from a dictionary."""
|
|
@@ -4456,6 +5630,14 @@ class InstancePoolPermissions:
|
|
|
4456
5630
|
if self.object_type is not None: body['object_type'] = self.object_type
|
|
4457
5631
|
return body
|
|
4458
5632
|
|
|
5633
|
+
def as_shallow_dict(self) -> dict:
|
|
5634
|
+
"""Serializes the InstancePoolPermissions into a shallow dictionary of its immediate attributes."""
|
|
5635
|
+
body = {}
|
|
5636
|
+
if self.access_control_list: body['access_control_list'] = self.access_control_list
|
|
5637
|
+
if self.object_id is not None: body['object_id'] = self.object_id
|
|
5638
|
+
if self.object_type is not None: body['object_type'] = self.object_type
|
|
5639
|
+
return body
|
|
5640
|
+
|
|
4459
5641
|
@classmethod
|
|
4460
5642
|
def from_dict(cls, d: Dict[str, any]) -> InstancePoolPermissions:
|
|
4461
5643
|
"""Deserializes the InstancePoolPermissions from a dictionary."""
|
|
@@ -4479,6 +5661,13 @@ class InstancePoolPermissionsDescription:
|
|
|
4479
5661
|
if self.permission_level is not None: body['permission_level'] = self.permission_level.value
|
|
4480
5662
|
return body
|
|
4481
5663
|
|
|
5664
|
+
def as_shallow_dict(self) -> dict:
|
|
5665
|
+
"""Serializes the InstancePoolPermissionsDescription into a shallow dictionary of its immediate attributes."""
|
|
5666
|
+
body = {}
|
|
5667
|
+
if self.description is not None: body['description'] = self.description
|
|
5668
|
+
if self.permission_level is not None: body['permission_level'] = self.permission_level
|
|
5669
|
+
return body
|
|
5670
|
+
|
|
4482
5671
|
@classmethod
|
|
4483
5672
|
def from_dict(cls, d: Dict[str, any]) -> InstancePoolPermissionsDescription:
|
|
4484
5673
|
"""Deserializes the InstancePoolPermissionsDescription from a dictionary."""
|
|
@@ -4501,6 +5690,13 @@ class InstancePoolPermissionsRequest:
|
|
|
4501
5690
|
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
4502
5691
|
return body
|
|
4503
5692
|
|
|
5693
|
+
def as_shallow_dict(self) -> dict:
|
|
5694
|
+
"""Serializes the InstancePoolPermissionsRequest into a shallow dictionary of its immediate attributes."""
|
|
5695
|
+
body = {}
|
|
5696
|
+
if self.access_control_list: body['access_control_list'] = self.access_control_list
|
|
5697
|
+
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
5698
|
+
return body
|
|
5699
|
+
|
|
4504
5700
|
@classmethod
|
|
4505
5701
|
def from_dict(cls, d: Dict[str, any]) -> InstancePoolPermissionsRequest:
|
|
4506
5702
|
"""Deserializes the InstancePoolPermissionsRequest from a dictionary."""
|
|
@@ -4540,6 +5736,15 @@ class InstancePoolStats:
|
|
|
4540
5736
|
if self.used_count is not None: body['used_count'] = self.used_count
|
|
4541
5737
|
return body
|
|
4542
5738
|
|
|
5739
|
+
def as_shallow_dict(self) -> dict:
|
|
5740
|
+
"""Serializes the InstancePoolStats into a shallow dictionary of its immediate attributes."""
|
|
5741
|
+
body = {}
|
|
5742
|
+
if self.idle_count is not None: body['idle_count'] = self.idle_count
|
|
5743
|
+
if self.pending_idle_count is not None: body['pending_idle_count'] = self.pending_idle_count
|
|
5744
|
+
if self.pending_used_count is not None: body['pending_used_count'] = self.pending_used_count
|
|
5745
|
+
if self.used_count is not None: body['used_count'] = self.used_count
|
|
5746
|
+
return body
|
|
5747
|
+
|
|
4543
5748
|
@classmethod
|
|
4544
5749
|
def from_dict(cls, d: Dict[str, any]) -> InstancePoolStats:
|
|
4545
5750
|
"""Deserializes the InstancePoolStats from a dictionary."""
|
|
@@ -4563,6 +5768,12 @@ class InstancePoolStatus:
|
|
|
4563
5768
|
body['pending_instance_errors'] = [v.as_dict() for v in self.pending_instance_errors]
|
|
4564
5769
|
return body
|
|
4565
5770
|
|
|
5771
|
+
def as_shallow_dict(self) -> dict:
|
|
5772
|
+
"""Serializes the InstancePoolStatus into a shallow dictionary of its immediate attributes."""
|
|
5773
|
+
body = {}
|
|
5774
|
+
if self.pending_instance_errors: body['pending_instance_errors'] = self.pending_instance_errors
|
|
5775
|
+
return body
|
|
5776
|
+
|
|
4566
5777
|
@classmethod
|
|
4567
5778
|
def from_dict(cls, d: Dict[str, any]) -> InstancePoolStatus:
|
|
4568
5779
|
"""Deserializes the InstancePoolStatus from a dictionary."""
|
|
@@ -4598,6 +5809,15 @@ class InstanceProfile:
|
|
|
4598
5809
|
body['is_meta_instance_profile'] = self.is_meta_instance_profile
|
|
4599
5810
|
return body
|
|
4600
5811
|
|
|
5812
|
+
def as_shallow_dict(self) -> dict:
|
|
5813
|
+
"""Serializes the InstanceProfile into a shallow dictionary of its immediate attributes."""
|
|
5814
|
+
body = {}
|
|
5815
|
+
if self.iam_role_arn is not None: body['iam_role_arn'] = self.iam_role_arn
|
|
5816
|
+
if self.instance_profile_arn is not None: body['instance_profile_arn'] = self.instance_profile_arn
|
|
5817
|
+
if self.is_meta_instance_profile is not None:
|
|
5818
|
+
body['is_meta_instance_profile'] = self.is_meta_instance_profile
|
|
5819
|
+
return body
|
|
5820
|
+
|
|
4601
5821
|
@classmethod
|
|
4602
5822
|
def from_dict(cls, d: Dict[str, any]) -> InstanceProfile:
|
|
4603
5823
|
"""Deserializes the InstanceProfile from a dictionary."""
|
|
@@ -4606,6 +5826,17 @@ class InstanceProfile:
|
|
|
4606
5826
|
is_meta_instance_profile=d.get('is_meta_instance_profile', None))
|
|
4607
5827
|
|
|
4608
5828
|
|
|
5829
|
+
class Kind(Enum):
|
|
5830
|
+
"""The kind of compute described by this compute specification.
|
|
5831
|
+
|
|
5832
|
+
Depending on `kind`, different validations and default values will be applied.
|
|
5833
|
+
|
|
5834
|
+
The first usage of this value is for the simple cluster form where it sets `kind =
|
|
5835
|
+
CLASSIC_PREVIEW`."""
|
|
5836
|
+
|
|
5837
|
+
CLASSIC_PREVIEW = 'CLASSIC_PREVIEW'
|
|
5838
|
+
|
|
5839
|
+
|
|
4609
5840
|
class Language(Enum):
|
|
4610
5841
|
|
|
4611
5842
|
PYTHON = 'python'
|
|
@@ -4660,6 +5891,18 @@ class Library:
|
|
|
4660
5891
|
if self.whl is not None: body['whl'] = self.whl
|
|
4661
5892
|
return body
|
|
4662
5893
|
|
|
5894
|
+
def as_shallow_dict(self) -> dict:
|
|
5895
|
+
"""Serializes the Library into a shallow dictionary of its immediate attributes."""
|
|
5896
|
+
body = {}
|
|
5897
|
+
if self.cran: body['cran'] = self.cran
|
|
5898
|
+
if self.egg is not None: body['egg'] = self.egg
|
|
5899
|
+
if self.jar is not None: body['jar'] = self.jar
|
|
5900
|
+
if self.maven: body['maven'] = self.maven
|
|
5901
|
+
if self.pypi: body['pypi'] = self.pypi
|
|
5902
|
+
if self.requirements is not None: body['requirements'] = self.requirements
|
|
5903
|
+
if self.whl is not None: body['whl'] = self.whl
|
|
5904
|
+
return body
|
|
5905
|
+
|
|
4663
5906
|
@classmethod
|
|
4664
5907
|
def from_dict(cls, d: Dict[str, any]) -> Library:
|
|
4665
5908
|
"""Deserializes the Library from a dictionary."""
|
|
@@ -4698,6 +5941,16 @@ class LibraryFullStatus:
|
|
|
4698
5941
|
if self.status is not None: body['status'] = self.status.value
|
|
4699
5942
|
return body
|
|
4700
5943
|
|
|
5944
|
+
def as_shallow_dict(self) -> dict:
|
|
5945
|
+
"""Serializes the LibraryFullStatus into a shallow dictionary of its immediate attributes."""
|
|
5946
|
+
body = {}
|
|
5947
|
+
if self.is_library_for_all_clusters is not None:
|
|
5948
|
+
body['is_library_for_all_clusters'] = self.is_library_for_all_clusters
|
|
5949
|
+
if self.library: body['library'] = self.library
|
|
5950
|
+
if self.messages: body['messages'] = self.messages
|
|
5951
|
+
if self.status is not None: body['status'] = self.status
|
|
5952
|
+
return body
|
|
5953
|
+
|
|
4701
5954
|
@classmethod
|
|
4702
5955
|
def from_dict(cls, d: Dict[str, any]) -> LibraryFullStatus:
|
|
4703
5956
|
"""Deserializes the LibraryFullStatus from a dictionary."""
|
|
@@ -4731,6 +5984,12 @@ class ListAllClusterLibraryStatusesResponse:
|
|
|
4731
5984
|
if self.statuses: body['statuses'] = [v.as_dict() for v in self.statuses]
|
|
4732
5985
|
return body
|
|
4733
5986
|
|
|
5987
|
+
def as_shallow_dict(self) -> dict:
|
|
5988
|
+
"""Serializes the ListAllClusterLibraryStatusesResponse into a shallow dictionary of its immediate attributes."""
|
|
5989
|
+
body = {}
|
|
5990
|
+
if self.statuses: body['statuses'] = self.statuses
|
|
5991
|
+
return body
|
|
5992
|
+
|
|
4734
5993
|
@classmethod
|
|
4735
5994
|
def from_dict(cls, d: Dict[str, any]) -> ListAllClusterLibraryStatusesResponse:
|
|
4736
5995
|
"""Deserializes the ListAllClusterLibraryStatusesResponse from a dictionary."""
|
|
@@ -4752,6 +6011,13 @@ class ListAvailableZonesResponse:
|
|
|
4752
6011
|
if self.zones: body['zones'] = [v for v in self.zones]
|
|
4753
6012
|
return body
|
|
4754
6013
|
|
|
6014
|
+
def as_shallow_dict(self) -> dict:
|
|
6015
|
+
"""Serializes the ListAvailableZonesResponse into a shallow dictionary of its immediate attributes."""
|
|
6016
|
+
body = {}
|
|
6017
|
+
if self.default_zone is not None: body['default_zone'] = self.default_zone
|
|
6018
|
+
if self.zones: body['zones'] = self.zones
|
|
6019
|
+
return body
|
|
6020
|
+
|
|
4755
6021
|
@classmethod
|
|
4756
6022
|
def from_dict(cls, d: Dict[str, any]) -> ListAvailableZonesResponse:
|
|
4757
6023
|
"""Deserializes the ListAvailableZonesResponse from a dictionary."""
|
|
@@ -4779,6 +6045,14 @@ class ListClusterCompliancesResponse:
|
|
|
4779
6045
|
if self.prev_page_token is not None: body['prev_page_token'] = self.prev_page_token
|
|
4780
6046
|
return body
|
|
4781
6047
|
|
|
6048
|
+
def as_shallow_dict(self) -> dict:
|
|
6049
|
+
"""Serializes the ListClusterCompliancesResponse into a shallow dictionary of its immediate attributes."""
|
|
6050
|
+
body = {}
|
|
6051
|
+
if self.clusters: body['clusters'] = self.clusters
|
|
6052
|
+
if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
|
|
6053
|
+
if self.prev_page_token is not None: body['prev_page_token'] = self.prev_page_token
|
|
6054
|
+
return body
|
|
6055
|
+
|
|
4782
6056
|
@classmethod
|
|
4783
6057
|
def from_dict(cls, d: Dict[str, any]) -> ListClusterCompliancesResponse:
|
|
4784
6058
|
"""Deserializes the ListClusterCompliancesResponse from a dictionary."""
|
|
@@ -4810,6 +6084,15 @@ class ListClustersFilterBy:
|
|
|
4810
6084
|
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
4811
6085
|
return body
|
|
4812
6086
|
|
|
6087
|
+
def as_shallow_dict(self) -> dict:
|
|
6088
|
+
"""Serializes the ListClustersFilterBy into a shallow dictionary of its immediate attributes."""
|
|
6089
|
+
body = {}
|
|
6090
|
+
if self.cluster_sources: body['cluster_sources'] = self.cluster_sources
|
|
6091
|
+
if self.cluster_states: body['cluster_states'] = self.cluster_states
|
|
6092
|
+
if self.is_pinned is not None: body['is_pinned'] = self.is_pinned
|
|
6093
|
+
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
6094
|
+
return body
|
|
6095
|
+
|
|
4813
6096
|
@classmethod
|
|
4814
6097
|
def from_dict(cls, d: Dict[str, any]) -> ListClustersFilterBy:
|
|
4815
6098
|
"""Deserializes the ListClustersFilterBy from a dictionary."""
|
|
@@ -4840,6 +6123,14 @@ class ListClustersResponse:
|
|
|
4840
6123
|
if self.prev_page_token is not None: body['prev_page_token'] = self.prev_page_token
|
|
4841
6124
|
return body
|
|
4842
6125
|
|
|
6126
|
+
def as_shallow_dict(self) -> dict:
|
|
6127
|
+
"""Serializes the ListClustersResponse into a shallow dictionary of its immediate attributes."""
|
|
6128
|
+
body = {}
|
|
6129
|
+
if self.clusters: body['clusters'] = self.clusters
|
|
6130
|
+
if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
|
|
6131
|
+
if self.prev_page_token is not None: body['prev_page_token'] = self.prev_page_token
|
|
6132
|
+
return body
|
|
6133
|
+
|
|
4843
6134
|
@classmethod
|
|
4844
6135
|
def from_dict(cls, d: Dict[str, any]) -> ListClustersResponse:
|
|
4845
6136
|
"""Deserializes the ListClustersResponse from a dictionary."""
|
|
@@ -4864,6 +6155,13 @@ class ListClustersSortBy:
|
|
|
4864
6155
|
if self.field is not None: body['field'] = self.field.value
|
|
4865
6156
|
return body
|
|
4866
6157
|
|
|
6158
|
+
def as_shallow_dict(self) -> dict:
|
|
6159
|
+
"""Serializes the ListClustersSortBy into a shallow dictionary of its immediate attributes."""
|
|
6160
|
+
body = {}
|
|
6161
|
+
if self.direction is not None: body['direction'] = self.direction
|
|
6162
|
+
if self.field is not None: body['field'] = self.field
|
|
6163
|
+
return body
|
|
6164
|
+
|
|
4867
6165
|
@classmethod
|
|
4868
6166
|
def from_dict(cls, d: Dict[str, any]) -> ListClustersSortBy:
|
|
4869
6167
|
"""Deserializes the ListClustersSortBy from a dictionary."""
|
|
@@ -4896,6 +6194,12 @@ class ListGlobalInitScriptsResponse:
|
|
|
4896
6194
|
if self.scripts: body['scripts'] = [v.as_dict() for v in self.scripts]
|
|
4897
6195
|
return body
|
|
4898
6196
|
|
|
6197
|
+
def as_shallow_dict(self) -> dict:
|
|
6198
|
+
"""Serializes the ListGlobalInitScriptsResponse into a shallow dictionary of its immediate attributes."""
|
|
6199
|
+
body = {}
|
|
6200
|
+
if self.scripts: body['scripts'] = self.scripts
|
|
6201
|
+
return body
|
|
6202
|
+
|
|
4899
6203
|
@classmethod
|
|
4900
6204
|
def from_dict(cls, d: Dict[str, any]) -> ListGlobalInitScriptsResponse:
|
|
4901
6205
|
"""Deserializes the ListGlobalInitScriptsResponse from a dictionary."""
|
|
@@ -4912,6 +6216,12 @@ class ListInstancePools:
|
|
|
4912
6216
|
if self.instance_pools: body['instance_pools'] = [v.as_dict() for v in self.instance_pools]
|
|
4913
6217
|
return body
|
|
4914
6218
|
|
|
6219
|
+
def as_shallow_dict(self) -> dict:
|
|
6220
|
+
"""Serializes the ListInstancePools into a shallow dictionary of its immediate attributes."""
|
|
6221
|
+
body = {}
|
|
6222
|
+
if self.instance_pools: body['instance_pools'] = self.instance_pools
|
|
6223
|
+
return body
|
|
6224
|
+
|
|
4915
6225
|
@classmethod
|
|
4916
6226
|
def from_dict(cls, d: Dict[str, any]) -> ListInstancePools:
|
|
4917
6227
|
"""Deserializes the ListInstancePools from a dictionary."""
|
|
@@ -4929,6 +6239,12 @@ class ListInstanceProfilesResponse:
|
|
|
4929
6239
|
if self.instance_profiles: body['instance_profiles'] = [v.as_dict() for v in self.instance_profiles]
|
|
4930
6240
|
return body
|
|
4931
6241
|
|
|
6242
|
+
def as_shallow_dict(self) -> dict:
|
|
6243
|
+
"""Serializes the ListInstanceProfilesResponse into a shallow dictionary of its immediate attributes."""
|
|
6244
|
+
body = {}
|
|
6245
|
+
if self.instance_profiles: body['instance_profiles'] = self.instance_profiles
|
|
6246
|
+
return body
|
|
6247
|
+
|
|
4932
6248
|
@classmethod
|
|
4933
6249
|
def from_dict(cls, d: Dict[str, any]) -> ListInstanceProfilesResponse:
|
|
4934
6250
|
"""Deserializes the ListInstanceProfilesResponse from a dictionary."""
|
|
@@ -4946,6 +6262,12 @@ class ListNodeTypesResponse:
|
|
|
4946
6262
|
if self.node_types: body['node_types'] = [v.as_dict() for v in self.node_types]
|
|
4947
6263
|
return body
|
|
4948
6264
|
|
|
6265
|
+
def as_shallow_dict(self) -> dict:
|
|
6266
|
+
"""Serializes the ListNodeTypesResponse into a shallow dictionary of its immediate attributes."""
|
|
6267
|
+
body = {}
|
|
6268
|
+
if self.node_types: body['node_types'] = self.node_types
|
|
6269
|
+
return body
|
|
6270
|
+
|
|
4949
6271
|
@classmethod
|
|
4950
6272
|
def from_dict(cls, d: Dict[str, any]) -> ListNodeTypesResponse:
|
|
4951
6273
|
"""Deserializes the ListNodeTypesResponse from a dictionary."""
|
|
@@ -4960,7 +6282,13 @@ class ListPoliciesResponse:
|
|
|
4960
6282
|
def as_dict(self) -> dict:
|
|
4961
6283
|
"""Serializes the ListPoliciesResponse into a dictionary suitable for use as a JSON request body."""
|
|
4962
6284
|
body = {}
|
|
4963
|
-
if self.policies: body['policies'] = [v.as_dict() for v in self.policies]
|
|
6285
|
+
if self.policies: body['policies'] = [v.as_dict() for v in self.policies]
|
|
6286
|
+
return body
|
|
6287
|
+
|
|
6288
|
+
def as_shallow_dict(self) -> dict:
|
|
6289
|
+
"""Serializes the ListPoliciesResponse into a shallow dictionary of its immediate attributes."""
|
|
6290
|
+
body = {}
|
|
6291
|
+
if self.policies: body['policies'] = self.policies
|
|
4964
6292
|
return body
|
|
4965
6293
|
|
|
4966
6294
|
@classmethod
|
|
@@ -4985,6 +6313,13 @@ class ListPolicyFamiliesResponse:
|
|
|
4985
6313
|
if self.policy_families: body['policy_families'] = [v.as_dict() for v in self.policy_families]
|
|
4986
6314
|
return body
|
|
4987
6315
|
|
|
6316
|
+
def as_shallow_dict(self) -> dict:
|
|
6317
|
+
"""Serializes the ListPolicyFamiliesResponse into a shallow dictionary of its immediate attributes."""
|
|
6318
|
+
body = {}
|
|
6319
|
+
if self.next_page_token is not None: body['next_page_token'] = self.next_page_token
|
|
6320
|
+
if self.policy_families: body['policy_families'] = self.policy_families
|
|
6321
|
+
return body
|
|
6322
|
+
|
|
4988
6323
|
@classmethod
|
|
4989
6324
|
def from_dict(cls, d: Dict[str, any]) -> ListPolicyFamiliesResponse:
|
|
4990
6325
|
"""Deserializes the ListPolicyFamiliesResponse from a dictionary."""
|
|
@@ -5016,6 +6351,12 @@ class LocalFileInfo:
|
|
|
5016
6351
|
if self.destination is not None: body['destination'] = self.destination
|
|
5017
6352
|
return body
|
|
5018
6353
|
|
|
6354
|
+
def as_shallow_dict(self) -> dict:
|
|
6355
|
+
"""Serializes the LocalFileInfo into a shallow dictionary of its immediate attributes."""
|
|
6356
|
+
body = {}
|
|
6357
|
+
if self.destination is not None: body['destination'] = self.destination
|
|
6358
|
+
return body
|
|
6359
|
+
|
|
5019
6360
|
@classmethod
|
|
5020
6361
|
def from_dict(cls, d: Dict[str, any]) -> LocalFileInfo:
|
|
5021
6362
|
"""Deserializes the LocalFileInfo from a dictionary."""
|
|
@@ -5039,6 +6380,15 @@ class LogAnalyticsInfo:
|
|
|
5039
6380
|
body['log_analytics_workspace_id'] = self.log_analytics_workspace_id
|
|
5040
6381
|
return body
|
|
5041
6382
|
|
|
6383
|
+
def as_shallow_dict(self) -> dict:
|
|
6384
|
+
"""Serializes the LogAnalyticsInfo into a shallow dictionary of its immediate attributes."""
|
|
6385
|
+
body = {}
|
|
6386
|
+
if self.log_analytics_primary_key is not None:
|
|
6387
|
+
body['log_analytics_primary_key'] = self.log_analytics_primary_key
|
|
6388
|
+
if self.log_analytics_workspace_id is not None:
|
|
6389
|
+
body['log_analytics_workspace_id'] = self.log_analytics_workspace_id
|
|
6390
|
+
return body
|
|
6391
|
+
|
|
5042
6392
|
@classmethod
|
|
5043
6393
|
def from_dict(cls, d: Dict[str, any]) -> LogAnalyticsInfo:
|
|
5044
6394
|
"""Deserializes the LogAnalyticsInfo from a dictionary."""
|
|
@@ -5063,6 +6413,13 @@ class LogSyncStatus:
|
|
|
5063
6413
|
if self.last_exception is not None: body['last_exception'] = self.last_exception
|
|
5064
6414
|
return body
|
|
5065
6415
|
|
|
6416
|
+
def as_shallow_dict(self) -> dict:
|
|
6417
|
+
"""Serializes the LogSyncStatus into a shallow dictionary of its immediate attributes."""
|
|
6418
|
+
body = {}
|
|
6419
|
+
if self.last_attempted is not None: body['last_attempted'] = self.last_attempted
|
|
6420
|
+
if self.last_exception is not None: body['last_exception'] = self.last_exception
|
|
6421
|
+
return body
|
|
6422
|
+
|
|
5066
6423
|
@classmethod
|
|
5067
6424
|
def from_dict(cls, d: Dict[str, any]) -> LogSyncStatus:
|
|
5068
6425
|
"""Deserializes the LogSyncStatus from a dictionary."""
|
|
@@ -5092,6 +6449,14 @@ class MavenLibrary:
|
|
|
5092
6449
|
if self.repo is not None: body['repo'] = self.repo
|
|
5093
6450
|
return body
|
|
5094
6451
|
|
|
6452
|
+
def as_shallow_dict(self) -> dict:
|
|
6453
|
+
"""Serializes the MavenLibrary into a shallow dictionary of its immediate attributes."""
|
|
6454
|
+
body = {}
|
|
6455
|
+
if self.coordinates is not None: body['coordinates'] = self.coordinates
|
|
6456
|
+
if self.exclusions: body['exclusions'] = self.exclusions
|
|
6457
|
+
if self.repo is not None: body['repo'] = self.repo
|
|
6458
|
+
return body
|
|
6459
|
+
|
|
5095
6460
|
@classmethod
|
|
5096
6461
|
def from_dict(cls, d: Dict[str, any]) -> MavenLibrary:
|
|
5097
6462
|
"""Deserializes the MavenLibrary from a dictionary."""
|
|
@@ -5123,6 +6488,17 @@ class NodeInstanceType:
|
|
|
5123
6488
|
if self.local_nvme_disks is not None: body['local_nvme_disks'] = self.local_nvme_disks
|
|
5124
6489
|
return body
|
|
5125
6490
|
|
|
6491
|
+
def as_shallow_dict(self) -> dict:
|
|
6492
|
+
"""Serializes the NodeInstanceType into a shallow dictionary of its immediate attributes."""
|
|
6493
|
+
body = {}
|
|
6494
|
+
if self.instance_type_id is not None: body['instance_type_id'] = self.instance_type_id
|
|
6495
|
+
if self.local_disk_size_gb is not None: body['local_disk_size_gb'] = self.local_disk_size_gb
|
|
6496
|
+
if self.local_disks is not None: body['local_disks'] = self.local_disks
|
|
6497
|
+
if self.local_nvme_disk_size_gb is not None:
|
|
6498
|
+
body['local_nvme_disk_size_gb'] = self.local_nvme_disk_size_gb
|
|
6499
|
+
if self.local_nvme_disks is not None: body['local_nvme_disks'] = self.local_nvme_disks
|
|
6500
|
+
return body
|
|
6501
|
+
|
|
5126
6502
|
@classmethod
|
|
5127
6503
|
def from_dict(cls, d: Dict[str, any]) -> NodeInstanceType:
|
|
5128
6504
|
"""Deserializes the NodeInstanceType from a dictionary."""
|
|
@@ -5217,6 +6593,34 @@ class NodeType:
|
|
|
5217
6593
|
if self.supports_elastic_disk is not None: body['supports_elastic_disk'] = self.supports_elastic_disk
|
|
5218
6594
|
return body
|
|
5219
6595
|
|
|
6596
|
+
def as_shallow_dict(self) -> dict:
|
|
6597
|
+
"""Serializes the NodeType into a shallow dictionary of its immediate attributes."""
|
|
6598
|
+
body = {}
|
|
6599
|
+
if self.category is not None: body['category'] = self.category
|
|
6600
|
+
if self.description is not None: body['description'] = self.description
|
|
6601
|
+
if self.display_order is not None: body['display_order'] = self.display_order
|
|
6602
|
+
if self.instance_type_id is not None: body['instance_type_id'] = self.instance_type_id
|
|
6603
|
+
if self.is_deprecated is not None: body['is_deprecated'] = self.is_deprecated
|
|
6604
|
+
if self.is_encrypted_in_transit is not None:
|
|
6605
|
+
body['is_encrypted_in_transit'] = self.is_encrypted_in_transit
|
|
6606
|
+
if self.is_graviton is not None: body['is_graviton'] = self.is_graviton
|
|
6607
|
+
if self.is_hidden is not None: body['is_hidden'] = self.is_hidden
|
|
6608
|
+
if self.is_io_cache_enabled is not None: body['is_io_cache_enabled'] = self.is_io_cache_enabled
|
|
6609
|
+
if self.memory_mb is not None: body['memory_mb'] = self.memory_mb
|
|
6610
|
+
if self.node_info: body['node_info'] = self.node_info
|
|
6611
|
+
if self.node_instance_type: body['node_instance_type'] = self.node_instance_type
|
|
6612
|
+
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
6613
|
+
if self.num_cores is not None: body['num_cores'] = self.num_cores
|
|
6614
|
+
if self.num_gpus is not None: body['num_gpus'] = self.num_gpus
|
|
6615
|
+
if self.photon_driver_capable is not None: body['photon_driver_capable'] = self.photon_driver_capable
|
|
6616
|
+
if self.photon_worker_capable is not None: body['photon_worker_capable'] = self.photon_worker_capable
|
|
6617
|
+
if self.support_cluster_tags is not None: body['support_cluster_tags'] = self.support_cluster_tags
|
|
6618
|
+
if self.support_ebs_volumes is not None: body['support_ebs_volumes'] = self.support_ebs_volumes
|
|
6619
|
+
if self.support_port_forwarding is not None:
|
|
6620
|
+
body['support_port_forwarding'] = self.support_port_forwarding
|
|
6621
|
+
if self.supports_elastic_disk is not None: body['supports_elastic_disk'] = self.supports_elastic_disk
|
|
6622
|
+
return body
|
|
6623
|
+
|
|
5220
6624
|
@classmethod
|
|
5221
6625
|
def from_dict(cls, d: Dict[str, any]) -> NodeType:
|
|
5222
6626
|
"""Deserializes the NodeType from a dictionary."""
|
|
@@ -5256,6 +6660,13 @@ class PendingInstanceError:
|
|
|
5256
6660
|
if self.message is not None: body['message'] = self.message
|
|
5257
6661
|
return body
|
|
5258
6662
|
|
|
6663
|
+
def as_shallow_dict(self) -> dict:
|
|
6664
|
+
"""Serializes the PendingInstanceError into a shallow dictionary of its immediate attributes."""
|
|
6665
|
+
body = {}
|
|
6666
|
+
if self.instance_id is not None: body['instance_id'] = self.instance_id
|
|
6667
|
+
if self.message is not None: body['message'] = self.message
|
|
6668
|
+
return body
|
|
6669
|
+
|
|
5259
6670
|
@classmethod
|
|
5260
6671
|
def from_dict(cls, d: Dict[str, any]) -> PendingInstanceError:
|
|
5261
6672
|
"""Deserializes the PendingInstanceError from a dictionary."""
|
|
@@ -5273,6 +6684,12 @@ class PermanentDeleteCluster:
|
|
|
5273
6684
|
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
5274
6685
|
return body
|
|
5275
6686
|
|
|
6687
|
+
def as_shallow_dict(self) -> dict:
|
|
6688
|
+
"""Serializes the PermanentDeleteCluster into a shallow dictionary of its immediate attributes."""
|
|
6689
|
+
body = {}
|
|
6690
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
6691
|
+
return body
|
|
6692
|
+
|
|
5276
6693
|
@classmethod
|
|
5277
6694
|
def from_dict(cls, d: Dict[str, any]) -> PermanentDeleteCluster:
|
|
5278
6695
|
"""Deserializes the PermanentDeleteCluster from a dictionary."""
|
|
@@ -5287,6 +6704,11 @@ class PermanentDeleteClusterResponse:
|
|
|
5287
6704
|
body = {}
|
|
5288
6705
|
return body
|
|
5289
6706
|
|
|
6707
|
+
def as_shallow_dict(self) -> dict:
|
|
6708
|
+
"""Serializes the PermanentDeleteClusterResponse into a shallow dictionary of its immediate attributes."""
|
|
6709
|
+
body = {}
|
|
6710
|
+
return body
|
|
6711
|
+
|
|
5290
6712
|
@classmethod
|
|
5291
6713
|
def from_dict(cls, d: Dict[str, any]) -> PermanentDeleteClusterResponse:
|
|
5292
6714
|
"""Deserializes the PermanentDeleteClusterResponse from a dictionary."""
|
|
@@ -5304,6 +6726,12 @@ class PinCluster:
|
|
|
5304
6726
|
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
5305
6727
|
return body
|
|
5306
6728
|
|
|
6729
|
+
def as_shallow_dict(self) -> dict:
|
|
6730
|
+
"""Serializes the PinCluster into a shallow dictionary of its immediate attributes."""
|
|
6731
|
+
body = {}
|
|
6732
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
6733
|
+
return body
|
|
6734
|
+
|
|
5307
6735
|
@classmethod
|
|
5308
6736
|
def from_dict(cls, d: Dict[str, any]) -> PinCluster:
|
|
5309
6737
|
"""Deserializes the PinCluster from a dictionary."""
|
|
@@ -5318,6 +6746,11 @@ class PinClusterResponse:
|
|
|
5318
6746
|
body = {}
|
|
5319
6747
|
return body
|
|
5320
6748
|
|
|
6749
|
+
def as_shallow_dict(self) -> dict:
|
|
6750
|
+
"""Serializes the PinClusterResponse into a shallow dictionary of its immediate attributes."""
|
|
6751
|
+
body = {}
|
|
6752
|
+
return body
|
|
6753
|
+
|
|
5321
6754
|
@classmethod
|
|
5322
6755
|
def from_dict(cls, d: Dict[str, any]) -> PinClusterResponse:
|
|
5323
6756
|
"""Deserializes the PinClusterResponse from a dictionary."""
|
|
@@ -5395,6 +6828,23 @@ class Policy:
|
|
|
5395
6828
|
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
5396
6829
|
return body
|
|
5397
6830
|
|
|
6831
|
+
def as_shallow_dict(self) -> dict:
|
|
6832
|
+
"""Serializes the Policy into a shallow dictionary of its immediate attributes."""
|
|
6833
|
+
body = {}
|
|
6834
|
+
if self.created_at_timestamp is not None: body['created_at_timestamp'] = self.created_at_timestamp
|
|
6835
|
+
if self.creator_user_name is not None: body['creator_user_name'] = self.creator_user_name
|
|
6836
|
+
if self.definition is not None: body['definition'] = self.definition
|
|
6837
|
+
if self.description is not None: body['description'] = self.description
|
|
6838
|
+
if self.is_default is not None: body['is_default'] = self.is_default
|
|
6839
|
+
if self.libraries: body['libraries'] = self.libraries
|
|
6840
|
+
if self.max_clusters_per_user is not None: body['max_clusters_per_user'] = self.max_clusters_per_user
|
|
6841
|
+
if self.name is not None: body['name'] = self.name
|
|
6842
|
+
if self.policy_family_definition_overrides is not None:
|
|
6843
|
+
body['policy_family_definition_overrides'] = self.policy_family_definition_overrides
|
|
6844
|
+
if self.policy_family_id is not None: body['policy_family_id'] = self.policy_family_id
|
|
6845
|
+
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
6846
|
+
return body
|
|
6847
|
+
|
|
5398
6848
|
@classmethod
|
|
5399
6849
|
def from_dict(cls, d: Dict[str, any]) -> Policy:
|
|
5400
6850
|
"""Deserializes the Policy from a dictionary."""
|
|
@@ -5436,6 +6886,15 @@ class PolicyFamily:
|
|
|
5436
6886
|
if self.policy_family_id is not None: body['policy_family_id'] = self.policy_family_id
|
|
5437
6887
|
return body
|
|
5438
6888
|
|
|
6889
|
+
def as_shallow_dict(self) -> dict:
|
|
6890
|
+
"""Serializes the PolicyFamily into a shallow dictionary of its immediate attributes."""
|
|
6891
|
+
body = {}
|
|
6892
|
+
if self.definition is not None: body['definition'] = self.definition
|
|
6893
|
+
if self.description is not None: body['description'] = self.description
|
|
6894
|
+
if self.name is not None: body['name'] = self.name
|
|
6895
|
+
if self.policy_family_id is not None: body['policy_family_id'] = self.policy_family_id
|
|
6896
|
+
return body
|
|
6897
|
+
|
|
5439
6898
|
@classmethod
|
|
5440
6899
|
def from_dict(cls, d: Dict[str, any]) -> PolicyFamily:
|
|
5441
6900
|
"""Deserializes the PolicyFamily from a dictionary."""
|
|
@@ -5461,6 +6920,13 @@ class PythonPyPiLibrary:
|
|
|
5461
6920
|
if self.repo is not None: body['repo'] = self.repo
|
|
5462
6921
|
return body
|
|
5463
6922
|
|
|
6923
|
+
def as_shallow_dict(self) -> dict:
|
|
6924
|
+
"""Serializes the PythonPyPiLibrary into a shallow dictionary of its immediate attributes."""
|
|
6925
|
+
body = {}
|
|
6926
|
+
if self.package is not None: body['package'] = self.package
|
|
6927
|
+
if self.repo is not None: body['repo'] = self.repo
|
|
6928
|
+
return body
|
|
6929
|
+
|
|
5464
6930
|
@classmethod
|
|
5465
6931
|
def from_dict(cls, d: Dict[str, any]) -> PythonPyPiLibrary:
|
|
5466
6932
|
"""Deserializes the PythonPyPiLibrary from a dictionary."""
|
|
@@ -5482,6 +6948,13 @@ class RCranLibrary:
|
|
|
5482
6948
|
if self.repo is not None: body['repo'] = self.repo
|
|
5483
6949
|
return body
|
|
5484
6950
|
|
|
6951
|
+
def as_shallow_dict(self) -> dict:
|
|
6952
|
+
"""Serializes the RCranLibrary into a shallow dictionary of its immediate attributes."""
|
|
6953
|
+
body = {}
|
|
6954
|
+
if self.package is not None: body['package'] = self.package
|
|
6955
|
+
if self.repo is not None: body['repo'] = self.repo
|
|
6956
|
+
return body
|
|
6957
|
+
|
|
5485
6958
|
@classmethod
|
|
5486
6959
|
def from_dict(cls, d: Dict[str, any]) -> RCranLibrary:
|
|
5487
6960
|
"""Deserializes the RCranLibrary from a dictionary."""
|
|
@@ -5499,6 +6972,12 @@ class RemoveInstanceProfile:
|
|
|
5499
6972
|
if self.instance_profile_arn is not None: body['instance_profile_arn'] = self.instance_profile_arn
|
|
5500
6973
|
return body
|
|
5501
6974
|
|
|
6975
|
+
def as_shallow_dict(self) -> dict:
|
|
6976
|
+
"""Serializes the RemoveInstanceProfile into a shallow dictionary of its immediate attributes."""
|
|
6977
|
+
body = {}
|
|
6978
|
+
if self.instance_profile_arn is not None: body['instance_profile_arn'] = self.instance_profile_arn
|
|
6979
|
+
return body
|
|
6980
|
+
|
|
5502
6981
|
@classmethod
|
|
5503
6982
|
def from_dict(cls, d: Dict[str, any]) -> RemoveInstanceProfile:
|
|
5504
6983
|
"""Deserializes the RemoveInstanceProfile from a dictionary."""
|
|
@@ -5513,6 +6992,11 @@ class RemoveResponse:
|
|
|
5513
6992
|
body = {}
|
|
5514
6993
|
return body
|
|
5515
6994
|
|
|
6995
|
+
def as_shallow_dict(self) -> dict:
|
|
6996
|
+
"""Serializes the RemoveResponse into a shallow dictionary of its immediate attributes."""
|
|
6997
|
+
body = {}
|
|
6998
|
+
return body
|
|
6999
|
+
|
|
5516
7000
|
@classmethod
|
|
5517
7001
|
def from_dict(cls, d: Dict[str, any]) -> RemoveResponse:
|
|
5518
7002
|
"""Deserializes the RemoveResponse from a dictionary."""
|
|
@@ -5546,6 +7030,14 @@ class ResizeCluster:
|
|
|
5546
7030
|
if self.num_workers is not None: body['num_workers'] = self.num_workers
|
|
5547
7031
|
return body
|
|
5548
7032
|
|
|
7033
|
+
def as_shallow_dict(self) -> dict:
|
|
7034
|
+
"""Serializes the ResizeCluster into a shallow dictionary of its immediate attributes."""
|
|
7035
|
+
body = {}
|
|
7036
|
+
if self.autoscale: body['autoscale'] = self.autoscale
|
|
7037
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
7038
|
+
if self.num_workers is not None: body['num_workers'] = self.num_workers
|
|
7039
|
+
return body
|
|
7040
|
+
|
|
5549
7041
|
@classmethod
|
|
5550
7042
|
def from_dict(cls, d: Dict[str, any]) -> ResizeCluster:
|
|
5551
7043
|
"""Deserializes the ResizeCluster from a dictionary."""
|
|
@@ -5562,6 +7054,11 @@ class ResizeClusterResponse:
|
|
|
5562
7054
|
body = {}
|
|
5563
7055
|
return body
|
|
5564
7056
|
|
|
7057
|
+
def as_shallow_dict(self) -> dict:
|
|
7058
|
+
"""Serializes the ResizeClusterResponse into a shallow dictionary of its immediate attributes."""
|
|
7059
|
+
body = {}
|
|
7060
|
+
return body
|
|
7061
|
+
|
|
5565
7062
|
@classmethod
|
|
5566
7063
|
def from_dict(cls, d: Dict[str, any]) -> ResizeClusterResponse:
|
|
5567
7064
|
"""Deserializes the ResizeClusterResponse from a dictionary."""
|
|
@@ -5583,6 +7080,13 @@ class RestartCluster:
|
|
|
5583
7080
|
if self.restart_user is not None: body['restart_user'] = self.restart_user
|
|
5584
7081
|
return body
|
|
5585
7082
|
|
|
7083
|
+
def as_shallow_dict(self) -> dict:
|
|
7084
|
+
"""Serializes the RestartCluster into a shallow dictionary of its immediate attributes."""
|
|
7085
|
+
body = {}
|
|
7086
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
7087
|
+
if self.restart_user is not None: body['restart_user'] = self.restart_user
|
|
7088
|
+
return body
|
|
7089
|
+
|
|
5586
7090
|
@classmethod
|
|
5587
7091
|
def from_dict(cls, d: Dict[str, any]) -> RestartCluster:
|
|
5588
7092
|
"""Deserializes the RestartCluster from a dictionary."""
|
|
@@ -5597,6 +7101,11 @@ class RestartClusterResponse:
|
|
|
5597
7101
|
body = {}
|
|
5598
7102
|
return body
|
|
5599
7103
|
|
|
7104
|
+
def as_shallow_dict(self) -> dict:
|
|
7105
|
+
"""Serializes the RestartClusterResponse into a shallow dictionary of its immediate attributes."""
|
|
7106
|
+
body = {}
|
|
7107
|
+
return body
|
|
7108
|
+
|
|
5600
7109
|
@classmethod
|
|
5601
7110
|
def from_dict(cls, d: Dict[str, any]) -> RestartClusterResponse:
|
|
5602
7111
|
"""Deserializes the RestartClusterResponse from a dictionary."""
|
|
@@ -5656,6 +7165,21 @@ class Results:
|
|
|
5656
7165
|
if self.truncated is not None: body['truncated'] = self.truncated
|
|
5657
7166
|
return body
|
|
5658
7167
|
|
|
7168
|
+
def as_shallow_dict(self) -> dict:
|
|
7169
|
+
"""Serializes the Results into a shallow dictionary of its immediate attributes."""
|
|
7170
|
+
body = {}
|
|
7171
|
+
if self.cause is not None: body['cause'] = self.cause
|
|
7172
|
+
if self.data: body['data'] = self.data
|
|
7173
|
+
if self.file_name is not None: body['fileName'] = self.file_name
|
|
7174
|
+
if self.file_names: body['fileNames'] = self.file_names
|
|
7175
|
+
if self.is_json_schema is not None: body['isJsonSchema'] = self.is_json_schema
|
|
7176
|
+
if self.pos is not None: body['pos'] = self.pos
|
|
7177
|
+
if self.result_type is not None: body['resultType'] = self.result_type
|
|
7178
|
+
if self.schema: body['schema'] = self.schema
|
|
7179
|
+
if self.summary is not None: body['summary'] = self.summary
|
|
7180
|
+
if self.truncated is not None: body['truncated'] = self.truncated
|
|
7181
|
+
return body
|
|
7182
|
+
|
|
5659
7183
|
@classmethod
|
|
5660
7184
|
def from_dict(cls, d: Dict[str, any]) -> Results:
|
|
5661
7185
|
"""Deserializes the Results from a dictionary."""
|
|
@@ -5732,6 +7256,18 @@ class S3StorageInfo:
|
|
|
5732
7256
|
if self.region is not None: body['region'] = self.region
|
|
5733
7257
|
return body
|
|
5734
7258
|
|
|
7259
|
+
def as_shallow_dict(self) -> dict:
|
|
7260
|
+
"""Serializes the S3StorageInfo into a shallow dictionary of its immediate attributes."""
|
|
7261
|
+
body = {}
|
|
7262
|
+
if self.canned_acl is not None: body['canned_acl'] = self.canned_acl
|
|
7263
|
+
if self.destination is not None: body['destination'] = self.destination
|
|
7264
|
+
if self.enable_encryption is not None: body['enable_encryption'] = self.enable_encryption
|
|
7265
|
+
if self.encryption_type is not None: body['encryption_type'] = self.encryption_type
|
|
7266
|
+
if self.endpoint is not None: body['endpoint'] = self.endpoint
|
|
7267
|
+
if self.kms_key is not None: body['kms_key'] = self.kms_key
|
|
7268
|
+
if self.region is not None: body['region'] = self.region
|
|
7269
|
+
return body
|
|
7270
|
+
|
|
5735
7271
|
@classmethod
|
|
5736
7272
|
def from_dict(cls, d: Dict[str, any]) -> S3StorageInfo:
|
|
5737
7273
|
"""Deserializes the S3StorageInfo from a dictionary."""
|
|
@@ -5788,6 +7324,18 @@ class SparkNode:
|
|
|
5788
7324
|
if self.start_timestamp is not None: body['start_timestamp'] = self.start_timestamp
|
|
5789
7325
|
return body
|
|
5790
7326
|
|
|
7327
|
+
def as_shallow_dict(self) -> dict:
|
|
7328
|
+
"""Serializes the SparkNode into a shallow dictionary of its immediate attributes."""
|
|
7329
|
+
body = {}
|
|
7330
|
+
if self.host_private_ip is not None: body['host_private_ip'] = self.host_private_ip
|
|
7331
|
+
if self.instance_id is not None: body['instance_id'] = self.instance_id
|
|
7332
|
+
if self.node_aws_attributes: body['node_aws_attributes'] = self.node_aws_attributes
|
|
7333
|
+
if self.node_id is not None: body['node_id'] = self.node_id
|
|
7334
|
+
if self.private_ip is not None: body['private_ip'] = self.private_ip
|
|
7335
|
+
if self.public_dns is not None: body['public_dns'] = self.public_dns
|
|
7336
|
+
if self.start_timestamp is not None: body['start_timestamp'] = self.start_timestamp
|
|
7337
|
+
return body
|
|
7338
|
+
|
|
5791
7339
|
@classmethod
|
|
5792
7340
|
def from_dict(cls, d: Dict[str, any]) -> SparkNode:
|
|
5793
7341
|
"""Deserializes the SparkNode from a dictionary."""
|
|
@@ -5811,6 +7359,12 @@ class SparkNodeAwsAttributes:
|
|
|
5811
7359
|
if self.is_spot is not None: body['is_spot'] = self.is_spot
|
|
5812
7360
|
return body
|
|
5813
7361
|
|
|
7362
|
+
def as_shallow_dict(self) -> dict:
|
|
7363
|
+
"""Serializes the SparkNodeAwsAttributes into a shallow dictionary of its immediate attributes."""
|
|
7364
|
+
body = {}
|
|
7365
|
+
if self.is_spot is not None: body['is_spot'] = self.is_spot
|
|
7366
|
+
return body
|
|
7367
|
+
|
|
5814
7368
|
@classmethod
|
|
5815
7369
|
def from_dict(cls, d: Dict[str, any]) -> SparkNodeAwsAttributes:
|
|
5816
7370
|
"""Deserializes the SparkNodeAwsAttributes from a dictionary."""
|
|
@@ -5835,6 +7389,13 @@ class SparkVersion:
|
|
|
5835
7389
|
if self.name is not None: body['name'] = self.name
|
|
5836
7390
|
return body
|
|
5837
7391
|
|
|
7392
|
+
def as_shallow_dict(self) -> dict:
|
|
7393
|
+
"""Serializes the SparkVersion into a shallow dictionary of its immediate attributes."""
|
|
7394
|
+
body = {}
|
|
7395
|
+
if self.key is not None: body['key'] = self.key
|
|
7396
|
+
if self.name is not None: body['name'] = self.name
|
|
7397
|
+
return body
|
|
7398
|
+
|
|
5838
7399
|
@classmethod
|
|
5839
7400
|
def from_dict(cls, d: Dict[str, any]) -> SparkVersion:
|
|
5840
7401
|
"""Deserializes the SparkVersion from a dictionary."""
|
|
@@ -5852,6 +7413,12 @@ class StartCluster:
|
|
|
5852
7413
|
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
5853
7414
|
return body
|
|
5854
7415
|
|
|
7416
|
+
def as_shallow_dict(self) -> dict:
|
|
7417
|
+
"""Serializes the StartCluster into a shallow dictionary of its immediate attributes."""
|
|
7418
|
+
body = {}
|
|
7419
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
7420
|
+
return body
|
|
7421
|
+
|
|
5855
7422
|
@classmethod
|
|
5856
7423
|
def from_dict(cls, d: Dict[str, any]) -> StartCluster:
|
|
5857
7424
|
"""Deserializes the StartCluster from a dictionary."""
|
|
@@ -5866,6 +7433,11 @@ class StartClusterResponse:
|
|
|
5866
7433
|
body = {}
|
|
5867
7434
|
return body
|
|
5868
7435
|
|
|
7436
|
+
def as_shallow_dict(self) -> dict:
|
|
7437
|
+
"""Serializes the StartClusterResponse into a shallow dictionary of its immediate attributes."""
|
|
7438
|
+
body = {}
|
|
7439
|
+
return body
|
|
7440
|
+
|
|
5869
7441
|
@classmethod
|
|
5870
7442
|
def from_dict(cls, d: Dict[str, any]) -> StartClusterResponse:
|
|
5871
7443
|
"""Deserializes the StartClusterResponse from a dictionary."""
|
|
@@ -5904,6 +7476,14 @@ class TerminationReason:
|
|
|
5904
7476
|
if self.type is not None: body['type'] = self.type.value
|
|
5905
7477
|
return body
|
|
5906
7478
|
|
|
7479
|
+
def as_shallow_dict(self) -> dict:
|
|
7480
|
+
"""Serializes the TerminationReason into a shallow dictionary of its immediate attributes."""
|
|
7481
|
+
body = {}
|
|
7482
|
+
if self.code is not None: body['code'] = self.code
|
|
7483
|
+
if self.parameters: body['parameters'] = self.parameters
|
|
7484
|
+
if self.type is not None: body['type'] = self.type
|
|
7485
|
+
return body
|
|
7486
|
+
|
|
5907
7487
|
@classmethod
|
|
5908
7488
|
def from_dict(cls, d: Dict[str, any]) -> TerminationReason:
|
|
5909
7489
|
"""Deserializes the TerminationReason from a dictionary."""
|
|
@@ -6020,6 +7600,13 @@ class UninstallLibraries:
|
|
|
6020
7600
|
if self.libraries: body['libraries'] = [v.as_dict() for v in self.libraries]
|
|
6021
7601
|
return body
|
|
6022
7602
|
|
|
7603
|
+
def as_shallow_dict(self) -> dict:
|
|
7604
|
+
"""Serializes the UninstallLibraries into a shallow dictionary of its immediate attributes."""
|
|
7605
|
+
body = {}
|
|
7606
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
7607
|
+
if self.libraries: body['libraries'] = self.libraries
|
|
7608
|
+
return body
|
|
7609
|
+
|
|
6023
7610
|
@classmethod
|
|
6024
7611
|
def from_dict(cls, d: Dict[str, any]) -> UninstallLibraries:
|
|
6025
7612
|
"""Deserializes the UninstallLibraries from a dictionary."""
|
|
@@ -6034,6 +7621,11 @@ class UninstallLibrariesResponse:
|
|
|
6034
7621
|
body = {}
|
|
6035
7622
|
return body
|
|
6036
7623
|
|
|
7624
|
+
def as_shallow_dict(self) -> dict:
|
|
7625
|
+
"""Serializes the UninstallLibrariesResponse into a shallow dictionary of its immediate attributes."""
|
|
7626
|
+
body = {}
|
|
7627
|
+
return body
|
|
7628
|
+
|
|
6037
7629
|
@classmethod
|
|
6038
7630
|
def from_dict(cls, d: Dict[str, any]) -> UninstallLibrariesResponse:
|
|
6039
7631
|
"""Deserializes the UninstallLibrariesResponse from a dictionary."""
|
|
@@ -6051,6 +7643,12 @@ class UnpinCluster:
|
|
|
6051
7643
|
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
6052
7644
|
return body
|
|
6053
7645
|
|
|
7646
|
+
def as_shallow_dict(self) -> dict:
|
|
7647
|
+
"""Serializes the UnpinCluster into a shallow dictionary of its immediate attributes."""
|
|
7648
|
+
body = {}
|
|
7649
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
7650
|
+
return body
|
|
7651
|
+
|
|
6054
7652
|
@classmethod
|
|
6055
7653
|
def from_dict(cls, d: Dict[str, any]) -> UnpinCluster:
|
|
6056
7654
|
"""Deserializes the UnpinCluster from a dictionary."""
|
|
@@ -6065,6 +7663,11 @@ class UnpinClusterResponse:
|
|
|
6065
7663
|
body = {}
|
|
6066
7664
|
return body
|
|
6067
7665
|
|
|
7666
|
+
def as_shallow_dict(self) -> dict:
|
|
7667
|
+
"""Serializes the UnpinClusterResponse into a shallow dictionary of its immediate attributes."""
|
|
7668
|
+
body = {}
|
|
7669
|
+
return body
|
|
7670
|
+
|
|
6068
7671
|
@classmethod
|
|
6069
7672
|
def from_dict(cls, d: Dict[str, any]) -> UnpinClusterResponse:
|
|
6070
7673
|
"""Deserializes the UnpinClusterResponse from a dictionary."""
|
|
@@ -6093,6 +7696,14 @@ class UpdateCluster:
|
|
|
6093
7696
|
if self.update_mask is not None: body['update_mask'] = self.update_mask
|
|
6094
7697
|
return body
|
|
6095
7698
|
|
|
7699
|
+
def as_shallow_dict(self) -> dict:
|
|
7700
|
+
"""Serializes the UpdateCluster into a shallow dictionary of its immediate attributes."""
|
|
7701
|
+
body = {}
|
|
7702
|
+
if self.cluster: body['cluster'] = self.cluster
|
|
7703
|
+
if self.cluster_id is not None: body['cluster_id'] = self.cluster_id
|
|
7704
|
+
if self.update_mask is not None: body['update_mask'] = self.update_mask
|
|
7705
|
+
return body
|
|
7706
|
+
|
|
6096
7707
|
@classmethod
|
|
6097
7708
|
def from_dict(cls, d: Dict[str, any]) -> UpdateCluster:
|
|
6098
7709
|
"""Deserializes the UpdateCluster from a dictionary."""
|
|
@@ -6144,13 +7755,19 @@ class UpdateClusterResource:
|
|
|
6144
7755
|
data_security_mode: Optional[DataSecurityMode] = None
|
|
6145
7756
|
"""Data security mode decides what data governance model to use when accessing data from a cluster.
|
|
6146
7757
|
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
7758
|
+
The following modes can only be used with `kind`. * `DATA_SECURITY_MODE_AUTO`: Databricks will
|
|
7759
|
+
choose the most appropriate access mode depending on your compute configuration. *
|
|
7760
|
+
`DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * `DATA_SECURITY_MODE_DEDICATED`:
|
|
7761
|
+
Alias for `SINGLE_USER`.
|
|
7762
|
+
|
|
7763
|
+
The following modes can be used regardless of `kind`. * `NONE`: No security isolation for
|
|
7764
|
+
multiple users sharing the cluster. Data governance features are not available in this mode. *
|
|
7765
|
+
`SINGLE_USER`: A secure cluster that can only be exclusively used by a single user specified in
|
|
7766
|
+
`single_user_name`. Most programming languages, cluster features and data governance features
|
|
7767
|
+
are available in this mode. * `USER_ISOLATION`: A secure cluster that can be shared by multiple
|
|
7768
|
+
users. Cluster users are fully isolated so that they cannot see each other's data and
|
|
7769
|
+
credentials. Most data governance features are supported in this mode. But programming languages
|
|
7770
|
+
and cluster features might be limited.
|
|
6154
7771
|
|
|
6155
7772
|
The following modes are deprecated starting with Databricks Runtime 15.0 and will be removed for
|
|
6156
7773
|
future Databricks Runtime versions:
|
|
@@ -6191,6 +7808,20 @@ class UpdateClusterResource:
|
|
|
6191
7808
|
instance_pool_id: Optional[str] = None
|
|
6192
7809
|
"""The optional ID of the instance pool to which the cluster belongs."""
|
|
6193
7810
|
|
|
7811
|
+
is_single_node: Optional[bool] = None
|
|
7812
|
+
"""This field can only be used with `kind`.
|
|
7813
|
+
|
|
7814
|
+
When set to true, Databricks will automatically set single node related `custom_tags`,
|
|
7815
|
+
`spark_conf`, and `num_workers`"""
|
|
7816
|
+
|
|
7817
|
+
kind: Optional[Kind] = None
|
|
7818
|
+
"""The kind of compute described by this compute specification.
|
|
7819
|
+
|
|
7820
|
+
Depending on `kind`, different validations and default values will be applied.
|
|
7821
|
+
|
|
7822
|
+
The first usage of this value is for the simple cluster form where it sets `kind =
|
|
7823
|
+
CLASSIC_PREVIEW`."""
|
|
7824
|
+
|
|
6194
7825
|
node_type_id: Optional[str] = None
|
|
6195
7826
|
"""This field encodes, through a single value, the resources available to each of the Spark nodes
|
|
6196
7827
|
in this cluster. For example, the Spark nodes can be provisioned and optimized for memory or
|
|
@@ -6249,6 +7880,12 @@ class UpdateClusterResource:
|
|
|
6249
7880
|
private keys can be used to login with the user name `ubuntu` on port `2200`. Up to 10 keys can
|
|
6250
7881
|
be specified."""
|
|
6251
7882
|
|
|
7883
|
+
use_ml_runtime: Optional[bool] = None
|
|
7884
|
+
"""This field can only be used with `kind`.
|
|
7885
|
+
|
|
7886
|
+
`effective_spark_version` is determined by `spark_version` (DBR release), this field
|
|
7887
|
+
`use_ml_runtime`, and whether `node_type_id` is gpu node or not."""
|
|
7888
|
+
|
|
6252
7889
|
workload_type: Optional[WorkloadType] = None
|
|
6253
7890
|
|
|
6254
7891
|
def as_dict(self) -> dict:
|
|
@@ -6273,6 +7910,8 @@ class UpdateClusterResource:
|
|
|
6273
7910
|
if self.gcp_attributes: body['gcp_attributes'] = self.gcp_attributes.as_dict()
|
|
6274
7911
|
if self.init_scripts: body['init_scripts'] = [v.as_dict() for v in self.init_scripts]
|
|
6275
7912
|
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
7913
|
+
if self.is_single_node is not None: body['is_single_node'] = self.is_single_node
|
|
7914
|
+
if self.kind is not None: body['kind'] = self.kind.value
|
|
6276
7915
|
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
6277
7916
|
if self.num_workers is not None: body['num_workers'] = self.num_workers
|
|
6278
7917
|
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
@@ -6282,9 +7921,47 @@ class UpdateClusterResource:
|
|
|
6282
7921
|
if self.spark_env_vars: body['spark_env_vars'] = self.spark_env_vars
|
|
6283
7922
|
if self.spark_version is not None: body['spark_version'] = self.spark_version
|
|
6284
7923
|
if self.ssh_public_keys: body['ssh_public_keys'] = [v for v in self.ssh_public_keys]
|
|
7924
|
+
if self.use_ml_runtime is not None: body['use_ml_runtime'] = self.use_ml_runtime
|
|
6285
7925
|
if self.workload_type: body['workload_type'] = self.workload_type.as_dict()
|
|
6286
7926
|
return body
|
|
6287
7927
|
|
|
7928
|
+
def as_shallow_dict(self) -> dict:
|
|
7929
|
+
"""Serializes the UpdateClusterResource into a shallow dictionary of its immediate attributes."""
|
|
7930
|
+
body = {}
|
|
7931
|
+
if self.autoscale: body['autoscale'] = self.autoscale
|
|
7932
|
+
if self.autotermination_minutes is not None:
|
|
7933
|
+
body['autotermination_minutes'] = self.autotermination_minutes
|
|
7934
|
+
if self.aws_attributes: body['aws_attributes'] = self.aws_attributes
|
|
7935
|
+
if self.azure_attributes: body['azure_attributes'] = self.azure_attributes
|
|
7936
|
+
if self.cluster_log_conf: body['cluster_log_conf'] = self.cluster_log_conf
|
|
7937
|
+
if self.cluster_name is not None: body['cluster_name'] = self.cluster_name
|
|
7938
|
+
if self.custom_tags: body['custom_tags'] = self.custom_tags
|
|
7939
|
+
if self.data_security_mode is not None: body['data_security_mode'] = self.data_security_mode
|
|
7940
|
+
if self.docker_image: body['docker_image'] = self.docker_image
|
|
7941
|
+
if self.driver_instance_pool_id is not None:
|
|
7942
|
+
body['driver_instance_pool_id'] = self.driver_instance_pool_id
|
|
7943
|
+
if self.driver_node_type_id is not None: body['driver_node_type_id'] = self.driver_node_type_id
|
|
7944
|
+
if self.enable_elastic_disk is not None: body['enable_elastic_disk'] = self.enable_elastic_disk
|
|
7945
|
+
if self.enable_local_disk_encryption is not None:
|
|
7946
|
+
body['enable_local_disk_encryption'] = self.enable_local_disk_encryption
|
|
7947
|
+
if self.gcp_attributes: body['gcp_attributes'] = self.gcp_attributes
|
|
7948
|
+
if self.init_scripts: body['init_scripts'] = self.init_scripts
|
|
7949
|
+
if self.instance_pool_id is not None: body['instance_pool_id'] = self.instance_pool_id
|
|
7950
|
+
if self.is_single_node is not None: body['is_single_node'] = self.is_single_node
|
|
7951
|
+
if self.kind is not None: body['kind'] = self.kind
|
|
7952
|
+
if self.node_type_id is not None: body['node_type_id'] = self.node_type_id
|
|
7953
|
+
if self.num_workers is not None: body['num_workers'] = self.num_workers
|
|
7954
|
+
if self.policy_id is not None: body['policy_id'] = self.policy_id
|
|
7955
|
+
if self.runtime_engine is not None: body['runtime_engine'] = self.runtime_engine
|
|
7956
|
+
if self.single_user_name is not None: body['single_user_name'] = self.single_user_name
|
|
7957
|
+
if self.spark_conf: body['spark_conf'] = self.spark_conf
|
|
7958
|
+
if self.spark_env_vars: body['spark_env_vars'] = self.spark_env_vars
|
|
7959
|
+
if self.spark_version is not None: body['spark_version'] = self.spark_version
|
|
7960
|
+
if self.ssh_public_keys: body['ssh_public_keys'] = self.ssh_public_keys
|
|
7961
|
+
if self.use_ml_runtime is not None: body['use_ml_runtime'] = self.use_ml_runtime
|
|
7962
|
+
if self.workload_type: body['workload_type'] = self.workload_type
|
|
7963
|
+
return body
|
|
7964
|
+
|
|
6288
7965
|
@classmethod
|
|
6289
7966
|
def from_dict(cls, d: Dict[str, any]) -> UpdateClusterResource:
|
|
6290
7967
|
"""Deserializes the UpdateClusterResource from a dictionary."""
|
|
@@ -6304,6 +7981,8 @@ class UpdateClusterResource:
|
|
|
6304
7981
|
gcp_attributes=_from_dict(d, 'gcp_attributes', GcpAttributes),
|
|
6305
7982
|
init_scripts=_repeated_dict(d, 'init_scripts', InitScriptInfo),
|
|
6306
7983
|
instance_pool_id=d.get('instance_pool_id', None),
|
|
7984
|
+
is_single_node=d.get('is_single_node', None),
|
|
7985
|
+
kind=_enum(d, 'kind', Kind),
|
|
6307
7986
|
node_type_id=d.get('node_type_id', None),
|
|
6308
7987
|
num_workers=d.get('num_workers', None),
|
|
6309
7988
|
policy_id=d.get('policy_id', None),
|
|
@@ -6313,6 +7992,7 @@ class UpdateClusterResource:
|
|
|
6313
7992
|
spark_env_vars=d.get('spark_env_vars', None),
|
|
6314
7993
|
spark_version=d.get('spark_version', None),
|
|
6315
7994
|
ssh_public_keys=d.get('ssh_public_keys', None),
|
|
7995
|
+
use_ml_runtime=d.get('use_ml_runtime', None),
|
|
6316
7996
|
workload_type=_from_dict(d, 'workload_type', WorkloadType))
|
|
6317
7997
|
|
|
6318
7998
|
|
|
@@ -6324,6 +8004,11 @@ class UpdateClusterResponse:
|
|
|
6324
8004
|
body = {}
|
|
6325
8005
|
return body
|
|
6326
8006
|
|
|
8007
|
+
def as_shallow_dict(self) -> dict:
|
|
8008
|
+
"""Serializes the UpdateClusterResponse into a shallow dictionary of its immediate attributes."""
|
|
8009
|
+
body = {}
|
|
8010
|
+
return body
|
|
8011
|
+
|
|
6327
8012
|
@classmethod
|
|
6328
8013
|
def from_dict(cls, d: Dict[str, any]) -> UpdateClusterResponse:
|
|
6329
8014
|
"""Deserializes the UpdateClusterResponse from a dictionary."""
|
|
@@ -6338,6 +8023,11 @@ class UpdateResponse:
|
|
|
6338
8023
|
body = {}
|
|
6339
8024
|
return body
|
|
6340
8025
|
|
|
8026
|
+
def as_shallow_dict(self) -> dict:
|
|
8027
|
+
"""Serializes the UpdateResponse into a shallow dictionary of its immediate attributes."""
|
|
8028
|
+
body = {}
|
|
8029
|
+
return body
|
|
8030
|
+
|
|
6341
8031
|
@classmethod
|
|
6342
8032
|
def from_dict(cls, d: Dict[str, any]) -> UpdateResponse:
|
|
6343
8033
|
"""Deserializes the UpdateResponse from a dictionary."""
|
|
@@ -6355,6 +8045,12 @@ class VolumesStorageInfo:
|
|
|
6355
8045
|
if self.destination is not None: body['destination'] = self.destination
|
|
6356
8046
|
return body
|
|
6357
8047
|
|
|
8048
|
+
def as_shallow_dict(self) -> dict:
|
|
8049
|
+
"""Serializes the VolumesStorageInfo into a shallow dictionary of its immediate attributes."""
|
|
8050
|
+
body = {}
|
|
8051
|
+
if self.destination is not None: body['destination'] = self.destination
|
|
8052
|
+
return body
|
|
8053
|
+
|
|
6358
8054
|
@classmethod
|
|
6359
8055
|
def from_dict(cls, d: Dict[str, any]) -> VolumesStorageInfo:
|
|
6360
8056
|
"""Deserializes the VolumesStorageInfo from a dictionary."""
|
|
@@ -6372,6 +8068,12 @@ class WorkloadType:
|
|
|
6372
8068
|
if self.clients: body['clients'] = self.clients.as_dict()
|
|
6373
8069
|
return body
|
|
6374
8070
|
|
|
8071
|
+
def as_shallow_dict(self) -> dict:
|
|
8072
|
+
"""Serializes the WorkloadType into a shallow dictionary of its immediate attributes."""
|
|
8073
|
+
body = {}
|
|
8074
|
+
if self.clients: body['clients'] = self.clients
|
|
8075
|
+
return body
|
|
8076
|
+
|
|
6375
8077
|
@classmethod
|
|
6376
8078
|
def from_dict(cls, d: Dict[str, any]) -> WorkloadType:
|
|
6377
8079
|
"""Deserializes the WorkloadType from a dictionary."""
|
|
@@ -6389,6 +8091,12 @@ class WorkspaceStorageInfo:
|
|
|
6389
8091
|
if self.destination is not None: body['destination'] = self.destination
|
|
6390
8092
|
return body
|
|
6391
8093
|
|
|
8094
|
+
def as_shallow_dict(self) -> dict:
|
|
8095
|
+
"""Serializes the WorkspaceStorageInfo into a shallow dictionary of its immediate attributes."""
|
|
8096
|
+
body = {}
|
|
8097
|
+
if self.destination is not None: body['destination'] = self.destination
|
|
8098
|
+
return body
|
|
8099
|
+
|
|
6392
8100
|
@classmethod
|
|
6393
8101
|
def from_dict(cls, d: Dict[str, any]) -> WorkspaceStorageInfo:
|
|
6394
8102
|
"""Deserializes the WorkspaceStorageInfo from a dictionary."""
|
|
@@ -6823,6 +8531,8 @@ class ClustersAPI:
|
|
|
6823
8531
|
gcp_attributes: Optional[GcpAttributes] = None,
|
|
6824
8532
|
init_scripts: Optional[List[InitScriptInfo]] = None,
|
|
6825
8533
|
instance_pool_id: Optional[str] = None,
|
|
8534
|
+
is_single_node: Optional[bool] = None,
|
|
8535
|
+
kind: Optional[Kind] = None,
|
|
6826
8536
|
node_type_id: Optional[str] = None,
|
|
6827
8537
|
num_workers: Optional[int] = None,
|
|
6828
8538
|
policy_id: Optional[str] = None,
|
|
@@ -6831,6 +8541,7 @@ class ClustersAPI:
|
|
|
6831
8541
|
spark_conf: Optional[Dict[str, str]] = None,
|
|
6832
8542
|
spark_env_vars: Optional[Dict[str, str]] = None,
|
|
6833
8543
|
ssh_public_keys: Optional[List[str]] = None,
|
|
8544
|
+
use_ml_runtime: Optional[bool] = None,
|
|
6834
8545
|
workload_type: Optional[WorkloadType] = None) -> Wait[ClusterDetails]:
|
|
6835
8546
|
"""Create new cluster.
|
|
6836
8547
|
|
|
@@ -6886,13 +8597,19 @@ class ClustersAPI:
|
|
|
6886
8597
|
:param data_security_mode: :class:`DataSecurityMode` (optional)
|
|
6887
8598
|
Data security mode decides what data governance model to use when accessing data from a cluster.
|
|
6888
8599
|
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
8600
|
+
The following modes can only be used with `kind`. * `DATA_SECURITY_MODE_AUTO`: Databricks will
|
|
8601
|
+
choose the most appropriate access mode depending on your compute configuration. *
|
|
8602
|
+
`DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * `DATA_SECURITY_MODE_DEDICATED`: Alias
|
|
8603
|
+
for `SINGLE_USER`.
|
|
8604
|
+
|
|
8605
|
+
The following modes can be used regardless of `kind`. * `NONE`: No security isolation for multiple
|
|
8606
|
+
users sharing the cluster. Data governance features are not available in this mode. * `SINGLE_USER`:
|
|
8607
|
+
A secure cluster that can only be exclusively used by a single user specified in `single_user_name`.
|
|
8608
|
+
Most programming languages, cluster features and data governance features are available in this
|
|
8609
|
+
mode. * `USER_ISOLATION`: A secure cluster that can be shared by multiple users. Cluster users are
|
|
8610
|
+
fully isolated so that they cannot see each other's data and credentials. Most data governance
|
|
8611
|
+
features are supported in this mode. But programming languages and cluster features might be
|
|
8612
|
+
limited.
|
|
6896
8613
|
|
|
6897
8614
|
The following modes are deprecated starting with Databricks Runtime 15.0 and will be removed for
|
|
6898
8615
|
future Databricks Runtime versions:
|
|
@@ -6924,6 +8641,17 @@ class ClustersAPI:
|
|
|
6924
8641
|
logs are sent to `<destination>/<cluster-ID>/init_scripts`.
|
|
6925
8642
|
:param instance_pool_id: str (optional)
|
|
6926
8643
|
The optional ID of the instance pool to which the cluster belongs.
|
|
8644
|
+
:param is_single_node: bool (optional)
|
|
8645
|
+
This field can only be used with `kind`.
|
|
8646
|
+
|
|
8647
|
+
When set to true, Databricks will automatically set single node related `custom_tags`, `spark_conf`,
|
|
8648
|
+
and `num_workers`
|
|
8649
|
+
:param kind: :class:`Kind` (optional)
|
|
8650
|
+
The kind of compute described by this compute specification.
|
|
8651
|
+
|
|
8652
|
+
Depending on `kind`, different validations and default values will be applied.
|
|
8653
|
+
|
|
8654
|
+
The first usage of this value is for the simple cluster form where it sets `kind = CLASSIC_PREVIEW`.
|
|
6927
8655
|
:param node_type_id: str (optional)
|
|
6928
8656
|
This field encodes, through a single value, the resources available to each of the Spark nodes in
|
|
6929
8657
|
this cluster. For example, the Spark nodes can be provisioned and optimized for memory or compute
|
|
@@ -6970,6 +8698,11 @@ class ClustersAPI:
|
|
|
6970
8698
|
SSH public key contents that will be added to each Spark node in this cluster. The corresponding
|
|
6971
8699
|
private keys can be used to login with the user name `ubuntu` on port `2200`. Up to 10 keys can be
|
|
6972
8700
|
specified.
|
|
8701
|
+
:param use_ml_runtime: bool (optional)
|
|
8702
|
+
This field can only be used with `kind`.
|
|
8703
|
+
|
|
8704
|
+
`effective_spark_version` is determined by `spark_version` (DBR release), this field
|
|
8705
|
+
`use_ml_runtime`, and whether `node_type_id` is gpu node or not.
|
|
6973
8706
|
:param workload_type: :class:`WorkloadType` (optional)
|
|
6974
8707
|
|
|
6975
8708
|
:returns:
|
|
@@ -6997,6 +8730,8 @@ class ClustersAPI:
|
|
|
6997
8730
|
if gcp_attributes is not None: body['gcp_attributes'] = gcp_attributes.as_dict()
|
|
6998
8731
|
if init_scripts is not None: body['init_scripts'] = [v.as_dict() for v in init_scripts]
|
|
6999
8732
|
if instance_pool_id is not None: body['instance_pool_id'] = instance_pool_id
|
|
8733
|
+
if is_single_node is not None: body['is_single_node'] = is_single_node
|
|
8734
|
+
if kind is not None: body['kind'] = kind.value
|
|
7000
8735
|
if node_type_id is not None: body['node_type_id'] = node_type_id
|
|
7001
8736
|
if num_workers is not None: body['num_workers'] = num_workers
|
|
7002
8737
|
if policy_id is not None: body['policy_id'] = policy_id
|
|
@@ -7006,6 +8741,7 @@ class ClustersAPI:
|
|
|
7006
8741
|
if spark_env_vars is not None: body['spark_env_vars'] = spark_env_vars
|
|
7007
8742
|
if spark_version is not None: body['spark_version'] = spark_version
|
|
7008
8743
|
if ssh_public_keys is not None: body['ssh_public_keys'] = [v for v in ssh_public_keys]
|
|
8744
|
+
if use_ml_runtime is not None: body['use_ml_runtime'] = use_ml_runtime
|
|
7009
8745
|
if workload_type is not None: body['workload_type'] = workload_type.as_dict()
|
|
7010
8746
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
7011
8747
|
|
|
@@ -7036,6 +8772,8 @@ class ClustersAPI:
|
|
|
7036
8772
|
gcp_attributes: Optional[GcpAttributes] = None,
|
|
7037
8773
|
init_scripts: Optional[List[InitScriptInfo]] = None,
|
|
7038
8774
|
instance_pool_id: Optional[str] = None,
|
|
8775
|
+
is_single_node: Optional[bool] = None,
|
|
8776
|
+
kind: Optional[Kind] = None,
|
|
7039
8777
|
node_type_id: Optional[str] = None,
|
|
7040
8778
|
num_workers: Optional[int] = None,
|
|
7041
8779
|
policy_id: Optional[str] = None,
|
|
@@ -7044,6 +8782,7 @@ class ClustersAPI:
|
|
|
7044
8782
|
spark_conf: Optional[Dict[str, str]] = None,
|
|
7045
8783
|
spark_env_vars: Optional[Dict[str, str]] = None,
|
|
7046
8784
|
ssh_public_keys: Optional[List[str]] = None,
|
|
8785
|
+
use_ml_runtime: Optional[bool] = None,
|
|
7047
8786
|
workload_type: Optional[WorkloadType] = None,
|
|
7048
8787
|
timeout=timedelta(minutes=20)) -> ClusterDetails:
|
|
7049
8788
|
return self.create(apply_policy_default_values=apply_policy_default_values,
|
|
@@ -7064,6 +8803,8 @@ class ClustersAPI:
|
|
|
7064
8803
|
gcp_attributes=gcp_attributes,
|
|
7065
8804
|
init_scripts=init_scripts,
|
|
7066
8805
|
instance_pool_id=instance_pool_id,
|
|
8806
|
+
is_single_node=is_single_node,
|
|
8807
|
+
kind=kind,
|
|
7067
8808
|
node_type_id=node_type_id,
|
|
7068
8809
|
num_workers=num_workers,
|
|
7069
8810
|
policy_id=policy_id,
|
|
@@ -7073,6 +8814,7 @@ class ClustersAPI:
|
|
|
7073
8814
|
spark_env_vars=spark_env_vars,
|
|
7074
8815
|
spark_version=spark_version,
|
|
7075
8816
|
ssh_public_keys=ssh_public_keys,
|
|
8817
|
+
use_ml_runtime=use_ml_runtime,
|
|
7076
8818
|
workload_type=workload_type).result(timeout=timeout)
|
|
7077
8819
|
|
|
7078
8820
|
def delete(self, cluster_id: str) -> Wait[ClusterDetails]:
|
|
@@ -7122,6 +8864,8 @@ class ClustersAPI:
|
|
|
7122
8864
|
gcp_attributes: Optional[GcpAttributes] = None,
|
|
7123
8865
|
init_scripts: Optional[List[InitScriptInfo]] = None,
|
|
7124
8866
|
instance_pool_id: Optional[str] = None,
|
|
8867
|
+
is_single_node: Optional[bool] = None,
|
|
8868
|
+
kind: Optional[Kind] = None,
|
|
7125
8869
|
node_type_id: Optional[str] = None,
|
|
7126
8870
|
num_workers: Optional[int] = None,
|
|
7127
8871
|
policy_id: Optional[str] = None,
|
|
@@ -7130,6 +8874,7 @@ class ClustersAPI:
|
|
|
7130
8874
|
spark_conf: Optional[Dict[str, str]] = None,
|
|
7131
8875
|
spark_env_vars: Optional[Dict[str, str]] = None,
|
|
7132
8876
|
ssh_public_keys: Optional[List[str]] = None,
|
|
8877
|
+
use_ml_runtime: Optional[bool] = None,
|
|
7133
8878
|
workload_type: Optional[WorkloadType] = None) -> Wait[ClusterDetails]:
|
|
7134
8879
|
"""Update cluster configuration.
|
|
7135
8880
|
|
|
@@ -7185,13 +8930,19 @@ class ClustersAPI:
|
|
|
7185
8930
|
:param data_security_mode: :class:`DataSecurityMode` (optional)
|
|
7186
8931
|
Data security mode decides what data governance model to use when accessing data from a cluster.
|
|
7187
8932
|
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
8933
|
+
The following modes can only be used with `kind`. * `DATA_SECURITY_MODE_AUTO`: Databricks will
|
|
8934
|
+
choose the most appropriate access mode depending on your compute configuration. *
|
|
8935
|
+
`DATA_SECURITY_MODE_STANDARD`: Alias for `USER_ISOLATION`. * `DATA_SECURITY_MODE_DEDICATED`: Alias
|
|
8936
|
+
for `SINGLE_USER`.
|
|
8937
|
+
|
|
8938
|
+
The following modes can be used regardless of `kind`. * `NONE`: No security isolation for multiple
|
|
8939
|
+
users sharing the cluster. Data governance features are not available in this mode. * `SINGLE_USER`:
|
|
8940
|
+
A secure cluster that can only be exclusively used by a single user specified in `single_user_name`.
|
|
8941
|
+
Most programming languages, cluster features and data governance features are available in this
|
|
8942
|
+
mode. * `USER_ISOLATION`: A secure cluster that can be shared by multiple users. Cluster users are
|
|
8943
|
+
fully isolated so that they cannot see each other's data and credentials. Most data governance
|
|
8944
|
+
features are supported in this mode. But programming languages and cluster features might be
|
|
8945
|
+
limited.
|
|
7195
8946
|
|
|
7196
8947
|
The following modes are deprecated starting with Databricks Runtime 15.0 and will be removed for
|
|
7197
8948
|
future Databricks Runtime versions:
|
|
@@ -7223,6 +8974,17 @@ class ClustersAPI:
|
|
|
7223
8974
|
logs are sent to `<destination>/<cluster-ID>/init_scripts`.
|
|
7224
8975
|
:param instance_pool_id: str (optional)
|
|
7225
8976
|
The optional ID of the instance pool to which the cluster belongs.
|
|
8977
|
+
:param is_single_node: bool (optional)
|
|
8978
|
+
This field can only be used with `kind`.
|
|
8979
|
+
|
|
8980
|
+
When set to true, Databricks will automatically set single node related `custom_tags`, `spark_conf`,
|
|
8981
|
+
and `num_workers`
|
|
8982
|
+
:param kind: :class:`Kind` (optional)
|
|
8983
|
+
The kind of compute described by this compute specification.
|
|
8984
|
+
|
|
8985
|
+
Depending on `kind`, different validations and default values will be applied.
|
|
8986
|
+
|
|
8987
|
+
The first usage of this value is for the simple cluster form where it sets `kind = CLASSIC_PREVIEW`.
|
|
7226
8988
|
:param node_type_id: str (optional)
|
|
7227
8989
|
This field encodes, through a single value, the resources available to each of the Spark nodes in
|
|
7228
8990
|
this cluster. For example, the Spark nodes can be provisioned and optimized for memory or compute
|
|
@@ -7269,6 +9031,11 @@ class ClustersAPI:
|
|
|
7269
9031
|
SSH public key contents that will be added to each Spark node in this cluster. The corresponding
|
|
7270
9032
|
private keys can be used to login with the user name `ubuntu` on port `2200`. Up to 10 keys can be
|
|
7271
9033
|
specified.
|
|
9034
|
+
:param use_ml_runtime: bool (optional)
|
|
9035
|
+
This field can only be used with `kind`.
|
|
9036
|
+
|
|
9037
|
+
`effective_spark_version` is determined by `spark_version` (DBR release), this field
|
|
9038
|
+
`use_ml_runtime`, and whether `node_type_id` is gpu node or not.
|
|
7272
9039
|
:param workload_type: :class:`WorkloadType` (optional)
|
|
7273
9040
|
|
|
7274
9041
|
:returns:
|
|
@@ -7296,6 +9063,8 @@ class ClustersAPI:
|
|
|
7296
9063
|
if gcp_attributes is not None: body['gcp_attributes'] = gcp_attributes.as_dict()
|
|
7297
9064
|
if init_scripts is not None: body['init_scripts'] = [v.as_dict() for v in init_scripts]
|
|
7298
9065
|
if instance_pool_id is not None: body['instance_pool_id'] = instance_pool_id
|
|
9066
|
+
if is_single_node is not None: body['is_single_node'] = is_single_node
|
|
9067
|
+
if kind is not None: body['kind'] = kind.value
|
|
7299
9068
|
if node_type_id is not None: body['node_type_id'] = node_type_id
|
|
7300
9069
|
if num_workers is not None: body['num_workers'] = num_workers
|
|
7301
9070
|
if policy_id is not None: body['policy_id'] = policy_id
|
|
@@ -7305,6 +9074,7 @@ class ClustersAPI:
|
|
|
7305
9074
|
if spark_env_vars is not None: body['spark_env_vars'] = spark_env_vars
|
|
7306
9075
|
if spark_version is not None: body['spark_version'] = spark_version
|
|
7307
9076
|
if ssh_public_keys is not None: body['ssh_public_keys'] = [v for v in ssh_public_keys]
|
|
9077
|
+
if use_ml_runtime is not None: body['use_ml_runtime'] = use_ml_runtime
|
|
7308
9078
|
if workload_type is not None: body['workload_type'] = workload_type.as_dict()
|
|
7309
9079
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
7310
9080
|
|
|
@@ -7335,6 +9105,8 @@ class ClustersAPI:
|
|
|
7335
9105
|
gcp_attributes: Optional[GcpAttributes] = None,
|
|
7336
9106
|
init_scripts: Optional[List[InitScriptInfo]] = None,
|
|
7337
9107
|
instance_pool_id: Optional[str] = None,
|
|
9108
|
+
is_single_node: Optional[bool] = None,
|
|
9109
|
+
kind: Optional[Kind] = None,
|
|
7338
9110
|
node_type_id: Optional[str] = None,
|
|
7339
9111
|
num_workers: Optional[int] = None,
|
|
7340
9112
|
policy_id: Optional[str] = None,
|
|
@@ -7343,6 +9115,7 @@ class ClustersAPI:
|
|
|
7343
9115
|
spark_conf: Optional[Dict[str, str]] = None,
|
|
7344
9116
|
spark_env_vars: Optional[Dict[str, str]] = None,
|
|
7345
9117
|
ssh_public_keys: Optional[List[str]] = None,
|
|
9118
|
+
use_ml_runtime: Optional[bool] = None,
|
|
7346
9119
|
workload_type: Optional[WorkloadType] = None,
|
|
7347
9120
|
timeout=timedelta(minutes=20)) -> ClusterDetails:
|
|
7348
9121
|
return self.edit(apply_policy_default_values=apply_policy_default_values,
|
|
@@ -7363,6 +9136,8 @@ class ClustersAPI:
|
|
|
7363
9136
|
gcp_attributes=gcp_attributes,
|
|
7364
9137
|
init_scripts=init_scripts,
|
|
7365
9138
|
instance_pool_id=instance_pool_id,
|
|
9139
|
+
is_single_node=is_single_node,
|
|
9140
|
+
kind=kind,
|
|
7366
9141
|
node_type_id=node_type_id,
|
|
7367
9142
|
num_workers=num_workers,
|
|
7368
9143
|
policy_id=policy_id,
|
|
@@ -7372,6 +9147,7 @@ class ClustersAPI:
|
|
|
7372
9147
|
spark_env_vars=spark_env_vars,
|
|
7373
9148
|
spark_version=spark_version,
|
|
7374
9149
|
ssh_public_keys=ssh_public_keys,
|
|
9150
|
+
use_ml_runtime=use_ml_runtime,
|
|
7375
9151
|
workload_type=workload_type).result(timeout=timeout)
|
|
7376
9152
|
|
|
7377
9153
|
def events(self,
|