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
@@ -154,6 +154,44 @@ module Google
|
|
154
154
|
result
|
155
155
|
end
|
156
156
|
|
157
|
+
##
|
158
|
+
# Baseline implementation for the cancel_execution REST call
|
159
|
+
#
|
160
|
+
# @param request_pb [::Google::Cloud::Run::V2::CancelExecutionRequest]
|
161
|
+
# A request object representing the call parameters. Required.
|
162
|
+
# @param options [::Gapic::CallOptions]
|
163
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
164
|
+
#
|
165
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
166
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
167
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
168
|
+
#
|
169
|
+
# @return [::Google::Longrunning::Operation]
|
170
|
+
# A result object deserialized from the server's reply
|
171
|
+
def cancel_execution request_pb, options = nil
|
172
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
173
|
+
|
174
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_cancel_execution_request request_pb
|
175
|
+
query_string_params = if query_string_params.any?
|
176
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
177
|
+
else
|
178
|
+
{}
|
179
|
+
end
|
180
|
+
|
181
|
+
response = @client_stub.make_http_request(
|
182
|
+
verb,
|
183
|
+
uri: uri,
|
184
|
+
body: body || "",
|
185
|
+
params: query_string_params,
|
186
|
+
options: options
|
187
|
+
)
|
188
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
189
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
190
|
+
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
194
|
+
|
157
195
|
##
|
158
196
|
# @private
|
159
197
|
#
|
@@ -216,6 +254,28 @@ module Google
|
|
216
254
|
)
|
217
255
|
transcoder.transcode request_pb
|
218
256
|
end
|
257
|
+
|
258
|
+
##
|
259
|
+
# @private
|
260
|
+
#
|
261
|
+
# GRPC transcoding helper method for the cancel_execution REST call
|
262
|
+
#
|
263
|
+
# @param request_pb [::Google::Cloud::Run::V2::CancelExecutionRequest]
|
264
|
+
# A request object representing the call parameters. Required.
|
265
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
266
|
+
# Uri, Body, Query string parameters
|
267
|
+
def self.transcode_cancel_execution_request request_pb
|
268
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
269
|
+
.with_bindings(
|
270
|
+
uri_method: :post,
|
271
|
+
uri_template: "/v2/{name}:cancel",
|
272
|
+
body: "*",
|
273
|
+
matches: [
|
274
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/jobs/[^/]+/executions/[^/]+/?$}, false]
|
275
|
+
]
|
276
|
+
)
|
277
|
+
transcoder.transcode request_pb
|
278
|
+
end
|
219
279
|
end
|
220
280
|
end
|
221
281
|
end
|
@@ -9,17 +9,20 @@ require 'google/api/client_pb'
|
|
9
9
|
require 'google/api/field_behavior_pb'
|
10
10
|
require 'google/api/launch_stage_pb'
|
11
11
|
require 'google/api/resource_pb'
|
12
|
+
require 'google/api/routing_pb'
|
12
13
|
require 'google/cloud/run/v2/condition_pb'
|
13
14
|
require 'google/cloud/run/v2/execution_pb'
|
14
15
|
require 'google/cloud/run/v2/execution_template_pb'
|
16
|
+
require 'google/cloud/run/v2/k8s.min_pb'
|
15
17
|
require 'google/cloud/run/v2/vendor_settings_pb'
|
16
18
|
require 'google/iam/v1/iam_policy_pb'
|
17
19
|
require 'google/iam/v1/policy_pb'
|
18
20
|
require 'google/longrunning/operations_pb'
|
21
|
+
require 'google/protobuf/duration_pb'
|
19
22
|
require 'google/protobuf/timestamp_pb'
|
20
23
|
|
21
24
|
|
22
|
-
descriptor_data = "\n\x1dgoogle/cloud/run/v2/job.proto\x12\x13google.cloud.run.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1dgoogle/api/launch_stage.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/run/v2/condition.proto\x1a#google/cloud/run/v2/execution.proto\x1a,google/cloud/run/v2/execution_template.proto\x1a)google/cloud/run/v2/vendor_settings.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9a\x01\n\x10\x43reateJobRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\x12\x16run.googleapis.com/Job\x12*\n\x03job\x18\x02 \x01(\x0b\x32\x18.google.cloud.run.v2.JobB\x03\xe0\x41\x02\x12\x13\n\x06job_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"=\n\rGetJobRequest\x12,\n\x04name\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16run.googleapis.com/Job\"l\n\x10UpdateJobRequest\x12*\n\x03job\x18\x01 \x01(\x0b\x32\x18.google.cloud.run.v2.JobB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12\x15\n\rallow_missing\x18\x04 \x01(\x08\"~\n\x0fListJobsRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\x12\x16run.googleapis.com/Job\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\"S\n\x10ListJobsResponse\x12&\n\x04jobs\x18\x01 \x03(\x0b\x32\x18.google.cloud.run.v2.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"e\n\x10\x44\x65leteJobRequest\x12,\n\x04name\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16run.googleapis.com/Job\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\"
|
25
|
+
descriptor_data = "\n\x1dgoogle/cloud/run/v2/job.proto\x12\x13google.cloud.run.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1dgoogle/api/launch_stage.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a#google/cloud/run/v2/condition.proto\x1a#google/cloud/run/v2/execution.proto\x1a,google/cloud/run/v2/execution_template.proto\x1a!google/cloud/run/v2/k8s.min.proto\x1a)google/cloud/run/v2/vendor_settings.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9a\x01\n\x10\x43reateJobRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\x12\x16run.googleapis.com/Job\x12*\n\x03job\x18\x02 \x01(\x0b\x32\x18.google.cloud.run.v2.JobB\x03\xe0\x41\x02\x12\x13\n\x06job_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"=\n\rGetJobRequest\x12,\n\x04name\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16run.googleapis.com/Job\"l\n\x10UpdateJobRequest\x12*\n\x03job\x18\x01 \x01(\x0b\x32\x18.google.cloud.run.v2.JobB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12\x15\n\rallow_missing\x18\x04 \x01(\x08\"~\n\x0fListJobsRequest\x12.\n\x06parent\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\x12\x16run.googleapis.com/Job\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\"S\n\x10ListJobsResponse\x12&\n\x04jobs\x18\x01 \x03(\x0b\x32\x18.google.cloud.run.v2.Job\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"e\n\x10\x44\x65leteJobRequest\x12,\n\x04name\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16run.googleapis.com/Job\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\"\xcc\x03\n\rRunJobRequest\x12,\n\x04name\x18\x01 \x01(\tB\x1e\xe0\x41\x02\xfa\x41\x18\n\x16run.googleapis.com/Job\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\x12?\n\toverrides\x18\x04 \x01(\x0b\x32,.google.cloud.run.v2.RunJobRequest.Overrides\x1a\xa6\x02\n\tOverrides\x12[\n\x13\x63ontainer_overrides\x18\x01 \x03(\x0b\x32>.google.cloud.run.v2.RunJobRequest.Overrides.ContainerOverride\x12\x17\n\ntask_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12*\n\x07timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x1aw\n\x11\x43ontainerOverride\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\x04\x61rgs\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12(\n\x03\x65nv\x18\x03 \x03(\x0b\x32\x1b.google.cloud.run.v2.EnvVar\x12\x17\n\nclear_args\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa6\t\n\x03Job\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x34\n\x06labels\x18\x04 \x03(\x0b\x32$.google.cloud.run.v2.Job.LabelsEntry\x12>\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32).google.cloud.run.v2.Job.AnnotationsEntry\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x14\n\x07\x63reator\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rlast_modifier\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x0e\n\x06\x63lient\x18\x0c \x01(\t\x12\x16\n\x0e\x63lient_version\x18\r \x01(\t\x12-\n\x0claunch_stage\x18\x0e \x01(\x0e\x32\x17.google.api.LaunchStage\x12\x46\n\x14\x62inary_authorization\x18\x0f \x01(\x0b\x32(.google.cloud.run.v2.BinaryAuthorization\x12=\n\x08template\x18\x10 \x01(\x0b\x32&.google.cloud.run.v2.ExecutionTemplateB\x03\xe0\x41\x02\x12 \n\x13observed_generation\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03\x12?\n\x12terminal_condition\x18\x12 \x01(\x0b\x32\x1e.google.cloud.run.v2.ConditionB\x03\xe0\x41\x03\x12\x37\n\nconditions\x18\x13 \x03(\x0b\x32\x1e.google.cloud.run.v2.ConditionB\x03\xe0\x41\x03\x12\x1c\n\x0f\x65xecution_count\x18\x14 \x01(\x05\x42\x03\xe0\x41\x03\x12N\n\x18latest_created_execution\x18\x16 \x01(\x0b\x32\'.google.cloud.run.v2.ExecutionReferenceB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x17 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x19 \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:R\xea\x41O\n\x16run.googleapis.com/Job\x12\x32projects/{project}/locations/{location}/jobs/{job}R\x01\x01\"\xab\x01\n\x12\x45xecutionReference\x12/\n\x04name\x18\x01 \x01(\tB!\xfa\x41\x1e\n\x1crun.googleapis.com/Execution\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x63ompletion_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\x8a\x0e\n\x04Jobs\x12\xdd\x01\n\tCreateJob\x12%.google.cloud.run.v2.CreateJobRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\x82\xd3\xe4\x93\x02/\"(/v2/{parent=projects/*/locations/*}/jobs:\x03job\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\xda\x41\x11parent,job,job_id\xca\x41\n\n\x03Job\x12\x03Job\x12\xb3\x01\n\x06GetJob\x12\".google.cloud.run.v2.GetJobRequest\x1a\x18.google.cloud.run.v2.Job\"k\x82\xd3\xe4\x93\x02*\x12(/v2/{name=projects/*/locations/*/jobs/*}\x8a\xd3\xe4\x93\x02.\x12,\n\x04name\x12$projects/*/locations/{location=*}/**\xda\x41\x04name\x12\xc5\x01\n\x08ListJobs\x12$.google.cloud.run.v2.ListJobsRequest\x1a%.google.cloud.run.v2.ListJobsResponse\"l\x82\xd3\xe4\x93\x02*\x12(/v2/{parent=projects/*/locations/*}/jobs\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\xda\x41\x06parent\x12\xd8\x01\n\tUpdateJob\x12%.google.cloud.run.v2.UpdateJobRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\x82\xd3\xe4\x93\x02\x33\x32,/v2/{job.name=projects/*/locations/*/jobs/*}:\x03job\x8a\xd3\xe4\x93\x02\x32\x12\x30\n\x08job.name\x12$projects/*/locations/{location=*}/**\xda\x41\x03job\xca\x41\n\n\x03Job\x12\x03Job\x12\xcb\x01\n\tDeleteJob\x12%.google.cloud.run.v2.DeleteJobRequest\x1a\x1d.google.longrunning.Operation\"x\x82\xd3\xe4\x93\x02**(/v2/{name=projects/*/locations/*/jobs/*}\x8a\xd3\xe4\x93\x02.\x12,\n\x04name\x12$projects/*/locations/{location=*}/**\xda\x41\x04name\xca\x41\n\n\x03Job\x12\x03Job\x12\xd9\x01\n\x06RunJob\x12\".google.cloud.run.v2.RunJobRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\x82\xd3\xe4\x93\x02\x31\",/v2/{name=projects/*/locations/*/jobs/*}:run:\x01*\x8a\xd3\xe4\x93\x02.\x12,\n\x04name\x12$projects/*/locations/{location=*}/**\xda\x41\x04name\xca\x41\x16\n\tExecution\x12\tExecution\x12\x8c\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"A\x82\xd3\xe4\x93\x02;\x12\x39/v2/{resource=projects/*/locations/*/jobs/*}:getIamPolicy\x12\x8f\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"D\x82\xd3\xe4\x93\x02>\"9/v2/{resource=projects/*/locations/*/jobs/*}:setIamPolicy:\x01*\x12\xb5\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"J\x82\xd3\xe4\x93\x02\x44\"?/v2/{resource=projects/*/locations/*/jobs/*}:testIamPermissions:\x01*\x1a\x46\xca\x41\x12run.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBP\n\x17\x63om.google.cloud.run.v2B\x08JobProtoP\x01Z)cloud.google.com/go/run/apiv2/runpb;runpbb\x06proto3"
|
23
26
|
|
24
27
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
25
28
|
|
@@ -34,6 +37,8 @@ rescue TypeError => e
|
|
34
37
|
file = pool.add_serialized_file(serialized)
|
35
38
|
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
36
39
|
imports = [
|
40
|
+
["google.protobuf.Duration", "google/protobuf/duration.proto"],
|
41
|
+
["google.cloud.run.v2.EnvVar", "google/cloud/run/v2/k8s.min.proto"],
|
37
42
|
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
38
43
|
["google.cloud.run.v2.BinaryAuthorization", "google/cloud/run/v2/vendor_settings.proto"],
|
39
44
|
["google.cloud.run.v2.ExecutionTemplate", "google/cloud/run/v2/execution_template.proto"],
|
@@ -60,6 +65,8 @@ module Google
|
|
60
65
|
ListJobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.ListJobsResponse").msgclass
|
61
66
|
DeleteJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.DeleteJobRequest").msgclass
|
62
67
|
RunJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.RunJobRequest").msgclass
|
68
|
+
RunJobRequest::Overrides = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.RunJobRequest.Overrides").msgclass
|
69
|
+
RunJobRequest::Overrides::ContainerOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.RunJobRequest.Overrides.ContainerOverride").msgclass
|
63
70
|
Job = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.Job").msgclass
|
64
71
|
ExecutionReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.run.v2.ExecutionReference").msgclass
|
65
72
|
end
|
@@ -151,7 +151,8 @@ module Google
|
|
151
151
|
credentials: credentials,
|
152
152
|
endpoint: @config.endpoint,
|
153
153
|
channel_args: @config.channel_args,
|
154
|
-
interceptors: @config.interceptors
|
154
|
+
interceptors: @config.interceptors,
|
155
|
+
channel_pool_config: @config.channel_pool
|
155
156
|
)
|
156
157
|
end
|
157
158
|
|
@@ -251,10 +252,13 @@ module Google
|
|
251
252
|
|
252
253
|
header_params = {}
|
253
254
|
if request.parent
|
254
|
-
|
255
|
+
regex_match = %r{^projects/[^/]+/locations/(?<location>[^/]+)/?$}.match request.parent
|
256
|
+
if regex_match
|
257
|
+
header_params["location"] = regex_match["location".to_s]
|
258
|
+
end
|
255
259
|
end
|
256
260
|
|
257
|
-
request_params_header =
|
261
|
+
request_params_header = URI.encode_www_form header_params
|
258
262
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
259
263
|
|
260
264
|
options.apply_defaults timeout: @config.rpcs.create_job.timeout,
|
@@ -339,10 +343,13 @@ module Google
|
|
339
343
|
|
340
344
|
header_params = {}
|
341
345
|
if request.name
|
342
|
-
|
346
|
+
regex_match = %r{^projects/[^/]+/locations/(?<location>[^/]+)(?:/.*)?$}.match request.name
|
347
|
+
if regex_match
|
348
|
+
header_params["location"] = regex_match["location".to_s]
|
349
|
+
end
|
343
350
|
end
|
344
351
|
|
345
|
-
request_params_header =
|
352
|
+
request_params_header = URI.encode_www_form header_params
|
346
353
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
347
354
|
|
348
355
|
options.apply_defaults timeout: @config.rpcs.get_job.timeout,
|
@@ -437,10 +444,13 @@ module Google
|
|
437
444
|
|
438
445
|
header_params = {}
|
439
446
|
if request.parent
|
440
|
-
|
447
|
+
regex_match = %r{^projects/[^/]+/locations/(?<location>[^/]+)/?$}.match request.parent
|
448
|
+
if regex_match
|
449
|
+
header_params["location"] = regex_match["location".to_s]
|
450
|
+
end
|
441
451
|
end
|
442
452
|
|
443
|
-
request_params_header =
|
453
|
+
request_params_header = URI.encode_www_form header_params
|
444
454
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
445
455
|
|
446
456
|
options.apply_defaults timeout: @config.rpcs.list_jobs.timeout,
|
@@ -537,10 +547,13 @@ module Google
|
|
537
547
|
|
538
548
|
header_params = {}
|
539
549
|
if request.job&.name
|
540
|
-
|
550
|
+
regex_match = %r{^projects/[^/]+/locations/(?<location>[^/]+)(?:/.*)?$}.match request.job.name
|
551
|
+
if regex_match
|
552
|
+
header_params["location"] = regex_match["location".to_s]
|
553
|
+
end
|
541
554
|
end
|
542
555
|
|
543
|
-
request_params_header =
|
556
|
+
request_params_header = URI.encode_www_form header_params
|
544
557
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
545
558
|
|
546
559
|
options.apply_defaults timeout: @config.rpcs.update_job.timeout,
|
@@ -638,10 +651,13 @@ module Google
|
|
638
651
|
|
639
652
|
header_params = {}
|
640
653
|
if request.name
|
641
|
-
|
654
|
+
regex_match = %r{^projects/[^/]+/locations/(?<location>[^/]+)(?:/.*)?$}.match request.name
|
655
|
+
if regex_match
|
656
|
+
header_params["location"] = regex_match["location".to_s]
|
657
|
+
end
|
642
658
|
end
|
643
659
|
|
644
|
-
request_params_header =
|
660
|
+
request_params_header = URI.encode_www_form header_params
|
645
661
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
646
662
|
|
647
663
|
options.apply_defaults timeout: @config.rpcs.delete_job.timeout,
|
@@ -674,7 +690,7 @@ module Google
|
|
674
690
|
# @param options [::Gapic::CallOptions, ::Hash]
|
675
691
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
676
692
|
#
|
677
|
-
# @overload run_job(name: nil, validate_only: nil, etag: nil)
|
693
|
+
# @overload run_job(name: nil, validate_only: nil, etag: nil, overrides: nil)
|
678
694
|
# Pass arguments to `run_job` via keyword arguments. Note that at
|
679
695
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
680
696
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -689,6 +705,9 @@ module Google
|
|
689
705
|
# @param etag [::String]
|
690
706
|
# A system-generated fingerprint for this version of the
|
691
707
|
# resource. May be used to detect modification conflict during updates.
|
708
|
+
# @param overrides [::Google::Cloud::Run::V2::RunJobRequest::Overrides, ::Hash]
|
709
|
+
# Overrides specification for a given execution of a job. If provided,
|
710
|
+
# overrides will be applied to update the execution or task spec.
|
692
711
|
#
|
693
712
|
# @yield [response, operation] Access the result along with the RPC operation
|
694
713
|
# @yieldparam response [::Gapic::Operation]
|
@@ -739,10 +758,13 @@ module Google
|
|
739
758
|
|
740
759
|
header_params = {}
|
741
760
|
if request.name
|
742
|
-
|
761
|
+
regex_match = %r{^projects/[^/]+/locations/(?<location>[^/]+)(?:/.*)?$}.match request.name
|
762
|
+
if regex_match
|
763
|
+
header_params["location"] = regex_match["location".to_s]
|
764
|
+
end
|
743
765
|
end
|
744
766
|
|
745
|
-
request_params_header =
|
767
|
+
request_params_header = URI.encode_www_form header_params
|
746
768
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
747
769
|
|
748
770
|
options.apply_defaults timeout: @config.rpcs.run_job.timeout,
|
@@ -1162,6 +1184,14 @@ module Google
|
|
1162
1184
|
end
|
1163
1185
|
end
|
1164
1186
|
|
1187
|
+
##
|
1188
|
+
# Configuration for the channel pool
|
1189
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
1190
|
+
#
|
1191
|
+
def channel_pool
|
1192
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
1193
|
+
end
|
1194
|
+
|
1165
1195
|
##
|
1166
1196
|
# Configuration RPC class for the Jobs API.
|
1167
1197
|
#
|
@@ -93,7 +93,8 @@ module Google
|
|
93
93
|
credentials: credentials,
|
94
94
|
endpoint: @config.endpoint,
|
95
95
|
channel_args: @config.channel_args,
|
96
|
-
interceptors: @config.interceptors
|
96
|
+
interceptors: @config.interceptors,
|
97
|
+
channel_pool_config: @config.channel_pool
|
97
98
|
)
|
98
99
|
|
99
100
|
# Used by an LRO wrapper for some methods of this service
|
@@ -709,6 +710,14 @@ module Google
|
|
709
710
|
end
|
710
711
|
end
|
711
712
|
|
713
|
+
##
|
714
|
+
# Configuration for the channel pool
|
715
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
716
|
+
#
|
717
|
+
def channel_pool
|
718
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
719
|
+
end
|
720
|
+
|
712
721
|
##
|
713
722
|
# Configuration RPC class for the Operations API.
|
714
723
|
#
|
@@ -199,6 +199,29 @@ module Google
|
|
199
199
|
# @return [::Gapic::Operation]
|
200
200
|
#
|
201
201
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
202
|
+
#
|
203
|
+
# @example Basic example
|
204
|
+
# require "google/cloud/run/v2"
|
205
|
+
#
|
206
|
+
# # Create a client object. The client can be reused for multiple calls.
|
207
|
+
# client = Google::Cloud::Run::V2::Jobs::Rest::Client.new
|
208
|
+
#
|
209
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
210
|
+
# request = Google::Cloud::Run::V2::CreateJobRequest.new
|
211
|
+
#
|
212
|
+
# # Call the create_job method.
|
213
|
+
# result = client.create_job request
|
214
|
+
#
|
215
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
216
|
+
# # check the status of an operation, cancel it, or wait for results.
|
217
|
+
# # Here is how to wait for a response.
|
218
|
+
# result.wait_until_done! timeout: 60
|
219
|
+
# if result.response?
|
220
|
+
# p result.response
|
221
|
+
# else
|
222
|
+
# puts "No response received."
|
223
|
+
# end
|
224
|
+
#
|
202
225
|
def create_job request, options = nil
|
203
226
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
204
227
|
|
@@ -264,6 +287,22 @@ module Google
|
|
264
287
|
# @return [::Google::Cloud::Run::V2::Job]
|
265
288
|
#
|
266
289
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
290
|
+
#
|
291
|
+
# @example Basic example
|
292
|
+
# require "google/cloud/run/v2"
|
293
|
+
#
|
294
|
+
# # Create a client object. The client can be reused for multiple calls.
|
295
|
+
# client = Google::Cloud::Run::V2::Jobs::Rest::Client.new
|
296
|
+
#
|
297
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
298
|
+
# request = Google::Cloud::Run::V2::GetJobRequest.new
|
299
|
+
#
|
300
|
+
# # Call the get_job method.
|
301
|
+
# result = client.get_job request
|
302
|
+
#
|
303
|
+
# # The returned object is of type Google::Cloud::Run::V2::Job.
|
304
|
+
# p result
|
305
|
+
#
|
267
306
|
def get_job request, options = nil
|
268
307
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
269
308
|
|
@@ -335,6 +374,26 @@ module Google
|
|
335
374
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Run::V2::Job>]
|
336
375
|
#
|
337
376
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
377
|
+
#
|
378
|
+
# @example Basic example
|
379
|
+
# require "google/cloud/run/v2"
|
380
|
+
#
|
381
|
+
# # Create a client object. The client can be reused for multiple calls.
|
382
|
+
# client = Google::Cloud::Run::V2::Jobs::Rest::Client.new
|
383
|
+
#
|
384
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
385
|
+
# request = Google::Cloud::Run::V2::ListJobsRequest.new
|
386
|
+
#
|
387
|
+
# # Call the list_jobs method.
|
388
|
+
# result = client.list_jobs request
|
389
|
+
#
|
390
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
391
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
392
|
+
# result.each do |item|
|
393
|
+
# # Each element is of type ::Google::Cloud::Run::V2::Job.
|
394
|
+
# p item
|
395
|
+
# end
|
396
|
+
#
|
338
397
|
def list_jobs request, options = nil
|
339
398
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
340
399
|
|
@@ -405,6 +464,29 @@ module Google
|
|
405
464
|
# @return [::Gapic::Operation]
|
406
465
|
#
|
407
466
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
467
|
+
#
|
468
|
+
# @example Basic example
|
469
|
+
# require "google/cloud/run/v2"
|
470
|
+
#
|
471
|
+
# # Create a client object. The client can be reused for multiple calls.
|
472
|
+
# client = Google::Cloud::Run::V2::Jobs::Rest::Client.new
|
473
|
+
#
|
474
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
475
|
+
# request = Google::Cloud::Run::V2::UpdateJobRequest.new
|
476
|
+
#
|
477
|
+
# # Call the update_job method.
|
478
|
+
# result = client.update_job request
|
479
|
+
#
|
480
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
481
|
+
# # check the status of an operation, cancel it, or wait for results.
|
482
|
+
# # Here is how to wait for a response.
|
483
|
+
# result.wait_until_done! timeout: 60
|
484
|
+
# if result.response?
|
485
|
+
# p result.response
|
486
|
+
# else
|
487
|
+
# puts "No response received."
|
488
|
+
# end
|
489
|
+
#
|
408
490
|
def update_job request, options = nil
|
409
491
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
410
492
|
|
@@ -476,6 +558,29 @@ module Google
|
|
476
558
|
# @return [::Gapic::Operation]
|
477
559
|
#
|
478
560
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
561
|
+
#
|
562
|
+
# @example Basic example
|
563
|
+
# require "google/cloud/run/v2"
|
564
|
+
#
|
565
|
+
# # Create a client object. The client can be reused for multiple calls.
|
566
|
+
# client = Google::Cloud::Run::V2::Jobs::Rest::Client.new
|
567
|
+
#
|
568
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
569
|
+
# request = Google::Cloud::Run::V2::DeleteJobRequest.new
|
570
|
+
#
|
571
|
+
# # Call the delete_job method.
|
572
|
+
# result = client.delete_job request
|
573
|
+
#
|
574
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
575
|
+
# # check the status of an operation, cancel it, or wait for results.
|
576
|
+
# # Here is how to wait for a response.
|
577
|
+
# result.wait_until_done! timeout: 60
|
578
|
+
# if result.response?
|
579
|
+
# p result.response
|
580
|
+
# else
|
581
|
+
# puts "No response received."
|
582
|
+
# end
|
583
|
+
#
|
479
584
|
def delete_job request, options = nil
|
480
585
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
481
586
|
|
@@ -525,7 +630,7 @@ module Google
|
|
525
630
|
# @param options [::Gapic::CallOptions, ::Hash]
|
526
631
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
527
632
|
#
|
528
|
-
# @overload run_job(name: nil, validate_only: nil, etag: nil)
|
633
|
+
# @overload run_job(name: nil, validate_only: nil, etag: nil, overrides: nil)
|
529
634
|
# Pass arguments to `run_job` via keyword arguments. Note that at
|
530
635
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
531
636
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -540,6 +645,9 @@ module Google
|
|
540
645
|
# @param etag [::String]
|
541
646
|
# A system-generated fingerprint for this version of the
|
542
647
|
# resource. May be used to detect modification conflict during updates.
|
648
|
+
# @param overrides [::Google::Cloud::Run::V2::RunJobRequest::Overrides, ::Hash]
|
649
|
+
# Overrides specification for a given execution of a job. If provided,
|
650
|
+
# overrides will be applied to update the execution or task spec.
|
543
651
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
544
652
|
# @yieldparam result [::Gapic::Operation]
|
545
653
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -547,6 +655,29 @@ module Google
|
|
547
655
|
# @return [::Gapic::Operation]
|
548
656
|
#
|
549
657
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
658
|
+
#
|
659
|
+
# @example Basic example
|
660
|
+
# require "google/cloud/run/v2"
|
661
|
+
#
|
662
|
+
# # Create a client object. The client can be reused for multiple calls.
|
663
|
+
# client = Google::Cloud::Run::V2::Jobs::Rest::Client.new
|
664
|
+
#
|
665
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
666
|
+
# request = Google::Cloud::Run::V2::RunJobRequest.new
|
667
|
+
#
|
668
|
+
# # Call the run_job method.
|
669
|
+
# result = client.run_job request
|
670
|
+
#
|
671
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
672
|
+
# # check the status of an operation, cancel it, or wait for results.
|
673
|
+
# # Here is how to wait for a response.
|
674
|
+
# result.wait_until_done! timeout: 60
|
675
|
+
# if result.response?
|
676
|
+
# p result.response
|
677
|
+
# else
|
678
|
+
# puts "No response received."
|
679
|
+
# end
|
680
|
+
#
|
550
681
|
def run_job request, options = nil
|
551
682
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
552
683
|
|
@@ -615,6 +746,22 @@ module Google
|
|
615
746
|
# @return [::Google::Iam::V1::Policy]
|
616
747
|
#
|
617
748
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
749
|
+
#
|
750
|
+
# @example Basic example
|
751
|
+
# require "google/cloud/run/v2"
|
752
|
+
#
|
753
|
+
# # Create a client object. The client can be reused for multiple calls.
|
754
|
+
# client = Google::Cloud::Run::V2::Jobs::Rest::Client.new
|
755
|
+
#
|
756
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
757
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
758
|
+
#
|
759
|
+
# # Call the get_iam_policy method.
|
760
|
+
# result = client.get_iam_policy request
|
761
|
+
#
|
762
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
763
|
+
# p result
|
764
|
+
#
|
618
765
|
def get_iam_policy request, options = nil
|
619
766
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
620
767
|
|
@@ -690,6 +837,22 @@ module Google
|
|
690
837
|
# @return [::Google::Iam::V1::Policy]
|
691
838
|
#
|
692
839
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
840
|
+
#
|
841
|
+
# @example Basic example
|
842
|
+
# require "google/cloud/run/v2"
|
843
|
+
#
|
844
|
+
# # Create a client object. The client can be reused for multiple calls.
|
845
|
+
# client = Google::Cloud::Run::V2::Jobs::Rest::Client.new
|
846
|
+
#
|
847
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
848
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
849
|
+
#
|
850
|
+
# # Call the set_iam_policy method.
|
851
|
+
# result = client.set_iam_policy request
|
852
|
+
#
|
853
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
854
|
+
# p result
|
855
|
+
#
|
693
856
|
def set_iam_policy request, options = nil
|
694
857
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
695
858
|
|
@@ -760,6 +923,22 @@ module Google
|
|
760
923
|
# @return [::Google::Iam::V1::TestIamPermissionsResponse]
|
761
924
|
#
|
762
925
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
926
|
+
#
|
927
|
+
# @example Basic example
|
928
|
+
# require "google/cloud/run/v2"
|
929
|
+
#
|
930
|
+
# # Create a client object. The client can be reused for multiple calls.
|
931
|
+
# client = Google::Cloud::Run::V2::Jobs::Rest::Client.new
|
932
|
+
#
|
933
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
934
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
935
|
+
#
|
936
|
+
# # Call the test_iam_permissions method.
|
937
|
+
# result = client.test_iam_permissions request
|
938
|
+
#
|
939
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
940
|
+
# p result
|
941
|
+
#
|
763
942
|
def test_iam_permissions request, options = nil
|
764
943
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
765
944
|
|