google-cloud-dataproc-v1 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/dataproc/v1/autoscaling_policy_service/client.rb +106 -15
- data/lib/google/cloud/dataproc/v1/batch_controller/client.rb +93 -12
- data/lib/google/cloud/dataproc/v1/batch_controller/operations.rb +115 -12
- data/lib/google/cloud/dataproc/v1/cluster_controller/client.rb +250 -38
- data/lib/google/cloud/dataproc/v1/cluster_controller/operations.rb +115 -12
- data/lib/google/cloud/dataproc/v1/job_controller/client.rb +186 -32
- data/lib/google/cloud/dataproc/v1/job_controller/operations.rb +115 -12
- data/lib/google/cloud/dataproc/v1/version.rb +1 -1
- data/lib/google/cloud/dataproc/v1/workflow_template_service/client.rb +160 -21
- data/lib/google/cloud/dataproc/v1/workflow_template_service/operations.rb +115 -12
- metadata +2 -2
@@ -237,6 +237,28 @@ module Google
|
|
237
237
|
#
|
238
238
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
239
239
|
#
|
240
|
+
# @example Basic example
|
241
|
+
# require "google/cloud/dataproc/v1"
|
242
|
+
#
|
243
|
+
# # Create a client object. The client can be reused for multiple calls.
|
244
|
+
# client = Google::Cloud::Dataproc::V1::ClusterController::Client.new
|
245
|
+
#
|
246
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
247
|
+
# request = Google::Cloud::Dataproc::V1::CreateClusterRequest.new
|
248
|
+
#
|
249
|
+
# # Call the create_cluster method.
|
250
|
+
# result = client.create_cluster request
|
251
|
+
#
|
252
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
253
|
+
# # object to check the status of an operation, cancel it, or wait
|
254
|
+
# # for results. Here is how to block until completion:
|
255
|
+
# result.wait_until_done! timeout: 60
|
256
|
+
# if result.response?
|
257
|
+
# p result.response
|
258
|
+
# else
|
259
|
+
# puts "Error!"
|
260
|
+
# end
|
261
|
+
#
|
240
262
|
def create_cluster request, options = nil
|
241
263
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
242
264
|
|
@@ -254,10 +276,14 @@ module Google
|
|
254
276
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
255
277
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
256
278
|
|
257
|
-
header_params = {
|
258
|
-
|
259
|
-
"
|
260
|
-
|
279
|
+
header_params = {}
|
280
|
+
if request.project_id
|
281
|
+
header_params["project_id"] = request.project_id
|
282
|
+
end
|
283
|
+
if request.region
|
284
|
+
header_params["region"] = request.region
|
285
|
+
end
|
286
|
+
|
261
287
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
262
288
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
263
289
|
|
@@ -393,6 +419,28 @@ module Google
|
|
393
419
|
#
|
394
420
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
395
421
|
#
|
422
|
+
# @example Basic example
|
423
|
+
# require "google/cloud/dataproc/v1"
|
424
|
+
#
|
425
|
+
# # Create a client object. The client can be reused for multiple calls.
|
426
|
+
# client = Google::Cloud::Dataproc::V1::ClusterController::Client.new
|
427
|
+
#
|
428
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
429
|
+
# request = Google::Cloud::Dataproc::V1::UpdateClusterRequest.new
|
430
|
+
#
|
431
|
+
# # Call the update_cluster method.
|
432
|
+
# result = client.update_cluster request
|
433
|
+
#
|
434
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
435
|
+
# # object to check the status of an operation, cancel it, or wait
|
436
|
+
# # for results. Here is how to block until completion:
|
437
|
+
# result.wait_until_done! timeout: 60
|
438
|
+
# if result.response?
|
439
|
+
# p result.response
|
440
|
+
# else
|
441
|
+
# puts "Error!"
|
442
|
+
# end
|
443
|
+
#
|
396
444
|
def update_cluster request, options = nil
|
397
445
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
398
446
|
|
@@ -410,11 +458,17 @@ module Google
|
|
410
458
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
411
459
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
412
460
|
|
413
|
-
header_params = {
|
414
|
-
|
415
|
-
"
|
416
|
-
|
417
|
-
|
461
|
+
header_params = {}
|
462
|
+
if request.project_id
|
463
|
+
header_params["project_id"] = request.project_id
|
464
|
+
end
|
465
|
+
if request.region
|
466
|
+
header_params["region"] = request.region
|
467
|
+
end
|
468
|
+
if request.cluster_name
|
469
|
+
header_params["cluster_name"] = request.cluster_name
|
470
|
+
end
|
471
|
+
|
418
472
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
419
473
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
420
474
|
|
@@ -485,6 +539,28 @@ module Google
|
|
485
539
|
#
|
486
540
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
487
541
|
#
|
542
|
+
# @example Basic example
|
543
|
+
# require "google/cloud/dataproc/v1"
|
544
|
+
#
|
545
|
+
# # Create a client object. The client can be reused for multiple calls.
|
546
|
+
# client = Google::Cloud::Dataproc::V1::ClusterController::Client.new
|
547
|
+
#
|
548
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
549
|
+
# request = Google::Cloud::Dataproc::V1::StopClusterRequest.new
|
550
|
+
#
|
551
|
+
# # Call the stop_cluster method.
|
552
|
+
# result = client.stop_cluster request
|
553
|
+
#
|
554
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
555
|
+
# # object to check the status of an operation, cancel it, or wait
|
556
|
+
# # for results. Here is how to block until completion:
|
557
|
+
# result.wait_until_done! timeout: 60
|
558
|
+
# if result.response?
|
559
|
+
# p result.response
|
560
|
+
# else
|
561
|
+
# puts "Error!"
|
562
|
+
# end
|
563
|
+
#
|
488
564
|
def stop_cluster request, options = nil
|
489
565
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
490
566
|
|
@@ -502,11 +578,17 @@ module Google
|
|
502
578
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
503
579
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
504
580
|
|
505
|
-
header_params = {
|
506
|
-
|
507
|
-
"
|
508
|
-
|
509
|
-
|
581
|
+
header_params = {}
|
582
|
+
if request.project_id
|
583
|
+
header_params["project_id"] = request.project_id
|
584
|
+
end
|
585
|
+
if request.region
|
586
|
+
header_params["region"] = request.region
|
587
|
+
end
|
588
|
+
if request.cluster_name
|
589
|
+
header_params["cluster_name"] = request.cluster_name
|
590
|
+
end
|
591
|
+
|
510
592
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
511
593
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
512
594
|
|
@@ -577,6 +659,28 @@ module Google
|
|
577
659
|
#
|
578
660
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
579
661
|
#
|
662
|
+
# @example Basic example
|
663
|
+
# require "google/cloud/dataproc/v1"
|
664
|
+
#
|
665
|
+
# # Create a client object. The client can be reused for multiple calls.
|
666
|
+
# client = Google::Cloud::Dataproc::V1::ClusterController::Client.new
|
667
|
+
#
|
668
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
669
|
+
# request = Google::Cloud::Dataproc::V1::StartClusterRequest.new
|
670
|
+
#
|
671
|
+
# # Call the start_cluster method.
|
672
|
+
# result = client.start_cluster request
|
673
|
+
#
|
674
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
675
|
+
# # object to check the status of an operation, cancel it, or wait
|
676
|
+
# # for results. Here is how to block until completion:
|
677
|
+
# result.wait_until_done! timeout: 60
|
678
|
+
# if result.response?
|
679
|
+
# p result.response
|
680
|
+
# else
|
681
|
+
# puts "Error!"
|
682
|
+
# end
|
683
|
+
#
|
580
684
|
def start_cluster request, options = nil
|
581
685
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
582
686
|
|
@@ -594,11 +698,17 @@ module Google
|
|
594
698
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
595
699
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
596
700
|
|
597
|
-
header_params = {
|
598
|
-
|
599
|
-
"
|
600
|
-
|
601
|
-
|
701
|
+
header_params = {}
|
702
|
+
if request.project_id
|
703
|
+
header_params["project_id"] = request.project_id
|
704
|
+
end
|
705
|
+
if request.region
|
706
|
+
header_params["region"] = request.region
|
707
|
+
end
|
708
|
+
if request.cluster_name
|
709
|
+
header_params["cluster_name"] = request.cluster_name
|
710
|
+
end
|
711
|
+
|
602
712
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
603
713
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
604
714
|
|
@@ -671,6 +781,28 @@ module Google
|
|
671
781
|
#
|
672
782
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
673
783
|
#
|
784
|
+
# @example Basic example
|
785
|
+
# require "google/cloud/dataproc/v1"
|
786
|
+
#
|
787
|
+
# # Create a client object. The client can be reused for multiple calls.
|
788
|
+
# client = Google::Cloud::Dataproc::V1::ClusterController::Client.new
|
789
|
+
#
|
790
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
791
|
+
# request = Google::Cloud::Dataproc::V1::DeleteClusterRequest.new
|
792
|
+
#
|
793
|
+
# # Call the delete_cluster method.
|
794
|
+
# result = client.delete_cluster request
|
795
|
+
#
|
796
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
797
|
+
# # object to check the status of an operation, cancel it, or wait
|
798
|
+
# # for results. Here is how to block until completion:
|
799
|
+
# result.wait_until_done! timeout: 60
|
800
|
+
# if result.response?
|
801
|
+
# p result.response
|
802
|
+
# else
|
803
|
+
# puts "Error!"
|
804
|
+
# end
|
805
|
+
#
|
674
806
|
def delete_cluster request, options = nil
|
675
807
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
676
808
|
|
@@ -688,11 +820,17 @@ module Google
|
|
688
820
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
689
821
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
690
822
|
|
691
|
-
header_params = {
|
692
|
-
|
693
|
-
"
|
694
|
-
|
695
|
-
|
823
|
+
header_params = {}
|
824
|
+
if request.project_id
|
825
|
+
header_params["project_id"] = request.project_id
|
826
|
+
end
|
827
|
+
if request.region
|
828
|
+
header_params["region"] = request.region
|
829
|
+
end
|
830
|
+
if request.cluster_name
|
831
|
+
header_params["cluster_name"] = request.cluster_name
|
832
|
+
end
|
833
|
+
|
696
834
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
697
835
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
698
836
|
|
@@ -747,6 +885,21 @@ module Google
|
|
747
885
|
#
|
748
886
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
749
887
|
#
|
888
|
+
# @example Basic example
|
889
|
+
# require "google/cloud/dataproc/v1"
|
890
|
+
#
|
891
|
+
# # Create a client object. The client can be reused for multiple calls.
|
892
|
+
# client = Google::Cloud::Dataproc::V1::ClusterController::Client.new
|
893
|
+
#
|
894
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
895
|
+
# request = Google::Cloud::Dataproc::V1::GetClusterRequest.new
|
896
|
+
#
|
897
|
+
# # Call the get_cluster method.
|
898
|
+
# result = client.get_cluster request
|
899
|
+
#
|
900
|
+
# # The returned object is of type Google::Cloud::Dataproc::V1::Cluster.
|
901
|
+
# p result
|
902
|
+
#
|
750
903
|
def get_cluster request, options = nil
|
751
904
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
752
905
|
|
@@ -764,11 +917,17 @@ module Google
|
|
764
917
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
765
918
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
766
919
|
|
767
|
-
header_params = {
|
768
|
-
|
769
|
-
"
|
770
|
-
|
771
|
-
|
920
|
+
header_params = {}
|
921
|
+
if request.project_id
|
922
|
+
header_params["project_id"] = request.project_id
|
923
|
+
end
|
924
|
+
if request.region
|
925
|
+
header_params["region"] = request.region
|
926
|
+
end
|
927
|
+
if request.cluster_name
|
928
|
+
header_params["cluster_name"] = request.cluster_name
|
929
|
+
end
|
930
|
+
|
772
931
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
773
932
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
774
933
|
|
@@ -844,6 +1003,27 @@ module Google
|
|
844
1003
|
#
|
845
1004
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
846
1005
|
#
|
1006
|
+
# @example Basic example
|
1007
|
+
# require "google/cloud/dataproc/v1"
|
1008
|
+
#
|
1009
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1010
|
+
# client = Google::Cloud::Dataproc::V1::ClusterController::Client.new
|
1011
|
+
#
|
1012
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1013
|
+
# request = Google::Cloud::Dataproc::V1::ListClustersRequest.new
|
1014
|
+
#
|
1015
|
+
# # Call the list_clusters method.
|
1016
|
+
# result = client.list_clusters request
|
1017
|
+
#
|
1018
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1019
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1020
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1021
|
+
# # methods are also available for managing paging directly.
|
1022
|
+
# result.each do |response|
|
1023
|
+
# # Each element is of type ::Google::Cloud::Dataproc::V1::Cluster.
|
1024
|
+
# p response
|
1025
|
+
# end
|
1026
|
+
#
|
847
1027
|
def list_clusters request, options = nil
|
848
1028
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
849
1029
|
|
@@ -861,10 +1041,14 @@ module Google
|
|
861
1041
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
862
1042
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
863
1043
|
|
864
|
-
header_params = {
|
865
|
-
|
866
|
-
"
|
867
|
-
|
1044
|
+
header_params = {}
|
1045
|
+
if request.project_id
|
1046
|
+
header_params["project_id"] = request.project_id
|
1047
|
+
end
|
1048
|
+
if request.region
|
1049
|
+
header_params["region"] = request.region
|
1050
|
+
end
|
1051
|
+
|
868
1052
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
869
1053
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
870
1054
|
|
@@ -925,6 +1109,28 @@ module Google
|
|
925
1109
|
#
|
926
1110
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
927
1111
|
#
|
1112
|
+
# @example Basic example
|
1113
|
+
# require "google/cloud/dataproc/v1"
|
1114
|
+
#
|
1115
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1116
|
+
# client = Google::Cloud::Dataproc::V1::ClusterController::Client.new
|
1117
|
+
#
|
1118
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1119
|
+
# request = Google::Cloud::Dataproc::V1::DiagnoseClusterRequest.new
|
1120
|
+
#
|
1121
|
+
# # Call the diagnose_cluster method.
|
1122
|
+
# result = client.diagnose_cluster request
|
1123
|
+
#
|
1124
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1125
|
+
# # object to check the status of an operation, cancel it, or wait
|
1126
|
+
# # for results. Here is how to block until completion:
|
1127
|
+
# result.wait_until_done! timeout: 60
|
1128
|
+
# if result.response?
|
1129
|
+
# p result.response
|
1130
|
+
# else
|
1131
|
+
# puts "Error!"
|
1132
|
+
# end
|
1133
|
+
#
|
928
1134
|
def diagnose_cluster request, options = nil
|
929
1135
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
930
1136
|
|
@@ -942,11 +1148,17 @@ module Google
|
|
942
1148
|
gapic_version: ::Google::Cloud::Dataproc::V1::VERSION
|
943
1149
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
944
1150
|
|
945
|
-
header_params = {
|
946
|
-
|
947
|
-
"
|
948
|
-
|
949
|
-
|
1151
|
+
header_params = {}
|
1152
|
+
if request.project_id
|
1153
|
+
header_params["project_id"] = request.project_id
|
1154
|
+
end
|
1155
|
+
if request.region
|
1156
|
+
header_params["region"] = request.region
|
1157
|
+
end
|
1158
|
+
if request.cluster_name
|
1159
|
+
header_params["cluster_name"] = request.cluster_name
|
1160
|
+
end
|
1161
|
+
|
950
1162
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
951
1163
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
952
1164
|
|
@@ -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
|
|