google-cloud-tasks-v2beta2 0.7.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +3 -3
- data/lib/google/cloud/tasks/v2beta2/cloud_tasks/client.rb +227 -202
- data/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/client.rb +2249 -0
- data/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest/service_stub.rb +1242 -0
- data/lib/google/cloud/tasks/v2beta2/cloud_tasks/rest.rb +53 -0
- data/lib/google/cloud/tasks/v2beta2/cloud_tasks.rb +7 -1
- data/lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb +29 -87
- data/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb +68 -56
- data/lib/google/cloud/tasks/v2beta2/queue_pb.rb +27 -44
- data/lib/google/cloud/tasks/v2beta2/rest.rb +37 -0
- data/lib/google/cloud/tasks/v2beta2/target_pb.rb +23 -32
- data/lib/google/cloud/tasks/v2beta2/task_pb.rb +27 -30
- data/lib/google/cloud/tasks/v2beta2/version.rb +1 -1
- data/lib/google/cloud/tasks/v2beta2.rb +7 -2
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/cloud/tasks/v2beta2/cloudtasks.rb +193 -159
- data/proto_docs/google/cloud/tasks/v2beta2/queue.rb +97 -73
- data/proto_docs/google/cloud/tasks/v2beta2/target.rb +88 -63
- data/proto_docs/google/cloud/tasks/v2beta2/task.rb +41 -24
- data/proto_docs/google/iam/v1/policy.rb +8 -4
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/empty.rb +0 -2
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +14 -8
@@ -26,8 +26,9 @@ module Google
|
|
26
26
|
# retry options, target 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::V2beta2::CloudTasks::Client#create_queue CreateQueue}, after
|
31
|
+
# which it becomes output only.
|
31
32
|
#
|
32
33
|
# The queue name.
|
33
34
|
#
|
@@ -49,29 +50,33 @@ module Google
|
|
49
50
|
# @return [::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget]
|
50
51
|
# App Engine HTTP target.
|
51
52
|
#
|
52
|
-
# An App Engine queue is a queue that has an
|
53
|
+
# An App Engine queue is a queue that has an
|
54
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget AppEngineHttpTarget}.
|
53
55
|
# @!attribute [rw] pull_target
|
54
56
|
# @return [::Google::Cloud::Tasks::V2beta2::PullTarget]
|
55
57
|
# Pull target.
|
56
58
|
#
|
57
|
-
# A pull queue is a queue that has a
|
59
|
+
# A pull queue is a queue that has a
|
60
|
+
# {::Google::Cloud::Tasks::V2beta2::PullTarget PullTarget}.
|
58
61
|
# @!attribute [rw] rate_limits
|
59
62
|
# @return [::Google::Cloud::Tasks::V2beta2::RateLimits]
|
60
63
|
# Rate limits for task dispatches.
|
61
64
|
#
|
62
65
|
# {::Google::Cloud::Tasks::V2beta2::Queue#rate_limits rate_limits} and
|
63
|
-
# {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} are related
|
64
|
-
# control task attempts however they control how tasks are
|
66
|
+
# {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} are related
|
67
|
+
# because they both control task attempts however they control how tasks are
|
65
68
|
# attempted in different ways:
|
66
69
|
#
|
67
|
-
# * {::Google::Cloud::Tasks::V2beta2::Queue#rate_limits rate_limits} controls the
|
70
|
+
# * {::Google::Cloud::Tasks::V2beta2::Queue#rate_limits rate_limits} controls the
|
71
|
+
# total rate of
|
68
72
|
# dispatches from a queue (i.e. all traffic dispatched from the
|
69
73
|
# queue, regardless of whether the dispatch is from a first
|
70
74
|
# attempt or a retry).
|
71
|
-
# * {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} controls
|
75
|
+
# * {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} controls
|
76
|
+
# what happens to
|
72
77
|
# particular a task after its first attempt fails. That is,
|
73
|
-
# {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} controls
|
74
|
-
# second attempt, third attempt, etc).
|
78
|
+
# {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} controls
|
79
|
+
# task retries (the second attempt, third attempt, etc).
|
75
80
|
# @!attribute [rw] retry_config
|
76
81
|
# @return [::Google::Cloud::Tasks::V2beta2::RetryConfig]
|
77
82
|
# Settings that determine the retry behavior.
|
@@ -90,18 +95,21 @@ module Google
|
|
90
95
|
#
|
91
96
|
# `state` can only be changed by calling
|
92
97
|
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#pause_queue PauseQueue},
|
93
|
-
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#resume_queue ResumeQueue}, or
|
98
|
+
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#resume_queue ResumeQueue}, or
|
99
|
+
# uploading
|
94
100
|
# [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
|
95
|
-
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue} cannot be
|
101
|
+
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue} cannot be
|
102
|
+
# used to change `state`.
|
96
103
|
# @!attribute [rw] purge_time
|
97
104
|
# @return [::Google::Protobuf::Timestamp]
|
98
105
|
# Output only. The last time this queue was purged.
|
99
106
|
#
|
100
|
-
# All tasks that were {::Google::Cloud::Tasks::V2beta2::Task#create_time created}
|
101
|
-
# were purged.
|
107
|
+
# All tasks that were {::Google::Cloud::Tasks::V2beta2::Task#create_time created}
|
108
|
+
# before this time were purged.
|
102
109
|
#
|
103
|
-
# A queue can be purged using
|
104
|
-
#
|
110
|
+
# A queue can be purged using
|
111
|
+
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#purge_queue PurgeQueue}, the [App
|
112
|
+
# Engine Task Queue SDK, or the Cloud
|
105
113
|
# Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
|
106
114
|
#
|
107
115
|
# Purge time will be truncated to the nearest microsecond. Purge
|
@@ -159,8 +167,8 @@ module Google
|
|
159
167
|
# Tasks are paused by the user. If the queue is paused then Cloud
|
160
168
|
# Tasks will stop delivering tasks from it, but more tasks can
|
161
169
|
# still be added to it by the user. When a pull queue is paused,
|
162
|
-
# all {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} calls
|
163
|
-
# [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION].
|
170
|
+
# all {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} calls
|
171
|
+
# will return a [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION].
|
164
172
|
PAUSED = 2
|
165
173
|
|
166
174
|
# The queue is disabled.
|
@@ -174,8 +182,8 @@ module Google
|
|
174
182
|
#
|
175
183
|
# When a queue is disabled, tasks can still be added to a queue
|
176
184
|
# but the tasks are not dispatched and
|
177
|
-
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} calls
|
178
|
-
# `FAILED_PRECONDITION` error.
|
185
|
+
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} calls
|
186
|
+
# return a `FAILED_PRECONDITION` error.
|
179
187
|
#
|
180
188
|
# To permanently delete this queue and all of its tasks, call
|
181
189
|
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#delete_queue DeleteQueue}.
|
@@ -188,8 +196,10 @@ module Google
|
|
188
196
|
# This message determines the maximum rate that tasks can be dispatched by a
|
189
197
|
# queue, regardless of whether the dispatch is a first task attempt or a retry.
|
190
198
|
#
|
191
|
-
# Note: The debugging command,
|
192
|
-
#
|
199
|
+
# Note: The debugging command,
|
200
|
+
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#run_task RunTask}, will run a task
|
201
|
+
# even if the queue has reached its
|
202
|
+
# {::Google::Cloud::Tasks::V2beta2::RateLimits RateLimits}.
|
193
203
|
# @!attribute [rw] max_tasks_dispatched_per_second
|
194
204
|
# @return [::Float]
|
195
205
|
# The maximum rate at which tasks are dispatched from this queue.
|
@@ -197,11 +207,14 @@ module Google
|
|
197
207
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
198
208
|
# default.
|
199
209
|
#
|
200
|
-
# * For {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget App Engine queues},
|
210
|
+
# * For {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget App Engine queues},
|
211
|
+
# the maximum allowed value
|
201
212
|
# is 500.
|
202
|
-
# * This field is output only for
|
213
|
+
# * This field is output only for [pull
|
214
|
+
# queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the
|
203
215
|
# `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
|
204
|
-
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} requests
|
216
|
+
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} requests
|
217
|
+
# are allowed per pull queue.
|
205
218
|
#
|
206
219
|
#
|
207
220
|
# This field has the same meaning as
|
@@ -236,11 +249,11 @@ module Google
|
|
236
249
|
# `queue.yaml/xml`, `max_burst_size` is equal to
|
237
250
|
# [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
|
238
251
|
# If
|
239
|
-
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue} is called
|
240
|
-
# explicitly setting a value for `max_burst_size`,
|
252
|
+
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue} is called
|
253
|
+
# on a queue without explicitly setting a value for `max_burst_size`,
|
241
254
|
# `max_burst_size` value will get updated if
|
242
|
-
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue} is
|
243
|
-
# [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
|
255
|
+
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue} is
|
256
|
+
# updating [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
|
244
257
|
# @!attribute [rw] max_concurrent_tasks
|
245
258
|
# @return [::Integer]
|
246
259
|
# The maximum number of concurrent tasks that Cloud Tasks allows
|
@@ -255,8 +268,9 @@ module Google
|
|
255
268
|
# The maximum allowed value is 5,000.
|
256
269
|
#
|
257
270
|
# This field is output only for
|
258
|
-
# {::Google::Cloud::Tasks::V2beta2::PullTarget pull queues} and always -1, which
|
259
|
-
# queue types can have `max_concurrent_tasks`
|
271
|
+
# {::Google::Cloud::Tasks::V2beta2::PullTarget pull queues} and always -1, which
|
272
|
+
# indicates no limit. No other queue types can have `max_concurrent_tasks`
|
273
|
+
# set to -1.
|
260
274
|
#
|
261
275
|
#
|
262
276
|
# This field has the same meaning as
|
@@ -285,16 +299,17 @@ module Google
|
|
285
299
|
# If positive, `max_retry_duration` specifies the time limit for
|
286
300
|
# retrying a failed task, measured from when the task was first
|
287
301
|
# attempted. Once `max_retry_duration` time has passed *and* the
|
288
|
-
# task has been attempted
|
289
|
-
# times,
|
290
|
-
# deleted.
|
302
|
+
# task has been attempted
|
303
|
+
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_attempts max_attempts} times,
|
304
|
+
# no further attempts will be made and the task will be deleted.
|
291
305
|
#
|
292
306
|
# If zero, then the task age is unlimited.
|
293
307
|
#
|
294
308
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
295
309
|
# default.
|
296
310
|
#
|
297
|
-
# This field is output only for
|
311
|
+
# This field is output only for [pull
|
312
|
+
# queues][google.cloud.tasks.v2beta2.PullTarget].
|
298
313
|
#
|
299
314
|
#
|
300
315
|
# `max_retry_duration` will be truncated to the nearest second.
|
@@ -304,16 +319,19 @@ module Google
|
|
304
319
|
# queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
|
305
320
|
# @!attribute [rw] min_backoff
|
306
321
|
# @return [::Google::Protobuf::Duration]
|
307
|
-
# A task will be {::Google::Cloud::Tasks::V2beta2::Task#schedule_time scheduled}
|
322
|
+
# A task will be {::Google::Cloud::Tasks::V2beta2::Task#schedule_time scheduled}
|
323
|
+
# for retry between
|
308
324
|
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff} and
|
309
|
-
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} duration
|
310
|
-
# if the queue's
|
311
|
-
#
|
325
|
+
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} duration
|
326
|
+
# after it fails, if the queue's
|
327
|
+
# {::Google::Cloud::Tasks::V2beta2::RetryConfig RetryConfig} specifies that the
|
328
|
+
# task should be retried.
|
312
329
|
#
|
313
330
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
314
331
|
# default.
|
315
332
|
#
|
316
|
-
# This field is output only for
|
333
|
+
# This field is output only for [pull
|
334
|
+
# queues][google.cloud.tasks.v2beta2.PullTarget].
|
317
335
|
#
|
318
336
|
#
|
319
337
|
# `min_backoff` will be truncated to the nearest second.
|
@@ -323,16 +341,19 @@ module Google
|
|
323
341
|
# queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
|
324
342
|
# @!attribute [rw] max_backoff
|
325
343
|
# @return [::Google::Protobuf::Duration]
|
326
|
-
# A task will be {::Google::Cloud::Tasks::V2beta2::Task#schedule_time scheduled}
|
344
|
+
# A task will be {::Google::Cloud::Tasks::V2beta2::Task#schedule_time scheduled}
|
345
|
+
# for retry between
|
327
346
|
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff} and
|
328
|
-
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} duration
|
329
|
-
# if the queue's
|
330
|
-
#
|
347
|
+
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} duration
|
348
|
+
# after it fails, if the queue's
|
349
|
+
# {::Google::Cloud::Tasks::V2beta2::RetryConfig RetryConfig} specifies that the
|
350
|
+
# task should be retried.
|
331
351
|
#
|
332
352
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
333
353
|
# default.
|
334
354
|
#
|
335
|
-
# This field is output only for
|
355
|
+
# This field is output only for [pull
|
356
|
+
# queues][google.cloud.tasks.v2beta2.PullTarget].
|
336
357
|
#
|
337
358
|
#
|
338
359
|
# `max_backoff` will be truncated to the nearest second.
|
@@ -345,26 +366,29 @@ module Google
|
|
345
366
|
# The time between retries will double `max_doublings` times.
|
346
367
|
#
|
347
368
|
# A task's retry interval starts at
|
348
|
-
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff}, then
|
349
|
-
# `max_doublings` times, then increases linearly, and finally
|
350
|
-
#
|
369
|
+
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff}, then
|
370
|
+
# doubles `max_doublings` times, then increases linearly, and finally retries
|
371
|
+
# at intervals of
|
351
372
|
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} up to
|
352
373
|
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_attempts max_attempts} times.
|
353
374
|
#
|
354
|
-
# For example, if
|
355
|
-
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#
|
356
|
-
#
|
357
|
-
#
|
358
|
-
# increase linearly by 2^3 *
|
359
|
-
#
|
360
|
-
#
|
361
|
-
#
|
362
|
-
#
|
375
|
+
# For example, if
|
376
|
+
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff} is 10s,
|
377
|
+
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} is 300s,
|
378
|
+
# and `max_doublings` is 3, then the a task will first be retried in 10s. The
|
379
|
+
# retry interval will double three times, and then increase linearly by 2^3 *
|
380
|
+
# 10s. Finally, the task will retry at intervals of
|
381
|
+
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} until the
|
382
|
+
# task has been attempted
|
383
|
+
# {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_attempts max_attempts} times.
|
384
|
+
# Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s,
|
385
|
+
# 300s, ....
|
363
386
|
#
|
364
387
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
365
388
|
# default.
|
366
389
|
#
|
367
|
-
# This field is output only for
|
390
|
+
# This field is output only for [pull
|
391
|
+
# queues][google.cloud.tasks.v2beta2.PullTarget].
|
368
392
|
#
|
369
393
|
#
|
370
394
|
# This field has the same meaning as
|
@@ -378,29 +402,29 @@ module Google
|
|
378
402
|
# Statistics for a queue.
|
379
403
|
# @!attribute [r] tasks_count
|
380
404
|
# @return [::Integer]
|
381
|
-
# Output only. An estimation of the number of tasks in the queue, that is,
|
382
|
-
# the queue that haven't been executed, the tasks in the queue
|
383
|
-
# queue has dispatched but has not yet received a reply for, and
|
384
|
-
# tasks that the queue is retrying.
|
405
|
+
# Output only. An estimation of the number of tasks in the queue, that is,
|
406
|
+
# the tasks in the queue that haven't been executed, the tasks in the queue
|
407
|
+
# which the queue has dispatched but has not yet received a reply for, and
|
408
|
+
# the failed tasks that the queue is retrying.
|
385
409
|
# @!attribute [r] oldest_estimated_arrival_time
|
386
410
|
# @return [::Google::Protobuf::Timestamp]
|
387
|
-
# Output only. An estimation of the nearest time in the future where a task
|
388
|
-
# is scheduled to be executed.
|
411
|
+
# Output only. An estimation of the nearest time in the future where a task
|
412
|
+
# in the queue is scheduled to be executed.
|
389
413
|
# @!attribute [r] executed_last_minute_count
|
390
414
|
# @return [::Integer]
|
391
|
-
# Output only. The number of tasks that the queue has dispatched and received
|
392
|
-
# during the last minute. This variable counts both successful
|
393
|
-
# non-successful executions.
|
415
|
+
# Output only. The number of tasks that the queue has dispatched and received
|
416
|
+
# a reply for during the last minute. This variable counts both successful
|
417
|
+
# and non-successful executions.
|
394
418
|
# @!attribute [r] concurrent_dispatches_count
|
395
419
|
# @return [::Integer]
|
396
|
-
# Output only. The number of requests that the queue has dispatched but has
|
397
|
-
# a reply for yet.
|
420
|
+
# Output only. The number of requests that the queue has dispatched but has
|
421
|
+
# not received a reply for yet.
|
398
422
|
# @!attribute [r] effective_execution_rate
|
399
423
|
# @return [::Float]
|
400
|
-
# Output only. The current maximum number of tasks per second executed by the
|
401
|
-
# The maximum value of this variable is controlled by the RateLimits
|
402
|
-
# Queue. However, this value could be less to avoid overloading the
|
403
|
-
# tasks in the queue are targeting.
|
424
|
+
# Output only. The current maximum number of tasks per second executed by the
|
425
|
+
# queue. The maximum value of this variable is controlled by the RateLimits
|
426
|
+
# of the Queue. However, this value could be less to avoid overloading the
|
427
|
+
# endpoints tasks in the queue are targeting.
|
404
428
|
class QueueStats
|
405
429
|
include ::Google::Protobuf::MessageExts
|
406
430
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -28,7 +28,8 @@ module Google
|
|
28
28
|
end
|
29
29
|
|
30
30
|
# The pull message contains data that can be used by the caller of
|
31
|
-
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} to process the
|
31
|
+
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} to process the
|
32
|
+
# task.
|
32
33
|
#
|
33
34
|
# This proto can only be used for tasks in a queue which has
|
34
35
|
# {::Google::Cloud::Tasks::V2beta2::Queue#pull_target pull_target} set.
|
@@ -41,10 +42,11 @@ module Google
|
|
41
42
|
#
|
42
43
|
# Tags allow similar tasks to be processed in a batch. If you label
|
43
44
|
# tasks with a tag, your worker can
|
44
|
-
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks lease tasks} with the
|
45
|
-
#
|
46
|
-
#
|
47
|
-
# you
|
45
|
+
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks lease tasks} with the
|
46
|
+
# same tag using
|
47
|
+
# {::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter filter}. For example,
|
48
|
+
# if you want to aggregate the events associated with a specific user once a
|
49
|
+
# day, you could tag tasks with the user ID.
|
48
50
|
#
|
49
51
|
# The task's tag can only be set when the
|
50
52
|
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task task is created}.
|
@@ -64,11 +66,15 @@ module Google
|
|
64
66
|
# App Engine HTTP target.
|
65
67
|
#
|
66
68
|
# The task will be delivered to the App Engine application hostname
|
67
|
-
# specified by its
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
71
|
-
#
|
69
|
+
# specified by its
|
70
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget AppEngineHttpTarget} and
|
71
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest}. The
|
72
|
+
# documentation for
|
73
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest}
|
74
|
+
# explains how the task's host URL is constructed.
|
75
|
+
#
|
76
|
+
# Using {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget AppEngineHttpTarget}
|
77
|
+
# requires
|
72
78
|
# [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
|
73
79
|
# Google IAM permission for the project
|
74
80
|
# and the following scope:
|
@@ -77,11 +83,13 @@ module Google
|
|
77
83
|
# @!attribute [rw] app_engine_routing_override
|
78
84
|
# @return [::Google::Cloud::Tasks::V2beta2::AppEngineRouting]
|
79
85
|
# Overrides for the
|
80
|
-
#
|
86
|
+
# [task-level
|
87
|
+
# app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
|
81
88
|
#
|
82
89
|
# If set, `app_engine_routing_override` is used for all tasks in
|
83
90
|
# the queue, no matter what the setting is for the
|
84
|
-
#
|
91
|
+
# [task-level
|
92
|
+
# app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
|
85
93
|
class AppEngineHttpTarget
|
86
94
|
include ::Google::Protobuf::MessageExts
|
87
95
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -93,9 +101,11 @@ module Google
|
|
93
101
|
# the task is dispatched.
|
94
102
|
#
|
95
103
|
# This proto can only be used for tasks in a queue which has
|
96
|
-
# {::Google::Cloud::Tasks::V2beta2::Queue#app_engine_http_target app_engine_http_target}
|
104
|
+
# {::Google::Cloud::Tasks::V2beta2::Queue#app_engine_http_target app_engine_http_target}
|
105
|
+
# set.
|
97
106
|
#
|
98
|
-
# Using {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest}
|
107
|
+
# Using {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest}
|
108
|
+
# requires
|
99
109
|
# [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
|
100
110
|
# Google IAM permission for the project
|
101
111
|
# and the following scope:
|
@@ -115,14 +125,16 @@ module Google
|
|
115
125
|
# The request to the handler, however, will appear to have used the HTTP
|
116
126
|
# protocol.
|
117
127
|
#
|
118
|
-
# The {::Google::Cloud::Tasks::V2beta2::AppEngineRouting AppEngineRouting} used to
|
119
|
-
# delivered to can be set at the queue-level
|
128
|
+
# The {::Google::Cloud::Tasks::V2beta2::AppEngineRouting AppEngineRouting} used to
|
129
|
+
# construct the URL that the task is delivered to can be set at the queue-level
|
130
|
+
# or task-level:
|
120
131
|
#
|
121
132
|
# * If set,
|
122
133
|
# {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget#app_engine_routing_override app_engine_routing_override}
|
123
134
|
# is used for all tasks in the queue, no matter what the setting
|
124
135
|
# is for the
|
125
|
-
#
|
136
|
+
# [task-level
|
137
|
+
# app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
|
126
138
|
#
|
127
139
|
#
|
128
140
|
# The `url` that the task will be sent to is:
|
@@ -145,12 +157,12 @@ module Google
|
|
145
157
|
# the app's handler returns a non-2xx response code or Cloud Tasks does
|
146
158
|
# not receive response before the [deadline][Task.dispatch_deadline]. Failed
|
147
159
|
# tasks will be retried according to the
|
148
|
-
# {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry configuration}. `503`
|
149
|
-
# considered an App Engine system error instead of an
|
150
|
-
# will cause Cloud Tasks' traffic congestion control to
|
151
|
-
# the queue's dispatches. Unlike other types of task
|
152
|
-
# Requests) response from an app handler does not
|
153
|
-
# control to throttle the queue.
|
160
|
+
# {::Google::Cloud::Tasks::V2beta2::Queue#retry_config retry configuration}. `503`
|
161
|
+
# (Service Unavailable) is considered an App Engine system error instead of an
|
162
|
+
# application error and will cause Cloud Tasks' traffic congestion control to
|
163
|
+
# temporarily throttle the queue's dispatches. Unlike other types of task
|
164
|
+
# targets, a `429` (Too Many Requests) response from an app handler does not
|
165
|
+
# cause traffic congestion control to throttle the queue.
|
154
166
|
# @!attribute [rw] http_method
|
155
167
|
# @return [::Google::Cloud::Tasks::V2beta2::HttpMethod]
|
156
168
|
# The HTTP method to use for the request. The default is POST.
|
@@ -168,7 +180,8 @@ module Google
|
|
168
180
|
# If set,
|
169
181
|
# {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget#app_engine_routing_override app_engine_routing_override}
|
170
182
|
# is used for all tasks in the queue, no matter what the setting is for the
|
171
|
-
#
|
183
|
+
# [task-level
|
184
|
+
# app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
|
172
185
|
# @!attribute [rw] relative_url
|
173
186
|
# @return [::String]
|
174
187
|
# The relative URL.
|
@@ -194,7 +207,8 @@ module Google
|
|
194
207
|
# `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
|
195
208
|
# modified `User-Agent`.
|
196
209
|
#
|
197
|
-
# If the task has a
|
210
|
+
# If the task has a
|
211
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest#payload payload}, Cloud
|
198
212
|
# Tasks sets the following headers:
|
199
213
|
#
|
200
214
|
# * `Content-Type`: By default, the `Content-Type` header is set to
|
@@ -219,8 +233,10 @@ module Google
|
|
219
233
|
# visible when the task is returned in a Cloud Tasks response.
|
220
234
|
#
|
221
235
|
# Although there is no specific limit for the maximum number of headers or
|
222
|
-
# the size, there is a limit on the maximum size of the
|
223
|
-
#
|
236
|
+
# the size, there is a limit on the maximum size of the
|
237
|
+
# {::Google::Cloud::Tasks::V2beta2::Task Task}. For more information, see the
|
238
|
+
# {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#create_task CreateTask}
|
239
|
+
# documentation.
|
224
240
|
# @!attribute [rw] payload
|
225
241
|
# @return [::String]
|
226
242
|
# Payload.
|
@@ -265,16 +281,18 @@ module Google
|
|
265
281
|
# service when the task is attempted.
|
266
282
|
#
|
267
283
|
# For some queues or tasks which were created using the App Engine
|
268
|
-
# Task Queue API, {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is
|
269
|
-
#
|
270
|
-
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and
|
271
|
-
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}. For example, some tasks
|
272
|
-
# which were created using the App Engine SDK use a custom domain
|
273
|
-
# name; custom domains are not parsed by Cloud Tasks. If
|
274
|
-
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is not parsable, then
|
284
|
+
# Task Queue API, {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is
|
285
|
+
# not parsable into
|
275
286
|
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service},
|
276
287
|
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and
|
277
|
-
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}
|
288
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}. For
|
289
|
+
# example, some tasks which were created using the App Engine SDK use a
|
290
|
+
# custom domain name; custom domains are not parsed by Cloud Tasks. If
|
291
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is not parsable,
|
292
|
+
# then {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service},
|
293
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and
|
294
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} are the
|
295
|
+
# empty string.
|
278
296
|
# @!attribute [rw] version
|
279
297
|
# @return [::String]
|
280
298
|
# App version.
|
@@ -283,16 +301,18 @@ module Google
|
|
283
301
|
# version when the task is attempted.
|
284
302
|
#
|
285
303
|
# For some queues or tasks which were created using the App Engine
|
286
|
-
# Task Queue API, {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is
|
287
|
-
#
|
288
|
-
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and
|
289
|
-
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}. For example, some tasks
|
290
|
-
# which were created using the App Engine SDK use a custom domain
|
291
|
-
# name; custom domains are not parsed by Cloud Tasks. If
|
292
|
-
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is not parsable, then
|
304
|
+
# Task Queue API, {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is
|
305
|
+
# not parsable into
|
293
306
|
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service},
|
294
307
|
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and
|
295
|
-
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}
|
308
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}. For
|
309
|
+
# example, some tasks which were created using the App Engine SDK use a
|
310
|
+
# custom domain name; custom domains are not parsed by Cloud Tasks. If
|
311
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is not parsable,
|
312
|
+
# then {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service},
|
313
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and
|
314
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} are the
|
315
|
+
# empty string.
|
296
316
|
# @!attribute [rw] instance
|
297
317
|
# @return [::String]
|
298
318
|
# App instance.
|
@@ -333,44 +353,49 @@ module Google
|
|
333
353
|
# queue's project ID. Some tasks which were created using the App Engine
|
334
354
|
# SDK use a custom domain name.
|
335
355
|
#
|
336
|
-
# * `service =`
|
356
|
+
# * `service =`
|
357
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}
|
337
358
|
#
|
338
|
-
# * `version =`
|
359
|
+
# * `version =`
|
360
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}
|
339
361
|
#
|
340
362
|
# * `version_dot_service =`
|
341
363
|
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version} `+ '.' +`
|
342
364
|
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}
|
343
365
|
#
|
344
|
-
# * `instance =`
|
366
|
+
# * `instance =`
|
367
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}
|
345
368
|
#
|
346
369
|
# * `instance_dot_service =`
|
347
|
-
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.'
|
348
|
-
#
|
370
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.'
|
371
|
+
# +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
|
349
372
|
#
|
350
373
|
# * `instance_dot_version =`
|
351
|
-
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.'
|
352
|
-
#
|
374
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.'
|
375
|
+
# +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
|
353
376
|
#
|
354
377
|
# * `instance_dot_version_dot_service =`
|
355
|
-
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.'
|
356
|
-
#
|
357
|
-
#
|
378
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.'
|
379
|
+
# +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.'
|
380
|
+
# +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
|
358
381
|
#
|
359
|
-
# If {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service} is empty,
|
360
|
-
# to the service which is the default service when
|
382
|
+
# If {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service} is empty,
|
383
|
+
# then the task will be sent to the service which is the default service when
|
384
|
+
# the task is attempted.
|
361
385
|
#
|
362
|
-
# If {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version} is empty,
|
363
|
-
# to the version which is the default version when
|
386
|
+
# If {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version} is empty,
|
387
|
+
# then the task will be sent to the version which is the default version when
|
388
|
+
# the task is attempted.
|
364
389
|
#
|
365
|
-
# If {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} is
|
366
|
-
# will be sent to an instance which is available when
|
367
|
-
# attempted.
|
390
|
+
# If {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} is
|
391
|
+
# empty, then the task will be sent to an instance which is available when
|
392
|
+
# the task is attempted.
|
368
393
|
#
|
369
394
|
# If {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service},
|
370
395
|
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, or
|
371
|
-
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} is
|
372
|
-
# will be sent to the default version of the default
|
373
|
-
# the task is attempted.
|
396
|
+
# {::Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} is
|
397
|
+
# invalid, then the task will be sent to the default version of the default
|
398
|
+
# service when the task is attempted.
|
374
399
|
class AppEngineRouting
|
375
400
|
include ::Google::Protobuf::MessageExts
|
376
401
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|