-
Notifications
You must be signed in to change notification settings - Fork 37
/
model.go
executable file
·3302 lines (2828 loc) · 147 KB
/
model.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
package compute
import "fmt"
// all definitions in this file are in alphabetical order
type AddInstanceProfile struct {
// The AWS IAM role ARN of the role associated with the instance profile.
// This field is required if your role name and instance profile name do not
// match and you want to use the instance profile with [Databricks SQL
// Serverless].
//
// Otherwise, this field is optional.
//
// [Databricks SQL Serverless]: https://docs.databricks.com/sql/admin/serverless.html
IamRoleArn string `json:"iam_role_arn,omitempty"`
// The AWS ARN of the instance profile to register with Databricks. This
// field is required.
InstanceProfileArn string `json:"instance_profile_arn"`
// By default, Databricks validates that it has sufficient permissions to
// launch instances with the instance profile. This validation uses AWS
// dry-run mode for the RunInstances API. If validation fails with an error
// message that does not indicate an IAM related permission issue, (e.g.
// `Your requested instance type is not supported in your requested
// availability zone`), you can pass this flag to skip the validation and
// forcibly add the instance profile.
IsMetaInstanceProfile bool `json:"is_meta_instance_profile,omitempty"`
// By default, Databricks validates that it has sufficient permissions to
// launch instances with the instance profile. This validation uses AWS
// dry-run mode for the RunInstances API. If validation fails with an error
// message that does not indicate an IAM related permission issue, (e.g.
// “Your requested instance type is not supported in your requested
// availability zone”), you can pass this flag to skip the validation and
// forcibly add the instance profile.
SkipValidation bool `json:"skip_validation,omitempty"`
}
type AutoScale struct {
// The maximum number of workers to which the cluster can scale up when
// overloaded. Note that `max_workers` must be strictly greater than
// `min_workers`.
MaxWorkers int `json:"max_workers"`
// The minimum number of workers to which the cluster can scale down when
// underutilized. It is also the initial number of workers the cluster will
// have after creation.
MinWorkers int `json:"min_workers"`
}
type AwsAttributes struct {
// Availability type used for all subsequent nodes past the
// `first_on_demand` ones.
//
// Note: If `first_on_demand` is zero, this availability type will be used
// for the entire cluster.
Availability AwsAvailability `json:"availability,omitempty"`
// The number of volumes launched for each instance. Users can choose up to
// 10 volumes. This feature is only enabled for supported node types. Legacy
// node types cannot specify custom EBS volumes. For node types with no
// instance store, at least one EBS volume needs to be specified; otherwise,
// cluster creation will fail.
//
// These EBS volumes will be mounted at `/ebs0`, `/ebs1`, and etc. Instance
// store volumes will be mounted at `/local_disk0`, `/local_disk1`, and etc.
//
// If EBS volumes are attached, Databricks will configure Spark to use only
// the EBS volumes for scratch storage because heterogenously sized scratch
// devices can lead to inefficient disk utilization. If no EBS volumes are
// attached, Databricks will configure Spark to use instance store volumes.
//
// Please note that if EBS volumes are specified, then the Spark
// configuration `spark.local.dir` will be overridden.
EbsVolumeCount int `json:"ebs_volume_count,omitempty"`
// <needs content added>
EbsVolumeIops int `json:"ebs_volume_iops,omitempty"`
// The size of each EBS volume (in GiB) launched for each instance. For
// general purpose SSD, this value must be within the range 100 - 4096. For
// throughput optimized HDD, this value must be within the range 500 - 4096.
EbsVolumeSize int `json:"ebs_volume_size,omitempty"`
// <needs content added>
EbsVolumeThroughput int `json:"ebs_volume_throughput,omitempty"`
// The type of EBS volumes that will be launched with this cluster.
EbsVolumeType EbsVolumeType `json:"ebs_volume_type,omitempty"`
// The first `first_on_demand` nodes of the cluster will be placed on
// on-demand instances. If this value is greater than 0, the cluster driver
// node in particular will be placed on an on-demand instance. If this value
// is greater than or equal to the current cluster size, all nodes will be
// placed on on-demand instances. If this value is less than the current
// cluster size, `first_on_demand` nodes will be placed on on-demand
// instances and the remainder will be placed on `availability` instances.
// Note that this value does not affect cluster size and cannot currently be
// mutated over the lifetime of a cluster.
FirstOnDemand int `json:"first_on_demand,omitempty"`
// Nodes for this cluster will only be placed on AWS instances with this
// instance profile. If ommitted, nodes will be placed on instances without
// an IAM instance profile. The instance profile must have previously been
// added to the Databricks environment by an account administrator.
//
// This feature may only be available to certain customer plans.
//
// If this field is ommitted, we will pull in the default from the conf if
// it exists.
InstanceProfileArn string `json:"instance_profile_arn,omitempty"`
// The bid price for AWS spot instances, as a percentage of the
// corresponding instance type's on-demand price. For example, if this field
// is set to 50, and the cluster needs a new `r3.xlarge` spot instance, then
// the bid price is half of the price of on-demand `r3.xlarge` instances.
// Similarly, if this field is set to 200, the bid price is twice the price
// of on-demand `r3.xlarge` instances. If not specified, the default value
// is 100. When spot instances are requested for this cluster, only spot
// instances whose bid price percentage matches this field will be
// considered. Note that, for safety, we enforce this field to be no more
// than 10000.
//
// The default value and documentation here should be kept consistent with
// CommonConf.defaultSpotBidPricePercent and
// CommonConf.maxSpotBidPricePercent.
SpotBidPricePercent int `json:"spot_bid_price_percent,omitempty"`
// Identifier for the availability zone/datacenter in which the cluster
// resides. This string will be of a form like "us-west-2a". The provided
// availability zone must be in the same region as the Databricks
// deployment. For example, "us-west-2a" is not a valid zone id if the
// Databricks deployment resides in the "us-east-1" region. This is an
// optional field at cluster creation, and if not specified, a default zone
// will be used. If the zone specified is "auto", will try to place cluster
// in a zone with high availability, and will retry placement in a different
// AZ if there is not enough capacity. See [[AutoAZHelper.scala]] for more
// details. The list of available zones as well as the default value can be
// found by using the `List Zones`_ method.
ZoneId string `json:"zone_id,omitempty"`
}
// Availability type used for all subsequent nodes past the `first_on_demand`
// ones.
//
// Note: If `first_on_demand` is zero, this availability type will be used for
// the entire cluster.
type AwsAvailability string
const AwsAvailabilityOnDemand AwsAvailability = `ON_DEMAND`
const AwsAvailabilitySpot AwsAvailability = `SPOT`
const AwsAvailabilitySpotWithFallback AwsAvailability = `SPOT_WITH_FALLBACK`
// String representation for [fmt.Print]
func (aa *AwsAvailability) String() string {
return string(*aa)
}
// Set raw string value and validate it against allowed values
func (aa *AwsAvailability) Set(v string) error {
switch v {
case `ON_DEMAND`, `SPOT`, `SPOT_WITH_FALLBACK`:
*aa = AwsAvailability(v)
return nil
default:
return fmt.Errorf(`value "%s" is not one of "ON_DEMAND", "SPOT", "SPOT_WITH_FALLBACK"`, v)
}
}
// Type always returns AwsAvailability to satisfy [pflag.Value] interface
func (aa *AwsAvailability) Type() string {
return "AwsAvailability"
}
type AzureAttributes struct {
// Availability type used for all subsequent nodes past the
// `first_on_demand` ones. Note: If `first_on_demand` is zero (which only
// happens on pool clusters), this availability type will be used for the
// entire cluster.
Availability AzureAvailability `json:"availability,omitempty"`
// The first `first_on_demand` nodes of the cluster will be placed on
// on-demand instances. This value should be greater than 0, to make sure
// the cluster driver node is placed on an on-demand instance. If this value
// is greater than or equal to the current cluster size, all nodes will be
// placed on on-demand instances. If this value is less than the current
// cluster size, `first_on_demand` nodes will be placed on on-demand
// instances and the remainder will be placed on `availability` instances.
// Note that this value does not affect cluster size and cannot currently be
// mutated over the lifetime of a cluster.
FirstOnDemand int `json:"first_on_demand,omitempty"`
// Defines values necessary to configure and run Azure Log Analytics agent
LogAnalyticsInfo *LogAnalyticsInfo `json:"log_analytics_info,omitempty"`
// The max bid price to be used for Azure spot instances. The Max price for
// the bid cannot be higher than the on-demand price of the instance. If not
// specified, the default value is -1, which specifies that the instance
// cannot be evicted on the basis of price, and only on the basis of
// availability. Further, the value should > 0 or -1.
SpotBidMaxPrice float64 `json:"spot_bid_max_price,omitempty"`
}
// Availability type used for all subsequent nodes past the `first_on_demand`
// ones. Note: If `first_on_demand` is zero (which only happens on pool
// clusters), this availability type will be used for the entire cluster.
type AzureAvailability string
const AzureAvailabilityOnDemandAzure AzureAvailability = `ON_DEMAND_AZURE`
const AzureAvailabilitySpotAzure AzureAvailability = `SPOT_AZURE`
const AzureAvailabilitySpotWithFallbackAzure AzureAvailability = `SPOT_WITH_FALLBACK_AZURE`
// String representation for [fmt.Print]
func (aa *AzureAvailability) String() string {
return string(*aa)
}
// Set raw string value and validate it against allowed values
func (aa *AzureAvailability) Set(v string) error {
switch v {
case `ON_DEMAND_AZURE`, `SPOT_AZURE`, `SPOT_WITH_FALLBACK_AZURE`:
*aa = AzureAvailability(v)
return nil
default:
return fmt.Errorf(`value "%s" is not one of "ON_DEMAND_AZURE", "SPOT_AZURE", "SPOT_WITH_FALLBACK_AZURE"`, v)
}
}
// Type always returns AzureAvailability to satisfy [pflag.Value] interface
func (aa *AzureAvailability) Type() string {
return "AzureAvailability"
}
type BaseClusterInfo struct {
// Parameters needed in order to automatically scale clusters up and down
// based on load. Note: autoscaling works best with DB runtime versions 3.0
// or later.
Autoscale *AutoScale `json:"autoscale,omitempty"`
// Automatically terminates the cluster after it is inactive for this time
// in minutes. If not set, this cluster will not be automatically
// terminated. If specified, the threshold must be between 10 and 10000
// minutes. Users can also set this value to 0 to explicitly disable
// automatic termination.
AutoterminationMinutes int `json:"autotermination_minutes,omitempty"`
// Attributes related to clusters running on Amazon Web Services. If not
// specified at cluster creation, a set of default values will be used.
AwsAttributes *AwsAttributes `json:"aws_attributes,omitempty"`
// Attributes related to clusters running on Microsoft Azure. If not
// specified at cluster creation, a set of default values will be used.
AzureAttributes *AzureAttributes `json:"azure_attributes,omitempty"`
// The configuration for delivering spark logs to a long-term storage
// destination. Two kinds of destinations (dbfs and s3) are supported. Only
// one destination can be specified for one cluster. If the conf is given,
// the logs will be delivered to the destination every `5 mins`. The
// destination of driver logs is `$destination/$clusterId/driver`, while the
// destination of executor logs is `$destination/$clusterId/executor`.
ClusterLogConf *ClusterLogConf `json:"cluster_log_conf,omitempty"`
// Cluster name requested by the user. This doesn't have to be unique. If
// not specified at creation, the cluster name will be an empty string.
ClusterName string `json:"cluster_name,omitempty"`
// Determines whether the cluster was created by a user through the UI,
// created by the Databricks Jobs Scheduler, or through an API request. This
// is the same as cluster_creator, but read only.
ClusterSource ClusterSource `json:"cluster_source,omitempty"`
// Additional tags for cluster resources. Databricks will tag all cluster
// resources (e.g., AWS instances and EBS volumes) with these tags in
// addition to `default_tags`. Notes:
//
// - Currently, Databricks allows at most 45 custom tags
//
// - Clusters can only reuse cloud resources if the resources' tags are a
// subset of the cluster tags
CustomTags map[string]string `json:"custom_tags,omitempty"`
// The optional ID of the instance pool for the driver of the cluster
// belongs. The pool cluster uses the instance pool with id
// (instance_pool_id) if the driver pool is not assigned.
DriverInstancePoolId string `json:"driver_instance_pool_id,omitempty"`
// The node type of the Spark driver. Note that this field is optional; if
// unset, the driver node type will be set as the same value as
// `node_type_id` defined above.
DriverNodeTypeId string `json:"driver_node_type_id,omitempty"`
// Autoscaling Local Storage: when enabled, this cluster will dynamically
// acquire additional disk space when its Spark workers are running low on
// disk space. This feature requires specific AWS permissions to function
// correctly - refer to the User Guide for more details.
EnableElasticDisk bool `json:"enable_elastic_disk,omitempty"`
// Whether to enable LUKS on cluster VMs' local disks
EnableLocalDiskEncryption bool `json:"enable_local_disk_encryption,omitempty"`
// Attributes related to clusters running on Google Cloud Platform. If not
// specified at cluster creation, a set of default values will be used.
GcpAttributes *GcpAttributes `json:"gcp_attributes,omitempty"`
// The optional ID of the instance pool to which the cluster belongs.
InstancePoolId string `json:"instance_pool_id,omitempty"`
// This field encodes, through a single value, the resources available to
// each of the Spark nodes in this cluster. For example, the Spark nodes can
// be provisioned and optimized for memory or compute intensive workloads. A
// list of available node types can be retrieved by using the
// :method:clusters/listNodeTypes API call.
NodeTypeId string `json:"node_type_id,omitempty"`
// Number of worker nodes that this cluster should have. A cluster has one
// Spark Driver and `num_workers` Executors for a total of `num_workers` + 1
// Spark nodes.
//
// Note: When reading the properties of a cluster, this field reflects the
// desired number of workers rather than the actual current number of
// workers. For instance, if a cluster is resized from 5 to 10 workers, this
// field will immediately be updated to reflect the target size of 10
// workers, whereas the workers listed in `spark_info` will gradually
// increase from 5 to 10 as the new nodes are provisioned.
NumWorkers int `json:"num_workers,omitempty"`
// The ID of the cluster policy used to create the cluster if applicable.
PolicyId string `json:"policy_id,omitempty"`
// Decides which runtime engine to be use, e.g. Standard vs. Photon. If
// unspecified, the runtime engine is inferred from spark_version.
RuntimeEngine RuntimeEngine `json:"runtime_engine,omitempty"`
// An object containing a set of optional, user-specified Spark
// configuration key-value pairs. Users can also pass in a string of extra
// JVM options to the driver and the executors via
// `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions`
// respectively.
SparkConf map[string]string `json:"spark_conf,omitempty"`
// An object containing a set of optional, user-specified environment
// variable key-value pairs. Please note that key-value pair of the form
// (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the
// driver and workers.
//
// In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we
// recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the
// example below. This ensures that all default databricks managed
// environmental variables are included as well.
//
// Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m",
// "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS":
// "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}`
SparkEnvVars map[string]string `json:"spark_env_vars,omitempty"`
// The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of
// available Spark versions can be retrieved by using the
// :method:clusters/sparkVersions API call.
SparkVersion string `json:"spark_version,omitempty"`
// SSH public key contents that will be added to each Spark node in this
// cluster. The corresponding private keys can be used to login with the
// user name `ubuntu` on port `2200`. Up to 10 keys can be specified.
SshPublicKeys []string `json:"ssh_public_keys,omitempty"`
WorkloadType *WorkloadType `json:"workload_type,omitempty"`
}
type CancelCommand struct {
ClusterId string `json:"clusterId,omitempty"`
CommandId string `json:"commandId,omitempty"`
ContextId string `json:"contextId,omitempty"`
}
type ChangeClusterOwner struct {
// <needs content added>
ClusterId string `json:"cluster_id"`
// New owner of the cluster_id after this RPC.
OwnerUsername string `json:"owner_username"`
}
type ClientsTypes struct {
// With jobs set, the cluster can be used for jobs
Jobs bool `json:"jobs,omitempty"`
// With notebooks set, this cluster can be used for notebooks
Notebooks bool `json:"notebooks,omitempty"`
}
type CloudProviderNodeInfo struct {
Status []CloudProviderNodeStatus `json:"status,omitempty"`
}
type CloudProviderNodeStatus string
const CloudProviderNodeStatusNotavailableinregion CloudProviderNodeStatus = `NotAvailableInRegion`
const CloudProviderNodeStatusNotenabledonsubscription CloudProviderNodeStatus = `NotEnabledOnSubscription`
// String representation for [fmt.Print]
func (cpns *CloudProviderNodeStatus) String() string {
return string(*cpns)
}
// Set raw string value and validate it against allowed values
func (cpns *CloudProviderNodeStatus) Set(v string) error {
switch v {
case `NotAvailableInRegion`, `NotEnabledOnSubscription`:
*cpns = CloudProviderNodeStatus(v)
return nil
default:
return fmt.Errorf(`value "%s" is not one of "NotAvailableInRegion", "NotEnabledOnSubscription"`, v)
}
}
// Type always returns CloudProviderNodeStatus to satisfy [pflag.Value] interface
func (cpns *CloudProviderNodeStatus) Type() string {
return "CloudProviderNodeStatus"
}
type ClusterAttributes struct {
// Automatically terminates the cluster after it is inactive for this time
// in minutes. If not set, this cluster will not be automatically
// terminated. If specified, the threshold must be between 10 and 10000
// minutes. Users can also set this value to 0 to explicitly disable
// automatic termination.
AutoterminationMinutes int `json:"autotermination_minutes,omitempty"`
// Attributes related to clusters running on Amazon Web Services. If not
// specified at cluster creation, a set of default values will be used.
AwsAttributes *AwsAttributes `json:"aws_attributes,omitempty"`
// Attributes related to clusters running on Microsoft Azure. If not
// specified at cluster creation, a set of default values will be used.
AzureAttributes *AzureAttributes `json:"azure_attributes,omitempty"`
// The configuration for delivering spark logs to a long-term storage
// destination. Two kinds of destinations (dbfs and s3) are supported. Only
// one destination can be specified for one cluster. If the conf is given,
// the logs will be delivered to the destination every `5 mins`. The
// destination of driver logs is `$destination/$clusterId/driver`, while the
// destination of executor logs is `$destination/$clusterId/executor`.
ClusterLogConf *ClusterLogConf `json:"cluster_log_conf,omitempty"`
// Cluster name requested by the user. This doesn't have to be unique. If
// not specified at creation, the cluster name will be an empty string.
ClusterName string `json:"cluster_name,omitempty"`
// Determines whether the cluster was created by a user through the UI,
// created by the Databricks Jobs Scheduler, or through an API request. This
// is the same as cluster_creator, but read only.
ClusterSource ClusterSource `json:"cluster_source,omitempty"`
// Additional tags for cluster resources. Databricks will tag all cluster
// resources (e.g., AWS instances and EBS volumes) with these tags in
// addition to `default_tags`. Notes:
//
// - Currently, Databricks allows at most 45 custom tags
//
// - Clusters can only reuse cloud resources if the resources' tags are a
// subset of the cluster tags
CustomTags map[string]string `json:"custom_tags,omitempty"`
// The optional ID of the instance pool for the driver of the cluster
// belongs. The pool cluster uses the instance pool with id
// (instance_pool_id) if the driver pool is not assigned.
DriverInstancePoolId string `json:"driver_instance_pool_id,omitempty"`
// The node type of the Spark driver. Note that this field is optional; if
// unset, the driver node type will be set as the same value as
// `node_type_id` defined above.
DriverNodeTypeId string `json:"driver_node_type_id,omitempty"`
// Autoscaling Local Storage: when enabled, this cluster will dynamically
// acquire additional disk space when its Spark workers are running low on
// disk space. This feature requires specific AWS permissions to function
// correctly - refer to the User Guide for more details.
EnableElasticDisk bool `json:"enable_elastic_disk,omitempty"`
// Whether to enable LUKS on cluster VMs' local disks
EnableLocalDiskEncryption bool `json:"enable_local_disk_encryption,omitempty"`
// Attributes related to clusters running on Google Cloud Platform. If not
// specified at cluster creation, a set of default values will be used.
GcpAttributes *GcpAttributes `json:"gcp_attributes,omitempty"`
// The optional ID of the instance pool to which the cluster belongs.
InstancePoolId string `json:"instance_pool_id,omitempty"`
// This field encodes, through a single value, the resources available to
// each of the Spark nodes in this cluster. For example, the Spark nodes can
// be provisioned and optimized for memory or compute intensive workloads. A
// list of available node types can be retrieved by using the
// :method:clusters/listNodeTypes API call.
NodeTypeId string `json:"node_type_id,omitempty"`
// The ID of the cluster policy used to create the cluster if applicable.
PolicyId string `json:"policy_id,omitempty"`
// Decides which runtime engine to be use, e.g. Standard vs. Photon. If
// unspecified, the runtime engine is inferred from spark_version.
RuntimeEngine RuntimeEngine `json:"runtime_engine,omitempty"`
// An object containing a set of optional, user-specified Spark
// configuration key-value pairs. Users can also pass in a string of extra
// JVM options to the driver and the executors via
// `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions`
// respectively.
SparkConf map[string]string `json:"spark_conf,omitempty"`
// An object containing a set of optional, user-specified environment
// variable key-value pairs. Please note that key-value pair of the form
// (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the
// driver and workers.
//
// In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we
// recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the
// example below. This ensures that all default databricks managed
// environmental variables are included as well.
//
// Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m",
// "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS":
// "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}`
SparkEnvVars map[string]string `json:"spark_env_vars,omitempty"`
// The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of
// available Spark versions can be retrieved by using the
// :method:clusters/sparkVersions API call.
SparkVersion string `json:"spark_version"`
// SSH public key contents that will be added to each Spark node in this
// cluster. The corresponding private keys can be used to login with the
// user name `ubuntu` on port `2200`. Up to 10 keys can be specified.
SshPublicKeys []string `json:"ssh_public_keys,omitempty"`
WorkloadType *WorkloadType `json:"workload_type,omitempty"`
}
type ClusterEvent struct {
// <needs content added>
ClusterId string `json:"cluster_id"`
// <needs content added>
DataPlaneEventDetails *DataPlaneEventDetails `json:"data_plane_event_details,omitempty"`
// <needs content added>
Details *EventDetails `json:"details,omitempty"`
// The timestamp when the event occurred, stored as the number of
// milliseconds since the Unix epoch. If not provided, this will be assigned
// by the Timeline service.
Timestamp int64 `json:"timestamp,omitempty"`
Type EventType `json:"type,omitempty"`
}
type ClusterInfo struct {
// Parameters needed in order to automatically scale clusters up and down
// based on load. Note: autoscaling works best with DB runtime versions 3.0
// or later.
Autoscale *AutoScale `json:"autoscale,omitempty"`
// Automatically terminates the cluster after it is inactive for this time
// in minutes. If not set, this cluster will not be automatically
// terminated. If specified, the threshold must be between 10 and 10000
// minutes. Users can also set this value to 0 to explicitly disable
// automatic termination.
AutoterminationMinutes int `json:"autotermination_minutes,omitempty"`
// Attributes related to clusters running on Amazon Web Services. If not
// specified at cluster creation, a set of default values will be used.
AwsAttributes *AwsAttributes `json:"aws_attributes,omitempty"`
// Attributes related to clusters running on Microsoft Azure. If not
// specified at cluster creation, a set of default values will be used.
AzureAttributes *AzureAttributes `json:"azure_attributes,omitempty"`
// Number of CPU cores available for this cluster. Note that this can be
// fractional, e.g. 7.5 cores, since certain node types are configured to
// share cores between Spark nodes on the same instance.
ClusterCores float64 `json:"cluster_cores,omitempty"`
// Canonical identifier for the cluster. This id is retained during cluster
// restarts and resizes, while each new cluster has a globally unique id.
ClusterId string `json:"cluster_id,omitempty"`
// The configuration for delivering spark logs to a long-term storage
// destination. Two kinds of destinations (dbfs and s3) are supported. Only
// one destination can be specified for one cluster. If the conf is given,
// the logs will be delivered to the destination every `5 mins`. The
// destination of driver logs is `$destination/$clusterId/driver`, while the
// destination of executor logs is `$destination/$clusterId/executor`.
ClusterLogConf *ClusterLogConf `json:"cluster_log_conf,omitempty"`
// Cluster log delivery status.
ClusterLogStatus *LogSyncStatus `json:"cluster_log_status,omitempty"`
// Total amount of cluster memory, in megabytes
ClusterMemoryMb int64 `json:"cluster_memory_mb,omitempty"`
// Cluster name requested by the user. This doesn't have to be unique. If
// not specified at creation, the cluster name will be an empty string.
ClusterName string `json:"cluster_name,omitempty"`
// Determines whether the cluster was created by a user through the UI,
// created by the Databricks Jobs Scheduler, or through an API request. This
// is the same as cluster_creator, but read only.
ClusterSource ClusterSource `json:"cluster_source,omitempty"`
// Creator user name. The field won't be included in the response if the
// user has already been deleted.
CreatorUserName string `json:"creator_user_name,omitempty"`
// Additional tags for cluster resources. Databricks will tag all cluster
// resources (e.g., AWS instances and EBS volumes) with these tags in
// addition to `default_tags`. Notes:
//
// - Currently, Databricks allows at most 45 custom tags
//
// - Clusters can only reuse cloud resources if the resources' tags are a
// subset of the cluster tags
CustomTags map[string]string `json:"custom_tags,omitempty"`
// This describes an enum
DataSecurityMode DataSecurityMode `json:"data_security_mode,omitempty"`
// Tags that are added by Databricks regardless of any `custom_tags`,
// including:
//
// - Vendor: Databricks
//
// - Creator: <username_of_creator>
//
// - ClusterName: <name_of_cluster>
//
// - ClusterId: <id_of_cluster>
//
// - Name: <Databricks internal use>
DefaultTags map[string]string `json:"default_tags,omitempty"`
// Node on which the Spark driver resides. The driver node contains the
// Spark master and the Databricks application that manages the per-notebook
// Spark REPLs.
Driver *SparkNode `json:"driver,omitempty"`
// The optional ID of the instance pool for the driver of the cluster
// belongs. The pool cluster uses the instance pool with id
// (instance_pool_id) if the driver pool is not assigned.
DriverInstancePoolId string `json:"driver_instance_pool_id,omitempty"`
// The node type of the Spark driver. Note that this field is optional; if
// unset, the driver node type will be set as the same value as
// `node_type_id` defined above.
DriverNodeTypeId string `json:"driver_node_type_id,omitempty"`
// Autoscaling Local Storage: when enabled, this cluster will dynamically
// acquire additional disk space when its Spark workers are running low on
// disk space. This feature requires specific AWS permissions to function
// correctly - refer to the User Guide for more details.
EnableElasticDisk bool `json:"enable_elastic_disk,omitempty"`
// Whether to enable LUKS on cluster VMs' local disks
EnableLocalDiskEncryption bool `json:"enable_local_disk_encryption,omitempty"`
// Nodes on which the Spark executors reside.
Executors []SparkNode `json:"executors,omitempty"`
// Attributes related to clusters running on Google Cloud Platform. If not
// specified at cluster creation, a set of default values will be used.
GcpAttributes *GcpAttributes `json:"gcp_attributes,omitempty"`
// The optional ID of the instance pool to which the cluster belongs.
InstancePoolId string `json:"instance_pool_id,omitempty"`
// Port on which Spark JDBC server is listening, in the driver nod. No
// service will be listeningon on this port in executor nodes.
JdbcPort int `json:"jdbc_port,omitempty"`
// the timestamp that the cluster was started/restarted
LastRestartedTime int64 `json:"last_restarted_time,omitempty"`
// Time when the cluster driver last lost its state (due to a restart or
// driver failure).
LastStateLossTime int64 `json:"last_state_loss_time,omitempty"`
// This field encodes, through a single value, the resources available to
// each of the Spark nodes in this cluster. For example, the Spark nodes can
// be provisioned and optimized for memory or compute intensive workloads. A
// list of available node types can be retrieved by using the
// :method:clusters/listNodeTypes API call.
NodeTypeId string `json:"node_type_id,omitempty"`
// Number of worker nodes that this cluster should have. A cluster has one
// Spark Driver and `num_workers` Executors for a total of `num_workers` + 1
// Spark nodes.
//
// Note: When reading the properties of a cluster, this field reflects the
// desired number of workers rather than the actual current number of
// workers. For instance, if a cluster is resized from 5 to 10 workers, this
// field will immediately be updated to reflect the target size of 10
// workers, whereas the workers listed in `spark_info` will gradually
// increase from 5 to 10 as the new nodes are provisioned.
NumWorkers int `json:"num_workers,omitempty"`
// The ID of the cluster policy used to create the cluster if applicable.
PolicyId string `json:"policy_id,omitempty"`
// Decides which runtime engine to be use, e.g. Standard vs. Photon. If
// unspecified, the runtime engine is inferred from spark_version.
RuntimeEngine RuntimeEngine `json:"runtime_engine,omitempty"`
// Single user name if data_security_mode is `SINGLE_USER`
SingleUserName string `json:"single_user_name,omitempty"`
// An object containing a set of optional, user-specified Spark
// configuration key-value pairs. Users can also pass in a string of extra
// JVM options to the driver and the executors via
// `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions`
// respectively.
SparkConf map[string]string `json:"spark_conf,omitempty"`
// A canonical SparkContext identifier. This value *does* change when the
// Spark driver restarts. The pair `(cluster_id, spark_context_id)` is a
// globally unique identifier over all Spark contexts.
SparkContextId int64 `json:"spark_context_id,omitempty"`
// An object containing a set of optional, user-specified environment
// variable key-value pairs. Please note that key-value pair of the form
// (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the
// driver and workers.
//
// In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we
// recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the
// example below. This ensures that all default databricks managed
// environmental variables are included as well.
//
// Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m",
// "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS":
// "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}`
SparkEnvVars map[string]string `json:"spark_env_vars,omitempty"`
// The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of
// available Spark versions can be retrieved by using the
// :method:clusters/sparkVersions API call.
SparkVersion string `json:"spark_version,omitempty"`
// SSH public key contents that will be added to each Spark node in this
// cluster. The corresponding private keys can be used to login with the
// user name `ubuntu` on port `2200`. Up to 10 keys can be specified.
SshPublicKeys []string `json:"ssh_public_keys,omitempty"`
// Time (in epoch milliseconds) when the cluster creation request was
// received (when the cluster entered a `PENDING` state).
StartTime int64 `json:"start_time,omitempty"`
// Current state of the cluster.
State State `json:"state,omitempty"`
// A message associated with the most recent state transition (e.g., the
// reason why the cluster entered a `TERMINATED` state).
StateMessage string `json:"state_message,omitempty"`
// Time (in epoch milliseconds) when the cluster was terminated, if
// applicable.
TerminatedTime int64 `json:"terminated_time,omitempty"`
// Information about why the cluster was terminated. This field only appears
// when the cluster is in a `TERMINATING` or `TERMINATED` state.
TerminationReason *TerminationReason `json:"termination_reason,omitempty"`
WorkloadType *WorkloadType `json:"workload_type,omitempty"`
}
type ClusterLibraryStatuses struct {
// Unique identifier for the cluster.
ClusterId string `json:"cluster_id,omitempty"`
// Status of all libraries on the cluster.
LibraryStatuses []LibraryFullStatus `json:"library_statuses,omitempty"`
}
type ClusterLogConf struct {
// destination needs to be provided. e.g. `{ "dbfs" : { "destination" :
// "dbfs:/home/cluster_log" } }`
Dbfs *DbfsStorageInfo `json:"dbfs,omitempty"`
// destination and either region or endpoint should also be provided. e.g.
// `{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" :
// "us-west-2" } }` Cluster iam role is used to access s3, please make sure
// the cluster iam role in `instance_profile_arn` has permission to write
// data to the s3 destination.
S3 *S3StorageInfo `json:"s3,omitempty"`
}
type ClusterSize struct {
// Parameters needed in order to automatically scale clusters up and down
// based on load. Note: autoscaling works best with DB runtime versions 3.0
// or later.
Autoscale *AutoScale `json:"autoscale,omitempty"`
// Number of worker nodes that this cluster should have. A cluster has one
// Spark Driver and `num_workers` Executors for a total of `num_workers` + 1
// Spark nodes.
//
// Note: When reading the properties of a cluster, this field reflects the
// desired number of workers rather than the actual current number of
// workers. For instance, if a cluster is resized from 5 to 10 workers, this
// field will immediately be updated to reflect the target size of 10
// workers, whereas the workers listed in `spark_info` will gradually
// increase from 5 to 10 as the new nodes are provisioned.
NumWorkers int `json:"num_workers,omitempty"`
}
// Determines whether the cluster was created by a user through the UI, created
// by the Databricks Jobs Scheduler, or through an API request. This is the same
// as cluster_creator, but read only.
type ClusterSource string
const ClusterSourceApi ClusterSource = `API`
const ClusterSourceJob ClusterSource = `JOB`
const ClusterSourceModels ClusterSource = `MODELS`
const ClusterSourcePipeline ClusterSource = `PIPELINE`
const ClusterSourcePipelineMaintenance ClusterSource = `PIPELINE_MAINTENANCE`
const ClusterSourceSql ClusterSource = `SQL`
const ClusterSourceUi ClusterSource = `UI`
// String representation for [fmt.Print]
func (cs *ClusterSource) String() string {
return string(*cs)
}
// Set raw string value and validate it against allowed values
func (cs *ClusterSource) Set(v string) error {
switch v {
case `API`, `JOB`, `MODELS`, `PIPELINE`, `PIPELINE_MAINTENANCE`, `SQL`, `UI`:
*cs = ClusterSource(v)
return nil
default:
return fmt.Errorf(`value "%s" is not one of "API", "JOB", "MODELS", "PIPELINE", "PIPELINE_MAINTENANCE", "SQL", "UI"`, v)
}
}
// Type always returns ClusterSource to satisfy [pflag.Value] interface
func (cs *ClusterSource) Type() string {
return "ClusterSource"
}
// Get status
type ClusterStatusRequest struct {
// Unique identifier of the cluster whose status should be retrieved.
ClusterId string `json:"-" url:"cluster_id"`
}
type Command struct {
// Running cluster id
ClusterId string `json:"clusterId,omitempty"`
// Executable code
Command string `json:"command,omitempty"`
// Running context id
ContextId string `json:"contextId,omitempty"`
Language Language `json:"language,omitempty"`
}
type CommandStatus string
const CommandStatusCancelled CommandStatus = `Cancelled`
const CommandStatusCancelling CommandStatus = `Cancelling`
const CommandStatusError CommandStatus = `Error`
const CommandStatusFinished CommandStatus = `Finished`
const CommandStatusQueued CommandStatus = `Queued`
const CommandStatusRunning CommandStatus = `Running`
// String representation for [fmt.Print]
func (cs *CommandStatus) String() string {
return string(*cs)
}
// Set raw string value and validate it against allowed values
func (cs *CommandStatus) Set(v string) error {
switch v {
case `Cancelled`, `Cancelling`, `Error`, `Finished`, `Queued`, `Running`:
*cs = CommandStatus(v)
return nil
default:
return fmt.Errorf(`value "%s" is not one of "Cancelled", "Cancelling", "Error", "Finished", "Queued", "Running"`, v)
}
}
// Type always returns CommandStatus to satisfy [pflag.Value] interface
func (cs *CommandStatus) Type() string {
return "CommandStatus"
}
// Get command info
type CommandStatusRequest struct {
ClusterId string `json:"-" url:"clusterId"`
CommandId string `json:"-" url:"commandId"`
ContextId string `json:"-" url:"contextId"`
}
type CommandStatusResponse struct {
Id string `json:"id,omitempty"`
Results *Results `json:"results,omitempty"`
Status CommandStatus `json:"status,omitempty"`
}
type ContextStatus string
const ContextStatusError ContextStatus = `Error`
const ContextStatusPending ContextStatus = `Pending`
const ContextStatusRunning ContextStatus = `Running`
// String representation for [fmt.Print]
func (cs *ContextStatus) String() string {
return string(*cs)
}
// Set raw string value and validate it against allowed values
func (cs *ContextStatus) Set(v string) error {
switch v {
case `Error`, `Pending`, `Running`:
*cs = ContextStatus(v)
return nil
default:
return fmt.Errorf(`value "%s" is not one of "Error", "Pending", "Running"`, v)
}
}
// Type always returns ContextStatus to satisfy [pflag.Value] interface
func (cs *ContextStatus) Type() string {
return "ContextStatus"
}
// Get status
type ContextStatusRequest struct {
ClusterId string `json:"-" url:"clusterId"`
ContextId string `json:"-" url:"contextId"`
}
type ContextStatusResponse struct {
Id string `json:"id,omitempty"`
Status ContextStatus `json:"status,omitempty"`
}
type CreateCluster struct {
// Note: This field won't be true for webapp requests. Only API users will
// check this field.
ApplyPolicyDefaultValues bool `json:"apply_policy_default_values,omitempty"`
// Parameters needed in order to automatically scale clusters up and down
// based on load. Note: autoscaling works best with DB runtime versions 3.0
// or later.
Autoscale *AutoScale `json:"autoscale,omitempty"`
// Automatically terminates the cluster after it is inactive for this time
// in minutes. If not set, this cluster will not be automatically
// terminated. If specified, the threshold must be between 10 and 10000
// minutes. Users can also set this value to 0 to explicitly disable
// automatic termination.
AutoterminationMinutes int `json:"autotermination_minutes,omitempty"`
// Attributes related to clusters running on Amazon Web Services. If not
// specified at cluster creation, a set of default values will be used.
AwsAttributes *AwsAttributes `json:"aws_attributes,omitempty"`
// Attributes related to clusters running on Microsoft Azure. If not
// specified at cluster creation, a set of default values will be used.
AzureAttributes *AzureAttributes `json:"azure_attributes,omitempty"`
// The configuration for delivering spark logs to a long-term storage
// destination. Two kinds of destinations (dbfs and s3) are supported. Only
// one destination can be specified for one cluster. If the conf is given,
// the logs will be delivered to the destination every `5 mins`. The
// destination of driver logs is `$destination/$clusterId/driver`, while the
// destination of executor logs is `$destination/$clusterId/executor`.
ClusterLogConf *ClusterLogConf `json:"cluster_log_conf,omitempty"`
// Cluster name requested by the user. This doesn't have to be unique. If
// not specified at creation, the cluster name will be an empty string.
ClusterName string `json:"cluster_name,omitempty"`
// Determines whether the cluster was created by a user through the UI,
// created by the Databricks Jobs Scheduler, or through an API request. This
// is the same as cluster_creator, but read only.
ClusterSource ClusterSource `json:"cluster_source,omitempty"`
// Additional tags for cluster resources. Databricks will tag all cluster
// resources (e.g., AWS instances and EBS volumes) with these tags in
// addition to `default_tags`. Notes:
//
// - Currently, Databricks allows at most 45 custom tags
//
// - Clusters can only reuse cloud resources if the resources' tags are a
// subset of the cluster tags
CustomTags map[string]string `json:"custom_tags,omitempty"`
// The optional ID of the instance pool for the driver of the cluster
// belongs. The pool cluster uses the instance pool with id
// (instance_pool_id) if the driver pool is not assigned.
DriverInstancePoolId string `json:"driver_instance_pool_id,omitempty"`
// The node type of the Spark driver. Note that this field is optional; if
// unset, the driver node type will be set as the same value as
// `node_type_id` defined above.
DriverNodeTypeId string `json:"driver_node_type_id,omitempty"`
// Autoscaling Local Storage: when enabled, this cluster will dynamically
// acquire additional disk space when its Spark workers are running low on
// disk space. This feature requires specific AWS permissions to function
// correctly - refer to the User Guide for more details.
EnableElasticDisk bool `json:"enable_elastic_disk,omitempty"`
// Whether to enable LUKS on cluster VMs' local disks
EnableLocalDiskEncryption bool `json:"enable_local_disk_encryption,omitempty"`
// Attributes related to clusters running on Google Cloud Platform. If not
// specified at cluster creation, a set of default values will be used.
GcpAttributes *GcpAttributes `json:"gcp_attributes,omitempty"`
// The optional ID of the instance pool to which the cluster belongs.
InstancePoolId string `json:"instance_pool_id,omitempty"`
// This field encodes, through a single value, the resources available to
// each of the Spark nodes in this cluster. For example, the Spark nodes can
// be provisioned and optimized for memory or compute intensive workloads. A
// list of available node types can be retrieved by using the
// :method:clusters/listNodeTypes API call.
NodeTypeId string `json:"node_type_id,omitempty"`
// Number of worker nodes that this cluster should have. A cluster has one
// Spark Driver and `num_workers` Executors for a total of `num_workers` + 1
// Spark nodes.
//
// Note: When reading the properties of a cluster, this field reflects the
// desired number of workers rather than the actual current number of
// workers. For instance, if a cluster is resized from 5 to 10 workers, this
// field will immediately be updated to reflect the target size of 10
// workers, whereas the workers listed in `spark_info` will gradually
// increase from 5 to 10 as the new nodes are provisioned.
NumWorkers int `json:"num_workers,omitempty"`
// The ID of the cluster policy used to create the cluster if applicable.
PolicyId string `json:"policy_id,omitempty"`
// Decides which runtime engine to be use, e.g. Standard vs. Photon. If
// unspecified, the runtime engine is inferred from spark_version.
RuntimeEngine RuntimeEngine `json:"runtime_engine,omitempty"`
// An object containing a set of optional, user-specified Spark
// configuration key-value pairs. Users can also pass in a string of extra
// JVM options to the driver and the executors via
// `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions`
// respectively.
SparkConf map[string]string `json:"spark_conf,omitempty"`
// An object containing a set of optional, user-specified environment
// variable key-value pairs. Please note that key-value pair of the form
// (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the
// driver and workers.
//
// In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we
// recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the
// example below. This ensures that all default databricks managed
// environmental variables are included as well.
//
// Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m",
// "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS":
// "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}`
SparkEnvVars map[string]string `json:"spark_env_vars,omitempty"`
// The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of
// available Spark versions can be retrieved by using the
// :method:clusters/sparkVersions API call.
SparkVersion string `json:"spark_version"`
// SSH public key contents that will be added to each Spark node in this
// cluster. The corresponding private keys can be used to login with the
// user name `ubuntu` on port `2200`. Up to 10 keys can be specified.
SshPublicKeys []string `json:"ssh_public_keys,omitempty"`
WorkloadType *WorkloadType `json:"workload_type,omitempty"`
}
type CreateClusterResponse struct {
ClusterId string `json:"cluster_id,omitempty"`
}
type CreateContext struct {
// Running cluster id
ClusterId string `json:"clusterId,omitempty"`
Language Language `json:"language,omitempty"`
}
type CreateInstancePool struct {