google-cloud-dataproc-v1 0.15.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +18 -6
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/rest/client.rb +711 -0
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/rest/service_stub.rb +382 -0
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/rest.rb +54 -0
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service.rb +6 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/client.rb +51 -15
- data/lib/google/cloud/dataproc/v1/batch_controller/operations.rb +12 -14
- data/lib/google/cloud/dataproc/v1/batch_controller/paths.rb +19 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/rest/client.rb +640 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/rest/operations.rb +820 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/rest/service_stub.rb +285 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/rest.rb +54 -0
- data/lib/google/cloud/dataproc/v1/batch_controller.rb +6 -0
- data/lib/google/cloud/dataproc/v1/batches_pb.rb +2 -0
- data/lib/google/cloud/dataproc/v1/bindings_override.rb +257 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +43 -31
- data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +12 -14
- data/lib/google/cloud/dataproc/v1/cluster_controller/paths.rb +19 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller/rest/client.rb +1117 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller/rest/operations.rb +820 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller/rest/service_stub.rb +539 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller/rest.rb +55 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller.rb +6 -0
- data/lib/google/cloud/dataproc/v1/clusters_pb.rb +10 -9
- data/lib/google/cloud/dataproc/v1/job_controller/client.rb +22 -10
- data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +12 -14
- data/lib/google/cloud/dataproc/v1/job_controller/rest/client.rb +929 -0
- data/lib/google/cloud/dataproc/v1/job_controller/rest/operations.rb +820 -0
- data/lib/google/cloud/dataproc/v1/job_controller/rest/service_stub.rb +476 -0
- data/lib/google/cloud/dataproc/v1/job_controller/rest.rb +53 -0
- data/lib/google/cloud/dataproc/v1/job_controller.rb +6 -0
- data/lib/google/cloud/dataproc/v1/jobs_pb.rb +13 -0
- data/lib/google/cloud/dataproc/v1/node_group_controller/client.rb +23 -9
- data/lib/google/cloud/dataproc/v1/node_group_controller/operations.rb +12 -14
- data/lib/google/cloud/dataproc/v1/node_group_controller/rest/client.rb +581 -0
- data/lib/google/cloud/dataproc/v1/node_group_controller/rest/operations.rb +820 -0
- data/lib/google/cloud/dataproc/v1/node_group_controller/rest/service_stub.rb +227 -0
- data/lib/google/cloud/dataproc/v1/node_group_controller/rest.rb +55 -0
- data/lib/google/cloud/dataproc/v1/node_group_controller.rb +6 -0
- data/lib/google/cloud/dataproc/v1/operations_pb.rb +1 -0
- data/lib/google/cloud/dataproc/v1/rest.rb +43 -0
- data/lib/google/cloud/dataproc/v1/shared_pb.rb +24 -1
- data/lib/google/cloud/dataproc/v1/version.rb +1 -1
- data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +28 -15
- data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +12 -14
- data/lib/google/cloud/dataproc/v1/workflow_template_service/rest/client.rb +983 -0
- data/lib/google/cloud/dataproc/v1/workflow_template_service/rest/operations.rb +820 -0
- data/lib/google/cloud/dataproc/v1/workflow_template_service/rest/service_stub.rb +518 -0
- data/lib/google/cloud/dataproc/v1/workflow_template_service/rest.rb +55 -0
- data/lib/google/cloud/dataproc/v1/workflow_template_service.rb +6 -0
- data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +2 -1
- data/lib/google/cloud/dataproc/v1.rb +6 -1
- data/proto_docs/google/cloud/dataproc/v1/autoscaling_policies.rb +8 -8
- data/proto_docs/google/cloud/dataproc/v1/batches.rb +42 -14
- data/proto_docs/google/cloud/dataproc/v1/clusters.rb +60 -54
- data/proto_docs/google/cloud/dataproc/v1/jobs.rb +48 -0
- data/proto_docs/google/cloud/dataproc/v1/node_groups.rb +1 -1
- data/proto_docs/google/cloud/dataproc/v1/operations.rb +3 -0
- data/proto_docs/google/cloud/dataproc/v1/shared.rb +174 -56
- data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +14 -11
- metadata +52 -7
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/dataproc/v1/clusters_pb"
|
21
|
+
require "google/iam/v1"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -170,6 +171,12 @@ module Google
|
|
170
171
|
config.endpoint = @config.endpoint
|
171
172
|
end
|
172
173
|
|
174
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
175
|
+
config.credentials = credentials
|
176
|
+
config.quota_project = @quota_project_id
|
177
|
+
config.endpoint = @config.endpoint
|
178
|
+
end
|
179
|
+
|
173
180
|
@cluster_controller_stub = ::Gapic::ServiceStub.new(
|
174
181
|
::Google::Cloud::Dataproc::V1::ClusterController::Stub,
|
175
182
|
credentials: credentials,
|
@@ -186,6 +193,13 @@ module Google
|
|
186
193
|
#
|
187
194
|
attr_reader :operations_client
|
188
195
|
|
196
|
+
##
|
197
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
198
|
+
#
|
199
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
200
|
+
#
|
201
|
+
attr_reader :iam_policy_client
|
202
|
+
|
189
203
|
# Service calls
|
190
204
|
|
191
205
|
##
|
@@ -251,14 +265,14 @@ module Google
|
|
251
265
|
# # Call the create_cluster method.
|
252
266
|
# result = client.create_cluster request
|
253
267
|
#
|
254
|
-
# # The returned object is of type Gapic::Operation. You can use
|
255
|
-
# #
|
256
|
-
# #
|
268
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
269
|
+
# # check the status of an operation, cancel it, or wait for results.
|
270
|
+
# # Here is how to wait for a response.
|
257
271
|
# result.wait_until_done! timeout: 60
|
258
272
|
# if result.response?
|
259
273
|
# p result.response
|
260
274
|
# else
|
261
|
-
# puts "
|
275
|
+
# puts "No response received."
|
262
276
|
# end
|
263
277
|
#
|
264
278
|
def create_cluster request, options = nil
|
@@ -339,7 +353,7 @@ module Google
|
|
339
353
|
# @param cluster [::Google::Cloud::Dataproc::V1::Cluster, ::Hash]
|
340
354
|
# Required. The changes to the cluster.
|
341
355
|
# @param graceful_decommission_timeout [::Google::Protobuf::Duration, ::Hash]
|
342
|
-
# Optional. Timeout for graceful YARN
|
356
|
+
# Optional. Timeout for graceful YARN decommissioning. Graceful
|
343
357
|
# decommissioning allows removing nodes from the cluster without
|
344
358
|
# interrupting jobs in progress. Timeout specifies how long to wait for jobs
|
345
359
|
# in progress to finish before forcefully removing nodes (and potentially
|
@@ -434,14 +448,14 @@ module Google
|
|
434
448
|
# # Call the update_cluster method.
|
435
449
|
# result = client.update_cluster request
|
436
450
|
#
|
437
|
-
# # The returned object is of type Gapic::Operation. You can use
|
438
|
-
# #
|
439
|
-
# #
|
451
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
452
|
+
# # check the status of an operation, cancel it, or wait for results.
|
453
|
+
# # Here is how to wait for a response.
|
440
454
|
# result.wait_until_done! timeout: 60
|
441
455
|
# if result.response?
|
442
456
|
# p result.response
|
443
457
|
# else
|
444
|
-
# puts "
|
458
|
+
# puts "No response received."
|
445
459
|
# end
|
446
460
|
#
|
447
461
|
def update_cluster request, options = nil
|
@@ -554,14 +568,14 @@ module Google
|
|
554
568
|
# # Call the stop_cluster method.
|
555
569
|
# result = client.stop_cluster request
|
556
570
|
#
|
557
|
-
# # The returned object is of type Gapic::Operation. You can use
|
558
|
-
# #
|
559
|
-
# #
|
571
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
572
|
+
# # check the status of an operation, cancel it, or wait for results.
|
573
|
+
# # Here is how to wait for a response.
|
560
574
|
# result.wait_until_done! timeout: 60
|
561
575
|
# if result.response?
|
562
576
|
# p result.response
|
563
577
|
# else
|
564
|
-
# puts "
|
578
|
+
# puts "No response received."
|
565
579
|
# end
|
566
580
|
#
|
567
581
|
def stop_cluster request, options = nil
|
@@ -674,14 +688,14 @@ module Google
|
|
674
688
|
# # Call the start_cluster method.
|
675
689
|
# result = client.start_cluster request
|
676
690
|
#
|
677
|
-
# # The returned object is of type Gapic::Operation. You can use
|
678
|
-
# #
|
679
|
-
# #
|
691
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
692
|
+
# # check the status of an operation, cancel it, or wait for results.
|
693
|
+
# # Here is how to wait for a response.
|
680
694
|
# result.wait_until_done! timeout: 60
|
681
695
|
# if result.response?
|
682
696
|
# p result.response
|
683
697
|
# else
|
684
|
-
# puts "
|
698
|
+
# puts "No response received."
|
685
699
|
# end
|
686
700
|
#
|
687
701
|
def start_cluster request, options = nil
|
@@ -796,14 +810,14 @@ module Google
|
|
796
810
|
# # Call the delete_cluster method.
|
797
811
|
# result = client.delete_cluster request
|
798
812
|
#
|
799
|
-
# # The returned object is of type Gapic::Operation. You can use
|
800
|
-
# #
|
801
|
-
# #
|
813
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
814
|
+
# # check the status of an operation, cancel it, or wait for results.
|
815
|
+
# # Here is how to wait for a response.
|
802
816
|
# result.wait_until_done! timeout: 60
|
803
817
|
# if result.response?
|
804
818
|
# p result.response
|
805
819
|
# else
|
806
|
-
# puts "
|
820
|
+
# puts "No response received."
|
807
821
|
# end
|
808
822
|
#
|
809
823
|
def delete_cluster request, options = nil
|
@@ -1018,13 +1032,11 @@ module Google
|
|
1018
1032
|
# # Call the list_clusters method.
|
1019
1033
|
# result = client.list_clusters request
|
1020
1034
|
#
|
1021
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1022
|
-
# #
|
1023
|
-
#
|
1024
|
-
# # methods are also available for managing paging directly.
|
1025
|
-
# result.each do |response|
|
1035
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1036
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1037
|
+
# result.each do |item|
|
1026
1038
|
# # Each element is of type ::Google::Cloud::Dataproc::V1::Cluster.
|
1027
|
-
# p
|
1039
|
+
# p item
|
1028
1040
|
# end
|
1029
1041
|
#
|
1030
1042
|
def list_clusters request, options = nil
|
@@ -1124,14 +1136,14 @@ module Google
|
|
1124
1136
|
# # Call the diagnose_cluster method.
|
1125
1137
|
# result = client.diagnose_cluster request
|
1126
1138
|
#
|
1127
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1128
|
-
# #
|
1129
|
-
# #
|
1139
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1140
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1141
|
+
# # Here is how to wait for a response.
|
1130
1142
|
# result.wait_until_done! timeout: 60
|
1131
1143
|
# if result.response?
|
1132
1144
|
# p result.response
|
1133
1145
|
# else
|
1134
|
-
# puts "
|
1146
|
+
# puts "No response received."
|
1135
1147
|
# end
|
1136
1148
|
#
|
1137
1149
|
def diagnose_cluster request, options = nil
|
@@ -158,13 +158,11 @@ module Google
|
|
158
158
|
# # Call the list_operations method.
|
159
159
|
# result = client.list_operations request
|
160
160
|
#
|
161
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
162
|
-
# #
|
163
|
-
#
|
164
|
-
# # methods are also available for managing paging directly.
|
165
|
-
# result.each do |response|
|
161
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
162
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
163
|
+
# result.each do |item|
|
166
164
|
# # Each element is of type ::Google::Longrunning::Operation.
|
167
|
-
# p
|
165
|
+
# p item
|
168
166
|
# end
|
169
167
|
#
|
170
168
|
def list_operations request, options = nil
|
@@ -253,14 +251,14 @@ module Google
|
|
253
251
|
# # Call the get_operation method.
|
254
252
|
# result = client.get_operation request
|
255
253
|
#
|
256
|
-
# # The returned object is of type Gapic::Operation. You can use
|
257
|
-
# #
|
258
|
-
# #
|
254
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
255
|
+
# # check the status of an operation, cancel it, or wait for results.
|
256
|
+
# # Here is how to wait for a response.
|
259
257
|
# result.wait_until_done! timeout: 60
|
260
258
|
# if result.response?
|
261
259
|
# p result.response
|
262
260
|
# else
|
263
|
-
# puts "
|
261
|
+
# puts "No response received."
|
264
262
|
# end
|
265
263
|
#
|
266
264
|
def get_operation request, options = nil
|
@@ -540,14 +538,14 @@ module Google
|
|
540
538
|
# # Call the wait_operation method.
|
541
539
|
# result = client.wait_operation request
|
542
540
|
#
|
543
|
-
# # The returned object is of type Gapic::Operation. You can use
|
544
|
-
# #
|
545
|
-
# #
|
541
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
542
|
+
# # check the status of an operation, cancel it, or wait for results.
|
543
|
+
# # Here is how to wait for a response.
|
546
544
|
# result.wait_until_done! timeout: 60
|
547
545
|
# if result.response?
|
548
546
|
# p result.response
|
549
547
|
# else
|
550
|
-
# puts "
|
548
|
+
# puts "No response received."
|
551
549
|
# end
|
552
550
|
#
|
553
551
|
def wait_operation request, options = nil
|
@@ -24,6 +24,25 @@ module Google
|
|
24
24
|
module ClusterController
|
25
25
|
# Path helper methods for the ClusterController API.
|
26
26
|
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Cluster resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/clusters/{cluster}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param cluster [String]
|
37
|
+
#
|
38
|
+
# @return [::String]
|
39
|
+
def cluster_path project:, location:, cluster:
|
40
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
41
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
42
|
+
|
43
|
+
"projects/#{project}/locations/#{location}/clusters/#{cluster}"
|
44
|
+
end
|
45
|
+
|
27
46
|
##
|
28
47
|
# Create a fully-qualified NodeGroup resource string.
|
29
48
|
#
|