google-cloud-resource_manager-v3 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/resource_manager/v3/folders/client.rb +254 -24
- data/lib/google/cloud/resource_manager/v3/folders/operations.rb +115 -12
- data/lib/google/cloud/resource_manager/v3/organizations/client.rb +103 -13
- data/lib/google/cloud/resource_manager/v3/projects/client.rb +254 -24
- data/lib/google/cloud/resource_manager/v3/projects/operations.rb +115 -12
- data/lib/google/cloud/resource_manager/v3/tag_bindings/client.rb +70 -3
- data/lib/google/cloud/resource_manager/v3/tag_bindings/operations.rb +115 -12
- data/lib/google/cloud/resource_manager/v3/tag_keys/client.rb +177 -18
- data/lib/google/cloud/resource_manager/v3/tag_keys/operations.rb +115 -12
- data/lib/google/cloud/resource_manager/v3/tag_values/client.rb +177 -18
- data/lib/google/cloud/resource_manager/v3/tag_values/operations.rb +115 -12
- data/lib/google/cloud/resource_manager/v3/version.rb +1 -1
- data/lib/google/cloud/resourcemanager/v3/folders_pb.rb +2 -2
- data/lib/google/cloud/resourcemanager/v3/folders_services_pb.rb +1 -1
- data/lib/google/cloud/resourcemanager/v3/organizations_pb.rb +2 -2
- data/lib/google/cloud/resourcemanager/v3/organizations_services_pb.rb +1 -1
- data/lib/google/cloud/resourcemanager/v3/projects_pb.rb +2 -2
- data/lib/google/cloud/resourcemanager/v3/projects_services_pb.rb +1 -1
- data/lib/google/cloud/resourcemanager/v3/tag_bindings_pb.rb +2 -2
- data/lib/google/cloud/resourcemanager/v3/tag_bindings_services_pb.rb +1 -1
- data/lib/google/cloud/resourcemanager/v3/tag_keys_pb.rb +2 -2
- data/lib/google/cloud/resourcemanager/v3/tag_keys_services_pb.rb +1 -1
- data/lib/google/cloud/resourcemanager/v3/tag_values_pb.rb +2 -2
- data/lib/google/cloud/resourcemanager/v3/tag_values_services_pb.rb +1 -1
- data/proto_docs/google/cloud/resourcemanager/v3/folders.rb +2 -0
- data/proto_docs/google/cloud/resourcemanager/v3/organizations.rb +2 -1
- data/proto_docs/google/cloud/resourcemanager/v3/projects.rb +2 -0
- metadata +2 -2
@@ -216,6 +216,27 @@ module Google
|
|
216
216
|
#
|
217
217
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
218
218
|
#
|
219
|
+
# @example Basic example
|
220
|
+
# require "google/cloud/resource_manager/v3"
|
221
|
+
#
|
222
|
+
# # Create a client object. The client can be reused for multiple calls.
|
223
|
+
# client = Google::Cloud::ResourceManager::V3::TagKeys::Client.new
|
224
|
+
#
|
225
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
226
|
+
# request = Google::Cloud::ResourceManager::V3::ListTagKeysRequest.new
|
227
|
+
#
|
228
|
+
# # Call the list_tag_keys method.
|
229
|
+
# result = client.list_tag_keys request
|
230
|
+
#
|
231
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
232
|
+
# # iterate over all elements by calling #each, and the enumerable
|
233
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
234
|
+
# # methods are also available for managing paging directly.
|
235
|
+
# result.each do |response|
|
236
|
+
# # Each element is of type ::Google::Cloud::ResourceManager::V3::TagKey.
|
237
|
+
# p response
|
238
|
+
# end
|
239
|
+
#
|
219
240
|
def list_tag_keys request, options = nil
|
220
241
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
221
242
|
|
@@ -281,6 +302,21 @@ module Google
|
|
281
302
|
#
|
282
303
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
283
304
|
#
|
305
|
+
# @example Basic example
|
306
|
+
# require "google/cloud/resource_manager/v3"
|
307
|
+
#
|
308
|
+
# # Create a client object. The client can be reused for multiple calls.
|
309
|
+
# client = Google::Cloud::ResourceManager::V3::TagKeys::Client.new
|
310
|
+
#
|
311
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
312
|
+
# request = Google::Cloud::ResourceManager::V3::GetTagKeyRequest.new
|
313
|
+
#
|
314
|
+
# # Call the get_tag_key method.
|
315
|
+
# result = client.get_tag_key request
|
316
|
+
#
|
317
|
+
# # The returned object is of type Google::Cloud::ResourceManager::V3::TagKey.
|
318
|
+
# p result
|
319
|
+
#
|
284
320
|
def get_tag_key request, options = nil
|
285
321
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
286
322
|
|
@@ -298,9 +334,11 @@ module Google
|
|
298
334
|
gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
|
299
335
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
300
336
|
|
301
|
-
header_params = {
|
302
|
-
|
303
|
-
|
337
|
+
header_params = {}
|
338
|
+
if request.name
|
339
|
+
header_params["name"] = request.name
|
340
|
+
end
|
341
|
+
|
304
342
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
305
343
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
306
344
|
|
@@ -356,6 +394,28 @@ module Google
|
|
356
394
|
#
|
357
395
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
358
396
|
#
|
397
|
+
# @example Basic example
|
398
|
+
# require "google/cloud/resource_manager/v3"
|
399
|
+
#
|
400
|
+
# # Create a client object. The client can be reused for multiple calls.
|
401
|
+
# client = Google::Cloud::ResourceManager::V3::TagKeys::Client.new
|
402
|
+
#
|
403
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
404
|
+
# request = Google::Cloud::ResourceManager::V3::CreateTagKeyRequest.new
|
405
|
+
#
|
406
|
+
# # Call the create_tag_key method.
|
407
|
+
# result = client.create_tag_key request
|
408
|
+
#
|
409
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
410
|
+
# # object to check the status of an operation, cancel it, or wait
|
411
|
+
# # for results. Here is how to block until completion:
|
412
|
+
# result.wait_until_done! timeout: 60
|
413
|
+
# if result.response?
|
414
|
+
# p result.response
|
415
|
+
# else
|
416
|
+
# puts "Error!"
|
417
|
+
# end
|
418
|
+
#
|
359
419
|
def create_tag_key request, options = nil
|
360
420
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
361
421
|
|
@@ -429,6 +489,28 @@ module Google
|
|
429
489
|
#
|
430
490
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
431
491
|
#
|
492
|
+
# @example Basic example
|
493
|
+
# require "google/cloud/resource_manager/v3"
|
494
|
+
#
|
495
|
+
# # Create a client object. The client can be reused for multiple calls.
|
496
|
+
# client = Google::Cloud::ResourceManager::V3::TagKeys::Client.new
|
497
|
+
#
|
498
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
499
|
+
# request = Google::Cloud::ResourceManager::V3::UpdateTagKeyRequest.new
|
500
|
+
#
|
501
|
+
# # Call the update_tag_key method.
|
502
|
+
# result = client.update_tag_key request
|
503
|
+
#
|
504
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
505
|
+
# # object to check the status of an operation, cancel it, or wait
|
506
|
+
# # for results. Here is how to block until completion:
|
507
|
+
# result.wait_until_done! timeout: 60
|
508
|
+
# if result.response?
|
509
|
+
# p result.response
|
510
|
+
# else
|
511
|
+
# puts "Error!"
|
512
|
+
# end
|
513
|
+
#
|
432
514
|
def update_tag_key request, options = nil
|
433
515
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
434
516
|
|
@@ -446,9 +528,11 @@ module Google
|
|
446
528
|
gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
|
447
529
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
448
530
|
|
449
|
-
header_params = {
|
450
|
-
|
451
|
-
|
531
|
+
header_params = {}
|
532
|
+
if request.tag_key&.name
|
533
|
+
header_params["tag_key.name"] = request.tag_key.name
|
534
|
+
end
|
535
|
+
|
452
536
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
453
537
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
454
538
|
|
@@ -507,6 +591,28 @@ module Google
|
|
507
591
|
#
|
508
592
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
509
593
|
#
|
594
|
+
# @example Basic example
|
595
|
+
# require "google/cloud/resource_manager/v3"
|
596
|
+
#
|
597
|
+
# # Create a client object. The client can be reused for multiple calls.
|
598
|
+
# client = Google::Cloud::ResourceManager::V3::TagKeys::Client.new
|
599
|
+
#
|
600
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
601
|
+
# request = Google::Cloud::ResourceManager::V3::DeleteTagKeyRequest.new
|
602
|
+
#
|
603
|
+
# # Call the delete_tag_key method.
|
604
|
+
# result = client.delete_tag_key request
|
605
|
+
#
|
606
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
607
|
+
# # object to check the status of an operation, cancel it, or wait
|
608
|
+
# # for results. Here is how to block until completion:
|
609
|
+
# result.wait_until_done! timeout: 60
|
610
|
+
# if result.response?
|
611
|
+
# p result.response
|
612
|
+
# else
|
613
|
+
# puts "Error!"
|
614
|
+
# end
|
615
|
+
#
|
510
616
|
def delete_tag_key request, options = nil
|
511
617
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
512
618
|
|
@@ -524,9 +630,11 @@ module Google
|
|
524
630
|
gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
|
525
631
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
526
632
|
|
527
|
-
header_params = {
|
528
|
-
|
529
|
-
|
633
|
+
header_params = {}
|
634
|
+
if request.name
|
635
|
+
header_params["name"] = request.name
|
636
|
+
end
|
637
|
+
|
530
638
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
531
639
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
532
640
|
|
@@ -585,6 +693,21 @@ module Google
|
|
585
693
|
#
|
586
694
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
587
695
|
#
|
696
|
+
# @example Basic example
|
697
|
+
# require "google/cloud/resource_manager/v3"
|
698
|
+
#
|
699
|
+
# # Create a client object. The client can be reused for multiple calls.
|
700
|
+
# client = Google::Cloud::ResourceManager::V3::TagKeys::Client.new
|
701
|
+
#
|
702
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
703
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
704
|
+
#
|
705
|
+
# # Call the get_iam_policy method.
|
706
|
+
# result = client.get_iam_policy request
|
707
|
+
#
|
708
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
709
|
+
# p result
|
710
|
+
#
|
588
711
|
def get_iam_policy request, options = nil
|
589
712
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
590
713
|
|
@@ -602,9 +725,11 @@ module Google
|
|
602
725
|
gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
|
603
726
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
604
727
|
|
605
|
-
header_params = {
|
606
|
-
|
607
|
-
|
728
|
+
header_params = {}
|
729
|
+
if request.resource
|
730
|
+
header_params["resource"] = request.resource
|
731
|
+
end
|
732
|
+
|
608
733
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
609
734
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
610
735
|
|
@@ -663,6 +788,21 @@ module Google
|
|
663
788
|
#
|
664
789
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
665
790
|
#
|
791
|
+
# @example Basic example
|
792
|
+
# require "google/cloud/resource_manager/v3"
|
793
|
+
#
|
794
|
+
# # Create a client object. The client can be reused for multiple calls.
|
795
|
+
# client = Google::Cloud::ResourceManager::V3::TagKeys::Client.new
|
796
|
+
#
|
797
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
798
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
799
|
+
#
|
800
|
+
# # Call the set_iam_policy method.
|
801
|
+
# result = client.set_iam_policy request
|
802
|
+
#
|
803
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
804
|
+
# p result
|
805
|
+
#
|
666
806
|
def set_iam_policy request, options = nil
|
667
807
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
668
808
|
|
@@ -680,9 +820,11 @@ module Google
|
|
680
820
|
gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
|
681
821
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
682
822
|
|
683
|
-
header_params = {
|
684
|
-
|
685
|
-
|
823
|
+
header_params = {}
|
824
|
+
if request.resource
|
825
|
+
header_params["resource"] = request.resource
|
826
|
+
end
|
827
|
+
|
686
828
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
687
829
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
688
830
|
|
@@ -741,6 +883,21 @@ module Google
|
|
741
883
|
#
|
742
884
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
743
885
|
#
|
886
|
+
# @example Basic example
|
887
|
+
# require "google/cloud/resource_manager/v3"
|
888
|
+
#
|
889
|
+
# # Create a client object. The client can be reused for multiple calls.
|
890
|
+
# client = Google::Cloud::ResourceManager::V3::TagKeys::Client.new
|
891
|
+
#
|
892
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
893
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
894
|
+
#
|
895
|
+
# # Call the test_iam_permissions method.
|
896
|
+
# result = client.test_iam_permissions request
|
897
|
+
#
|
898
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
899
|
+
# p result
|
900
|
+
#
|
744
901
|
def test_iam_permissions request, options = nil
|
745
902
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
746
903
|
|
@@ -758,9 +915,11 @@ module Google
|
|
758
915
|
gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
|
759
916
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
760
917
|
|
761
|
-
header_params = {
|
762
|
-
|
763
|
-
|
918
|
+
header_params = {}
|
919
|
+
if request.resource
|
920
|
+
header_params["resource"] = request.resource
|
921
|
+
end
|
922
|
+
|
764
923
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
765
924
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
766
925
|
|
@@ -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::ResourceManager::V3::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::ResourceManager::V3::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::ResourceManager::V3::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::ResourceManager::V3::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
|
|