google-cloud-dataproc-v1 0.6.3 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +1 -1
- data/lib/google/cloud/dataproc/v1/autoscaling_policies_pb.rb +3 -2
- data/lib/google/cloud/dataproc/v1/autoscaling_policies_services_pb.rb +1 -1
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +106 -15
- data/lib/google/cloud/dataproc/v1/batch_controller/client.rb +719 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/credentials.rb +51 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/operations.rb +767 -0
- data/lib/google/cloud/dataproc/v1/batch_controller/paths.rb +69 -0
- data/lib/google/cloud/dataproc/v1/batch_controller.rb +50 -0
- data/lib/google/cloud/dataproc/v1/batches_pb.rb +123 -0
- data/lib/google/cloud/dataproc/v1/batches_services_pb.rb +52 -0
- data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +266 -49
- data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +115 -12
- data/lib/google/cloud/dataproc/v1/cluster_controller/paths.rb +0 -19
- data/lib/google/cloud/dataproc/v1/clusters_pb.rb +23 -10
- data/lib/google/cloud/dataproc/v1/clusters_services_pb.rb +3 -1
- data/lib/google/cloud/dataproc/v1/job_controller/client.rb +187 -32
- data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +115 -12
- data/lib/google/cloud/dataproc/v1/jobs_pb.rb +2 -2
- data/lib/google/cloud/dataproc/v1/jobs_services_pb.rb +1 -1
- data/lib/google/cloud/dataproc/v1/operations_pb.rb +18 -3
- data/lib/google/cloud/dataproc/v1/shared_pb.rb +99 -2
- data/lib/google/cloud/dataproc/v1/version.rb +1 -1
- data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +163 -24
- data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +115 -12
- data/lib/google/cloud/dataproc/v1/workflow_template_service/paths.rb +0 -19
- data/lib/google/cloud/dataproc/v1/workflow_templates_pb.rb +2 -2
- data/lib/google/cloud/dataproc/v1/workflow_templates_services_pb.rb +2 -3
- data/lib/google/cloud/dataproc/v1.rb +1 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/dataproc/v1/autoscaling_policies.rb +18 -0
- data/proto_docs/google/cloud/dataproc/v1/batches.rb +339 -0
- data/proto_docs/google/cloud/dataproc/v1/clusters.rb +117 -47
- data/proto_docs/google/cloud/dataproc/v1/jobs.rb +20 -9
- data/proto_docs/google/cloud/dataproc/v1/operations.rb +48 -0
- data/proto_docs/google/cloud/dataproc/v1/shared.rb +336 -1
- data/proto_docs/google/cloud/dataproc/v1/workflow_templates.rb +12 -15
- metadata +11 -3
@@ -171,6 +171,7 @@ module Google
|
|
171
171
|
|
172
172
|
@operations_client = Operations.new do |config|
|
173
173
|
config.credentials = credentials
|
174
|
+
config.quota_project = @quota_project_id
|
174
175
|
config.endpoint = @config.endpoint
|
175
176
|
end
|
176
177
|
|
@@ -214,7 +215,7 @@ module Google
|
|
214
215
|
# Required. The resource name of the region or location, as described
|
215
216
|
# in https://cloud.google.com/apis/design/resource_names.
|
216
217
|
#
|
217
|
-
# * For `projects.regions.workflowTemplates
|
218
|
+
# * For `projects.regions.workflowTemplates.create`, the resource name of the
|
218
219
|
# region has the following format:
|
219
220
|
# `projects/{project_id}/regions/{region}`
|
220
221
|
#
|
@@ -232,6 +233,21 @@ module Google
|
|
232
233
|
#
|
233
234
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
234
235
|
#
|
236
|
+
# @example Basic example
|
237
|
+
# require "google/cloud/dataproc/v1"
|
238
|
+
#
|
239
|
+
# # Create a client object. The client can be reused for multiple calls.
|
240
|
+
# client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
|
241
|
+
#
|
242
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
243
|
+
# request = Google::Cloud::Dataproc::V1::CreateWorkflowTemplateRequest.new
|
244
|
+
#
|
245
|
+
# # Call the create_workflow_template method.
|
246
|
+
# result = client.create_workflow_template request
|
247
|
+
#
|
248
|
+
# # The returned object is of type Google::Cloud::Dataproc::V1::WorkflowTemplate.
|
249
|
+
# p result
|
250
|
+
#
|
235
251
|
def create_workflow_template request, options = nil
|
236
252
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
237
253
|
|
@@ -249,9 +265,11 @@ module Google
|
|
249
265
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
250
266
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
251
267
|
|
252
|
-
header_params = {
|
253
|
-
|
254
|
-
|
268
|
+
header_params = {}
|
269
|
+
if request.parent
|
270
|
+
header_params["parent"] = request.parent
|
271
|
+
end
|
272
|
+
|
255
273
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
256
274
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
257
275
|
|
@@ -317,6 +335,21 @@ module Google
|
|
317
335
|
#
|
318
336
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
319
337
|
#
|
338
|
+
# @example Basic example
|
339
|
+
# require "google/cloud/dataproc/v1"
|
340
|
+
#
|
341
|
+
# # Create a client object. The client can be reused for multiple calls.
|
342
|
+
# client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
|
343
|
+
#
|
344
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
345
|
+
# request = Google::Cloud::Dataproc::V1::GetWorkflowTemplateRequest.new
|
346
|
+
#
|
347
|
+
# # Call the get_workflow_template method.
|
348
|
+
# result = client.get_workflow_template request
|
349
|
+
#
|
350
|
+
# # The returned object is of type Google::Cloud::Dataproc::V1::WorkflowTemplate.
|
351
|
+
# p result
|
352
|
+
#
|
320
353
|
def get_workflow_template request, options = nil
|
321
354
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
322
355
|
|
@@ -334,9 +367,11 @@ module Google
|
|
334
367
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
335
368
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
336
369
|
|
337
|
-
header_params = {
|
338
|
-
|
339
|
-
|
370
|
+
header_params = {}
|
371
|
+
if request.name
|
372
|
+
header_params["name"] = request.name
|
373
|
+
end
|
374
|
+
|
340
375
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
341
376
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
342
377
|
|
@@ -433,6 +468,28 @@ module Google
|
|
433
468
|
#
|
434
469
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
435
470
|
#
|
471
|
+
# @example Basic example
|
472
|
+
# require "google/cloud/dataproc/v1"
|
473
|
+
#
|
474
|
+
# # Create a client object. The client can be reused for multiple calls.
|
475
|
+
# client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
|
476
|
+
#
|
477
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
478
|
+
# request = Google::Cloud::Dataproc::V1::InstantiateWorkflowTemplateRequest.new
|
479
|
+
#
|
480
|
+
# # Call the instantiate_workflow_template method.
|
481
|
+
# result = client.instantiate_workflow_template request
|
482
|
+
#
|
483
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
484
|
+
# # object to check the status of an operation, cancel it, or wait
|
485
|
+
# # for results. Here is how to block until completion:
|
486
|
+
# result.wait_until_done! timeout: 60
|
487
|
+
# if result.response?
|
488
|
+
# p result.response
|
489
|
+
# else
|
490
|
+
# puts "Error!"
|
491
|
+
# end
|
492
|
+
#
|
436
493
|
def instantiate_workflow_template request, options = nil
|
437
494
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
438
495
|
|
@@ -450,9 +507,11 @@ module Google
|
|
450
507
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
451
508
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
452
509
|
|
453
|
-
header_params = {
|
454
|
-
|
455
|
-
|
510
|
+
header_params = {}
|
511
|
+
if request.name
|
512
|
+
header_params["name"] = request.name
|
513
|
+
end
|
514
|
+
|
456
515
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
457
516
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
458
517
|
|
@@ -477,8 +536,7 @@ module Google
|
|
477
536
|
# Instantiates a template and begins execution.
|
478
537
|
#
|
479
538
|
# This method is equivalent to executing the sequence
|
480
|
-
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#create_workflow_template CreateWorkflowTemplate},
|
481
|
-
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#instantiate_workflow_template InstantiateWorkflowTemplate},
|
539
|
+
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#create_workflow_template CreateWorkflowTemplate}, {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#instantiate_workflow_template InstantiateWorkflowTemplate},
|
482
540
|
# {::Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client#delete_workflow_template DeleteWorkflowTemplate}.
|
483
541
|
#
|
484
542
|
# The returned Operation can be used to track execution of
|
@@ -547,6 +605,28 @@ module Google
|
|
547
605
|
#
|
548
606
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
549
607
|
#
|
608
|
+
# @example Basic example
|
609
|
+
# require "google/cloud/dataproc/v1"
|
610
|
+
#
|
611
|
+
# # Create a client object. The client can be reused for multiple calls.
|
612
|
+
# client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
|
613
|
+
#
|
614
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
615
|
+
# request = Google::Cloud::Dataproc::V1::InstantiateInlineWorkflowTemplateRequest.new
|
616
|
+
#
|
617
|
+
# # Call the instantiate_inline_workflow_template method.
|
618
|
+
# result = client.instantiate_inline_workflow_template request
|
619
|
+
#
|
620
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
621
|
+
# # object to check the status of an operation, cancel it, or wait
|
622
|
+
# # for results. Here is how to block until completion:
|
623
|
+
# result.wait_until_done! timeout: 60
|
624
|
+
# if result.response?
|
625
|
+
# p result.response
|
626
|
+
# else
|
627
|
+
# puts "Error!"
|
628
|
+
# end
|
629
|
+
#
|
550
630
|
def instantiate_inline_workflow_template request, options = nil
|
551
631
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
552
632
|
|
@@ -564,9 +644,11 @@ module Google
|
|
564
644
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
565
645
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
566
646
|
|
567
|
-
header_params = {
|
568
|
-
|
569
|
-
|
647
|
+
header_params = {}
|
648
|
+
if request.parent
|
649
|
+
header_params["parent"] = request.parent
|
650
|
+
end
|
651
|
+
|
570
652
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
571
653
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
572
654
|
|
@@ -619,6 +701,21 @@ module Google
|
|
619
701
|
#
|
620
702
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
621
703
|
#
|
704
|
+
# @example Basic example
|
705
|
+
# require "google/cloud/dataproc/v1"
|
706
|
+
#
|
707
|
+
# # Create a client object. The client can be reused for multiple calls.
|
708
|
+
# client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
|
709
|
+
#
|
710
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
711
|
+
# request = Google::Cloud::Dataproc::V1::UpdateWorkflowTemplateRequest.new
|
712
|
+
#
|
713
|
+
# # Call the update_workflow_template method.
|
714
|
+
# result = client.update_workflow_template request
|
715
|
+
#
|
716
|
+
# # The returned object is of type Google::Cloud::Dataproc::V1::WorkflowTemplate.
|
717
|
+
# p result
|
718
|
+
#
|
622
719
|
def update_workflow_template request, options = nil
|
623
720
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
624
721
|
|
@@ -636,9 +733,11 @@ module Google
|
|
636
733
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
637
734
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
638
735
|
|
639
|
-
header_params = {
|
640
|
-
|
641
|
-
|
736
|
+
header_params = {}
|
737
|
+
if request.template&.name
|
738
|
+
header_params["template.name"] = request.template.name
|
739
|
+
end
|
740
|
+
|
642
741
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
643
742
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
644
743
|
|
@@ -701,6 +800,27 @@ module Google
|
|
701
800
|
#
|
702
801
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
703
802
|
#
|
803
|
+
# @example Basic example
|
804
|
+
# require "google/cloud/dataproc/v1"
|
805
|
+
#
|
806
|
+
# # Create a client object. The client can be reused for multiple calls.
|
807
|
+
# client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
|
808
|
+
#
|
809
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
810
|
+
# request = Google::Cloud::Dataproc::V1::ListWorkflowTemplatesRequest.new
|
811
|
+
#
|
812
|
+
# # Call the list_workflow_templates method.
|
813
|
+
# result = client.list_workflow_templates request
|
814
|
+
#
|
815
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
816
|
+
# # iterate over all elements by calling #each, and the enumerable
|
817
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
818
|
+
# # methods are also available for managing paging directly.
|
819
|
+
# result.each do |response|
|
820
|
+
# # Each element is of type ::Google::Cloud::Dataproc::V1::WorkflowTemplate.
|
821
|
+
# p response
|
822
|
+
# end
|
823
|
+
#
|
704
824
|
def list_workflow_templates request, options = nil
|
705
825
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
706
826
|
|
@@ -718,9 +838,11 @@ module Google
|
|
718
838
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
719
839
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
720
840
|
|
721
|
-
header_params = {
|
722
|
-
|
723
|
-
|
841
|
+
header_params = {}
|
842
|
+
if request.parent
|
843
|
+
header_params["parent"] = request.parent
|
844
|
+
end
|
845
|
+
|
724
846
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
725
847
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
726
848
|
|
@@ -783,6 +905,21 @@ module Google
|
|
783
905
|
#
|
784
906
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
785
907
|
#
|
908
|
+
# @example Basic example
|
909
|
+
# require "google/cloud/dataproc/v1"
|
910
|
+
#
|
911
|
+
# # Create a client object. The client can be reused for multiple calls.
|
912
|
+
# client = Google::Cloud::Dataproc::V1::WorkflowTemplateService::Client.new
|
913
|
+
#
|
914
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
915
|
+
# request = Google::Cloud::Dataproc::V1::DeleteWorkflowTemplateRequest.new
|
916
|
+
#
|
917
|
+
# # Call the delete_workflow_template method.
|
918
|
+
# result = client.delete_workflow_template request
|
919
|
+
#
|
920
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
921
|
+
# p result
|
922
|
+
#
|
786
923
|
def delete_workflow_template request, options = nil
|
787
924
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
788
925
|
|
@@ -800,9 +937,11 @@ module Google
|
|
800
937
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
801
938
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
802
939
|
|
803
|
-
header_params = {
|
804
|
-
|
805
|
-
|
940
|
+
header_params = {}
|
941
|
+
if request.name
|
942
|
+
header_params["name"] = request.name
|
943
|
+
end
|
944
|
+
|
806
945
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
807
946
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
808
947
|
|
@@ -143,6 +143,27 @@ module Google
|
|
143
143
|
#
|
144
144
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
145
145
|
#
|
146
|
+
# @example Basic example
|
147
|
+
# require "google/longrunning"
|
148
|
+
#
|
149
|
+
# # Create a client object. The client can be reused for multiple calls.
|
150
|
+
# client = Google::Longrunning::Operations::Client.new
|
151
|
+
#
|
152
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
153
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
154
|
+
#
|
155
|
+
# # Call the list_operations method.
|
156
|
+
# result = client.list_operations request
|
157
|
+
#
|
158
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
159
|
+
# # iterate over all elements by calling #each, and the enumerable
|
160
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
161
|
+
# # methods are also available for managing paging directly.
|
162
|
+
# result.each do |response|
|
163
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
164
|
+
# p response
|
165
|
+
# end
|
166
|
+
#
|
146
167
|
def list_operations request, options = nil
|
147
168
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
148
169
|
|
@@ -160,9 +181,11 @@ module Google
|
|
160
181
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
161
182
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
162
183
|
|
163
|
-
header_params = {
|
164
|
-
|
165
|
-
|
184
|
+
header_params = {}
|
185
|
+
if request.name
|
186
|
+
header_params["name"] = request.name
|
187
|
+
end
|
188
|
+
|
166
189
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
167
190
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
168
191
|
|
@@ -215,6 +238,28 @@ module Google
|
|
215
238
|
#
|
216
239
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
217
240
|
#
|
241
|
+
# @example Basic example
|
242
|
+
# require "google/longrunning"
|
243
|
+
#
|
244
|
+
# # Create a client object. The client can be reused for multiple calls.
|
245
|
+
# client = Google::Longrunning::Operations::Client.new
|
246
|
+
#
|
247
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
248
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
249
|
+
#
|
250
|
+
# # Call the get_operation method.
|
251
|
+
# result = client.get_operation request
|
252
|
+
#
|
253
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
254
|
+
# # object to check the status of an operation, cancel it, or wait
|
255
|
+
# # for results. Here is how to block until completion:
|
256
|
+
# result.wait_until_done! timeout: 60
|
257
|
+
# if result.response?
|
258
|
+
# p result.response
|
259
|
+
# else
|
260
|
+
# puts "Error!"
|
261
|
+
# end
|
262
|
+
#
|
218
263
|
def get_operation request, options = nil
|
219
264
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
220
265
|
|
@@ -232,9 +277,11 @@ module Google
|
|
232
277
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
233
278
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
234
279
|
|
235
|
-
header_params = {
|
236
|
-
|
237
|
-
|
280
|
+
header_params = {}
|
281
|
+
if request.name
|
282
|
+
header_params["name"] = request.name
|
283
|
+
end
|
284
|
+
|
238
285
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
239
286
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
240
287
|
|
@@ -287,6 +334,21 @@ module Google
|
|
287
334
|
#
|
288
335
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
289
336
|
#
|
337
|
+
# @example Basic example
|
338
|
+
# require "google/longrunning"
|
339
|
+
#
|
340
|
+
# # Create a client object. The client can be reused for multiple calls.
|
341
|
+
# client = Google::Longrunning::Operations::Client.new
|
342
|
+
#
|
343
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
344
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
345
|
+
#
|
346
|
+
# # Call the delete_operation method.
|
347
|
+
# result = client.delete_operation request
|
348
|
+
#
|
349
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
350
|
+
# p result
|
351
|
+
#
|
290
352
|
def delete_operation request, options = nil
|
291
353
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
292
354
|
|
@@ -304,9 +366,11 @@ module Google
|
|
304
366
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
305
367
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
306
368
|
|
307
|
-
header_params = {
|
308
|
-
|
309
|
-
|
369
|
+
header_params = {}
|
370
|
+
if request.name
|
371
|
+
header_params["name"] = request.name
|
372
|
+
end
|
373
|
+
|
310
374
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
311
375
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
312
376
|
|
@@ -364,6 +428,21 @@ module Google
|
|
364
428
|
#
|
365
429
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
366
430
|
#
|
431
|
+
# @example Basic example
|
432
|
+
# require "google/longrunning"
|
433
|
+
#
|
434
|
+
# # Create a client object. The client can be reused for multiple calls.
|
435
|
+
# client = Google::Longrunning::Operations::Client.new
|
436
|
+
#
|
437
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
438
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
439
|
+
#
|
440
|
+
# # Call the cancel_operation method.
|
441
|
+
# result = client.cancel_operation request
|
442
|
+
#
|
443
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
444
|
+
# p result
|
445
|
+
#
|
367
446
|
def cancel_operation request, options = nil
|
368
447
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
369
448
|
|
@@ -381,9 +460,11 @@ module Google
|
|
381
460
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
382
461
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
383
462
|
|
384
|
-
header_params = {
|
385
|
-
|
386
|
-
|
463
|
+
header_params = {}
|
464
|
+
if request.name
|
465
|
+
header_params["name"] = request.name
|
466
|
+
end
|
467
|
+
|
387
468
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
388
469
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
389
470
|
|
@@ -444,6 +525,28 @@ module Google
|
|
444
525
|
#
|
445
526
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
446
527
|
#
|
528
|
+
# @example Basic example
|
529
|
+
# require "google/longrunning"
|
530
|
+
#
|
531
|
+
# # Create a client object. The client can be reused for multiple calls.
|
532
|
+
# client = Google::Longrunning::Operations::Client.new
|
533
|
+
#
|
534
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
535
|
+
# request = Google::Longrunning::WaitOperationRequest.new
|
536
|
+
#
|
537
|
+
# # Call the wait_operation method.
|
538
|
+
# result = client.wait_operation request
|
539
|
+
#
|
540
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
541
|
+
# # object to check the status of an operation, cancel it, or wait
|
542
|
+
# # for results. Here is how to block until completion:
|
543
|
+
# result.wait_until_done! timeout: 60
|
544
|
+
# if result.response?
|
545
|
+
# p result.response
|
546
|
+
# else
|
547
|
+
# puts "Error!"
|
548
|
+
# end
|
549
|
+
#
|
447
550
|
def wait_operation request, options = nil
|
448
551
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
449
552
|
|
@@ -24,25 +24,6 @@ module Google
|
|
24
24
|
module WorkflowTemplateService
|
25
25
|
# Path helper methods for the WorkflowTemplateService 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
|
-
|
46
27
|
##
|
47
28
|
# Create a fully-qualified Location resource string.
|
48
29
|
#
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dataproc/v1/workflow_templates.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -13,6 +11,8 @@ require 'google/longrunning/operations_pb'
|
|
13
11
|
require 'google/protobuf/duration_pb'
|
14
12
|
require 'google/protobuf/empty_pb'
|
15
13
|
require 'google/protobuf/timestamp_pb'
|
14
|
+
require 'google/protobuf'
|
15
|
+
|
16
16
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
17
17
|
add_file("google/cloud/dataproc/v1/workflow_templates.proto", :syntax => :proto3) do
|
18
18
|
add_message "google.cloud.dataproc.v1.WorkflowTemplate" do
|
@@ -28,7 +28,7 @@ module Google
|
|
28
28
|
# Dataproc API.
|
29
29
|
class Service
|
30
30
|
|
31
|
-
include GRPC::GenericService
|
31
|
+
include ::GRPC::GenericService
|
32
32
|
|
33
33
|
self.marshal_class_method = :encode
|
34
34
|
self.unmarshal_class_method = :decode
|
@@ -65,8 +65,7 @@ module Google
|
|
65
65
|
# Instantiates a template and begins execution.
|
66
66
|
#
|
67
67
|
# This method is equivalent to executing the sequence
|
68
|
-
# [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate],
|
69
|
-
# [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate],
|
68
|
+
# [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate],
|
70
69
|
# [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].
|
71
70
|
#
|
72
71
|
# The returned Operation can be used to track execution of
|
@@ -17,6 +17,7 @@
|
|
17
17
|
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
18
|
|
19
19
|
require "google/cloud/dataproc/v1/autoscaling_policy_service"
|
20
|
+
require "google/cloud/dataproc/v1/batch_controller"
|
20
21
|
require "google/cloud/dataproc/v1/cluster_controller"
|
21
22
|
require "google/cloud/dataproc/v1/job_controller"
|
22
23
|
require "google/cloud/dataproc/v1/workflow_template_service"
|
@@ -33,11 +33,7 @@ module Google
|
|
33
33
|
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
34
|
# option (google.api.resource) = {
|
35
35
|
# type: "pubsub.googleapis.com/Topic"
|
36
|
-
#
|
37
|
-
# pattern: "projects/{project}/topics/{topic}"
|
38
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
-
# parent_name_extractor: "projects/{project}"
|
40
|
-
# }
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
41
37
|
# };
|
42
38
|
# }
|
43
39
|
#
|
@@ -45,10 +41,7 @@ module Google
|
|
45
41
|
#
|
46
42
|
# resources:
|
47
43
|
# - type: "pubsub.googleapis.com/Topic"
|
48
|
-
#
|
49
|
-
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
-
# parent_name_extractor: "projects/{project}"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
52
45
|
#
|
53
46
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
47
|
# live under multiple parents.
|
@@ -58,26 +51,10 @@ module Google
|
|
58
51
|
# message LogEntry {
|
59
52
|
# option (google.api.resource) = {
|
60
53
|
# type: "logging.googleapis.com/LogEntry"
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# }
|
66
|
-
# name_descriptor: {
|
67
|
-
# pattern: "folders/{folder}/logs/{log}"
|
68
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
-
# parent_name_extractor: "folders/{folder}"
|
70
|
-
# }
|
71
|
-
# name_descriptor: {
|
72
|
-
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
-
# parent_name_extractor: "organizations/{organization}"
|
75
|
-
# }
|
76
|
-
# name_descriptor: {
|
77
|
-
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
-
# }
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
81
58
|
# };
|
82
59
|
# }
|
83
60
|
#
|
@@ -85,48 +62,10 @@ module Google
|
|
85
62
|
#
|
86
63
|
# resources:
|
87
64
|
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
-
# parent_name_extractor: "folders/{folder}"
|
95
|
-
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
-
# parent_name_extractor: "organizations/{organization}"
|
98
|
-
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
-
#
|
102
|
-
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
-
# the resource itself has parents for policy evaluation.
|
104
|
-
#
|
105
|
-
# Example:
|
106
|
-
#
|
107
|
-
# message Shelf {
|
108
|
-
# option (google.api.resource) = {
|
109
|
-
# type: "library.googleapis.com/Shelf"
|
110
|
-
# name_descriptor: {
|
111
|
-
# pattern: "shelves/{shelf}"
|
112
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
-
# }
|
114
|
-
# name_descriptor: {
|
115
|
-
# pattern: "shelves/{shelf}"
|
116
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
-
# }
|
118
|
-
# };
|
119
|
-
# }
|
120
|
-
#
|
121
|
-
# The ResourceDescriptor Yaml config will look like:
|
122
|
-
#
|
123
|
-
# resources:
|
124
|
-
# - type: 'library.googleapis.com/Shelf'
|
125
|
-
# name_descriptor:
|
126
|
-
# - pattern: "shelves/{shelf}"
|
127
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
-
# - pattern: "shelves/{shelf}"
|
129
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
130
69
|
# @!attribute [rw] type
|
131
70
|
# @return [::String]
|
132
71
|
# The resource type. It must be in the format of
|