google-cloud-tasks-v2beta3 0.9.0 → 0.10.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 -1
- data/lib/google/cloud/tasks/v2beta3/cloud_tasks/client.rb +2 -2
- data/lib/google/cloud/tasks/v2beta3/cloud_tasks/rest/client.rb +2 -2
- data/lib/google/cloud/tasks/v2beta3/cloudtasks_pb.rb +27 -62
- data/lib/google/cloud/tasks/v2beta3/queue_pb.rb +27 -49
- data/lib/google/cloud/tasks/v2beta3/target_pb.rb +24 -49
- data/lib/google/cloud/tasks/v2beta3/task_pb.rb +28 -28
- data/lib/google/cloud/tasks/v2beta3/version.rb +1 -1
- data/proto_docs/google/api/client.rb +67 -4
- data/proto_docs/google/cloud/tasks/v2beta3/queue.rb +83 -63
- data/proto_docs/google/cloud/tasks/v2beta3/target.rb +80 -54
- data/proto_docs/google/cloud/tasks/v2beta3/task.rb +30 -19
- 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
@@ -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
|
-
#
|
29
|
+
# Caller-specified and required in
|
30
|
+
# {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_queue CreateQueue}, after
|
31
|
+
# which it becomes output only.
|
31
32
|
#
|
32
33
|
# The queue name.
|
33
34
|
#
|
@@ -47,30 +48,36 @@ module Google
|
|
47
48
|
# hyphens (-). The maximum length is 100 characters.
|
48
49
|
# @!attribute [rw] app_engine_http_queue
|
49
50
|
# @return [::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue]
|
50
|
-
# {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue AppEngineHttpQueue}
|
51
|
-
#
|
52
|
-
#
|
51
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue AppEngineHttpQueue}
|
52
|
+
# settings apply only to [App Engine
|
53
|
+
# tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
|
54
|
+
# {::Google::Cloud::Tasks::V2beta3::HttpRequest Http tasks} are not affected by
|
55
|
+
# this proto.
|
53
56
|
# @!attribute [rw] rate_limits
|
54
57
|
# @return [::Google::Cloud::Tasks::V2beta3::RateLimits]
|
55
58
|
# Rate limits for task dispatches.
|
56
59
|
#
|
57
|
-
# {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate_limits} and
|
58
|
-
#
|
59
|
-
# attempts
|
60
|
+
# {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate_limits} and
|
61
|
+
# {::Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config} are related
|
62
|
+
# because they both control task attempts. However they control task attempts
|
63
|
+
# in different ways:
|
60
64
|
#
|
61
|
-
# * {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate_limits} controls the
|
65
|
+
# * {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate_limits} controls the
|
66
|
+
# total rate of
|
62
67
|
# dispatches from a queue (i.e. all traffic dispatched from the
|
63
68
|
# queue, regardless of whether the dispatch is from a first
|
64
69
|
# attempt or a retry).
|
65
|
-
# * {::Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config} controls
|
70
|
+
# * {::Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config} controls
|
71
|
+
# what happens to
|
66
72
|
# particular a task after its first attempt fails. That is,
|
67
|
-
# {::Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config} controls
|
68
|
-
# second attempt, third attempt, etc).
|
73
|
+
# {::Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config} controls
|
74
|
+
# task retries (the second attempt, third attempt, etc).
|
69
75
|
#
|
70
76
|
# The queue's actual dispatch rate is the result of:
|
71
77
|
#
|
72
78
|
# * Number of tasks in the queue
|
73
|
-
# * User-specified throttling:
|
79
|
+
# * User-specified throttling:
|
80
|
+
# {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate_limits},
|
74
81
|
# {::Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config}, and the
|
75
82
|
# [queue's state][google.cloud.tasks.v2beta3.Queue.state].
|
76
83
|
# * System throttling due to `429` (Too Many Requests) or `503` (Service
|
@@ -94,18 +101,21 @@ module Google
|
|
94
101
|
#
|
95
102
|
# `state` can only be changed by calling
|
96
103
|
# {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#pause_queue PauseQueue},
|
97
|
-
# {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#resume_queue ResumeQueue}, or
|
104
|
+
# {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#resume_queue ResumeQueue}, or
|
105
|
+
# uploading
|
98
106
|
# [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
|
99
|
-
# {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue UpdateQueue} cannot be
|
107
|
+
# {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue UpdateQueue} cannot be
|
108
|
+
# used to change `state`.
|
100
109
|
# @!attribute [rw] purge_time
|
101
110
|
# @return [::Google::Protobuf::Timestamp]
|
102
111
|
# Output only. The last time this queue was purged.
|
103
112
|
#
|
104
|
-
# All tasks that were {::Google::Cloud::Tasks::V2beta3::Task#create_time created}
|
105
|
-
# were purged.
|
113
|
+
# All tasks that were {::Google::Cloud::Tasks::V2beta3::Task#create_time created}
|
114
|
+
# before this time were purged.
|
106
115
|
#
|
107
|
-
# A queue can be purged using
|
108
|
-
#
|
116
|
+
# A queue can be purged using
|
117
|
+
# {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#purge_queue PurgeQueue}, the [App
|
118
|
+
# Engine Task Queue SDK, or the Cloud
|
109
119
|
# Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
|
110
120
|
#
|
111
121
|
# Purge time will be truncated to the nearest microsecond. Purge
|
@@ -212,8 +222,10 @@ module Google
|
|
212
222
|
# This message determines the maximum rate that tasks can be dispatched by a
|
213
223
|
# queue, regardless of whether the dispatch is a first task attempt or a retry.
|
214
224
|
#
|
215
|
-
# Note: The debugging command,
|
216
|
-
#
|
225
|
+
# Note: The debugging command,
|
226
|
+
# {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#run_task RunTask}, will run a task
|
227
|
+
# even if the queue has reached its
|
228
|
+
# {::Google::Cloud::Tasks::V2beta3::RateLimits RateLimits}.
|
217
229
|
# @!attribute [rw] max_dispatches_per_second
|
218
230
|
# @return [::Float]
|
219
231
|
# The maximum rate at which tasks are dispatched from this queue.
|
@@ -221,7 +233,8 @@ module Google
|
|
221
233
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
222
234
|
# default.
|
223
235
|
#
|
224
|
-
# * For {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue App Engine queues},
|
236
|
+
# * For {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue App Engine queues},
|
237
|
+
# the maximum allowed value
|
225
238
|
# is 500.
|
226
239
|
#
|
227
240
|
#
|
@@ -257,10 +270,11 @@ module Google
|
|
257
270
|
# `queue.yaml/xml`, `max_burst_size` is equal to
|
258
271
|
# [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
|
259
272
|
# If
|
260
|
-
# {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue UpdateQueue} is called
|
261
|
-
# explicitly setting a value for `max_burst_size`,
|
273
|
+
# {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue UpdateQueue} is called
|
274
|
+
# on a queue without explicitly setting a value for `max_burst_size`,
|
262
275
|
# `max_burst_size` value will get updated if
|
263
|
-
# {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue UpdateQueue} is
|
276
|
+
# {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#update_queue UpdateQueue} is
|
277
|
+
# updating
|
264
278
|
# {::Google::Cloud::Tasks::V2beta3::RateLimits#max_dispatches_per_second max_dispatches_per_second}.
|
265
279
|
# @!attribute [rw] max_concurrent_dispatches
|
266
280
|
# @return [::Integer]
|
@@ -308,9 +322,9 @@ module Google
|
|
308
322
|
# If positive, `max_retry_duration` specifies the time limit for
|
309
323
|
# retrying a failed task, measured from when the task was first
|
310
324
|
# attempted. Once `max_retry_duration` time has passed *and* the
|
311
|
-
# task has been attempted
|
312
|
-
# times,
|
313
|
-
# deleted.
|
325
|
+
# task has been attempted
|
326
|
+
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_attempts max_attempts} times,
|
327
|
+
# no further attempts will be made and the task will be deleted.
|
314
328
|
#
|
315
329
|
# If zero, then the task age is unlimited.
|
316
330
|
#
|
@@ -325,11 +339,13 @@ module Google
|
|
325
339
|
# queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
|
326
340
|
# @!attribute [rw] min_backoff
|
327
341
|
# @return [::Google::Protobuf::Duration]
|
328
|
-
# A task will be {::Google::Cloud::Tasks::V2beta3::Task#schedule_time scheduled}
|
342
|
+
# A task will be {::Google::Cloud::Tasks::V2beta3::Task#schedule_time scheduled}
|
343
|
+
# for retry between
|
329
344
|
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff} and
|
330
|
-
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} duration
|
331
|
-
# if the queue's
|
332
|
-
#
|
345
|
+
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} duration
|
346
|
+
# after it fails, if the queue's
|
347
|
+
# {::Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig} specifies that the
|
348
|
+
# task should be retried.
|
333
349
|
#
|
334
350
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
335
351
|
# default.
|
@@ -342,11 +358,13 @@ module Google
|
|
342
358
|
# queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
|
343
359
|
# @!attribute [rw] max_backoff
|
344
360
|
# @return [::Google::Protobuf::Duration]
|
345
|
-
# A task will be {::Google::Cloud::Tasks::V2beta3::Task#schedule_time scheduled}
|
361
|
+
# A task will be {::Google::Cloud::Tasks::V2beta3::Task#schedule_time scheduled}
|
362
|
+
# for retry between
|
346
363
|
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff} and
|
347
|
-
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} duration
|
348
|
-
# if the queue's
|
349
|
-
#
|
364
|
+
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} duration
|
365
|
+
# after it fails, if the queue's
|
366
|
+
# {::Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig} specifies that the
|
367
|
+
# task should be retried.
|
350
368
|
#
|
351
369
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
352
370
|
# default.
|
@@ -362,21 +380,23 @@ module Google
|
|
362
380
|
# The time between retries will double `max_doublings` times.
|
363
381
|
#
|
364
382
|
# A task's retry interval starts at
|
365
|
-
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff}, then
|
366
|
-
# `max_doublings` times, then increases linearly, and finally
|
367
|
-
#
|
383
|
+
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff}, then
|
384
|
+
# doubles `max_doublings` times, then increases linearly, and finally retries
|
385
|
+
# at intervals of
|
368
386
|
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} up to
|
369
387
|
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_attempts max_attempts} times.
|
370
388
|
#
|
371
|
-
# For example, if
|
372
|
-
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#
|
373
|
-
#
|
374
|
-
#
|
375
|
-
# increase linearly by 2^3 *
|
376
|
-
#
|
377
|
-
#
|
378
|
-
#
|
379
|
-
#
|
389
|
+
# For example, if
|
390
|
+
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff} is 10s,
|
391
|
+
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} is 300s,
|
392
|
+
# and `max_doublings` is 3, then the a task will first be retried in 10s. The
|
393
|
+
# retry interval will double three times, and then increase linearly by 2^3 *
|
394
|
+
# 10s. Finally, the task will retry at intervals of
|
395
|
+
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} until the
|
396
|
+
# task has been attempted
|
397
|
+
# {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_attempts max_attempts} times.
|
398
|
+
# Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s,
|
399
|
+
# 300s, ....
|
380
400
|
#
|
381
401
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
382
402
|
# default.
|
@@ -406,29 +426,29 @@ module Google
|
|
406
426
|
# Statistics for a queue.
|
407
427
|
# @!attribute [r] tasks_count
|
408
428
|
# @return [::Integer]
|
409
|
-
# Output only. An estimation of the number of tasks in the queue, that is,
|
410
|
-
# the queue that haven't been executed, the tasks in the queue
|
411
|
-
# queue has dispatched but has not yet received a reply for, and
|
412
|
-
# tasks that the queue is retrying.
|
429
|
+
# Output only. An estimation of the number of tasks in the queue, that is,
|
430
|
+
# the tasks in the queue that haven't been executed, the tasks in the queue
|
431
|
+
# which the queue has dispatched but has not yet received a reply for, and
|
432
|
+
# the failed tasks that the queue is retrying.
|
413
433
|
# @!attribute [r] oldest_estimated_arrival_time
|
414
434
|
# @return [::Google::Protobuf::Timestamp]
|
415
|
-
# Output only. An estimation of the nearest time in the future where a task
|
416
|
-
# is scheduled to be executed.
|
435
|
+
# Output only. An estimation of the nearest time in the future where a task
|
436
|
+
# in the queue is scheduled to be executed.
|
417
437
|
# @!attribute [r] executed_last_minute_count
|
418
438
|
# @return [::Integer]
|
419
|
-
# Output only. The number of tasks that the queue has dispatched and received
|
420
|
-
# during the last minute. This variable counts both successful
|
421
|
-
# non-successful executions.
|
439
|
+
# Output only. The number of tasks that the queue has dispatched and received
|
440
|
+
# a reply for during the last minute. This variable counts both successful
|
441
|
+
# and non-successful executions.
|
422
442
|
# @!attribute [r] concurrent_dispatches_count
|
423
443
|
# @return [::Integer]
|
424
|
-
# Output only. The number of requests that the queue has dispatched but has
|
425
|
-
# a reply for yet.
|
444
|
+
# Output only. The number of requests that the queue has dispatched but has
|
445
|
+
# not received a reply for yet.
|
426
446
|
# @!attribute [r] effective_execution_rate
|
427
447
|
# @return [::Float]
|
428
|
-
# Output only. The current maximum number of tasks per second executed by the
|
429
|
-
# The maximum value of this variable is controlled by the RateLimits
|
430
|
-
# Queue. However, this value could be less to avoid overloading the
|
431
|
-
# tasks in the queue are targeting.
|
448
|
+
# Output only. The current maximum number of tasks per second executed by the
|
449
|
+
# queue. The maximum value of this variable is controlled by the RateLimits
|
450
|
+
# of the Queue. However, this value could be less to avoid overloading the
|
451
|
+
# endpoints tasks in the queue are targeting.
|
432
452
|
class QueueStats
|
433
453
|
include ::Google::Protobuf::MessageExts
|
434
454
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -24,8 +24,9 @@ module Google
|
|
24
24
|
# Pull Message.
|
25
25
|
#
|
26
26
|
# This proto can only be used for tasks in a queue which has
|
27
|
-
# {::Google::Cloud::Tasks::V2beta3::Queue#type PULL} type. It currently exists for
|
28
|
-
# the App Engine Task Queue SDK. This message type
|
27
|
+
# {::Google::Cloud::Tasks::V2beta3::Queue#type PULL} type. It currently exists for
|
28
|
+
# backwards compatibility with the App Engine Task Queue SDK. This message type
|
29
|
+
# maybe returned with methods
|
29
30
|
# [list][google.cloud.tasks.v2beta3.CloudTask.ListTasks] and
|
30
31
|
# [get][google.cloud.tasks.v2beta3.CloudTask.ListTasks], when the response view
|
31
32
|
# is [FULL][google.cloud.tasks.v2beta3.Task.View.Full].
|
@@ -56,8 +57,10 @@ module Google
|
|
56
57
|
# any other HTTP response code is returned or no response is received, the
|
57
58
|
# task will be retried according to the following:
|
58
59
|
#
|
59
|
-
# * User-specified throttling:
|
60
|
-
#
|
60
|
+
# * User-specified throttling: [retry
|
61
|
+
# configuration][google.cloud.tasks.v2beta3.Queue.retry_config],
|
62
|
+
# {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate limits}, and the
|
63
|
+
# [queue's state][google.cloud.tasks.v2beta3.Queue.state].
|
61
64
|
#
|
62
65
|
# * System throttling: To prevent the worker from overloading, Cloud Tasks may
|
63
66
|
# temporarily reduce the queue's effective rate. User-specified settings
|
@@ -66,10 +69,11 @@ module Google
|
|
66
69
|
# System throttling happens because:
|
67
70
|
#
|
68
71
|
# * Cloud Tasks backs off on all errors. Normally the backoff specified in
|
69
|
-
# {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate limits} will be used.
|
70
|
-
# `429` (Too Many Requests), `503` (Service
|
71
|
-
# errors is high, Cloud Tasks will use a
|
72
|
-
# specified in the `Retry-After` HTTP
|
72
|
+
# {::Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate limits} will be used.
|
73
|
+
# But if the worker returns `429` (Too Many Requests), `503` (Service
|
74
|
+
# Unavailable), or the rate of errors is high, Cloud Tasks will use a
|
75
|
+
# higher backoff rate. The retry specified in the `Retry-After` HTTP
|
76
|
+
# response header is considered.
|
73
77
|
#
|
74
78
|
# * To prevent traffic spikes and to smooth sudden increases in traffic,
|
75
79
|
# dispatches ramp up slowly when the queue is newly created or idle and
|
@@ -125,8 +129,9 @@ module Google
|
|
125
129
|
# HTTP request body.
|
126
130
|
#
|
127
131
|
# A request body is allowed only if the
|
128
|
-
# {::Google::Cloud::Tasks::V2beta3::HttpRequest#http_method HTTP method} is POST,
|
129
|
-
# error to set body on a task with an incompatible
|
132
|
+
# {::Google::Cloud::Tasks::V2beta3::HttpRequest#http_method HTTP method} is POST,
|
133
|
+
# PUT, or PATCH. It is an error to set body on a task with an incompatible
|
134
|
+
# {::Google::Cloud::Tasks::V2beta3::HttpMethod HttpMethod}.
|
130
135
|
# @!attribute [rw] oauth_token
|
131
136
|
# @return [::Google::Cloud::Tasks::V2beta3::OAuthToken]
|
132
137
|
# If specified, an
|
@@ -163,11 +168,15 @@ module Google
|
|
163
168
|
# App Engine HTTP queue.
|
164
169
|
#
|
165
170
|
# The task will be delivered to the App Engine application hostname
|
166
|
-
# specified by its
|
167
|
-
#
|
168
|
-
#
|
169
|
-
#
|
170
|
-
#
|
171
|
+
# specified by its
|
172
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue AppEngineHttpQueue} and
|
173
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest}. The
|
174
|
+
# documentation for
|
175
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest}
|
176
|
+
# explains how the task's host URL is constructed.
|
177
|
+
#
|
178
|
+
# Using {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue AppEngineHttpQueue}
|
179
|
+
# requires
|
171
180
|
# [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
|
172
181
|
# Google IAM permission for the project
|
173
182
|
# and the following scope:
|
@@ -176,11 +185,13 @@ module Google
|
|
176
185
|
# @!attribute [rw] app_engine_routing_override
|
177
186
|
# @return [::Google::Cloud::Tasks::V2beta3::AppEngineRouting]
|
178
187
|
# Overrides for the
|
179
|
-
#
|
188
|
+
# [task-level
|
189
|
+
# app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing].
|
180
190
|
#
|
181
191
|
# If set, `app_engine_routing_override` is used for all tasks in
|
182
192
|
# the queue, no matter what the setting is for the
|
183
|
-
#
|
193
|
+
# [task-level
|
194
|
+
# app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing].
|
184
195
|
class AppEngineHttpQueue
|
185
196
|
include ::Google::Protobuf::MessageExts
|
186
197
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -191,7 +202,8 @@ module Google
|
|
191
202
|
# The message defines the HTTP request that is sent to an App Engine app when
|
192
203
|
# the task is dispatched.
|
193
204
|
#
|
194
|
-
# Using {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest}
|
205
|
+
# Using {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest}
|
206
|
+
# requires
|
195
207
|
# [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
|
196
208
|
# Google IAM permission for the project
|
197
209
|
# and the following scope:
|
@@ -211,14 +223,16 @@ module Google
|
|
211
223
|
# The request to the handler, however, will appear to have used the HTTP
|
212
224
|
# protocol.
|
213
225
|
#
|
214
|
-
# The {::Google::Cloud::Tasks::V2beta3::AppEngineRouting AppEngineRouting} used to
|
215
|
-
# delivered to can be set at the queue-level
|
226
|
+
# The {::Google::Cloud::Tasks::V2beta3::AppEngineRouting AppEngineRouting} used to
|
227
|
+
# construct the URL that the task is delivered to can be set at the queue-level
|
228
|
+
# or task-level:
|
216
229
|
#
|
217
230
|
# * If set,
|
218
231
|
# {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue#app_engine_routing_override app_engine_routing_override}
|
219
232
|
# is used for all tasks in the queue, no matter what the setting
|
220
233
|
# is for the
|
221
|
-
#
|
234
|
+
# [task-level
|
235
|
+
# app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing].
|
222
236
|
#
|
223
237
|
#
|
224
238
|
# The `url` that the task will be sent to is:
|
@@ -239,14 +253,15 @@ module Google
|
|
239
253
|
# The task attempt has succeeded if the app's request handler returns an HTTP
|
240
254
|
# response code in the range [`200` - `299`]. The task attempt has failed if
|
241
255
|
# the app's handler returns a non-2xx response code or Cloud Tasks does
|
242
|
-
# not receive response before the
|
243
|
-
#
|
244
|
-
#
|
245
|
-
#
|
246
|
-
#
|
247
|
-
#
|
248
|
-
#
|
249
|
-
#
|
256
|
+
# not receive response before the
|
257
|
+
# {::Google::Cloud::Tasks::V2beta3::Task#dispatch_deadline deadline}. Failed tasks
|
258
|
+
# will be retried according to the [retry
|
259
|
+
# configuration][google.cloud.tasks.v2beta3.Queue.retry_config]. `503` (Service
|
260
|
+
# Unavailable) is considered an App Engine system error instead of an
|
261
|
+
# application error and will cause Cloud Tasks' traffic congestion control to
|
262
|
+
# temporarily throttle the queue's dispatches. Unlike other types of task
|
263
|
+
# targets, a `429` (Too Many Requests) response from an app handler does not
|
264
|
+
# cause traffic congestion control to throttle the queue.
|
250
265
|
# @!attribute [rw] http_method
|
251
266
|
# @return [::Google::Cloud::Tasks::V2beta3::HttpMethod]
|
252
267
|
# The HTTP method to use for the request. The default is POST.
|
@@ -264,7 +279,8 @@ module Google
|
|
264
279
|
# If set,
|
265
280
|
# {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue#app_engine_routing_override app_engine_routing_override}
|
266
281
|
# is used for all tasks in the queue, no matter what the setting is for the
|
267
|
-
#
|
282
|
+
# [task-level
|
283
|
+
# app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing].
|
268
284
|
# @!attribute [rw] relative_uri
|
269
285
|
# @return [::String]
|
270
286
|
# The relative URI.
|
@@ -290,8 +306,9 @@ module Google
|
|
290
306
|
# `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
|
291
307
|
# modified `User-Agent`.
|
292
308
|
#
|
293
|
-
# If the task has a
|
294
|
-
# Tasks
|
309
|
+
# If the task has a
|
310
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#body body}, Cloud Tasks
|
311
|
+
# sets the following headers:
|
295
312
|
#
|
296
313
|
# * `Content-Type`: By default, the `Content-Type` header is set to
|
297
314
|
# `"application/octet-stream"`. The default can be overridden by explicitly
|
@@ -315,14 +332,17 @@ module Google
|
|
315
332
|
# visible when the task is returned in a Cloud Tasks response.
|
316
333
|
#
|
317
334
|
# Although there is no specific limit for the maximum number of headers or
|
318
|
-
# the size, there is a limit on the maximum size of the
|
319
|
-
#
|
335
|
+
# the size, there is a limit on the maximum size of the
|
336
|
+
# {::Google::Cloud::Tasks::V2beta3::Task Task}. For more information, see the
|
337
|
+
# {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#create_task CreateTask}
|
338
|
+
# documentation.
|
320
339
|
# @!attribute [rw] body
|
321
340
|
# @return [::String]
|
322
341
|
# HTTP request body.
|
323
342
|
#
|
324
343
|
# A request body is allowed only if the HTTP method is POST or PUT. It is
|
325
|
-
# an error to set a body on a task with an incompatible
|
344
|
+
# an error to set a body on a task with an incompatible
|
345
|
+
# {::Google::Cloud::Tasks::V2beta3::HttpMethod HttpMethod}.
|
326
346
|
class AppEngineHttpRequest
|
327
347
|
include ::Google::Protobuf::MessageExts
|
328
348
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -359,16 +379,18 @@ module Google
|
|
359
379
|
# service when the task is attempted.
|
360
380
|
#
|
361
381
|
# For some queues or tasks which were created using the App Engine
|
362
|
-
# Task Queue API, {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is
|
363
|
-
#
|
364
|
-
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and
|
365
|
-
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}. For example, some tasks
|
366
|
-
# which were created using the App Engine SDK use a custom domain
|
367
|
-
# name; custom domains are not parsed by Cloud Tasks. If
|
368
|
-
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is not parsable, then
|
382
|
+
# Task Queue API, {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is
|
383
|
+
# not parsable into
|
369
384
|
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service},
|
370
385
|
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and
|
371
|
-
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}
|
386
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}. For
|
387
|
+
# example, some tasks which were created using the App Engine SDK use a
|
388
|
+
# custom domain name; custom domains are not parsed by Cloud Tasks. If
|
389
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is not parsable,
|
390
|
+
# then {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service},
|
391
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and
|
392
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance} are the
|
393
|
+
# empty string.
|
372
394
|
# @!attribute [rw] version
|
373
395
|
# @return [::String]
|
374
396
|
# App version.
|
@@ -377,16 +399,18 @@ module Google
|
|
377
399
|
# version when the task is attempted.
|
378
400
|
#
|
379
401
|
# For some queues or tasks which were created using the App Engine
|
380
|
-
# Task Queue API, {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is
|
381
|
-
#
|
382
|
-
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and
|
383
|
-
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}. For example, some tasks
|
384
|
-
# which were created using the App Engine SDK use a custom domain
|
385
|
-
# name; custom domains are not parsed by Cloud Tasks. If
|
386
|
-
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is not parsable, then
|
402
|
+
# Task Queue API, {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is
|
403
|
+
# not parsable into
|
387
404
|
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service},
|
388
405
|
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and
|
389
|
-
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}
|
406
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}. For
|
407
|
+
# example, some tasks which were created using the App Engine SDK use a
|
408
|
+
# custom domain name; custom domains are not parsed by Cloud Tasks. If
|
409
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is not parsable,
|
410
|
+
# then {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service},
|
411
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and
|
412
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance} are the
|
413
|
+
# empty string.
|
390
414
|
# @!attribute [rw] instance
|
391
415
|
# @return [::String]
|
392
416
|
# App instance.
|
@@ -408,9 +432,11 @@ module Google
|
|
408
432
|
#
|
409
433
|
# The host is constructed from the domain name of the app associated with
|
410
434
|
# the queue's project ID (for example <app-id>.appspot.com), and the
|
411
|
-
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service},
|
412
|
-
#
|
413
|
-
#
|
435
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service},
|
436
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and
|
437
|
+
# {::Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}. Tasks
|
438
|
+
# which were created using the App Engine SDK might have a custom domain
|
439
|
+
# name.
|
414
440
|
#
|
415
441
|
# For more information, see
|
416
442
|
# [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::V2beta3::CloudTasks::Client#create_task CreateTask}.
|
28
29
|
#
|
29
30
|
# The task name.
|
30
31
|
#
|
@@ -48,18 +49,21 @@ module Google
|
|
48
49
|
# @return [::Google::Cloud::Tasks::V2beta3::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::V2beta3::AppEngineHttpRequest AppEngineHttpRequest}
|
54
|
+
# set.
|
52
55
|
# @!attribute [rw] http_request
|
53
56
|
# @return [::Google::Cloud::Tasks::V2beta3::HttpRequest]
|
54
57
|
# HTTP request that is sent to the task's target.
|
55
58
|
#
|
56
|
-
# An HTTP task is a task that has
|
59
|
+
# An HTTP task is a task that has
|
60
|
+
# {::Google::Cloud::Tasks::V2beta3::HttpRequest HttpRequest} set.
|
57
61
|
# @!attribute [rw] pull_message
|
58
62
|
# @return [::Google::Cloud::Tasks::V2beta3::PullMessage]
|
59
|
-
# Pull Message contained in a task in a
|
60
|
-
#
|
61
|
-
#
|
62
|
-
# Task Queue
|
63
|
+
# Pull Message contained in a task in a
|
64
|
+
# {::Google::Cloud::Tasks::V2beta3::Queue#type PULL} queue type. This payload
|
65
|
+
# type cannot be explicitly set through Cloud Tasks API. Its purpose,
|
66
|
+
# currently is to provide backward compatibility with App Engine Task Queue
|
63
67
|
# [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
|
64
68
|
# queues to provide a way to inspect contents of pull tasks through the
|
65
69
|
# {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#get_task CloudTasks.GetTask}.
|
@@ -80,7 +84,8 @@ module Google
|
|
80
84
|
# The deadline for requests sent to the worker. If the worker does not
|
81
85
|
# respond by this deadline then the request is cancelled and the attempt
|
82
86
|
# is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
|
83
|
-
# task according to the
|
87
|
+
# task according to the
|
88
|
+
# {::Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig}.
|
84
89
|
#
|
85
90
|
# Note that when the request is cancelled, Cloud Tasks will stop listening
|
86
91
|
# for the response, but whether the worker stops processing depends on the
|
@@ -89,10 +94,12 @@ module Google
|
|
89
94
|
#
|
90
95
|
# The default and maximum values depend on the type of request:
|
91
96
|
#
|
92
|
-
# * For {::Google::Cloud::Tasks::V2beta3::HttpRequest HTTP tasks}, the default is
|
97
|
+
# * For {::Google::Cloud::Tasks::V2beta3::HttpRequest HTTP tasks}, the default is
|
98
|
+
# 10 minutes. The deadline
|
93
99
|
# must be in the interval [15 seconds, 30 minutes].
|
94
100
|
#
|
95
|
-
# * For {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest App Engine tasks},
|
101
|
+
# * For {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest App Engine tasks},
|
102
|
+
# 0 indicates that the
|
96
103
|
# request has the default deadline. The default deadline depends on the
|
97
104
|
# [scaling
|
98
105
|
# type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
|
@@ -121,20 +128,22 @@ module Google
|
|
121
128
|
# @return [::Google::Cloud::Tasks::V2beta3::Attempt]
|
122
129
|
# Output only. The status of the task's first attempt.
|
123
130
|
#
|
124
|
-
# Only {::Google::Cloud::Tasks::V2beta3::Attempt#dispatch_time dispatch_time} will
|
125
|
-
# The other {::Google::Cloud::Tasks::V2beta3::Attempt Attempt} information
|
131
|
+
# Only {::Google::Cloud::Tasks::V2beta3::Attempt#dispatch_time dispatch_time} will
|
132
|
+
# be set. The other {::Google::Cloud::Tasks::V2beta3::Attempt Attempt} information
|
133
|
+
# is not retained by Cloud Tasks.
|
126
134
|
# @!attribute [rw] last_attempt
|
127
135
|
# @return [::Google::Cloud::Tasks::V2beta3::Attempt]
|
128
136
|
# Output only. The status of the task's last attempt.
|
129
137
|
# @!attribute [rw] view
|
130
138
|
# @return [::Google::Cloud::Tasks::V2beta3::Task::View]
|
131
|
-
# Output only. The view specifies which subset of the
|
132
|
-
# been returned.
|
139
|
+
# Output only. The view specifies which subset of the
|
140
|
+
# {::Google::Cloud::Tasks::V2beta3::Task Task} has been returned.
|
133
141
|
class Task
|
134
142
|
include ::Google::Protobuf::MessageExts
|
135
143
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
136
144
|
|
137
|
-
# The view specifies a subset of {::Google::Cloud::Tasks::V2beta3::Task Task}
|
145
|
+
# The view specifies a subset of {::Google::Cloud::Tasks::V2beta3::Task Task}
|
146
|
+
# data.
|
138
147
|
#
|
139
148
|
# When a task is returned in a response, not all
|
140
149
|
# information is retrieved by default because some data, such as
|
@@ -149,7 +158,8 @@ module Google
|
|
149
158
|
# sensitive data.
|
150
159
|
#
|
151
160
|
# This view does not include the
|
152
|
-
#
|
161
|
+
# [body in
|
162
|
+
# AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body].
|
153
163
|
# Bodies are desirable to return only when needed, because they
|
154
164
|
# can be large and because of the sensitivity of the data that you
|
155
165
|
# choose to store in it.
|
@@ -157,9 +167,10 @@ module Google
|
|
157
167
|
|
158
168
|
# All information is returned.
|
159
169
|
#
|
160
|
-
# Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL}
|
161
|
-
# `cloudtasks.tasks.fullView` [Google
|
162
|
-
# permission on the
|
170
|
+
# Authorization for {::Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL}
|
171
|
+
# requires `cloudtasks.tasks.fullView` [Google
|
172
|
+
# IAM](https://cloud.google.com/iam/) permission on the
|
173
|
+
# {::Google::Cloud::Tasks::V2beta3::Queue Queue} resource.
|
163
174
|
FULL = 2
|
164
175
|
end
|
165
176
|
end
|