google-cloud-tasks-v2 0.7.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/tasks/v2/cloud_tasks/client.rb +6 -4
- data/lib/google/cloud/tasks/v2/cloud_tasks/rest/client.rb +6 -4
- data/lib/google/cloud/tasks/v2/cloud_tasks/rest/service_stub.rb +16 -16
- data/lib/google/cloud/tasks/v2/cloudtasks_pb.rb +27 -60
- data/lib/google/cloud/tasks/v2/queue_pb.rb +27 -31
- data/lib/google/cloud/tasks/v2/target_pb.rb +24 -42
- data/lib/google/cloud/tasks/v2/task_pb.rb +28 -27
- data/lib/google/cloud/tasks/v2/version.rb +1 -1
- data/proto_docs/google/api/client.rb +67 -4
- data/proto_docs/google/cloud/tasks/v2/queue.rb +56 -44
- data/proto_docs/google/cloud/tasks/v2/target.rb +49 -37
- data/proto_docs/google/cloud/tasks/v2/task.rb +17 -10
- data/proto_docs/google/iam/v1/policy.rb +8 -4
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +4 -4
@@ -35,7 +35,9 @@ module Google
|
|
35
35
|
# Details about how and where to publish client libraries.
|
36
36
|
# @!attribute [rw] version
|
37
37
|
# @return [::String]
|
38
|
-
# Version of the API to apply these settings to.
|
38
|
+
# Version of the API to apply these settings to. This is the full protobuf
|
39
|
+
# package for the API, ending in the version element.
|
40
|
+
# Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
|
39
41
|
# @!attribute [rw] launch_stage
|
40
42
|
# @return [::Google::Api::LaunchStage]
|
41
43
|
# Launch stage of this version of the API.
|
@@ -81,7 +83,7 @@ module Google
|
|
81
83
|
# long-running operation pattern.
|
82
84
|
# @!attribute [rw] new_issue_uri
|
83
85
|
# @return [::String]
|
84
|
-
# Link to a
|
86
|
+
# Link to a *public* URI where users can report issues. Example:
|
85
87
|
# https://issuetracker.google.com/issues/new?component=190865&template=1161103
|
86
88
|
# @!attribute [rw] documentation_uri
|
87
89
|
# @return [::String]
|
@@ -111,6 +113,10 @@ module Google
|
|
111
113
|
# Client library settings. If the same version string appears multiple
|
112
114
|
# times in this list, then the last one wins. Settings from earlier
|
113
115
|
# settings with the same version string are discarded.
|
116
|
+
# @!attribute [rw] proto_reference_documentation_uri
|
117
|
+
# @return [::String]
|
118
|
+
# Optional link to proto reference documentation. Example:
|
119
|
+
# https://cloud.google.com/pubsub/lite/docs/reference/rpc
|
114
120
|
class Publishing
|
115
121
|
include ::Google::Protobuf::MessageExts
|
116
122
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -203,9 +209,57 @@ module Google
|
|
203
209
|
# @!attribute [rw] common
|
204
210
|
# @return [::Google::Api::CommonLanguageSettings]
|
205
211
|
# Some settings.
|
212
|
+
# @!attribute [rw] renamed_services
|
213
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
214
|
+
# Map from original service names to renamed versions.
|
215
|
+
# This is used when the default generated types
|
216
|
+
# would cause a naming conflict. (Neither name is
|
217
|
+
# fully-qualified.)
|
218
|
+
# Example: Subscriber to SubscriberServiceApi.
|
219
|
+
# @!attribute [rw] renamed_resources
|
220
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
221
|
+
# Map from full resource types to the effective short name
|
222
|
+
# for the resource. This is used when otherwise resource
|
223
|
+
# named from different services would cause naming collisions.
|
224
|
+
# Example entry:
|
225
|
+
# "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
|
226
|
+
# @!attribute [rw] ignored_resources
|
227
|
+
# @return [::Array<::String>]
|
228
|
+
# List of full resource types to ignore during generation.
|
229
|
+
# This is typically used for API-specific Location resources,
|
230
|
+
# which should be handled by the generator as if they were actually
|
231
|
+
# the common Location resources.
|
232
|
+
# Example entry: "documentai.googleapis.com/Location"
|
233
|
+
# @!attribute [rw] forced_namespace_aliases
|
234
|
+
# @return [::Array<::String>]
|
235
|
+
# Namespaces which must be aliased in snippets due to
|
236
|
+
# a known (but non-generator-predictable) naming collision
|
237
|
+
# @!attribute [rw] handwritten_signatures
|
238
|
+
# @return [::Array<::String>]
|
239
|
+
# Method signatures (in the form "service.method(signature)")
|
240
|
+
# which are provided separately, so shouldn't be generated.
|
241
|
+
# Snippets *calling* these methods are still generated, however.
|
206
242
|
class DotnetSettings
|
207
243
|
include ::Google::Protobuf::MessageExts
|
208
244
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
245
|
+
|
246
|
+
# @!attribute [rw] key
|
247
|
+
# @return [::String]
|
248
|
+
# @!attribute [rw] value
|
249
|
+
# @return [::String]
|
250
|
+
class RenamedServicesEntry
|
251
|
+
include ::Google::Protobuf::MessageExts
|
252
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
253
|
+
end
|
254
|
+
|
255
|
+
# @!attribute [rw] key
|
256
|
+
# @return [::String]
|
257
|
+
# @!attribute [rw] value
|
258
|
+
# @return [::String]
|
259
|
+
class RenamedResourcesEntry
|
260
|
+
include ::Google::Protobuf::MessageExts
|
261
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
262
|
+
end
|
209
263
|
end
|
210
264
|
|
211
265
|
# Settings for Ruby client libraries.
|
@@ -240,8 +294,8 @@ module Google
|
|
240
294
|
# Example of a YAML configuration::
|
241
295
|
#
|
242
296
|
# publishing:
|
243
|
-
#
|
244
|
-
# - selector:
|
297
|
+
# method_settings:
|
298
|
+
# - selector: google.cloud.speech.v2.Speech.BatchRecognize
|
245
299
|
# long_running:
|
246
300
|
# initial_poll_delay:
|
247
301
|
# seconds: 60 # 1 minute
|
@@ -299,6 +353,15 @@ module Google
|
|
299
353
|
|
300
354
|
# Street View Org.
|
301
355
|
STREET_VIEW = 4
|
356
|
+
|
357
|
+
# Shopping Org.
|
358
|
+
SHOPPING = 5
|
359
|
+
|
360
|
+
# Geo Org.
|
361
|
+
GEO = 6
|
362
|
+
|
363
|
+
# Generative AI - https://developers.generativeai.google
|
364
|
+
GENERATIVE_AI = 7
|
302
365
|
end
|
303
366
|
|
304
367
|
# To where should client libraries be published?
|
@@ -26,8 +26,9 @@ module Google
|
|
26
26
|
# retry options, queue types, and others.
|
27
27
|
# @!attribute [rw] name
|
28
28
|
# @return [::String]
|
29
|
-
# Caller-specified and required in
|
30
|
-
# after which it
|
29
|
+
# Caller-specified and required in
|
30
|
+
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_queue CreateQueue}, after which it
|
31
|
+
# becomes output only.
|
31
32
|
#
|
32
33
|
# The queue name.
|
33
34
|
#
|
@@ -48,36 +49,41 @@ module Google
|
|
48
49
|
# @!attribute [rw] app_engine_routing_override
|
49
50
|
# @return [::Google::Cloud::Tasks::V2::AppEngineRouting]
|
50
51
|
# Overrides for
|
51
|
-
#
|
52
|
+
# [task-level
|
53
|
+
# app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
|
52
54
|
# These settings apply only to
|
53
|
-
# {::Google::Cloud::Tasks::V2::AppEngineHttpRequest App Engine tasks} in this
|
54
|
-
# {::Google::Cloud::Tasks::V2::HttpRequest Http tasks} are not affected.
|
55
|
+
# {::Google::Cloud::Tasks::V2::AppEngineHttpRequest App Engine tasks} in this
|
56
|
+
# queue. {::Google::Cloud::Tasks::V2::HttpRequest Http tasks} are not affected.
|
55
57
|
#
|
56
58
|
# If set, `app_engine_routing_override` is used for all
|
57
|
-
# {::Google::Cloud::Tasks::V2::AppEngineHttpRequest App Engine tasks} in the
|
58
|
-
# setting is for the
|
59
|
-
#
|
59
|
+
# {::Google::Cloud::Tasks::V2::AppEngineHttpRequest App Engine tasks} in the
|
60
|
+
# queue, no matter what the setting is for the [task-level
|
61
|
+
# app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing].
|
60
62
|
# @!attribute [rw] rate_limits
|
61
63
|
# @return [::Google::Cloud::Tasks::V2::RateLimits]
|
62
64
|
# Rate limits for task dispatches.
|
63
65
|
#
|
64
|
-
# {::Google::Cloud::Tasks::V2::Queue#rate_limits rate_limits} and
|
65
|
-
#
|
66
|
-
# attempts
|
66
|
+
# {::Google::Cloud::Tasks::V2::Queue#rate_limits rate_limits} and
|
67
|
+
# {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config} are related
|
68
|
+
# because they both control task attempts. However they control task attempts
|
69
|
+
# in different ways:
|
67
70
|
#
|
68
|
-
# * {::Google::Cloud::Tasks::V2::Queue#rate_limits rate_limits} controls the total
|
71
|
+
# * {::Google::Cloud::Tasks::V2::Queue#rate_limits rate_limits} controls the total
|
72
|
+
# rate of
|
69
73
|
# dispatches from a queue (i.e. all traffic dispatched from the
|
70
74
|
# queue, regardless of whether the dispatch is from a first
|
71
75
|
# attempt or a retry).
|
72
|
-
# * {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config} controls what
|
76
|
+
# * {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config} controls what
|
77
|
+
# happens to
|
73
78
|
# particular a task after its first attempt fails. That is,
|
74
|
-
# {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config} controls task
|
75
|
-
# second attempt, third attempt, etc).
|
79
|
+
# {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config} controls task
|
80
|
+
# retries (the second attempt, third attempt, etc).
|
76
81
|
#
|
77
82
|
# The queue's actual dispatch rate is the result of:
|
78
83
|
#
|
79
84
|
# * Number of tasks in the queue
|
80
|
-
# * User-specified throttling:
|
85
|
+
# * User-specified throttling:
|
86
|
+
# {::Google::Cloud::Tasks::V2::Queue#rate_limits rate_limits},
|
81
87
|
# {::Google::Cloud::Tasks::V2::Queue#retry_config retry_config}, and the
|
82
88
|
# [queue's state][google.cloud.tasks.v2.Queue.state].
|
83
89
|
# * System throttling due to `429` (Too Many Requests) or `503` (Service
|
@@ -103,16 +109,18 @@ module Google
|
|
103
109
|
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#pause_queue PauseQueue},
|
104
110
|
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#resume_queue ResumeQueue}, or uploading
|
105
111
|
# [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
|
106
|
-
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue UpdateQueue} cannot be used
|
112
|
+
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue UpdateQueue} cannot be used
|
113
|
+
# to change `state`.
|
107
114
|
# @!attribute [rw] purge_time
|
108
115
|
# @return [::Google::Protobuf::Timestamp]
|
109
116
|
# Output only. The last time this queue was purged.
|
110
117
|
#
|
111
|
-
# All tasks that were {::Google::Cloud::Tasks::V2::Task#create_time created}
|
112
|
-
# were purged.
|
118
|
+
# All tasks that were {::Google::Cloud::Tasks::V2::Task#create_time created}
|
119
|
+
# before this time were purged.
|
113
120
|
#
|
114
|
-
# A queue can be purged using
|
115
|
-
#
|
121
|
+
# A queue can be purged using
|
122
|
+
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#purge_queue PurgeQueue}, the [App Engine
|
123
|
+
# Task Queue SDK, or the Cloud
|
116
124
|
# Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
|
117
125
|
#
|
118
126
|
# Purge time will be truncated to the nearest microsecond. Purge
|
@@ -169,8 +177,9 @@ module Google
|
|
169
177
|
# This message determines the maximum rate that tasks can be dispatched by a
|
170
178
|
# queue, regardless of whether the dispatch is a first task attempt or a retry.
|
171
179
|
#
|
172
|
-
# Note: The debugging command,
|
173
|
-
#
|
180
|
+
# Note: The debugging command,
|
181
|
+
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#run_task RunTask}, will run a task even if
|
182
|
+
# the queue has reached its {::Google::Cloud::Tasks::V2::RateLimits RateLimits}.
|
174
183
|
# @!attribute [rw] max_dispatches_per_second
|
175
184
|
# @return [::Float]
|
176
185
|
# The maximum rate at which tasks are dispatched from this queue.
|
@@ -211,9 +220,9 @@ module Google
|
|
211
220
|
# `queue.yaml/xml`, `max_burst_size` is equal to
|
212
221
|
# [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
|
213
222
|
# Since `max_burst_size` is output only, if
|
214
|
-
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue UpdateQueue} is called on a
|
215
|
-
# created by `queue.yaml/xml`, `max_burst_size` will be reset based
|
216
|
-
#
|
223
|
+
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#update_queue UpdateQueue} is called on a
|
224
|
+
# queue created by `queue.yaml/xml`, `max_burst_size` will be reset based on
|
225
|
+
# the value of
|
217
226
|
# {::Google::Cloud::Tasks::V2::RateLimits#max_dispatches_per_second max_dispatches_per_second},
|
218
227
|
# regardless of whether
|
219
228
|
# {::Google::Cloud::Tasks::V2::RateLimits#max_dispatches_per_second max_dispatches_per_second}
|
@@ -264,9 +273,9 @@ module Google
|
|
264
273
|
# If positive, `max_retry_duration` specifies the time limit for
|
265
274
|
# retrying a failed task, measured from when the task was first
|
266
275
|
# attempted. Once `max_retry_duration` time has passed *and* the
|
267
|
-
# task has been attempted
|
268
|
-
# times, no
|
269
|
-
# deleted.
|
276
|
+
# task has been attempted
|
277
|
+
# {::Google::Cloud::Tasks::V2::RetryConfig#max_attempts max_attempts} times, no
|
278
|
+
# further attempts will be made and the task will be deleted.
|
270
279
|
#
|
271
280
|
# If zero, then the task age is unlimited.
|
272
281
|
#
|
@@ -281,11 +290,12 @@ module Google
|
|
281
290
|
# queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
|
282
291
|
# @!attribute [rw] min_backoff
|
283
292
|
# @return [::Google::Protobuf::Duration]
|
284
|
-
# A task will be {::Google::Cloud::Tasks::V2::Task#schedule_time scheduled} for
|
285
|
-
# {::Google::Cloud::Tasks::V2::RetryConfig#min_backoff min_backoff}
|
286
|
-
# {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} duration
|
287
|
-
# if the queue's
|
288
|
-
#
|
293
|
+
# A task will be {::Google::Cloud::Tasks::V2::Task#schedule_time scheduled} for
|
294
|
+
# retry between {::Google::Cloud::Tasks::V2::RetryConfig#min_backoff min_backoff}
|
295
|
+
# and {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} duration
|
296
|
+
# after it fails, if the queue's
|
297
|
+
# {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig} specifies that the task
|
298
|
+
# should be retried.
|
289
299
|
#
|
290
300
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
291
301
|
# default.
|
@@ -298,11 +308,12 @@ module Google
|
|
298
308
|
# queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
|
299
309
|
# @!attribute [rw] max_backoff
|
300
310
|
# @return [::Google::Protobuf::Duration]
|
301
|
-
# A task will be {::Google::Cloud::Tasks::V2::Task#schedule_time scheduled} for
|
302
|
-
# {::Google::Cloud::Tasks::V2::RetryConfig#min_backoff min_backoff}
|
303
|
-
# {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} duration
|
304
|
-
# if the queue's
|
305
|
-
#
|
311
|
+
# A task will be {::Google::Cloud::Tasks::V2::Task#schedule_time scheduled} for
|
312
|
+
# retry between {::Google::Cloud::Tasks::V2::RetryConfig#min_backoff min_backoff}
|
313
|
+
# and {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} duration
|
314
|
+
# after it fails, if the queue's
|
315
|
+
# {::Google::Cloud::Tasks::V2::RetryConfig RetryConfig} specifies that the task
|
316
|
+
# should be retried.
|
306
317
|
#
|
307
318
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
308
319
|
# default.
|
@@ -324,15 +335,16 @@ module Google
|
|
324
335
|
# {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} up to
|
325
336
|
# {::Google::Cloud::Tasks::V2::RetryConfig#max_attempts max_attempts} times.
|
326
337
|
#
|
327
|
-
# For example, if
|
338
|
+
# For example, if
|
339
|
+
# {::Google::Cloud::Tasks::V2::RetryConfig#min_backoff min_backoff} is 10s,
|
328
340
|
# {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff} is 300s, and
|
329
341
|
# `max_doublings` is 3, then the a task will first be retried in
|
330
342
|
# 10s. The retry interval will double three times, and then
|
331
343
|
# increase linearly by 2^3 * 10s. Finally, the task will retry at
|
332
|
-
# intervals of {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff}
|
333
|
-
# task has been attempted
|
334
|
-
# times. Thus,
|
335
|
-
# 240s, 300s, 300s, ....
|
344
|
+
# intervals of {::Google::Cloud::Tasks::V2::RetryConfig#max_backoff max_backoff}
|
345
|
+
# until the task has been attempted
|
346
|
+
# {::Google::Cloud::Tasks::V2::RetryConfig#max_attempts max_attempts} times. Thus,
|
347
|
+
# the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
|
336
348
|
#
|
337
349
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
338
350
|
# default.
|
@@ -29,8 +29,10 @@ module Google
|
|
29
29
|
# any other HTTP response code is returned or no response is received, the
|
30
30
|
# task will be retried according to the following:
|
31
31
|
#
|
32
|
-
# * User-specified throttling:
|
33
|
-
#
|
32
|
+
# * User-specified throttling: [retry
|
33
|
+
# configuration][google.cloud.tasks.v2.Queue.retry_config],
|
34
|
+
# {::Google::Cloud::Tasks::V2::Queue#rate_limits rate limits}, and the [queue's
|
35
|
+
# state][google.cloud.tasks.v2.Queue.state].
|
34
36
|
#
|
35
37
|
# * System throttling: To prevent the worker from overloading, Cloud Tasks may
|
36
38
|
# temporarily reduce the queue's effective rate. User-specified settings
|
@@ -39,10 +41,11 @@ module Google
|
|
39
41
|
# System throttling happens because:
|
40
42
|
#
|
41
43
|
# * Cloud Tasks backs off on all errors. Normally the backoff specified in
|
42
|
-
# {::Google::Cloud::Tasks::V2::Queue#rate_limits rate limits} will be used. But
|
43
|
-
# `429` (Too Many Requests), `503` (Service
|
44
|
-
# errors is high, Cloud Tasks will use a
|
45
|
-
# specified in the `Retry-After` HTTP
|
44
|
+
# {::Google::Cloud::Tasks::V2::Queue#rate_limits rate limits} will be used. But
|
45
|
+
# if the worker returns `429` (Too Many Requests), `503` (Service
|
46
|
+
# Unavailable), or the rate of errors is high, Cloud Tasks will use a
|
47
|
+
# higher backoff rate. The retry specified in the `Retry-After` HTTP
|
48
|
+
# response header is considered.
|
46
49
|
#
|
47
50
|
# * To prevent traffic spikes and to smooth sudden increases in traffic,
|
48
51
|
# dispatches ramp up slowly when the queue is newly created or idle and
|
@@ -98,8 +101,9 @@ module Google
|
|
98
101
|
# HTTP request body.
|
99
102
|
#
|
100
103
|
# A request body is allowed only if the
|
101
|
-
# {::Google::Cloud::Tasks::V2::HttpRequest#http_method HTTP method} is POST, PUT,
|
102
|
-
# error to set body on a task with an incompatible
|
104
|
+
# {::Google::Cloud::Tasks::V2::HttpRequest#http_method HTTP method} is POST, PUT,
|
105
|
+
# or PATCH. It is an error to set body on a task with an incompatible
|
106
|
+
# {::Google::Cloud::Tasks::V2::HttpMethod HttpMethod}.
|
103
107
|
# @!attribute [rw] oauth_token
|
104
108
|
# @return [::Google::Cloud::Tasks::V2::OAuthToken]
|
105
109
|
# If specified, an
|
@@ -138,7 +142,8 @@ module Google
|
|
138
142
|
# The message defines the HTTP request that is sent to an App Engine app when
|
139
143
|
# the task is dispatched.
|
140
144
|
#
|
141
|
-
# Using {::Google::Cloud::Tasks::V2::AppEngineHttpRequest AppEngineHttpRequest}
|
145
|
+
# Using {::Google::Cloud::Tasks::V2::AppEngineHttpRequest AppEngineHttpRequest}
|
146
|
+
# requires
|
142
147
|
# [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
|
143
148
|
# Google IAM permission for the project
|
144
149
|
# and the following scope:
|
@@ -158,8 +163,9 @@ module Google
|
|
158
163
|
# The request to the handler, however, will appear to have used the HTTP
|
159
164
|
# protocol.
|
160
165
|
#
|
161
|
-
# The {::Google::Cloud::Tasks::V2::AppEngineRouting AppEngineRouting} used to
|
162
|
-
# delivered to can be set at the queue-level
|
166
|
+
# The {::Google::Cloud::Tasks::V2::AppEngineRouting AppEngineRouting} used to
|
167
|
+
# construct the URL that the task is delivered to can be set at the queue-level
|
168
|
+
# or task-level:
|
163
169
|
#
|
164
170
|
# * If [app_engine_routing_override is set on the
|
165
171
|
# queue][Queue.app_engine_routing_override], this value is used for all
|
@@ -185,14 +191,15 @@ module Google
|
|
185
191
|
# The task attempt has succeeded if the app's request handler returns an HTTP
|
186
192
|
# response code in the range [`200` - `299`]. The task attempt has failed if
|
187
193
|
# the app's handler returns a non-2xx response code or Cloud Tasks does
|
188
|
-
# not receive response before the
|
189
|
-
#
|
190
|
-
#
|
191
|
-
#
|
192
|
-
#
|
193
|
-
#
|
194
|
-
#
|
195
|
-
#
|
194
|
+
# not receive response before the
|
195
|
+
# {::Google::Cloud::Tasks::V2::Task#dispatch_deadline deadline}. Failed tasks will
|
196
|
+
# be retried according to the [retry
|
197
|
+
# configuration][google.cloud.tasks.v2.Queue.retry_config]. `503` (Service
|
198
|
+
# Unavailable) is considered an App Engine system error instead of an
|
199
|
+
# application error and will cause Cloud Tasks' traffic congestion control to
|
200
|
+
# temporarily throttle the queue's dispatches. Unlike other types of task
|
201
|
+
# targets, a `429` (Too Many Requests) response from an app handler does not
|
202
|
+
# cause traffic congestion control to throttle the queue.
|
196
203
|
# @!attribute [rw] http_method
|
197
204
|
# @return [::Google::Cloud::Tasks::V2::HttpMethod]
|
198
205
|
# The HTTP method to use for the request. The default is POST.
|
@@ -239,8 +246,8 @@ module Google
|
|
239
246
|
# `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
|
240
247
|
# modified `User-Agent`.
|
241
248
|
#
|
242
|
-
# If the task has a {::Google::Cloud::Tasks::V2::AppEngineHttpRequest#body body},
|
243
|
-
# Tasks sets the following headers:
|
249
|
+
# If the task has a {::Google::Cloud::Tasks::V2::AppEngineHttpRequest#body body},
|
250
|
+
# Cloud Tasks sets the following headers:
|
244
251
|
#
|
245
252
|
# * `Content-Type`: By default, the `Content-Type` header is set to
|
246
253
|
# `"application/octet-stream"`. The default can be overridden by explicitly
|
@@ -264,14 +271,16 @@ module Google
|
|
264
271
|
# visible when the task is returned in a Cloud Tasks response.
|
265
272
|
#
|
266
273
|
# Although there is no specific limit for the maximum number of headers or
|
267
|
-
# the size, there is a limit on the maximum size of the
|
268
|
-
#
|
274
|
+
# the size, there is a limit on the maximum size of the
|
275
|
+
# {::Google::Cloud::Tasks::V2::Task Task}. For more information, see the
|
276
|
+
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task CreateTask} documentation.
|
269
277
|
# @!attribute [rw] body
|
270
278
|
# @return [::String]
|
271
279
|
# HTTP request body.
|
272
280
|
#
|
273
281
|
# A request body is allowed only if the HTTP method is POST or PUT. It is
|
274
|
-
# an error to set a body on a task with an incompatible
|
282
|
+
# an error to set a body on a task with an incompatible
|
283
|
+
# {::Google::Cloud::Tasks::V2::HttpMethod HttpMethod}.
|
275
284
|
class AppEngineHttpRequest
|
276
285
|
include ::Google::Protobuf::MessageExts
|
277
286
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -315,16 +324,17 @@ module Google
|
|
315
324
|
# service when the task is attempted.
|
316
325
|
#
|
317
326
|
# For some queues or tasks which were created using the App Engine
|
318
|
-
# Task Queue API, {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not
|
319
|
-
# into {::Google::Cloud::Tasks::V2::AppEngineRouting#service service},
|
327
|
+
# Task Queue API, {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not
|
328
|
+
# parsable into {::Google::Cloud::Tasks::V2::AppEngineRouting#service service},
|
320
329
|
# {::Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and
|
321
|
-
# {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance}. For example,
|
322
|
-
# which were created using the App Engine SDK use a custom domain
|
330
|
+
# {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance}. For example,
|
331
|
+
# some tasks which were created using the App Engine SDK use a custom domain
|
323
332
|
# name; custom domains are not parsed by Cloud Tasks. If
|
324
333
|
# {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not parsable, then
|
325
334
|
# {::Google::Cloud::Tasks::V2::AppEngineRouting#service service},
|
326
335
|
# {::Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and
|
327
|
-
# {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance} are the empty
|
336
|
+
# {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance} are the empty
|
337
|
+
# string.
|
328
338
|
# @!attribute [rw] version
|
329
339
|
# @return [::String]
|
330
340
|
# App version.
|
@@ -333,16 +343,17 @@ module Google
|
|
333
343
|
# version when the task is attempted.
|
334
344
|
#
|
335
345
|
# For some queues or tasks which were created using the App Engine
|
336
|
-
# Task Queue API, {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not
|
337
|
-
# into {::Google::Cloud::Tasks::V2::AppEngineRouting#service service},
|
346
|
+
# Task Queue API, {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not
|
347
|
+
# parsable into {::Google::Cloud::Tasks::V2::AppEngineRouting#service service},
|
338
348
|
# {::Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and
|
339
|
-
# {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance}. For example,
|
340
|
-
# which were created using the App Engine SDK use a custom domain
|
349
|
+
# {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance}. For example,
|
350
|
+
# some tasks which were created using the App Engine SDK use a custom domain
|
341
351
|
# name; custom domains are not parsed by Cloud Tasks. If
|
342
352
|
# {::Google::Cloud::Tasks::V2::AppEngineRouting#host host} is not parsable, then
|
343
353
|
# {::Google::Cloud::Tasks::V2::AppEngineRouting#service service},
|
344
354
|
# {::Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and
|
345
|
-
# {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance} are the empty
|
355
|
+
# {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance} are the empty
|
356
|
+
# string.
|
346
357
|
# @!attribute [rw] instance
|
347
358
|
# @return [::String]
|
348
359
|
# App instance.
|
@@ -364,9 +375,10 @@ module Google
|
|
364
375
|
#
|
365
376
|
# The host is constructed from the domain name of the app associated with
|
366
377
|
# the queue's project ID (for example <app-id>.appspot.com), and the
|
367
|
-
# {::Google::Cloud::Tasks::V2::AppEngineRouting#service service},
|
368
|
-
#
|
369
|
-
#
|
378
|
+
# {::Google::Cloud::Tasks::V2::AppEngineRouting#service service},
|
379
|
+
# {::Google::Cloud::Tasks::V2::AppEngineRouting#version version}, and
|
380
|
+
# {::Google::Cloud::Tasks::V2::AppEngineRouting#instance instance}. Tasks which
|
381
|
+
# were created using the App Engine SDK might have a custom domain name.
|
370
382
|
#
|
371
383
|
# For more information, see
|
372
384
|
# [How Requests are
|
@@ -24,7 +24,8 @@ module Google
|
|
24
24
|
# A unit of scheduled work.
|
25
25
|
# @!attribute [rw] name
|
26
26
|
# @return [::String]
|
27
|
-
# Optionally caller-specified in
|
27
|
+
# Optionally caller-specified in
|
28
|
+
# {::Google::Cloud::Tasks::V2::CloudTasks::Client#create_task CreateTask}.
|
28
29
|
#
|
29
30
|
# The task name.
|
30
31
|
#
|
@@ -48,12 +49,14 @@ module Google
|
|
48
49
|
# @return [::Google::Cloud::Tasks::V2::AppEngineHttpRequest]
|
49
50
|
# HTTP request that is sent to the App Engine app handler.
|
50
51
|
#
|
51
|
-
# An App Engine task is a task that has
|
52
|
+
# An App Engine task is a task that has
|
53
|
+
# {::Google::Cloud::Tasks::V2::AppEngineHttpRequest AppEngineHttpRequest} set.
|
52
54
|
# @!attribute [rw] http_request
|
53
55
|
# @return [::Google::Cloud::Tasks::V2::HttpRequest]
|
54
56
|
# HTTP request that is sent to the worker.
|
55
57
|
#
|
56
|
-
# An HTTP task is a task that has
|
58
|
+
# An HTTP task is a task that has
|
59
|
+
# {::Google::Cloud::Tasks::V2::HttpRequest HttpRequest} set.
|
57
60
|
# @!attribute [rw] schedule_time
|
58
61
|
# @return [::Google::Protobuf::Timestamp]
|
59
62
|
# The time when the task is scheduled to be attempted or retried.
|
@@ -78,10 +81,12 @@ module Google
|
|
78
81
|
#
|
79
82
|
# The default and maximum values depend on the type of request:
|
80
83
|
#
|
81
|
-
# * For {::Google::Cloud::Tasks::V2::HttpRequest HTTP tasks}, the default is 10
|
84
|
+
# * For {::Google::Cloud::Tasks::V2::HttpRequest HTTP tasks}, the default is 10
|
85
|
+
# minutes. The deadline
|
82
86
|
# must be in the interval [15 seconds, 30 minutes].
|
83
87
|
#
|
84
|
-
# * For {::Google::Cloud::Tasks::V2::AppEngineHttpRequest App Engine tasks}, 0
|
88
|
+
# * For {::Google::Cloud::Tasks::V2::AppEngineHttpRequest App Engine tasks}, 0
|
89
|
+
# indicates that the
|
85
90
|
# request has the default deadline. The default deadline depends on the
|
86
91
|
# [scaling
|
87
92
|
# type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
|
@@ -110,15 +115,16 @@ module Google
|
|
110
115
|
# @return [::Google::Cloud::Tasks::V2::Attempt]
|
111
116
|
# Output only. The status of the task's first attempt.
|
112
117
|
#
|
113
|
-
# Only {::Google::Cloud::Tasks::V2::Attempt#dispatch_time dispatch_time} will be
|
114
|
-
# The other {::Google::Cloud::Tasks::V2::Attempt Attempt} information is not
|
118
|
+
# Only {::Google::Cloud::Tasks::V2::Attempt#dispatch_time dispatch_time} will be
|
119
|
+
# set. The other {::Google::Cloud::Tasks::V2::Attempt Attempt} information is not
|
120
|
+
# retained by Cloud Tasks.
|
115
121
|
# @!attribute [rw] last_attempt
|
116
122
|
# @return [::Google::Cloud::Tasks::V2::Attempt]
|
117
123
|
# Output only. The status of the task's last attempt.
|
118
124
|
# @!attribute [rw] view
|
119
125
|
# @return [::Google::Cloud::Tasks::V2::Task::View]
|
120
|
-
# Output only. The view specifies which subset of the
|
121
|
-
# been returned.
|
126
|
+
# Output only. The view specifies which subset of the
|
127
|
+
# {::Google::Cloud::Tasks::V2::Task Task} has been returned.
|
122
128
|
class Task
|
123
129
|
include ::Google::Protobuf::MessageExts
|
124
130
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -138,7 +144,8 @@ module Google
|
|
138
144
|
# sensitive data.
|
139
145
|
#
|
140
146
|
# This view does not include the
|
141
|
-
#
|
147
|
+
# [body in
|
148
|
+
# AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest.body].
|
142
149
|
# Bodies are desirable to return only when needed, because they
|
143
150
|
# can be large and because of the sensitivity of the data that you
|
144
151
|
# choose to store in it.
|
@@ -35,7 +35,8 @@ module Google
|
|
35
35
|
# only if the expression evaluates to `true`. A condition can add constraints
|
36
36
|
# based on attributes of the request, the resource, or both. To learn which
|
37
37
|
# resources support conditions in their IAM policies, see the
|
38
|
-
# [IAM
|
38
|
+
# [IAM
|
39
|
+
# documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
|
39
40
|
#
|
40
41
|
# **JSON example:**
|
41
42
|
#
|
@@ -58,7 +59,8 @@ module Google
|
|
58
59
|
# "condition": {
|
59
60
|
# "title": "expirable access",
|
60
61
|
# "description": "Does not grant access after Sep 2020",
|
61
|
-
# "expression": "request.time <
|
62
|
+
# "expression": "request.time <
|
63
|
+
# timestamp('2020-10-01T00:00:00.000Z')",
|
62
64
|
# }
|
63
65
|
# }
|
64
66
|
# ],
|
@@ -112,7 +114,8 @@ module Google
|
|
112
114
|
# specify any valid version or leave the field unset.
|
113
115
|
#
|
114
116
|
# To learn which resources support conditions in their IAM policies, see the
|
115
|
-
# [IAM
|
117
|
+
# [IAM
|
118
|
+
# documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
|
116
119
|
# @!attribute [rw] bindings
|
117
120
|
# @return [::Array<::Google::Iam::V1::Binding>]
|
118
121
|
# Associates a list of `members`, or principals, with a `role`. Optionally,
|
@@ -305,7 +308,8 @@ module Google
|
|
305
308
|
# @return [::Array<::String>]
|
306
309
|
# Specifies the identities that do not cause logging for this type of
|
307
310
|
# permission.
|
308
|
-
# Follows the same format of
|
311
|
+
# Follows the same format of
|
312
|
+
# {::Google::Iam::V1::Binding#members Binding.members}.
|
309
313
|
class AuditLogConfig
|
310
314
|
include ::Google::Protobuf::MessageExts
|
311
315
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -43,8 +43,12 @@ module Google
|
|
43
43
|
# if (any.is(Foo.class)) {
|
44
44
|
# foo = any.unpack(Foo.class);
|
45
45
|
# }
|
46
|
+
# // or ...
|
47
|
+
# if (any.isSameTypeAs(Foo.getDefaultInstance())) {
|
48
|
+
# foo = any.unpack(Foo.getDefaultInstance());
|
49
|
+
# }
|
46
50
|
#
|
47
|
-
#
|
51
|
+
# Example 3: Pack and unpack a message in Python.
|
48
52
|
#
|
49
53
|
# foo = Foo(...)
|
50
54
|
# any = Any()
|
@@ -54,7 +58,7 @@ module Google
|
|
54
58
|
# any.Unpack(foo)
|
55
59
|
# ...
|
56
60
|
#
|
57
|
-
#
|
61
|
+
# Example 4: Pack and unpack a message in Go
|
58
62
|
#
|
59
63
|
# foo := &pb.Foo{...}
|
60
64
|
# any, err := anypb.New(foo)
|
@@ -73,9 +77,8 @@ module Google
|
|
73
77
|
# in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
74
78
|
# name "y.z".
|
75
79
|
#
|
76
|
-
#
|
77
80
|
# JSON
|
78
|
-
#
|
81
|
+
# ====
|
79
82
|
# The JSON representation of an `Any` value uses the regular
|
80
83
|
# representation of the deserialized, embedded message, with an
|
81
84
|
# additional field `@type` which contains the type URL. Example:
|