google-cloud-run-v2 0.10.1 → 0.12.0
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/run/v2/condition_pb.rb +1 -1
- data/lib/google/cloud/run/v2/execution_pb.rb +2 -1
- data/lib/google/cloud/run/v2/execution_services_pb.rb +2 -0
- data/lib/google/cloud/run/v2/executions/client.rb +125 -7
- data/lib/google/cloud/run/v2/executions/operations.rb +10 -1
- data/lib/google/cloud/run/v2/executions/rest/client.rb +167 -6
- data/lib/google/cloud/run/v2/executions/rest/operations.rb +98 -0
- data/lib/google/cloud/run/v2/executions/rest/service_stub.rb +60 -0
- data/lib/google/cloud/run/v2/job_pb.rb +8 -1
- data/lib/google/cloud/run/v2/jobs/client.rb +44 -14
- data/lib/google/cloud/run/v2/jobs/operations.rb +10 -1
- data/lib/google/cloud/run/v2/jobs/rest/client.rb +180 -1
- data/lib/google/cloud/run/v2/jobs/rest/operations.rb +98 -0
- data/lib/google/cloud/run/v2/k8s.min_pb.rb +3 -1
- data/lib/google/cloud/run/v2/revisions/client.rb +10 -1
- data/lib/google/cloud/run/v2/revisions/operations.rb +10 -1
- data/lib/google/cloud/run/v2/revisions/rest/client.rb +59 -0
- data/lib/google/cloud/run/v2/revisions/rest/operations.rb +98 -0
- data/lib/google/cloud/run/v2/services/client.rb +10 -1
- data/lib/google/cloud/run/v2/services/operations.rb +10 -1
- data/lib/google/cloud/run/v2/services/rest/client.rb +153 -0
- data/lib/google/cloud/run/v2/services/rest/operations.rb +98 -0
- data/lib/google/cloud/run/v2/task_pb.rb +1 -1
- data/lib/google/cloud/run/v2/tasks/client.rb +10 -1
- data/lib/google/cloud/run/v2/tasks/rest/client.rb +36 -0
- data/lib/google/cloud/run/v2/vendor_settings_pb.rb +3 -1
- data/lib/google/cloud/run/v2/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/run/v2/condition.rb +3 -0
- data/proto_docs/google/cloud/run/v2/execution.rb +26 -6
- data/proto_docs/google/cloud/run/v2/job.rb +42 -0
- data/proto_docs/google/cloud/run/v2/k8s.min.rb +44 -4
- data/proto_docs/google/cloud/run/v2/task.rb +7 -2
- data/proto_docs/google/cloud/run/v2/vendor_settings.rb +33 -5
- metadata +5 -5
@@ -216,6 +216,29 @@ module Google
|
|
216
216
|
# @return [::Gapic::Operation]
|
217
217
|
#
|
218
218
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
219
|
+
#
|
220
|
+
# @example Basic example
|
221
|
+
# require "google/cloud/run/v2"
|
222
|
+
#
|
223
|
+
# # Create a client object. The client can be reused for multiple calls.
|
224
|
+
# client = Google::Cloud::Run::V2::Services::Rest::Client.new
|
225
|
+
#
|
226
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
227
|
+
# request = Google::Cloud::Run::V2::CreateServiceRequest.new
|
228
|
+
#
|
229
|
+
# # Call the create_service method.
|
230
|
+
# result = client.create_service request
|
231
|
+
#
|
232
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
233
|
+
# # check the status of an operation, cancel it, or wait for results.
|
234
|
+
# # Here is how to wait for a response.
|
235
|
+
# result.wait_until_done! timeout: 60
|
236
|
+
# if result.response?
|
237
|
+
# p result.response
|
238
|
+
# else
|
239
|
+
# puts "No response received."
|
240
|
+
# end
|
241
|
+
#
|
219
242
|
def create_service request, options = nil
|
220
243
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
221
244
|
|
@@ -281,6 +304,22 @@ module Google
|
|
281
304
|
# @return [::Google::Cloud::Run::V2::Service]
|
282
305
|
#
|
283
306
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
307
|
+
#
|
308
|
+
# @example Basic example
|
309
|
+
# require "google/cloud/run/v2"
|
310
|
+
#
|
311
|
+
# # Create a client object. The client can be reused for multiple calls.
|
312
|
+
# client = Google::Cloud::Run::V2::Services::Rest::Client.new
|
313
|
+
#
|
314
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
315
|
+
# request = Google::Cloud::Run::V2::GetServiceRequest.new
|
316
|
+
#
|
317
|
+
# # Call the get_service method.
|
318
|
+
# result = client.get_service request
|
319
|
+
#
|
320
|
+
# # The returned object is of type Google::Cloud::Run::V2::Service.
|
321
|
+
# p result
|
322
|
+
#
|
284
323
|
def get_service request, options = nil
|
285
324
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
286
325
|
|
@@ -353,6 +392,26 @@ module Google
|
|
353
392
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Run::V2::Service>]
|
354
393
|
#
|
355
394
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
395
|
+
#
|
396
|
+
# @example Basic example
|
397
|
+
# require "google/cloud/run/v2"
|
398
|
+
#
|
399
|
+
# # Create a client object. The client can be reused for multiple calls.
|
400
|
+
# client = Google::Cloud::Run::V2::Services::Rest::Client.new
|
401
|
+
#
|
402
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
403
|
+
# request = Google::Cloud::Run::V2::ListServicesRequest.new
|
404
|
+
#
|
405
|
+
# # Call the list_services method.
|
406
|
+
# result = client.list_services request
|
407
|
+
#
|
408
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
409
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
410
|
+
# result.each do |item|
|
411
|
+
# # Each element is of type ::Google::Cloud::Run::V2::Service.
|
412
|
+
# p item
|
413
|
+
# end
|
414
|
+
#
|
356
415
|
def list_services request, options = nil
|
357
416
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
358
417
|
|
@@ -423,6 +482,29 @@ module Google
|
|
423
482
|
# @return [::Gapic::Operation]
|
424
483
|
#
|
425
484
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
485
|
+
#
|
486
|
+
# @example Basic example
|
487
|
+
# require "google/cloud/run/v2"
|
488
|
+
#
|
489
|
+
# # Create a client object. The client can be reused for multiple calls.
|
490
|
+
# client = Google::Cloud::Run::V2::Services::Rest::Client.new
|
491
|
+
#
|
492
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
493
|
+
# request = Google::Cloud::Run::V2::UpdateServiceRequest.new
|
494
|
+
#
|
495
|
+
# # Call the update_service method.
|
496
|
+
# result = client.update_service request
|
497
|
+
#
|
498
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
499
|
+
# # check the status of an operation, cancel it, or wait for results.
|
500
|
+
# # Here is how to wait for a response.
|
501
|
+
# result.wait_until_done! timeout: 60
|
502
|
+
# if result.response?
|
503
|
+
# p result.response
|
504
|
+
# else
|
505
|
+
# puts "No response received."
|
506
|
+
# end
|
507
|
+
#
|
426
508
|
def update_service request, options = nil
|
427
509
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
428
510
|
|
@@ -496,6 +578,29 @@ module Google
|
|
496
578
|
# @return [::Gapic::Operation]
|
497
579
|
#
|
498
580
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
581
|
+
#
|
582
|
+
# @example Basic example
|
583
|
+
# require "google/cloud/run/v2"
|
584
|
+
#
|
585
|
+
# # Create a client object. The client can be reused for multiple calls.
|
586
|
+
# client = Google::Cloud::Run::V2::Services::Rest::Client.new
|
587
|
+
#
|
588
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
589
|
+
# request = Google::Cloud::Run::V2::DeleteServiceRequest.new
|
590
|
+
#
|
591
|
+
# # Call the delete_service method.
|
592
|
+
# result = client.delete_service request
|
593
|
+
#
|
594
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
595
|
+
# # check the status of an operation, cancel it, or wait for results.
|
596
|
+
# # Here is how to wait for a response.
|
597
|
+
# result.wait_until_done! timeout: 60
|
598
|
+
# if result.response?
|
599
|
+
# p result.response
|
600
|
+
# else
|
601
|
+
# puts "No response received."
|
602
|
+
# end
|
603
|
+
#
|
499
604
|
def delete_service request, options = nil
|
500
605
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
501
606
|
|
@@ -564,6 +669,22 @@ module Google
|
|
564
669
|
# @return [::Google::Iam::V1::Policy]
|
565
670
|
#
|
566
671
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
672
|
+
#
|
673
|
+
# @example Basic example
|
674
|
+
# require "google/cloud/run/v2"
|
675
|
+
#
|
676
|
+
# # Create a client object. The client can be reused for multiple calls.
|
677
|
+
# client = Google::Cloud::Run::V2::Services::Rest::Client.new
|
678
|
+
#
|
679
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
680
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
681
|
+
#
|
682
|
+
# # Call the get_iam_policy method.
|
683
|
+
# result = client.get_iam_policy request
|
684
|
+
#
|
685
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
686
|
+
# p result
|
687
|
+
#
|
567
688
|
def get_iam_policy request, options = nil
|
568
689
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
569
690
|
|
@@ -639,6 +760,22 @@ module Google
|
|
639
760
|
# @return [::Google::Iam::V1::Policy]
|
640
761
|
#
|
641
762
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
763
|
+
#
|
764
|
+
# @example Basic example
|
765
|
+
# require "google/cloud/run/v2"
|
766
|
+
#
|
767
|
+
# # Create a client object. The client can be reused for multiple calls.
|
768
|
+
# client = Google::Cloud::Run::V2::Services::Rest::Client.new
|
769
|
+
#
|
770
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
771
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
772
|
+
#
|
773
|
+
# # Call the set_iam_policy method.
|
774
|
+
# result = client.set_iam_policy request
|
775
|
+
#
|
776
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
777
|
+
# p result
|
778
|
+
#
|
642
779
|
def set_iam_policy request, options = nil
|
643
780
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
644
781
|
|
@@ -709,6 +846,22 @@ module Google
|
|
709
846
|
# @return [::Google::Iam::V1::TestIamPermissionsResponse]
|
710
847
|
#
|
711
848
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
849
|
+
#
|
850
|
+
# @example Basic example
|
851
|
+
# require "google/cloud/run/v2"
|
852
|
+
#
|
853
|
+
# # Create a client object. The client can be reused for multiple calls.
|
854
|
+
# client = Google::Cloud::Run::V2::Services::Rest::Client.new
|
855
|
+
#
|
856
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
857
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
858
|
+
#
|
859
|
+
# # Call the test_iam_permissions method.
|
860
|
+
# result = client.test_iam_permissions request
|
861
|
+
#
|
862
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
863
|
+
# p result
|
864
|
+
#
|
712
865
|
def test_iam_permissions request, options = nil
|
713
866
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
714
867
|
|
@@ -136,6 +136,26 @@ module Google
|
|
136
136
|
# @return [::Gapic::Operation]
|
137
137
|
#
|
138
138
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
139
|
+
#
|
140
|
+
# @example Basic example
|
141
|
+
# require "google/longrunning"
|
142
|
+
#
|
143
|
+
# # Create a client object. The client can be reused for multiple calls.
|
144
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
145
|
+
#
|
146
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
147
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
148
|
+
#
|
149
|
+
# # Call the list_operations method.
|
150
|
+
# result = client.list_operations request
|
151
|
+
#
|
152
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
153
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
154
|
+
# result.each do |item|
|
155
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
156
|
+
# p item
|
157
|
+
# end
|
158
|
+
#
|
139
159
|
def list_operations request, options = nil
|
140
160
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
141
161
|
|
@@ -201,6 +221,29 @@ module Google
|
|
201
221
|
# @return [::Gapic::Operation]
|
202
222
|
#
|
203
223
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
224
|
+
#
|
225
|
+
# @example Basic example
|
226
|
+
# require "google/longrunning"
|
227
|
+
#
|
228
|
+
# # Create a client object. The client can be reused for multiple calls.
|
229
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
230
|
+
#
|
231
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
232
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
233
|
+
#
|
234
|
+
# # Call the get_operation method.
|
235
|
+
# result = client.get_operation request
|
236
|
+
#
|
237
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
238
|
+
# # check the status of an operation, cancel it, or wait for results.
|
239
|
+
# # Here is how to wait for a response.
|
240
|
+
# result.wait_until_done! timeout: 60
|
241
|
+
# if result.response?
|
242
|
+
# p result.response
|
243
|
+
# else
|
244
|
+
# puts "No response received."
|
245
|
+
# end
|
246
|
+
#
|
204
247
|
def get_operation request, options = nil
|
205
248
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
206
249
|
|
@@ -267,6 +310,22 @@ module Google
|
|
267
310
|
# @return [::Google::Protobuf::Empty]
|
268
311
|
#
|
269
312
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
313
|
+
#
|
314
|
+
# @example Basic example
|
315
|
+
# require "google/longrunning"
|
316
|
+
#
|
317
|
+
# # Create a client object. The client can be reused for multiple calls.
|
318
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
319
|
+
#
|
320
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
321
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
322
|
+
#
|
323
|
+
# # Call the delete_operation method.
|
324
|
+
# result = client.delete_operation request
|
325
|
+
#
|
326
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
327
|
+
# p result
|
328
|
+
#
|
270
329
|
def delete_operation request, options = nil
|
271
330
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
272
331
|
|
@@ -338,6 +397,22 @@ module Google
|
|
338
397
|
# @return [::Google::Protobuf::Empty]
|
339
398
|
#
|
340
399
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
400
|
+
#
|
401
|
+
# @example Basic example
|
402
|
+
# require "google/longrunning"
|
403
|
+
#
|
404
|
+
# # Create a client object. The client can be reused for multiple calls.
|
405
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
406
|
+
#
|
407
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
408
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
409
|
+
#
|
410
|
+
# # Call the cancel_operation method.
|
411
|
+
# result = client.cancel_operation request
|
412
|
+
#
|
413
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
414
|
+
# p result
|
415
|
+
#
|
341
416
|
def cancel_operation request, options = nil
|
342
417
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
343
418
|
|
@@ -412,6 +487,29 @@ module Google
|
|
412
487
|
# @return [::Gapic::Operation]
|
413
488
|
#
|
414
489
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
490
|
+
#
|
491
|
+
# @example Basic example
|
492
|
+
# require "google/longrunning"
|
493
|
+
#
|
494
|
+
# # Create a client object. The client can be reused for multiple calls.
|
495
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
496
|
+
#
|
497
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
498
|
+
# request = Google::Longrunning::WaitOperationRequest.new
|
499
|
+
#
|
500
|
+
# # Call the wait_operation method.
|
501
|
+
# result = client.wait_operation request
|
502
|
+
#
|
503
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
504
|
+
# # check the status of an operation, cancel it, or wait for results.
|
505
|
+
# # Here is how to wait for a response.
|
506
|
+
# result.wait_until_done! timeout: 60
|
507
|
+
# if result.response?
|
508
|
+
# p result.response
|
509
|
+
# else
|
510
|
+
# puts "No response received."
|
511
|
+
# end
|
512
|
+
#
|
415
513
|
def wait_operation request, options = nil
|
416
514
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
417
515
|
|
@@ -16,7 +16,7 @@ require 'google/protobuf/timestamp_pb'
|
|
16
16
|
require 'google/rpc/status_pb'
|
17
17
|
|
18
18
|
|
19
|
-
descriptor_data = "\n\x1egoogle/cloud/run/v2/task.proto\x12\x13google.cloud.run.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/run/v2/condition.proto\x1a!google/cloud/run/v2/k8s.min.proto\x1a)google/cloud/run/v2/vendor_settings.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"?\n\x0eGetTaskRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17run.googleapis.com/Task\"\x80\x01\n\x10ListTasksRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17run.googleapis.com/Task\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"V\n\x11ListTasksResponse\x12(\n\x05tasks\x18\x01 \x03(\x0b\x32\x19.google.cloud.run.v2.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\
|
19
|
+
descriptor_data = "\n\x1egoogle/cloud/run/v2/task.proto\x12\x13google.cloud.run.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/run/v2/condition.proto\x1a!google/cloud/run/v2/k8s.min.proto\x1a)google/cloud/run/v2/vendor_settings.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"?\n\x0eGetTaskRequest\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\n\x17run.googleapis.com/Task\"\x80\x01\n\x10ListTasksRequest\x12/\n\x06parent\x18\x01 \x01(\tB\x1f\xe0\x41\x02\xfa\x41\x19\x12\x17run.googleapis.com/Task\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"V\n\x11ListTasksResponse\x12(\n\x05tasks\x18\x01 \x03(\x0b\x32\x19.google.cloud.run.v2.Task\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb8\x0c\n\x04Task\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ngeneration\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12:\n\x06labels\x18\x04 \x03(\x0b\x32%.google.cloud.run.v2.Task.LabelsEntryB\x03\xe0\x41\x03\x12\x44\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32*.google.cloud.run.v2.Task.AnnotationsEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x0escheduled_time\x18\" \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x0f\x63ompletion_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12+\n\x03job\x18\x0c \x01(\tB\x1e\xe0\x41\x03\xfa\x41\x18\n\x16run.googleapis.com/Job\x12\x37\n\texecution\x18\r \x01(\tB$\xe0\x41\x03\xfa\x41\x1e\n\x1crun.googleapis.com/Execution\x12\x32\n\ncontainers\x18\x0e \x03(\x0b\x32\x1e.google.cloud.run.v2.Container\x12,\n\x07volumes\x18\x0f \x03(\x0b\x32\x1b.google.cloud.run.v2.Volume\x12\x13\n\x0bmax_retries\x18\x10 \x01(\x05\x12*\n\x07timeout\x18\x11 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x17\n\x0fservice_account\x18\x12 \x01(\t\x12H\n\x15\x65xecution_environment\x18\x14 \x01(\x0e\x32).google.cloud.run.v2.ExecutionEnvironment\x12\x18\n\x0breconciling\x18\x15 \x01(\x08\x42\x03\xe0\x41\x03\x12\x37\n\nconditions\x18\x16 \x03(\x0b\x32\x1e.google.cloud.run.v2.ConditionB\x03\xe0\x41\x03\x12 \n\x13observed_generation\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x12\x12\n\x05index\x18\x18 \x01(\x05\x42\x03\xe0\x41\x03\x12\x14\n\x07retried\x18\x19 \x01(\x05\x42\x03\xe0\x41\x03\x12H\n\x13last_attempt_result\x18\x1a \x01(\x0b\x32&.google.cloud.run.v2.TaskAttemptResultB\x03\xe0\x41\x03\x12\x41\n\x0e\x65ncryption_key\x18\x1c \x01(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x37\n\nvpc_access\x18\x1d \x01(\x0b\x32\x1e.google.cloud.run.v2.VpcAccessB\x03\xe0\x41\x03\x12\x14\n\x07log_uri\x18 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18! \x01(\x08\x42\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x63 \x01(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:w\xea\x41t\n\x17run.googleapis.com/Task\x12Vprojects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task}R\x01\x01\"T\n\x11TaskAttemptResult\x12\'\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x16\n\texit_code\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x32\x96\x03\n\x05Tasks\x12\x97\x01\n\x07GetTask\x12#.google.cloud.run.v2.GetTaskRequest\x1a\x19.google.cloud.run.v2.Task\"L\x82\xd3\xe4\x93\x02?\x12=/v2/{name=projects/*/locations/*/jobs/*/executions/*/tasks/*}\xda\x41\x04name\x12\xaa\x01\n\tListTasks\x12%.google.cloud.run.v2.ListTasksRequest\x1a&.google.cloud.run.v2.ListTasksResponse\"N\x82\xd3\xe4\x93\x02?\x12=/v2/{parent=projects/*/locations/*/jobs/*/executions/*}/tasks\xda\x41\x06parent\x1a\x46\xca\x41\x12run.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBQ\n\x17\x63om.google.cloud.run.v2B\tTaskProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3"
|
20
20
|
|
21
21
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
22
22
|
|
@@ -145,7 +145,8 @@ module Google
|
|
145
145
|
credentials: credentials,
|
146
146
|
endpoint: @config.endpoint,
|
147
147
|
channel_args: @config.channel_args,
|
148
|
-
interceptors: @config.interceptors
|
148
|
+
interceptors: @config.interceptors,
|
149
|
+
channel_pool_config: @config.channel_pool
|
149
150
|
)
|
150
151
|
end
|
151
152
|
|
@@ -464,6 +465,14 @@ module Google
|
|
464
465
|
end
|
465
466
|
end
|
466
467
|
|
468
|
+
##
|
469
|
+
# Configuration for the channel pool
|
470
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
471
|
+
#
|
472
|
+
def channel_pool
|
473
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
474
|
+
end
|
475
|
+
|
467
476
|
##
|
468
477
|
# Configuration RPC class for the Tasks API.
|
469
478
|
#
|
@@ -178,6 +178,22 @@ module Google
|
|
178
178
|
# @return [::Google::Cloud::Run::V2::Task]
|
179
179
|
#
|
180
180
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
181
|
+
#
|
182
|
+
# @example Basic example
|
183
|
+
# require "google/cloud/run/v2"
|
184
|
+
#
|
185
|
+
# # Create a client object. The client can be reused for multiple calls.
|
186
|
+
# client = Google::Cloud::Run::V2::Tasks::Rest::Client.new
|
187
|
+
#
|
188
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
189
|
+
# request = Google::Cloud::Run::V2::GetTaskRequest.new
|
190
|
+
#
|
191
|
+
# # Call the get_task method.
|
192
|
+
# result = client.get_task request
|
193
|
+
#
|
194
|
+
# # The returned object is of type Google::Cloud::Run::V2::Task.
|
195
|
+
# p result
|
196
|
+
#
|
181
197
|
def get_task request, options = nil
|
182
198
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
183
199
|
|
@@ -250,6 +266,26 @@ module Google
|
|
250
266
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Run::V2::Task>]
|
251
267
|
#
|
252
268
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
269
|
+
#
|
270
|
+
# @example Basic example
|
271
|
+
# require "google/cloud/run/v2"
|
272
|
+
#
|
273
|
+
# # Create a client object. The client can be reused for multiple calls.
|
274
|
+
# client = Google::Cloud::Run::V2::Tasks::Rest::Client.new
|
275
|
+
#
|
276
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
277
|
+
# request = Google::Cloud::Run::V2::ListTasksRequest.new
|
278
|
+
#
|
279
|
+
# # Call the list_tasks method.
|
280
|
+
# result = client.list_tasks request
|
281
|
+
#
|
282
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
283
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
284
|
+
# result.each do |item|
|
285
|
+
# # Each element is of type ::Google::Cloud::Run::V2::Task.
|
286
|
+
# p item
|
287
|
+
# end
|
288
|
+
#
|
253
289
|
def list_tasks request, options = nil
|
254
290
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
255
291
|
|
@@ -4,10 +4,11 @@
|
|
4
4
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
|
+
require 'google/api/field_behavior_pb'
|
7
8
|
require 'google/api/resource_pb'
|
8
9
|
|
9
10
|
|
10
|
-
descriptor_data = "\n)google/cloud/run/v2/vendor_settings.proto\x12\x13google.cloud.run.v2\x1a\x19google/api/resource.proto\"\
|
11
|
+
descriptor_data = "\n)google/cloud/run/v2/vendor_settings.proto\x12\x13google.cloud.run.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe8\x02\n\tVpcAccess\x12:\n\tconnector\x18\x01 \x01(\tB\'\xfa\x41$\n\"vpcaccess.googleapis.com/Connector\x12\x38\n\x06\x65gress\x18\x02 \x01(\x0e\x32(.google.cloud.run.v2.VpcAccess.VpcEgress\x12K\n\x12network_interfaces\x18\x03 \x03(\x0b\x32/.google.cloud.run.v2.VpcAccess.NetworkInterface\x1a\x45\n\x10NetworkInterface\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x12\n\nsubnetwork\x18\x02 \x01(\t\x12\x0c\n\x04tags\x18\x03 \x03(\t\"Q\n\tVpcEgress\x12\x1a\n\x16VPC_EGRESS_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x41LL_TRAFFIC\x10\x01\x12\x17\n\x13PRIVATE_RANGES_ONLY\x10\x02\"a\n\x13\x42inaryAuthorization\x12\x15\n\x0buse_default\x18\x01 \x01(\x08H\x00\x12 \n\x18\x62reakglass_justification\x18\x02 \x01(\tB\x11\n\x0f\x62inauthz_method\"I\n\x0fRevisionScaling\x12\x1a\n\x12min_instance_count\x18\x01 \x01(\x05\x12\x1a\n\x12max_instance_count\x18\x02 \x01(\x05*\x99\x01\n\x0eIngressTraffic\x12\x1f\n\x1bINGRESS_TRAFFIC_UNSPECIFIED\x10\x00\x12\x17\n\x13INGRESS_TRAFFIC_ALL\x10\x01\x12!\n\x1dINGRESS_TRAFFIC_INTERNAL_ONLY\x10\x02\x12*\n&INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER\x10\x03*}\n\x14\x45xecutionEnvironment\x12%\n!EXECUTION_ENVIRONMENT_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x45XECUTION_ENVIRONMENT_GEN1\x10\x01\x12\x1e\n\x1a\x45XECUTION_ENVIRONMENT_GEN2\x10\x02*p\n\x1d\x45ncryptionKeyRevocationAction\x12\x30\n,ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPREVENT_NEW\x10\x01\x12\x0c\n\x08SHUTDOWN\x10\x02\x42[\n\x17\x63om.google.cloud.run.v2B\x13VendorSettingsProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3"
|
11
12
|
|
12
13
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
14
|
|
@@ -38,6 +39,7 @@ module Google
|
|
38
39
|
module Run
|
39
40
|
module V2
|
40
41
|
VpcAccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.VpcAccess").msgclass
|
42
|
+
VpcAccess::NetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.VpcAccess.NetworkInterface").msgclass
|
41
43
|
VpcAccess::VpcEgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.VpcAccess.VpcEgress").enummodule
|
42
44
|
BinaryAuthorization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.BinaryAuthorization").msgclass
|
43
45
|
RevisionScaling = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.RevisionScaling").msgclass
|
@@ -66,6 +66,20 @@ module Google
|
|
66
66
|
# a non-empty value will be returned. The user will not be aware of what
|
67
67
|
# non-empty value to expect.
|
68
68
|
NON_EMPTY_DEFAULT = 7
|
69
|
+
|
70
|
+
# Denotes that the field in a resource (a message annotated with
|
71
|
+
# google.api.resource) is used in the resource name to uniquely identify the
|
72
|
+
# resource. For AIP-compliant APIs, this should only be applied to the
|
73
|
+
# `name` field on the resource.
|
74
|
+
#
|
75
|
+
# This behavior should not be applied to references to other resources within
|
76
|
+
# the message.
|
77
|
+
#
|
78
|
+
# The identifier field of resources often have different field behavior
|
79
|
+
# depending on the request it is embedded in (e.g. for Create methods name
|
80
|
+
# is optional and unused, while for Update methods it is required). Instead
|
81
|
+
# of method-specific annotations, only `IDENTIFIER` is required.
|
82
|
+
IDENTIFIER = 8
|
69
83
|
end
|
70
84
|
end
|
71
85
|
end
|
@@ -26,8 +26,8 @@ module Google
|
|
26
26
|
# @return [::String]
|
27
27
|
# Required. The full name of the Execution.
|
28
28
|
# Format:
|
29
|
-
# projects
|
30
|
-
# where
|
29
|
+
# `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
|
30
|
+
# where `{project}` can be project id or number.
|
31
31
|
class GetExecutionRequest
|
32
32
|
include ::Google::Protobuf::MessageExts
|
33
33
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -38,8 +38,8 @@ module Google
|
|
38
38
|
# @return [::String]
|
39
39
|
# Required. The Execution from which the Executions should be listed.
|
40
40
|
# To list all Executions across Jobs, use "-" instead of Job name.
|
41
|
-
# Format: projects
|
42
|
-
# can be project id or number.
|
41
|
+
# Format: `projects/{project}/locations/{location}/jobs/{job}`, where
|
42
|
+
# `{project}` can be project id or number.
|
43
43
|
# @!attribute [rw] page_size
|
44
44
|
# @return [::Integer]
|
45
45
|
# Maximum number of Executions to return in this call.
|
@@ -73,8 +73,8 @@ module Google
|
|
73
73
|
# @return [::String]
|
74
74
|
# Required. The name of the Execution to delete.
|
75
75
|
# Format:
|
76
|
-
# projects
|
77
|
-
# where
|
76
|
+
# `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
|
77
|
+
# where `{project}` can be project id or number.
|
78
78
|
# @!attribute [rw] validate_only
|
79
79
|
# @return [::Boolean]
|
80
80
|
# Indicates that the request should be validated without actually
|
@@ -88,6 +88,26 @@ module Google
|
|
88
88
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
89
89
|
end
|
90
90
|
|
91
|
+
# Request message for deleting an Execution.
|
92
|
+
# @!attribute [rw] name
|
93
|
+
# @return [::String]
|
94
|
+
# Required. The name of the Execution to cancel.
|
95
|
+
# Format:
|
96
|
+
# `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`,
|
97
|
+
# where `{project}` can be project id or number.
|
98
|
+
# @!attribute [rw] validate_only
|
99
|
+
# @return [::Boolean]
|
100
|
+
# Indicates that the request should be validated without actually
|
101
|
+
# cancelling any resources.
|
102
|
+
# @!attribute [rw] etag
|
103
|
+
# @return [::String]
|
104
|
+
# A system-generated fingerprint for this version of the resource.
|
105
|
+
# This may be used to detect modification conflict during updates.
|
106
|
+
class CancelExecutionRequest
|
107
|
+
include ::Google::Protobuf::MessageExts
|
108
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
109
|
+
end
|
110
|
+
|
91
111
|
# Execution represents the configuration of a single execution. A execution an
|
92
112
|
# immutable resource that references a container image which is run to
|
93
113
|
# completion.
|
@@ -139,9 +139,51 @@ module Google
|
|
139
139
|
# @return [::String]
|
140
140
|
# A system-generated fingerprint for this version of the
|
141
141
|
# resource. May be used to detect modification conflict during updates.
|
142
|
+
# @!attribute [rw] overrides
|
143
|
+
# @return [::Google::Cloud::Run::V2::RunJobRequest::Overrides]
|
144
|
+
# Overrides specification for a given execution of a job. If provided,
|
145
|
+
# overrides will be applied to update the execution or task spec.
|
142
146
|
class RunJobRequest
|
143
147
|
include ::Google::Protobuf::MessageExts
|
144
148
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
149
|
+
|
150
|
+
# RunJob Overrides that contains Execution fields to be overridden.
|
151
|
+
# @!attribute [rw] container_overrides
|
152
|
+
# @return [::Array<::Google::Cloud::Run::V2::RunJobRequest::Overrides::ContainerOverride>]
|
153
|
+
# Per container override specification.
|
154
|
+
# @!attribute [rw] task_count
|
155
|
+
# @return [::Integer]
|
156
|
+
# Optional. The desired number of tasks the execution should run. Will
|
157
|
+
# replace existing task_count value.
|
158
|
+
# @!attribute [rw] timeout
|
159
|
+
# @return [::Google::Protobuf::Duration]
|
160
|
+
# Duration in seconds the task may be active before the system will
|
161
|
+
# actively try to mark it failed and kill associated containers. Will
|
162
|
+
# replace existing timeout_seconds value.
|
163
|
+
class Overrides
|
164
|
+
include ::Google::Protobuf::MessageExts
|
165
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
166
|
+
|
167
|
+
# Per-container override specification.
|
168
|
+
# @!attribute [rw] name
|
169
|
+
# @return [::String]
|
170
|
+
# The name of the container specified as a DNS_LABEL.
|
171
|
+
# @!attribute [rw] args
|
172
|
+
# @return [::Array<::String>]
|
173
|
+
# Optional. Arguments to the entrypoint. Will replace existing args for
|
174
|
+
# override.
|
175
|
+
# @!attribute [rw] env
|
176
|
+
# @return [::Array<::Google::Cloud::Run::V2::EnvVar>]
|
177
|
+
# List of environment variables to set in the container. Will be merged
|
178
|
+
# with existing env for override.
|
179
|
+
# @!attribute [rw] clear_args
|
180
|
+
# @return [::Boolean]
|
181
|
+
# Optional. True if the intention is to clear out existing args list.
|
182
|
+
class ContainerOverride
|
183
|
+
include ::Google::Protobuf::MessageExts
|
184
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
185
|
+
end
|
186
|
+
end
|
145
187
|
end
|
146
188
|
|
147
189
|
# Job represents the configuration of a single job, which references a
|