google-cloud-tasks-v2 1.5.0 → 1.7.0
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/README.md +1 -5
- data/lib/google/cloud/tasks/v2/bindings_override.rb +1 -1
- data/lib/google/cloud/tasks/v2/cloud_tasks/client.rb +468 -12
- data/lib/google/cloud/tasks/v2/cloud_tasks/credentials.rb +1 -1
- data/lib/google/cloud/tasks/v2/cloud_tasks/operations.rb +843 -0
- data/lib/google/cloud/tasks/v2/cloud_tasks/paths.rb +39 -1
- data/lib/google/cloud/tasks/v2/cloud_tasks/rest/client.rb +440 -12
- data/lib/google/cloud/tasks/v2/cloud_tasks/rest/operations.rb +927 -0
- data/lib/google/cloud/tasks/v2/cloud_tasks/rest/service_stub.rb +248 -1
- data/lib/google/cloud/tasks/v2/cloud_tasks/rest.rb +2 -1
- data/lib/google/cloud/tasks/v2/cloud_tasks.rb +2 -1
- data/lib/google/cloud/tasks/v2/cloudtasks_pb.rb +15 -1
- data/lib/google/cloud/tasks/v2/cloudtasks_services_pb.rb +37 -7
- data/lib/google/cloud/tasks/v2/cmek_config_pb.rb +24 -0
- data/lib/google/cloud/tasks/v2/queue_pb.rb +2 -1
- data/lib/google/cloud/tasks/v2/rest.rb +1 -1
- data/lib/google/cloud/tasks/v2/target_pb.rb +9 -1
- data/lib/google/cloud/tasks/v2/task_pb.rb +3 -1
- data/lib/google/cloud/tasks/v2/version.rb +1 -1
- data/lib/google/cloud/tasks/v2.rb +1 -1
- data/lib/google-cloud-tasks-v2.rb +1 -1
- data/proto_docs/google/api/client.rb +150 -30
- data/proto_docs/google/api/field_behavior.rb +1 -1
- data/proto_docs/google/api/field_info.rb +88 -0
- data/proto_docs/google/api/launch_stage.rb +1 -1
- data/proto_docs/google/api/resource.rb +1 -1
- data/proto_docs/google/cloud/tasks/v2/cloudtasks.rb +203 -6
- data/proto_docs/google/cloud/tasks/v2/cmek_config.rb +44 -0
- data/proto_docs/google/cloud/tasks/v2/queue.rb +54 -30
- data/proto_docs/google/cloud/tasks/v2/target.rb +217 -3
- data/proto_docs/google/cloud/tasks/v2/task.rb +13 -1
- data/proto_docs/google/iam/v1/iam_policy.rb +1 -1
- data/proto_docs/google/iam/v1/options.rb +1 -1
- data/proto_docs/google/iam/v1/policy.rb +1 -1
- data/proto_docs/google/longrunning/operations.rb +191 -0
- data/proto_docs/google/protobuf/any.rb +1 -1
- data/proto_docs/google/protobuf/duration.rb +1 -1
- data/proto_docs/google/protobuf/empty.rb +1 -1
- data/proto_docs/google/protobuf/field_mask.rb +1 -1
- data/proto_docs/google/protobuf/timestamp.rb +8 -7
- data/proto_docs/google/rpc/status.rb +1 -1
- data/proto_docs/google/type/expr.rb +1 -1
- metadata +13 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -59,6 +59,9 @@ module Google
|
|
|
59
59
|
# {::Google::Cloud::Tasks::V2::AppEngineHttpRequest App Engine tasks} in the
|
|
60
60
|
# queue, no matter what the setting is for the [task-level
|
|
61
61
|
# app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
|
|
62
|
+
# @!attribute [rw] http_target
|
|
63
|
+
# @return [::Google::Cloud::Tasks::V2::HttpTarget]
|
|
64
|
+
# Modifies HTTP target for HTTP tasks.
|
|
62
65
|
# @!attribute [rw] rate_limits
|
|
63
66
|
# @return [::Google::Cloud::Tasks::V2::RateLimits]
|
|
64
67
|
# Rate limits for task dispatches.
|
|
@@ -74,8 +77,8 @@ module Google
|
|
|
74
77
|
# queue, regardless of whether the dispatch is from a first
|
|
75
78
|
# attempt or a retry).
|
|
76
79
|
# * {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config} controls what
|
|
77
|
-
# happens to
|
|
78
|
-
# particular
|
|
80
|
+
# happens to a
|
|
81
|
+
# particular task after its first attempt fails. That is,
|
|
79
82
|
# {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config} controls task
|
|
80
83
|
# retries (the second attempt, third attempt, etc).
|
|
81
84
|
#
|
|
@@ -187,7 +190,7 @@ module Google
|
|
|
187
190
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
|
188
191
|
# default.
|
|
189
192
|
#
|
|
190
|
-
#
|
|
193
|
+
# The maximum allowed value is 500.
|
|
191
194
|
#
|
|
192
195
|
#
|
|
193
196
|
# This field has the same meaning as
|
|
@@ -210,11 +213,13 @@ module Google
|
|
|
210
213
|
# token is removed from the bucket. Tasks will be dispatched until
|
|
211
214
|
# the queue's bucket runs out of tokens. The bucket will be
|
|
212
215
|
# continuously refilled with new tokens based on
|
|
213
|
-
#
|
|
216
|
+
# `max_dispatches_per_second`.
|
|
214
217
|
#
|
|
215
|
-
# Cloud Tasks
|
|
216
|
-
# value of
|
|
217
|
-
#
|
|
218
|
+
# Cloud Tasks automatically sets an appropriate `max_burst_size` based
|
|
219
|
+
# on the value of `max_dispatches_per_second`. The value is dynamically
|
|
220
|
+
# optimized to ensure queue stability and throughput. It is generally at
|
|
221
|
+
# least equal to `max_dispatches_per_second` but might be higher to
|
|
222
|
+
# accommodate bursts of traffic.
|
|
218
223
|
#
|
|
219
224
|
# For queues that were created or updated using
|
|
220
225
|
# `queue.yaml/xml`, `max_burst_size` is equal to
|
|
@@ -222,11 +227,8 @@ module Google
|
|
|
222
227
|
# Since `max_burst_size` is output only, if
|
|
223
228
|
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue UpdateQueue} is called on a
|
|
224
229
|
# queue created by `queue.yaml/xml`, `max_burst_size` will be reset based on
|
|
225
|
-
# the value of
|
|
226
|
-
#
|
|
227
|
-
# regardless of whether
|
|
228
|
-
# {::Google::Cloud::Tasks::V2::RateLimits#max_dispatches_per_second max_dispatches_per_second}
|
|
229
|
-
# is updated.
|
|
230
|
+
# the value of `max_dispatches_per_second`, regardless of whether
|
|
231
|
+
# `max_dispatches_per_second` is updated.
|
|
230
232
|
# @!attribute [rw] max_concurrent_dispatches
|
|
231
233
|
# @return [::Integer]
|
|
232
234
|
# The maximum number of concurrent tasks that Cloud Tasks allows
|
|
@@ -254,17 +256,25 @@ module Google
|
|
|
254
256
|
# These settings determine when a failed task attempt is retried.
|
|
255
257
|
# @!attribute [rw] max_attempts
|
|
256
258
|
# @return [::Integer]
|
|
257
|
-
# Number of attempts per task.
|
|
259
|
+
# Number of attempts per task, including the first attempt. (If the
|
|
260
|
+
# first attempt fails, there will be `max_attempts - 1` retries.)
|
|
258
261
|
#
|
|
259
|
-
#
|
|
260
|
-
#
|
|
261
|
-
#
|
|
262
|
+
# Must be greater than or equal to -1, which indicates unlimited attempts.
|
|
263
|
+
#
|
|
264
|
+
#
|
|
265
|
+
# Cloud Tasks stops retrying only when `max_attempts` and
|
|
266
|
+
# `max_retry_duration` are both satisfied, or when the task is successfully
|
|
267
|
+
# executed. When the task has been attempted
|
|
268
|
+
# `max_attempts` times and when the `max_retry_duration` time has passed, no
|
|
269
|
+
# further attempts are made, and the task is deleted. If `max_attempts` is
|
|
270
|
+
# set to -1 and `max_retry_duration` is set to 0, the task is retried
|
|
271
|
+
# until the [maximum task
|
|
272
|
+
# retention](https://docs.cloud.google.com/tasks/docs/quotas#limits) limit is
|
|
273
|
+
# reached.
|
|
262
274
|
#
|
|
263
275
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
|
264
276
|
# default.
|
|
265
277
|
#
|
|
266
|
-
# -1 indicates unlimited attempts.
|
|
267
|
-
#
|
|
268
278
|
# This field has the same meaning as
|
|
269
279
|
# [task_retry_limit in
|
|
270
280
|
# queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
|
|
@@ -275,16 +285,22 @@ module Google
|
|
|
275
285
|
# attempted. Once `max_retry_duration` time has passed *and* the
|
|
276
286
|
# task has been attempted
|
|
277
287
|
# {::Google::Cloud::Tasks::V2::RetryConfig#max_attempts max_attempts} times, no
|
|
278
|
-
# further attempts
|
|
288
|
+
# further attempts are made and the task is deleted.
|
|
279
289
|
#
|
|
280
|
-
#
|
|
281
|
-
#
|
|
282
|
-
#
|
|
283
|
-
# default.
|
|
290
|
+
# A zero (0) indicates an unlimited duration, up to the
|
|
291
|
+
# [maximum task
|
|
292
|
+
# retention](https://docs.cloud.google.com/tasks/docs/quotas#limits) limit.
|
|
284
293
|
#
|
|
285
294
|
#
|
|
295
|
+
# The value must be given as a string that indicates the length of time
|
|
296
|
+
# (in seconds) followed by `s` (for "seconds"). For the maximum possible
|
|
297
|
+
# value or the format, see the documentation for
|
|
298
|
+
# [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration).
|
|
286
299
|
# `max_retry_duration` will be truncated to the nearest second.
|
|
287
300
|
#
|
|
301
|
+
# If unspecified when the queue is created, Cloud Tasks will pick the
|
|
302
|
+
# default.
|
|
303
|
+
#
|
|
288
304
|
# This field has the same meaning as
|
|
289
305
|
# [task_age_limit in
|
|
290
306
|
# queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
|
|
@@ -297,12 +313,16 @@ module Google
|
|
|
297
313
|
# {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig} specifies that the task
|
|
298
314
|
# should be retried.
|
|
299
315
|
#
|
|
300
|
-
# If unspecified when the queue is created, Cloud Tasks will pick the
|
|
301
|
-
# default.
|
|
302
|
-
#
|
|
303
316
|
#
|
|
317
|
+
# The value must be given as a string that indicates the length of time
|
|
318
|
+
# (in seconds) followed by `s` (for "seconds"). For more information on the
|
|
319
|
+
# format, see the documentation for
|
|
320
|
+
# [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration).
|
|
304
321
|
# `min_backoff` will be truncated to the nearest second.
|
|
305
322
|
#
|
|
323
|
+
# If unspecified when the queue is created, Cloud Tasks will pick the
|
|
324
|
+
# default.
|
|
325
|
+
#
|
|
306
326
|
# This field has the same meaning as
|
|
307
327
|
# [min_backoff_seconds in
|
|
308
328
|
# queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
|
|
@@ -315,12 +335,16 @@ module Google
|
|
|
315
335
|
# {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig} specifies that the task
|
|
316
336
|
# should be retried.
|
|
317
337
|
#
|
|
318
|
-
# If unspecified when the queue is created, Cloud Tasks will pick the
|
|
319
|
-
# default.
|
|
320
|
-
#
|
|
321
338
|
#
|
|
339
|
+
# The value must be given as a string that indicates the length of time
|
|
340
|
+
# (in seconds) followed by `s` (for "seconds"). For more information on the
|
|
341
|
+
# format, see the documentation for
|
|
342
|
+
# [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration).
|
|
322
343
|
# `max_backoff` will be truncated to the nearest second.
|
|
323
344
|
#
|
|
345
|
+
# If unspecified when the queue is created, Cloud Tasks will pick the
|
|
346
|
+
# default.
|
|
347
|
+
#
|
|
324
348
|
# This field has the same meaning as
|
|
325
349
|
# [max_backoff_seconds in
|
|
326
350
|
# queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -21,6 +21,220 @@ module Google
|
|
|
21
21
|
module Cloud
|
|
22
22
|
module Tasks
|
|
23
23
|
module V2
|
|
24
|
+
# PathOverride.
|
|
25
|
+
#
|
|
26
|
+
# Path message defines path override for HTTP targets.
|
|
27
|
+
# @!attribute [rw] path
|
|
28
|
+
# @return [::String]
|
|
29
|
+
# The URI path (e.g., /users/1234). Default is an empty string.
|
|
30
|
+
class PathOverride
|
|
31
|
+
include ::Google::Protobuf::MessageExts
|
|
32
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# QueryOverride.
|
|
36
|
+
#
|
|
37
|
+
# Query message defines query override for HTTP targets.
|
|
38
|
+
# @!attribute [rw] query_params
|
|
39
|
+
# @return [::String]
|
|
40
|
+
# The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty
|
|
41
|
+
# string.
|
|
42
|
+
class QueryOverride
|
|
43
|
+
include ::Google::Protobuf::MessageExts
|
|
44
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# URI Override.
|
|
48
|
+
#
|
|
49
|
+
# When specified, all the HTTP tasks inside the queue will be partially or
|
|
50
|
+
# fully overridden depending on the configured values.
|
|
51
|
+
# @!attribute [rw] scheme
|
|
52
|
+
# @return [::Google::Cloud::Tasks::V2::UriOverride::Scheme]
|
|
53
|
+
# Scheme override.
|
|
54
|
+
#
|
|
55
|
+
# When specified, the task URI scheme is replaced by the provided value (HTTP
|
|
56
|
+
# or HTTPS).
|
|
57
|
+
# @!attribute [rw] host
|
|
58
|
+
# @return [::String]
|
|
59
|
+
# Host override.
|
|
60
|
+
#
|
|
61
|
+
# When specified, replaces the host part of the task URL. For example,
|
|
62
|
+
# if the task URL is "https://www.google.com," and host value is set to
|
|
63
|
+
# "example.net", the overridden URI will be changed to "https://example.net."
|
|
64
|
+
# Host value cannot be an empty string (INVALID_ARGUMENT).
|
|
65
|
+
# @!attribute [rw] port
|
|
66
|
+
# @return [::Integer]
|
|
67
|
+
# Port override.
|
|
68
|
+
#
|
|
69
|
+
# When specified, replaces the port part of the task URI. For instance,
|
|
70
|
+
# for a URI "https://www.example.com/example" and port=123, the overridden
|
|
71
|
+
# URI becomes "https://www.example.com:123/example". Note that the port value
|
|
72
|
+
# must be a positive integer. Setting the port to 0 (Zero) clears the URI
|
|
73
|
+
# port.
|
|
74
|
+
# @!attribute [rw] path_override
|
|
75
|
+
# @return [::Google::Cloud::Tasks::V2::PathOverride]
|
|
76
|
+
# URI path.
|
|
77
|
+
#
|
|
78
|
+
# When specified, replaces the existing path of the task URL. Setting the
|
|
79
|
+
# path value to an empty string clears the URI path segment.
|
|
80
|
+
# @!attribute [rw] query_override
|
|
81
|
+
# @return [::Google::Cloud::Tasks::V2::QueryOverride]
|
|
82
|
+
# URI query.
|
|
83
|
+
#
|
|
84
|
+
# When specified, replaces the query part of the task URI. Setting the
|
|
85
|
+
# query value to an empty string clears the URI query segment.
|
|
86
|
+
# @!attribute [rw] uri_override_enforce_mode
|
|
87
|
+
# @return [::Google::Cloud::Tasks::V2::UriOverride::UriOverrideEnforceMode]
|
|
88
|
+
# URI Override Enforce Mode
|
|
89
|
+
#
|
|
90
|
+
# When specified, determines the Target UriOverride mode. If not specified,
|
|
91
|
+
# it defaults to ALWAYS.
|
|
92
|
+
class UriOverride
|
|
93
|
+
include ::Google::Protobuf::MessageExts
|
|
94
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
95
|
+
|
|
96
|
+
# The Scheme for an HTTP request. By default, it is HTTPS.
|
|
97
|
+
module Scheme
|
|
98
|
+
# Scheme unspecified. Defaults to HTTPS.
|
|
99
|
+
SCHEME_UNSPECIFIED = 0
|
|
100
|
+
|
|
101
|
+
# Convert the scheme to HTTP, e.g., "https://www.example.com" will change
|
|
102
|
+
# to "http://www.example.com".
|
|
103
|
+
HTTP = 1
|
|
104
|
+
|
|
105
|
+
# Convert the scheme to HTTPS, e.g., "http://www.example.com" will change
|
|
106
|
+
# to "https://www.example.com".
|
|
107
|
+
HTTPS = 2
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# UriOverrideEnforceMode defines when the URI override is enforced.
|
|
111
|
+
module UriOverrideEnforceMode
|
|
112
|
+
# UriOverrideEnforceMode Unspecified. Defaults to ALWAYS.
|
|
113
|
+
URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0
|
|
114
|
+
|
|
115
|
+
# In the IF_NOT_EXISTS mode, queue-level configuration is only
|
|
116
|
+
# applied where task-level configuration does not exist.
|
|
117
|
+
IF_NOT_EXISTS = 1
|
|
118
|
+
|
|
119
|
+
# In the ALWAYS mode, queue-level configuration overrides all
|
|
120
|
+
# task-level configuration
|
|
121
|
+
ALWAYS = 2
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# HTTP target.
|
|
126
|
+
#
|
|
127
|
+
# When specified at the {::Google::Cloud::Tasks::V2::Queue Queue} level, all tasks
|
|
128
|
+
# with {::Google::Cloud::Tasks::V2::HttpRequest HttpRequest} are overridden
|
|
129
|
+
# according to the target.
|
|
130
|
+
# @!attribute [rw] uri_override
|
|
131
|
+
# @return [::Google::Cloud::Tasks::V2::UriOverride]
|
|
132
|
+
# URI override.
|
|
133
|
+
#
|
|
134
|
+
# When specified, overrides the execution URI for all the tasks in the queue.
|
|
135
|
+
# @!attribute [rw] http_method
|
|
136
|
+
# @return [::Google::Cloud::Tasks::V2::HttpMethod]
|
|
137
|
+
# The HTTP method to use for the request.
|
|
138
|
+
#
|
|
139
|
+
# When specified, it overrides
|
|
140
|
+
# {::Google::Cloud::Tasks::V2::HttpTarget#http_method HttpRequest} for the task.
|
|
141
|
+
# Note that if the value is set to [HttpMethod][GET] the [HttpRequest][body]
|
|
142
|
+
# of the task will be ignored at execution time.
|
|
143
|
+
# @!attribute [rw] header_overrides
|
|
144
|
+
# @return [::Array<::Google::Cloud::Tasks::V2::HttpTarget::HeaderOverride>]
|
|
145
|
+
# HTTP target headers.
|
|
146
|
+
#
|
|
147
|
+
# This map contains the header field names and values.
|
|
148
|
+
# Headers will be set when running the
|
|
149
|
+
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task CreateTask} and/or
|
|
150
|
+
# [BufferTask][google.cloud.tasks.v2.CloudTasks.BufferTask].
|
|
151
|
+
#
|
|
152
|
+
# These headers represent a subset of the headers that will be configured for
|
|
153
|
+
# the task's HTTP request. Some HTTP request headers will be ignored or
|
|
154
|
+
# replaced.
|
|
155
|
+
#
|
|
156
|
+
# A partial list of headers that will be ignored or replaced is:
|
|
157
|
+
# * Several predefined headers, prefixed with "X-CloudTasks-", can
|
|
158
|
+
# be used to define properties of the task.
|
|
159
|
+
# * Host: This will be computed by Cloud Tasks and derived from
|
|
160
|
+
# [HttpRequest.url][google.cloud.tasks.v2.Target.HttpRequest.url].
|
|
161
|
+
# * Content-Length: This will be computed by Cloud Tasks.
|
|
162
|
+
#
|
|
163
|
+
# `Content-Type` won't be set by Cloud Tasks. You can explicitly set
|
|
164
|
+
# `Content-Type` to a media type when the
|
|
165
|
+
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task task is created}.
|
|
166
|
+
# For example, `Content-Type` can be set to `"application/octet-stream"` or
|
|
167
|
+
# `"application/json"`. The default value is set to `"application/json"`.
|
|
168
|
+
#
|
|
169
|
+
# * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
|
|
170
|
+
#
|
|
171
|
+
# Headers which can have multiple values (according to RFC2616) can be
|
|
172
|
+
# specified using comma-separated values.
|
|
173
|
+
#
|
|
174
|
+
# The size of the headers must be less than 80KB.
|
|
175
|
+
# Queue-level headers to override headers of all the tasks in the queue.
|
|
176
|
+
#
|
|
177
|
+
# Do not put business sensitive or personally identifying data in the HTTP
|
|
178
|
+
# Header Override Configuration or other similar fields in accordance with
|
|
179
|
+
# Section 12 (Resource Fields) of the
|
|
180
|
+
# [Service Specific Terms](https://cloud.google.com/terms/service-terms).
|
|
181
|
+
# @!attribute [rw] oauth_token
|
|
182
|
+
# @return [::Google::Cloud::Tasks::V2::OAuthToken]
|
|
183
|
+
# If specified, an
|
|
184
|
+
# [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
|
|
185
|
+
# is generated and attached as the `Authorization` header in the HTTP
|
|
186
|
+
# request.
|
|
187
|
+
#
|
|
188
|
+
# This type of authorization should generally be used only when calling
|
|
189
|
+
# Google APIs hosted on *.googleapis.com. Note that both the service
|
|
190
|
+
# account email and the scope MUST be specified when using the queue-level
|
|
191
|
+
# authorization override.
|
|
192
|
+
#
|
|
193
|
+
# Note: The following fields are mutually exclusive: `oauth_token`, `oidc_token`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
194
|
+
# @!attribute [rw] oidc_token
|
|
195
|
+
# @return [::Google::Cloud::Tasks::V2::OidcToken]
|
|
196
|
+
# If specified, an
|
|
197
|
+
# [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
|
|
198
|
+
# token is generated and attached as an `Authorization` header in the
|
|
199
|
+
# HTTP request.
|
|
200
|
+
#
|
|
201
|
+
# This type of authorization can be used for many scenarios, including
|
|
202
|
+
# calling Cloud Run, or endpoints where you intend to validate the token
|
|
203
|
+
# yourself. Note that both the service account email and the audience MUST
|
|
204
|
+
# be specified when using the queue-level authorization override.
|
|
205
|
+
#
|
|
206
|
+
# Note: The following fields are mutually exclusive: `oidc_token`, `oauth_token`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
207
|
+
class HttpTarget
|
|
208
|
+
include ::Google::Protobuf::MessageExts
|
|
209
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
210
|
+
|
|
211
|
+
# Defines a header message. A header can have a key and a value.
|
|
212
|
+
# @!attribute [rw] key
|
|
213
|
+
# @return [::String]
|
|
214
|
+
# The Key of the header.
|
|
215
|
+
# @!attribute [rw] value
|
|
216
|
+
# @return [::String]
|
|
217
|
+
# The Value of the header.
|
|
218
|
+
class Header
|
|
219
|
+
include ::Google::Protobuf::MessageExts
|
|
220
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Wraps the Header object.
|
|
224
|
+
# @!attribute [rw] header
|
|
225
|
+
# @return [::Google::Cloud::Tasks::V2::HttpTarget::Header]
|
|
226
|
+
# Header embodying a key and a value.
|
|
227
|
+
#
|
|
228
|
+
# Do not put business sensitive or personally identifying data in the HTTP
|
|
229
|
+
# Header Override Configuration or other similar fields in accordance with
|
|
230
|
+
# Section 12 (Resource Fields) of the
|
|
231
|
+
# [Service Specific Terms](https://cloud.google.com/terms/service-terms).
|
|
232
|
+
class HeaderOverride
|
|
233
|
+
include ::Google::Protobuf::MessageExts
|
|
234
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
24
238
|
# HTTP request.
|
|
25
239
|
#
|
|
26
240
|
# The task will be pushed to the worker as an HTTP request. If the worker
|
|
@@ -72,7 +286,7 @@ module Google
|
|
|
72
286
|
#
|
|
73
287
|
# This map contains the header field names and values.
|
|
74
288
|
# Headers can be set when the
|
|
75
|
-
#
|
|
289
|
+
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task task is created}.
|
|
76
290
|
#
|
|
77
291
|
# These headers represent a subset of the headers that will accompany the
|
|
78
292
|
# task's HTTP request. Some HTTP request headers will be ignored or replaced.
|
|
@@ -88,7 +302,7 @@ module Google
|
|
|
88
302
|
#
|
|
89
303
|
# `Content-Type` won't be set by Cloud Tasks. You can explicitly set
|
|
90
304
|
# `Content-Type` to a media type when the
|
|
91
|
-
#
|
|
305
|
+
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task task is created}.
|
|
92
306
|
# For example, `Content-Type` can be set to `"application/octet-stream"` or
|
|
93
307
|
# `"application/json"`.
|
|
94
308
|
#
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -104,6 +104,10 @@ module Google
|
|
|
104
104
|
# information see
|
|
105
105
|
# [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
|
|
106
106
|
#
|
|
107
|
+
# The value must be given as a string that indicates the length of time
|
|
108
|
+
# (in seconds) followed by `s` (for "seconds"). For more information on the
|
|
109
|
+
# format, see the documentation for
|
|
110
|
+
# [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration).
|
|
107
111
|
# `dispatch_deadline` will be truncated to the nearest millisecond. The
|
|
108
112
|
# deadline is an approximate deadline.
|
|
109
113
|
# @!attribute [rw] dispatch_count
|
|
@@ -129,6 +133,14 @@ module Google
|
|
|
129
133
|
# @return [::Google::Cloud::Tasks::V2::Task::View]
|
|
130
134
|
# Output only. The view specifies which subset of the
|
|
131
135
|
# {::Google::Cloud::Tasks::V2::Task Task} has been returned.
|
|
136
|
+
# @!attribute [rw] retry_config
|
|
137
|
+
# @return [::Google::Cloud::Tasks::V2::RetryConfig]
|
|
138
|
+
# Optional. Specifies the task-level
|
|
139
|
+
# {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig}.
|
|
140
|
+
#
|
|
141
|
+
# If present, this overrides the
|
|
142
|
+
# {::Google::Cloud::Tasks::V2::Queue#retry_config Queue.retry_config} for this
|
|
143
|
+
# task.
|
|
132
144
|
class Task
|
|
133
145
|
include ::Google::Protobuf::MessageExts
|
|
134
146
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
module Google
|
|
21
|
+
module Longrunning
|
|
22
|
+
# This resource represents a long-running operation that is the result of a
|
|
23
|
+
# network API call.
|
|
24
|
+
# @!attribute [rw] name
|
|
25
|
+
# @return [::String]
|
|
26
|
+
# The server-assigned name, which is only unique within the same service that
|
|
27
|
+
# originally returns it. If you use the default HTTP mapping, the
|
|
28
|
+
# `name` should be a resource name ending with `operations/{unique_id}`.
|
|
29
|
+
# @!attribute [rw] metadata
|
|
30
|
+
# @return [::Google::Protobuf::Any]
|
|
31
|
+
# Service-specific metadata associated with the operation. It typically
|
|
32
|
+
# contains progress information and common metadata such as create time.
|
|
33
|
+
# Some services might not provide such metadata. Any method that returns a
|
|
34
|
+
# long-running operation should document the metadata type, if any.
|
|
35
|
+
# @!attribute [rw] done
|
|
36
|
+
# @return [::Boolean]
|
|
37
|
+
# If the value is `false`, it means the operation is still in progress.
|
|
38
|
+
# If `true`, the operation is completed, and either `error` or `response` is
|
|
39
|
+
# available.
|
|
40
|
+
# @!attribute [rw] error
|
|
41
|
+
# @return [::Google::Rpc::Status]
|
|
42
|
+
# The error result of the operation in case of failure or cancellation.
|
|
43
|
+
#
|
|
44
|
+
# Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
45
|
+
# @!attribute [rw] response
|
|
46
|
+
# @return [::Google::Protobuf::Any]
|
|
47
|
+
# The normal, successful response of the operation. If the original
|
|
48
|
+
# method returns no data on success, such as `Delete`, the response is
|
|
49
|
+
# `google.protobuf.Empty`. If the original method is standard
|
|
50
|
+
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
|
51
|
+
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
|
52
|
+
# is the original method name. For example, if the original method name
|
|
53
|
+
# is `TakeSnapshot()`, the inferred response type is
|
|
54
|
+
# `TakeSnapshotResponse`.
|
|
55
|
+
#
|
|
56
|
+
# Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
|
57
|
+
class Operation
|
|
58
|
+
include ::Google::Protobuf::MessageExts
|
|
59
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# The request message for
|
|
63
|
+
# Operations.GetOperation.
|
|
64
|
+
# @!attribute [rw] name
|
|
65
|
+
# @return [::String]
|
|
66
|
+
# The name of the operation resource.
|
|
67
|
+
class GetOperationRequest
|
|
68
|
+
include ::Google::Protobuf::MessageExts
|
|
69
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# The request message for
|
|
73
|
+
# Operations.ListOperations.
|
|
74
|
+
# @!attribute [rw] name
|
|
75
|
+
# @return [::String]
|
|
76
|
+
# The name of the operation's parent resource.
|
|
77
|
+
# @!attribute [rw] filter
|
|
78
|
+
# @return [::String]
|
|
79
|
+
# The standard list filter.
|
|
80
|
+
# @!attribute [rw] page_size
|
|
81
|
+
# @return [::Integer]
|
|
82
|
+
# The standard list page size.
|
|
83
|
+
# @!attribute [rw] page_token
|
|
84
|
+
# @return [::String]
|
|
85
|
+
# The standard list page token.
|
|
86
|
+
# @!attribute [rw] return_partial_success
|
|
87
|
+
# @return [::Boolean]
|
|
88
|
+
# When set to `true`, operations that are reachable are returned as normal,
|
|
89
|
+
# and those that are unreachable are returned in the
|
|
90
|
+
# [ListOperationsResponse.unreachable] field.
|
|
91
|
+
#
|
|
92
|
+
# This can only be `true` when reading across collections e.g. when `parent`
|
|
93
|
+
# is set to `"projects/example/locations/-"`.
|
|
94
|
+
#
|
|
95
|
+
# This field is not by default supported and will result in an
|
|
96
|
+
# `UNIMPLEMENTED` error if set unless explicitly documented otherwise in
|
|
97
|
+
# service or product specific documentation.
|
|
98
|
+
class ListOperationsRequest
|
|
99
|
+
include ::Google::Protobuf::MessageExts
|
|
100
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# The response message for
|
|
104
|
+
# Operations.ListOperations.
|
|
105
|
+
# @!attribute [rw] operations
|
|
106
|
+
# @return [::Array<::Google::Longrunning::Operation>]
|
|
107
|
+
# A list of operations that matches the specified filter in the request.
|
|
108
|
+
# @!attribute [rw] next_page_token
|
|
109
|
+
# @return [::String]
|
|
110
|
+
# The standard List next-page token.
|
|
111
|
+
# @!attribute [rw] unreachable
|
|
112
|
+
# @return [::Array<::String>]
|
|
113
|
+
# Unordered list. Unreachable resources. Populated when the request sets
|
|
114
|
+
# `ListOperationsRequest.return_partial_success` and reads across
|
|
115
|
+
# collections e.g. when attempting to list all resources across all supported
|
|
116
|
+
# locations.
|
|
117
|
+
class ListOperationsResponse
|
|
118
|
+
include ::Google::Protobuf::MessageExts
|
|
119
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# The request message for
|
|
123
|
+
# Operations.CancelOperation.
|
|
124
|
+
# @!attribute [rw] name
|
|
125
|
+
# @return [::String]
|
|
126
|
+
# The name of the operation resource to be cancelled.
|
|
127
|
+
class CancelOperationRequest
|
|
128
|
+
include ::Google::Protobuf::MessageExts
|
|
129
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# The request message for
|
|
133
|
+
# Operations.DeleteOperation.
|
|
134
|
+
# @!attribute [rw] name
|
|
135
|
+
# @return [::String]
|
|
136
|
+
# The name of the operation resource to be deleted.
|
|
137
|
+
class DeleteOperationRequest
|
|
138
|
+
include ::Google::Protobuf::MessageExts
|
|
139
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# The request message for
|
|
143
|
+
# Operations.WaitOperation.
|
|
144
|
+
# @!attribute [rw] name
|
|
145
|
+
# @return [::String]
|
|
146
|
+
# The name of the operation resource to wait on.
|
|
147
|
+
# @!attribute [rw] timeout
|
|
148
|
+
# @return [::Google::Protobuf::Duration]
|
|
149
|
+
# The maximum duration to wait before timing out. If left blank, the wait
|
|
150
|
+
# will be at most the time permitted by the underlying HTTP/RPC protocol.
|
|
151
|
+
# If RPC context deadline is also specified, the shorter one will be used.
|
|
152
|
+
class WaitOperationRequest
|
|
153
|
+
include ::Google::Protobuf::MessageExts
|
|
154
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# A message representing the message types used by a long-running operation.
|
|
158
|
+
#
|
|
159
|
+
# Example:
|
|
160
|
+
#
|
|
161
|
+
# rpc Export(ExportRequest) returns (google.longrunning.Operation) {
|
|
162
|
+
# option (google.longrunning.operation_info) = {
|
|
163
|
+
# response_type: "ExportResponse"
|
|
164
|
+
# metadata_type: "ExportMetadata"
|
|
165
|
+
# };
|
|
166
|
+
# }
|
|
167
|
+
# @!attribute [rw] response_type
|
|
168
|
+
# @return [::String]
|
|
169
|
+
# Required. The message name of the primary return type for this
|
|
170
|
+
# long-running operation.
|
|
171
|
+
# This type will be used to deserialize the LRO's response.
|
|
172
|
+
#
|
|
173
|
+
# If the response is in a different package from the rpc, a fully-qualified
|
|
174
|
+
# message name must be used (e.g. `google.protobuf.Struct`).
|
|
175
|
+
#
|
|
176
|
+
# Note: Altering this value constitutes a breaking change.
|
|
177
|
+
# @!attribute [rw] metadata_type
|
|
178
|
+
# @return [::String]
|
|
179
|
+
# Required. The message name of the metadata type for this long-running
|
|
180
|
+
# operation.
|
|
181
|
+
#
|
|
182
|
+
# If the response is in a different package from the rpc, a fully-qualified
|
|
183
|
+
# message name must be used (e.g. `google.protobuf.Struct`).
|
|
184
|
+
#
|
|
185
|
+
# Note: Altering this value constitutes a breaking change.
|
|
186
|
+
class OperationInfo
|
|
187
|
+
include ::Google::Protobuf::MessageExts
|
|
188
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
end
|