-
Notifications
You must be signed in to change notification settings - Fork 867
/
classes.rb
3761 lines (3181 loc) · 168 KB
/
classes.rb
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
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module DataprocV1beta2
# Specifies the type and number of accelerator cards attached to the instances
# of an instance group (see GPUs on Compute Engine (https://cloud.google.com/
# compute/docs/gpus/)).
class AcceleratorConfig
include Google::Apis::Core::Hashable
# The number of the accelerator cards of this type exposed to this instance.
# Corresponds to the JSON property `acceleratorCount`
# @return [Fixnum]
attr_accessor :accelerator_count
# Full URL, partial URI, or short name of the accelerator type resource to
# expose to this instance. See Compute Engine AcceleratorTypes (https://cloud.
# google.com/compute/docs/reference/beta/acceleratorTypes)Examples * https://www.
# googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/
# acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/
# acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80Auto Zone Exception: If
# you are using the Dataproc Auto Zone Placement (https://cloud.google.com/
# dataproc/docs/concepts/configuring-clusters/auto-zone#
# using_auto_zone_placement) feature, you must use the short name of the
# accelerator type resource, for example, nvidia-tesla-k80.
# Corresponds to the JSON property `acceleratorTypeUri`
# @return [String]
attr_accessor :accelerator_type_uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@accelerator_count = args[:accelerator_count] if args.key?(:accelerator_count)
@accelerator_type_uri = args[:accelerator_type_uri] if args.key?(:accelerator_type_uri)
end
end
# Autoscaling Policy config associated with the cluster.
class AutoscalingConfig
include Google::Apis::Core::Hashable
# Optional. The autoscaling policy used by the cluster.Only resource names
# including projectid and location (region) are valid. Examples: https://www.
# googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/
# autoscalingPolicies/[policy_id] projects/[project_id]/locations/[
# dataproc_region]/autoscalingPolicies/[policy_id]Note that the policy must be
# in the same project and Dataproc region.
# Corresponds to the JSON property `policyUri`
# @return [String]
attr_accessor :policy_uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@policy_uri = args[:policy_uri] if args.key?(:policy_uri)
end
end
# Describes an autoscaling policy for Dataproc cluster autoscaler.
class AutoscalingPolicy
include Google::Apis::Core::Hashable
# Basic algorithm for autoscaling.
# Corresponds to the JSON property `basicAlgorithm`
# @return [Google::Apis::DataprocV1beta2::BasicAutoscalingAlgorithm]
attr_accessor :basic_algorithm
# Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (
# 0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or
# hyphen. Must consist of between 3 and 50 characters.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Output only. The "resource name" of the autoscaling policy, as described in
# https://cloud.google.com/apis/design/resource_names. For projects.regions.
# autoscalingPolicies, the resource name of the policy has the following format:
# projects/`project_id`/regions/`region`/autoscalingPolicies/`policy_id` For
# projects.locations.autoscalingPolicies, the resource name of the policy has
# the following format: projects/`project_id`/locations/`location`/
# autoscalingPolicies/`policy_id`
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# Configuration for the size bounds of an instance group, including its
# proportional size to other groups.
# Corresponds to the JSON property `secondaryWorkerConfig`
# @return [Google::Apis::DataprocV1beta2::InstanceGroupAutoscalingPolicyConfig]
attr_accessor :secondary_worker_config
# Configuration for the size bounds of an instance group, including its
# proportional size to other groups.
# Corresponds to the JSON property `workerConfig`
# @return [Google::Apis::DataprocV1beta2::InstanceGroupAutoscalingPolicyConfig]
attr_accessor :worker_config
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@basic_algorithm = args[:basic_algorithm] if args.key?(:basic_algorithm)
@id = args[:id] if args.key?(:id)
@name = args[:name] if args.key?(:name)
@secondary_worker_config = args[:secondary_worker_config] if args.key?(:secondary_worker_config)
@worker_config = args[:worker_config] if args.key?(:worker_config)
end
end
# Basic algorithm for autoscaling.
class BasicAutoscalingAlgorithm
include Google::Apis::Core::Hashable
# Optional. Duration between scaling events. A scaling period starts after the
# update operation from the previous event has completed.Bounds: 2m, 1d. Default:
# 2m.
# Corresponds to the JSON property `cooldownPeriod`
# @return [String]
attr_accessor :cooldown_period
# Basic autoscaling configurations for YARN.
# Corresponds to the JSON property `yarnConfig`
# @return [Google::Apis::DataprocV1beta2::BasicYarnAutoscalingConfig]
attr_accessor :yarn_config
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cooldown_period = args[:cooldown_period] if args.key?(:cooldown_period)
@yarn_config = args[:yarn_config] if args.key?(:yarn_config)
end
end
# Basic autoscaling configurations for YARN.
class BasicYarnAutoscalingConfig
include Google::Apis::Core::Hashable
# Required. Timeout for YARN graceful decommissioning of Node Managers.
# Specifies the duration to wait for jobs to complete before forcefully removing
# workers (and potentially interrupting jobs). Only applicable to downscaling
# operations.Bounds: 0s, 1d.
# Corresponds to the JSON property `gracefulDecommissionTimeout`
# @return [String]
attr_accessor :graceful_decommission_timeout
# Required. Fraction of average YARN pending memory in the last cooldown period
# for which to remove workers. A scale-down factor of 1 will result in scaling
# down so that there is no available memory remaining after the update (more
# aggressive scaling). A scale-down factor of 0 disables removing workers, which
# can be beneficial for autoscaling a single job. See How autoscaling works for
# more information.Bounds: 0.0, 1.0.
# Corresponds to the JSON property `scaleDownFactor`
# @return [Float]
attr_accessor :scale_down_factor
# Optional. Minimum scale-down threshold as a fraction of total cluster size
# before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1
# means the autoscaler must recommend at least a 2 worker scale-down for the
# cluster to scale. A threshold of 0 means the autoscaler will scale down on any
# recommended change.Bounds: 0.0, 1.0. Default: 0.0.
# Corresponds to the JSON property `scaleDownMinWorkerFraction`
# @return [Float]
attr_accessor :scale_down_min_worker_fraction
# Required. Fraction of average YARN pending memory in the last cooldown period
# for which to add workers. A scale-up factor of 1.0 will result in scaling up
# so that there is no pending memory remaining after the update (more aggressive
# scaling). A scale-up factor closer to 0 will result in a smaller magnitude of
# scaling up (less aggressive scaling). See How autoscaling works for more
# information.Bounds: 0.0, 1.0.
# Corresponds to the JSON property `scaleUpFactor`
# @return [Float]
attr_accessor :scale_up_factor
# Optional. Minimum scale-up threshold as a fraction of total cluster size
# before scaling occurs. For example, in a 20-worker cluster, a threshold of 0.1
# means the autoscaler must recommend at least a 2-worker scale-up for the
# cluster to scale. A threshold of 0 means the autoscaler will scale up on any
# recommended change.Bounds: 0.0, 1.0. Default: 0.0.
# Corresponds to the JSON property `scaleUpMinWorkerFraction`
# @return [Float]
attr_accessor :scale_up_min_worker_fraction
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@graceful_decommission_timeout = args[:graceful_decommission_timeout] if args.key?(:graceful_decommission_timeout)
@scale_down_factor = args[:scale_down_factor] if args.key?(:scale_down_factor)
@scale_down_min_worker_fraction = args[:scale_down_min_worker_fraction] if args.key?(:scale_down_min_worker_fraction)
@scale_up_factor = args[:scale_up_factor] if args.key?(:scale_up_factor)
@scale_up_min_worker_fraction = args[:scale_up_min_worker_fraction] if args.key?(:scale_up_min_worker_fraction)
end
end
# Associates members with a role.
class Binding
include Google::Apis::Core::Hashable
# Represents a textual expression in the Common Expression Language (CEL) syntax.
# CEL is a C-like expression language. The syntax and semantics of CEL are
# documented at https://github.com/google/cel-spec.Example (Comparison): title: "
# Summary size limit" description: "Determines if a summary is less than 100
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
# Requestor is owner" description: "Determines if requestor is the document
# owner" expression: "document.owner == request.auth.claims.email" Example (
# Logic): title: "Public documents" description: "Determine whether the document
# should be publicly visible" expression: "document.type != 'private' &&
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
# string" description: "Create a notification string with a timestamp."
# expression: "'New message received at ' + string(document.create_time)" The
# exact variables and functions that may be referenced within an expression are
# determined by the service that evaluates it. See the service documentation for
# additional information.
# Corresponds to the JSON property `condition`
# @return [Google::Apis::DataprocV1beta2::Expr]
attr_accessor :condition
# Specifies the identities requesting access for a Cloud Platform resource.
# members can have the following values: allUsers: A special identifier that
# represents anyone who is on the internet; with or without a Google account.
# allAuthenticatedUsers: A special identifier that represents anyone who is
# authenticated with a Google account or a service account. user:`emailid`: An
# email address that represents a specific Google account. For example, alice@
# example.com . serviceAccount:`emailid`: An email address that represents a
# service account. For example, my-other-app@appspot.gserviceaccount.com. group:`
# emailid`: An email address that represents a Google group. For example, admins@
# example.com. deleted:user:`emailid`?uid=`uniqueid`: An email address (plus
# unique identifier) representing a user that has been recently deleted. For
# example, alice@example.com?uid=123456789012345678901. If the user is recovered,
# this value reverts to user:`emailid` and the recovered user retains the role
# in the binding. deleted:serviceAccount:`emailid`?uid=`uniqueid`: An email
# address (plus unique identifier) representing a service account that has been
# recently deleted. For example, my-other-app@appspot.gserviceaccount.com?uid=
# 123456789012345678901. If the service account is undeleted, this value reverts
# to serviceAccount:`emailid` and the undeleted service account retains the role
# in the binding. deleted:group:`emailid`?uid=`uniqueid`: An email address (plus
# unique identifier) representing a Google group that has been recently deleted.
# For example, admins@example.com?uid=123456789012345678901. If the group is
# recovered, this value reverts to group:`emailid` and the recovered group
# retains the role in the binding. domain:`domain`: The G Suite domain (primary)
# that represents all the users of that domain. For example, google.com or
# example.com.
# Corresponds to the JSON property `members`
# @return [Array<String>]
attr_accessor :members
# Role that is assigned to members. For example, roles/viewer, roles/editor, or
# roles/owner.
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@condition = args[:condition] if args.key?(:condition)
@members = args[:members] if args.key?(:members)
@role = args[:role] if args.key?(:role)
end
end
# A request to cancel a job.
class CancelJobRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Describes the identifying information, config, and status of a cluster of
# Compute Engine instances.
class Cluster
include Google::Apis::Core::Hashable
# Required. The cluster name. Cluster names within a project must be unique.
# Names of deleted clusters can be reused.
# Corresponds to the JSON property `clusterName`
# @return [String]
attr_accessor :cluster_name
# Output only. A cluster UUID (Unique Universal Identifier). Dataproc generates
# this value when it creates the cluster.
# Corresponds to the JSON property `clusterUuid`
# @return [String]
attr_accessor :cluster_uuid
# The cluster config.
# Corresponds to the JSON property `config`
# @return [Google::Apis::DataprocV1beta2::ClusterConfig]
attr_accessor :config
# Optional. The labels to associate with this cluster. Label keys must contain 1
# to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/
# rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63
# characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt)
# . No more than 32 labels can be associated with a cluster.
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature:
# This report is available for testing purposes only. It may be changed before
# final release.
# Corresponds to the JSON property `metrics`
# @return [Google::Apis::DataprocV1beta2::ClusterMetrics]
attr_accessor :metrics
# Required. The Google Cloud Platform project ID that the cluster belongs to.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
# The status of a cluster and its instances.
# Corresponds to the JSON property `status`
# @return [Google::Apis::DataprocV1beta2::ClusterStatus]
attr_accessor :status
# Output only. The previous cluster status.
# Corresponds to the JSON property `statusHistory`
# @return [Array<Google::Apis::DataprocV1beta2::ClusterStatus>]
attr_accessor :status_history
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cluster_name = args[:cluster_name] if args.key?(:cluster_name)
@cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid)
@config = args[:config] if args.key?(:config)
@labels = args[:labels] if args.key?(:labels)
@metrics = args[:metrics] if args.key?(:metrics)
@project_id = args[:project_id] if args.key?(:project_id)
@status = args[:status] if args.key?(:status)
@status_history = args[:status_history] if args.key?(:status_history)
end
end
# The cluster config.
class ClusterConfig
include Google::Apis::Core::Hashable
# Autoscaling Policy config associated with the cluster.
# Corresponds to the JSON property `autoscalingConfig`
# @return [Google::Apis::DataprocV1beta2::AutoscalingConfig]
attr_accessor :autoscaling_config
# Optional. A Cloud Storage bucket used to stage job dependencies, config files,
# and job driver console output. If you do not specify a staging bucket, Cloud
# Dataproc will determine a Cloud Storage location (US, ASIA, or EU) for your
# cluster's staging bucket according to the Compute Engine zone where your
# cluster is deployed, and then create and manage this project-level, per-
# location bucket (see Dataproc staging bucket (https://cloud.google.com/
# dataproc/docs/concepts/configuring-clusters/staging-bucket)).
# Corresponds to the JSON property `configBucket`
# @return [String]
attr_accessor :config_bucket
# Encryption settings for the cluster.
# Corresponds to the JSON property `encryptionConfig`
# @return [Google::Apis::DataprocV1beta2::EncryptionConfig]
attr_accessor :encryption_config
# Endpoint config for this cluster
# Corresponds to the JSON property `endpointConfig`
# @return [Google::Apis::DataprocV1beta2::EndpointConfig]
attr_accessor :endpoint_config
# Common config settings for resources of Compute Engine cluster instances,
# applicable to all instances in the cluster.
# Corresponds to the JSON property `gceClusterConfig`
# @return [Google::Apis::DataprocV1beta2::GceClusterConfig]
attr_accessor :gce_cluster_config
# The GKE config for this cluster.
# Corresponds to the JSON property `gkeClusterConfig`
# @return [Google::Apis::DataprocV1beta2::GkeClusterConfig]
attr_accessor :gke_cluster_config
# Optional. Commands to execute on each node after config is completed. By
# default, executables are run on master and all worker nodes. You can test a
# node's role metadata to run an executable on a master or worker node, as shown
# below using curl (you can also use wget): ROLE=$(curl -H Metadata-Flavor:
# Google http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-
# role) if [[ "$`ROLE`" == 'Master' ]]; then ... master specific actions ...
# else ... worker specific actions ... fi
# Corresponds to the JSON property `initializationActions`
# @return [Array<Google::Apis::DataprocV1beta2::NodeInitializationAction>]
attr_accessor :initialization_actions
# Specifies the cluster auto-delete schedule configuration.
# Corresponds to the JSON property `lifecycleConfig`
# @return [Google::Apis::DataprocV1beta2::LifecycleConfig]
attr_accessor :lifecycle_config
# The config settings for Compute Engine resources in an instance group, such as
# a master or worker group.
# Corresponds to the JSON property `masterConfig`
# @return [Google::Apis::DataprocV1beta2::InstanceGroupConfig]
attr_accessor :master_config
# Specifies a Metastore configuration.
# Corresponds to the JSON property `metastoreConfig`
# @return [Google::Apis::DataprocV1beta2::MetastoreConfig]
attr_accessor :metastore_config
# The config settings for Compute Engine resources in an instance group, such as
# a master or worker group.
# Corresponds to the JSON property `secondaryWorkerConfig`
# @return [Google::Apis::DataprocV1beta2::InstanceGroupConfig]
attr_accessor :secondary_worker_config
# Security related configuration, including encryption, Kerberos, etc.
# Corresponds to the JSON property `securityConfig`
# @return [Google::Apis::DataprocV1beta2::SecurityConfig]
attr_accessor :security_config
# Specifies the selection and config of software inside the cluster.
# Corresponds to the JSON property `softwareConfig`
# @return [Google::Apis::DataprocV1beta2::SoftwareConfig]
attr_accessor :software_config
# Optional. A Cloud Storage bucket used to store ephemeral cluster and jobs data,
# such as Spark and MapReduce history files. If you do not specify a temp
# bucket, Dataproc will determine a Cloud Storage location (US, ASIA, or EU) for
# your cluster's temp bucket according to the Compute Engine zone where your
# cluster is deployed, and then create and manage this project-level, per-
# location bucket. The default bucket has a TTL of 90 days, but you can use any
# TTL (or none) if you specify a bucket.
# Corresponds to the JSON property `tempBucket`
# @return [String]
attr_accessor :temp_bucket
# The config settings for Compute Engine resources in an instance group, such as
# a master or worker group.
# Corresponds to the JSON property `workerConfig`
# @return [Google::Apis::DataprocV1beta2::InstanceGroupConfig]
attr_accessor :worker_config
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@autoscaling_config = args[:autoscaling_config] if args.key?(:autoscaling_config)
@config_bucket = args[:config_bucket] if args.key?(:config_bucket)
@encryption_config = args[:encryption_config] if args.key?(:encryption_config)
@endpoint_config = args[:endpoint_config] if args.key?(:endpoint_config)
@gce_cluster_config = args[:gce_cluster_config] if args.key?(:gce_cluster_config)
@gke_cluster_config = args[:gke_cluster_config] if args.key?(:gke_cluster_config)
@initialization_actions = args[:initialization_actions] if args.key?(:initialization_actions)
@lifecycle_config = args[:lifecycle_config] if args.key?(:lifecycle_config)
@master_config = args[:master_config] if args.key?(:master_config)
@metastore_config = args[:metastore_config] if args.key?(:metastore_config)
@secondary_worker_config = args[:secondary_worker_config] if args.key?(:secondary_worker_config)
@security_config = args[:security_config] if args.key?(:security_config)
@software_config = args[:software_config] if args.key?(:software_config)
@temp_bucket = args[:temp_bucket] if args.key?(:temp_bucket)
@worker_config = args[:worker_config] if args.key?(:worker_config)
end
end
# Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature:
# This report is available for testing purposes only. It may be changed before
# final release.
class ClusterMetrics
include Google::Apis::Core::Hashable
# The HDFS metrics.
# Corresponds to the JSON property `hdfsMetrics`
# @return [Hash<String,Fixnum>]
attr_accessor :hdfs_metrics
# The YARN metrics.
# Corresponds to the JSON property `yarnMetrics`
# @return [Hash<String,Fixnum>]
attr_accessor :yarn_metrics
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@hdfs_metrics = args[:hdfs_metrics] if args.key?(:hdfs_metrics)
@yarn_metrics = args[:yarn_metrics] if args.key?(:yarn_metrics)
end
end
# The cluster operation triggered by a workflow.
class ClusterOperation
include Google::Apis::Core::Hashable
# Output only. Indicates the operation is done.
# Corresponds to the JSON property `done`
# @return [Boolean]
attr_accessor :done
alias_method :done?, :done
# Output only. Error, if operation failed.
# Corresponds to the JSON property `error`
# @return [String]
attr_accessor :error
# Output only. The id of the cluster operation.
# Corresponds to the JSON property `operationId`
# @return [String]
attr_accessor :operation_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@done = args[:done] if args.key?(:done)
@error = args[:error] if args.key?(:error)
@operation_id = args[:operation_id] if args.key?(:operation_id)
end
end
# Metadata describing the operation.
class ClusterOperationMetadata
include Google::Apis::Core::Hashable
# Output only. Name of the cluster for the operation.
# Corresponds to the JSON property `clusterName`
# @return [String]
attr_accessor :cluster_name
# Output only. Cluster UUID for the operation.
# Corresponds to the JSON property `clusterUuid`
# @return [String]
attr_accessor :cluster_uuid
# Output only. Short description of operation.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Output only. Labels associated with the operation
# Corresponds to the JSON property `labels`
# @return [Hash<String,String>]
attr_accessor :labels
# Output only. The operation type.
# Corresponds to the JSON property `operationType`
# @return [String]
attr_accessor :operation_type
# The status of the operation.
# Corresponds to the JSON property `status`
# @return [Google::Apis::DataprocV1beta2::ClusterOperationStatus]
attr_accessor :status
# Output only. The previous operation status.
# Corresponds to the JSON property `statusHistory`
# @return [Array<Google::Apis::DataprocV1beta2::ClusterOperationStatus>]
attr_accessor :status_history
# Output only. Errors encountered during operation execution.
# Corresponds to the JSON property `warnings`
# @return [Array<String>]
attr_accessor :warnings
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cluster_name = args[:cluster_name] if args.key?(:cluster_name)
@cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid)
@description = args[:description] if args.key?(:description)
@labels = args[:labels] if args.key?(:labels)
@operation_type = args[:operation_type] if args.key?(:operation_type)
@status = args[:status] if args.key?(:status)
@status_history = args[:status_history] if args.key?(:status_history)
@warnings = args[:warnings] if args.key?(:warnings)
end
end
# The status of the operation.
class ClusterOperationStatus
include Google::Apis::Core::Hashable
# Output only. A message containing any operation metadata details.
# Corresponds to the JSON property `details`
# @return [String]
attr_accessor :details
# Output only. A message containing the detailed operation state.
# Corresponds to the JSON property `innerState`
# @return [String]
attr_accessor :inner_state
# Output only. A message containing the operation state.
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
# Output only. The time this state was entered.
# Corresponds to the JSON property `stateStartTime`
# @return [String]
attr_accessor :state_start_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@details = args[:details] if args.key?(:details)
@inner_state = args[:inner_state] if args.key?(:inner_state)
@state = args[:state] if args.key?(:state)
@state_start_time = args[:state_start_time] if args.key?(:state_start_time)
end
end
# A selector that chooses target cluster for jobs based on metadata.
class ClusterSelector
include Google::Apis::Core::Hashable
# Required. The cluster labels. Cluster must have all labels to match.
# Corresponds to the JSON property `clusterLabels`
# @return [Hash<String,String>]
attr_accessor :cluster_labels
# Optional. The zone where workflow process executes. This parameter does not
# affect the selection of the cluster.If unspecified, the zone of the first
# cluster matching the selector is used.
# Corresponds to the JSON property `zone`
# @return [String]
attr_accessor :zone
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cluster_labels = args[:cluster_labels] if args.key?(:cluster_labels)
@zone = args[:zone] if args.key?(:zone)
end
end
# The status of a cluster and its instances.
class ClusterStatus
include Google::Apis::Core::Hashable
# Output only. Optional details of cluster's state.
# Corresponds to the JSON property `detail`
# @return [String]
attr_accessor :detail
# Output only. The cluster's state.
# Corresponds to the JSON property `state`
# @return [String]
attr_accessor :state
# Output only. Time when this state was entered (see JSON representation of
# Timestamp (https://developers.google.com/protocol-buffers/docs/proto3#json)).
# Corresponds to the JSON property `stateStartTime`
# @return [String]
attr_accessor :state_start_time
# Output only. Additional state information that includes status reported by the
# agent.
# Corresponds to the JSON property `substate`
# @return [String]
attr_accessor :substate
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@detail = args[:detail] if args.key?(:detail)
@state = args[:state] if args.key?(:state)
@state_start_time = args[:state_start_time] if args.key?(:state_start_time)
@substate = args[:substate] if args.key?(:substate)
end
end
# A request to collect cluster diagnostic information.
class DiagnoseClusterRequest
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# The location of diagnostic output.
class DiagnoseClusterResults
include Google::Apis::Core::Hashable
# Output only. The Cloud Storage URI of the diagnostic output. The output report
# is a plain text file with a summary of collected diagnostics.
# Corresponds to the JSON property `outputUri`
# @return [String]
attr_accessor :output_uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@output_uri = args[:output_uri] if args.key?(:output_uri)
end
end
# Specifies the config of disk options for a group of VM instances.
class DiskConfig
include Google::Apis::Core::Hashable
# Optional. Size in GB of the boot disk (default is 500GB).
# Corresponds to the JSON property `bootDiskSizeGb`
# @return [Fixnum]
attr_accessor :boot_disk_size_gb
# Optional. Type of the boot disk (default is "pd-standard"). Valid values: "pd-
# ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk
# Hard Disk Drive).
# Corresponds to the JSON property `bootDiskType`
# @return [String]
attr_accessor :boot_disk_type
# Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached,
# the boot disk is used to store runtime logs and HDFS (https://hadoop.apache.
# org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached,
# this runtime bulk data is spread across them, and the boot disk contains only
# basic config and installed binaries.
# Corresponds to the JSON property `numLocalSsds`
# @return [Fixnum]
attr_accessor :num_local_ssds
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@boot_disk_size_gb = args[:boot_disk_size_gb] if args.key?(:boot_disk_size_gb)
@boot_disk_type = args[:boot_disk_type] if args.key?(:boot_disk_type)
@num_local_ssds = args[:num_local_ssds] if args.key?(:num_local_ssds)
end
end
# A generic empty message that you can re-use to avoid defining duplicated empty
# messages in your APIs. A typical example is to use it as the request or the
# response type of an API method. For instance: service Foo ` rpc Bar(google.
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
# Empty is empty JSON object ``.
class Empty
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Encryption settings for the cluster.
class EncryptionConfig
include Google::Apis::Core::Hashable
# Optional. The Cloud KMS key name to use for PD disk encryption for all
# instances in the cluster.
# Corresponds to the JSON property `gcePdKmsKeyName`
# @return [String]
attr_accessor :gce_pd_kms_key_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@gce_pd_kms_key_name = args[:gce_pd_kms_key_name] if args.key?(:gce_pd_kms_key_name)
end
end
# Endpoint config for this cluster
class EndpointConfig
include Google::Apis::Core::Hashable
# Optional. If true, enable http access to specific ports on the cluster from
# external sources. Defaults to false.
# Corresponds to the JSON property `enableHttpPortAccess`
# @return [Boolean]
attr_accessor :enable_http_port_access
alias_method :enable_http_port_access?, :enable_http_port_access
# Output only. The map of port descriptions to URLs. Will only be populated if
# enable_http_port_access is true.
# Corresponds to the JSON property `httpPorts`
# @return [Hash<String,String>]
attr_accessor :http_ports
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@enable_http_port_access = args[:enable_http_port_access] if args.key?(:enable_http_port_access)
@http_ports = args[:http_ports] if args.key?(:http_ports)
end
end
# Represents a textual expression in the Common Expression Language (CEL) syntax.
# CEL is a C-like expression language. The syntax and semantics of CEL are
# documented at https://github.com/google/cel-spec.Example (Comparison): title: "
# Summary size limit" description: "Determines if a summary is less than 100
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
# Requestor is owner" description: "Determines if requestor is the document
# owner" expression: "document.owner == request.auth.claims.email" Example (
# Logic): title: "Public documents" description: "Determine whether the document
# should be publicly visible" expression: "document.type != 'private' &&
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
# string" description: "Create a notification string with a timestamp."
# expression: "'New message received at ' + string(document.create_time)" The
# exact variables and functions that may be referenced within an expression are
# determined by the service that evaluates it. See the service documentation for
# additional information.
class Expr
include Google::Apis::Core::Hashable
# Optional. Description of the expression. This is a longer text which describes
# the expression, e.g. when hovered over it in a UI.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Textual representation of an expression in Common Expression Language syntax.
# Corresponds to the JSON property `expression`
# @return [String]
attr_accessor :expression
# Optional. String indicating the location of the expression for error reporting,
# e.g. a file name and a position in the file.
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
# Optional. Title for the expression, i.e. a short string describing its purpose.
# This can be used e.g. in UIs which allow to enter the expression.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@description = args[:description] if args.key?(:description)
@expression = args[:expression] if args.key?(:expression)
@location = args[:location] if args.key?(:location)
@title = args[:title] if args.key?(:title)
end
end
# Common config settings for resources of Compute Engine cluster instances,
# applicable to all instances in the cluster.
class GceClusterConfig
include Google::Apis::Core::Hashable
# Optional. If true, all instances in the cluster will only have internal IP
# addresses. By default, clusters are not restricted to internal IP addresses,
# and will have ephemeral external IP addresses assigned to each instance. This
# internal_ip_only restriction can only be enabled for subnetwork enabled
# networks, and all off-cluster dependencies must be configured to be accessible
# without external IP addresses.
# Corresponds to the JSON property `internalIpOnly`
# @return [Boolean]
attr_accessor :internal_ip_only
alias_method :internal_ip_only?, :internal_ip_only
# The Compute Engine metadata entries to add to all instances (see Project and
# instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-
# metadata#project_and_instance_metadata)).
# Corresponds to the JSON property `metadata`
# @return [Hash<String,String>]
attr_accessor :metadata
# Optional. The Compute Engine network to be used for machine communications.
# Cannot be specified with subnetwork_uri. If neither network_uri nor
# subnetwork_uri is specified, the "default" network of the project is used, if
# it exists. Cannot be a "Custom Subnet Network" (see Using Subnetworks (https://
# cloud.google.com/compute/docs/subnetworks) for more information).A full URL,
# partial URI, or short name are valid. Examples: https://www.googleapis.com/
# compute/v1/projects/[project_id]/regions/global/default projects/[project_id]/
# regions/global/default default
# Corresponds to the JSON property `networkUri`
# @return [String]
attr_accessor :network_uri
# Node Group Affinity for clusters using sole-tenant node groups.
# Corresponds to the JSON property `nodeGroupAffinity`
# @return [Google::Apis::DataprocV1beta2::NodeGroupAffinity]
attr_accessor :node_group_affinity
# Optional. The type of IPv6 access for a cluster.
# Corresponds to the JSON property `privateIpv6GoogleAccess`
# @return [String]
attr_accessor :private_ipv6_google_access
# Reservation Affinity for consuming Zonal reservation.
# Corresponds to the JSON property `reservationAffinity`
# @return [Google::Apis::DataprocV1beta2::ReservationAffinity]
attr_accessor :reservation_affinity
# Optional. The Dataproc service account (https://cloud.google.com/dataproc/docs/
# concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc) (
# also see VM Data Plane identity (https://cloud.google.com/dataproc/docs/
# concepts/iam/dataproc-principals#vm_service_account_data_plane_identity)) used
# by Dataproc cluster VM instances to access Google Cloud Platform services.If
# not specified, the Compute Engine default service account (https://cloud.
# google.com/compute/docs/access/service-accounts#default_service_account) is
# used.
# Corresponds to the JSON property `serviceAccount`
# @return [String]
attr_accessor :service_account
# Optional. The URIs of service account scopes to be included in Compute Engine
# instances. The following base set of scopes is always included: https://www.
# googleapis.com/auth/cloud.useraccounts.readonly https://www.googleapis.com/
# auth/devstorage.read_write https://www.googleapis.com/auth/logging.writeIf no
# scopes are specified, the following defaults are also provided: https://www.
# googleapis.com/auth/bigquery https://www.googleapis.com/auth/bigtable.admin.
# table https://www.googleapis.com/auth/bigtable.data https://www.googleapis.com/
# auth/devstorage.full_control
# Corresponds to the JSON property `serviceAccountScopes`
# @return [Array<String>]
attr_accessor :service_account_scopes
# Shielded Instance Config for clusters using shielded VMs.
# Corresponds to the JSON property `shieldedInstanceConfig`
# @return [Google::Apis::DataprocV1beta2::ShieldedInstanceConfig]
attr_accessor :shielded_instance_config
# Optional. The Compute Engine subnetwork to be used for machine communications.
# Cannot be specified with network_uri.A full URL, partial URI, or short name
# are valid. Examples: https://www.googleapis.com/compute/v1/projects/[