google-cloud-tasks 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +40 -4
- data/lib/google/cloud/tasks/v2beta2.rb +37 -4
- data/lib/google/cloud/tasks/v2beta2/cloud_tasks_client.rb +258 -76
- data/lib/google/cloud/tasks/v2beta2/cloud_tasks_client_config.json +1 -1
- data/lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb +1 -0
- data/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb +0 -10
- data/lib/google/cloud/tasks/{credentials.rb → v2beta2/credentials.rb} +9 -7
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/cloudtasks.rb +529 -0
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/queue.rb +3 -3
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/target.rb +2 -8
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/task.rb +2 -2
- data/lib/google/cloud/tasks/v2beta2/doc/google/iam/v1/iam_policy.rb +62 -0
- data/lib/google/cloud/tasks/v2beta2/doc/google/protobuf/empty.rb +28 -0
- data/lib/google/cloud/tasks/v2beta2/doc/overview.rb +28 -4
- metadata +6 -3
@@ -12,6 +12,7 @@ require 'google/protobuf/duration_pb'
|
|
12
12
|
require 'google/protobuf/empty_pb'
|
13
13
|
require 'google/protobuf/field_mask_pb'
|
14
14
|
require 'google/protobuf/timestamp_pb'
|
15
|
+
require 'google/rpc/code_pb'
|
15
16
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
16
17
|
add_message "google.cloud.tasks.v2beta2.ListQueuesRequest" do
|
17
18
|
optional :parent, :string, 1
|
@@ -147,11 +147,6 @@ module Google
|
|
147
147
|
rpc :GetTask, GetTaskRequest, Task
|
148
148
|
# Creates a task and adds it to a queue.
|
149
149
|
#
|
150
|
-
# To add multiple tasks at the same time, use
|
151
|
-
# [HTTP batching](/storage/docs/json_api/v1/how-tos/batch)
|
152
|
-
# or the batching documentation for your client library, for example
|
153
|
-
# https://developers.google.com/api-client-library/python/guide/batch.
|
154
|
-
#
|
155
150
|
# Tasks cannot be updated after creation; there is no UpdateTask command.
|
156
151
|
#
|
157
152
|
# * For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget),
|
@@ -201,11 +196,6 @@ module Google
|
|
201
196
|
# by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks],
|
202
197
|
# [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or
|
203
198
|
# [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
|
204
|
-
#
|
205
|
-
# To acknowledge multiple tasks at the same time, use
|
206
|
-
# [HTTP batching](/storage/docs/json_api/v1/how-tos/batch)
|
207
|
-
# or the batching documentation for your client library, for example
|
208
|
-
# https://developers.google.com/api-client-library/python/guide/batch.
|
209
199
|
rpc :AcknowledgeTask, AcknowledgeTaskRequest, Google::Protobuf::Empty
|
210
200
|
# Renew the current lease of a pull task.
|
211
201
|
#
|
@@ -17,13 +17,15 @@ require "googleauth"
|
|
17
17
|
module Google
|
18
18
|
module Cloud
|
19
19
|
module Tasks
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
20
|
+
module V2beta2
|
21
|
+
class Credentials < Google::Auth::Credentials
|
22
|
+
SCOPE = [
|
23
|
+
"https://www.googleapis.com/auth/cloud-platform"
|
24
|
+
].freeze
|
25
|
+
PATH_ENV_VARS = %w(TASKS_KEYFILE GOOGLE_CLOUD_KEYFILE GCLOUD_KEYFILE)
|
26
|
+
JSON_ENV_VARS = %w(TASKS_KEYFILE_JSON GOOGLE_CLOUD_KEYFILE_JSON GCLOUD_KEYFILE_JSON)
|
27
|
+
DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
|
28
|
+
end
|
27
29
|
end
|
28
30
|
end
|
29
31
|
end
|
@@ -0,0 +1,529 @@
|
|
1
|
+
# Copyright 2018 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module Google
|
16
|
+
module Cloud
|
17
|
+
module Tasks
|
18
|
+
##
|
19
|
+
# # Cloud Tasks API Contents
|
20
|
+
#
|
21
|
+
# | Class | Description |
|
22
|
+
# | ----- | ----------- |
|
23
|
+
# | [CloudTasksClient][] | Cloud Tasks allows developers to manage the execution of background work in their applications. |
|
24
|
+
# | [Data Types][] | Data types for Google::Cloud::Tasks::V2beta2 |
|
25
|
+
#
|
26
|
+
# [CloudTasksClient]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-tasks/latest/google/cloud/tasks/v2beta2/cloudtasksclient
|
27
|
+
# [Data Types]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-tasks/latest/google/cloud/tasks/v2beta2/datatypes
|
28
|
+
#
|
29
|
+
module V2beta2
|
30
|
+
# Request message for {Google::Cloud::Tasks::V2beta2::CloudTasks::ListQueues ListQueues}.
|
31
|
+
# @!attribute [rw] parent
|
32
|
+
# @return [String]
|
33
|
+
# Required.
|
34
|
+
#
|
35
|
+
# The location name.
|
36
|
+
# For example: +projects/PROJECT_ID/locations/LOCATION_ID+
|
37
|
+
# @!attribute [rw] filter
|
38
|
+
# @return [String]
|
39
|
+
# +filter+ can be used to specify a subset of queues. Any {Google::Cloud::Tasks::V2beta2::Queue Queue}
|
40
|
+
# field can be used as a filter and several operators as supported.
|
41
|
+
# For example: +<=, <, >=, >, !=, =, :+. The filter syntax is the same as
|
42
|
+
# described in
|
43
|
+
# [Stackdriver's Advanced Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
|
44
|
+
#
|
45
|
+
# Sample filter "app_engine_http_target: *".
|
46
|
+
#
|
47
|
+
# Note that using filters might cause fewer queues than the
|
48
|
+
# requested_page size to be returned.
|
49
|
+
# @!attribute [rw] page_size
|
50
|
+
# @return [Integer]
|
51
|
+
# Requested page size.
|
52
|
+
#
|
53
|
+
# The maximum page size is 9800. If unspecified, the page size will
|
54
|
+
# be the maximum. Fewer queues than requested might be returned,
|
55
|
+
# even if more queues exist; use the
|
56
|
+
# {Google::Cloud::Tasks::V2beta2::ListQueuesResponse#next_page_token next_page_token} in the
|
57
|
+
# response to determine if more queues exist.
|
58
|
+
# @!attribute [rw] page_token
|
59
|
+
# @return [String]
|
60
|
+
# A token identifying the page of results to return.
|
61
|
+
#
|
62
|
+
# To request the first page results, page_token must be empty. To
|
63
|
+
# request the next page of results, page_token must be the value of
|
64
|
+
# {Google::Cloud::Tasks::V2beta2::ListQueuesResponse#next_page_token next_page_token} returned
|
65
|
+
# from the previous call to {Google::Cloud::Tasks::V2beta2::CloudTasks::ListQueues ListQueues}
|
66
|
+
# method. It is an error to switch the value of the
|
67
|
+
# {Google::Cloud::Tasks::V2beta2::ListQueuesRequest#filter filter} while iterating through pages.
|
68
|
+
class ListQueuesRequest; end
|
69
|
+
|
70
|
+
# Response message for {Google::Cloud::Tasks::V2beta2::CloudTasks::ListQueues ListQueues}.
|
71
|
+
# @!attribute [rw] queues
|
72
|
+
# @return [Array<Google::Cloud::Tasks::V2beta2::Queue>]
|
73
|
+
# The list of queues.
|
74
|
+
# @!attribute [rw] next_page_token
|
75
|
+
# @return [String]
|
76
|
+
# A token to retrieve next page of results.
|
77
|
+
#
|
78
|
+
# To return the next page of results, call
|
79
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::ListQueues ListQueues} with this value as the
|
80
|
+
# {Google::Cloud::Tasks::V2beta2::ListQueuesRequest#page_token page_token}.
|
81
|
+
#
|
82
|
+
# If the next_page_token is empty, there are no more results.
|
83
|
+
#
|
84
|
+
# The page token is valid for only 2 hours.
|
85
|
+
class ListQueuesResponse; end
|
86
|
+
|
87
|
+
# Request message for {Google::Cloud::Tasks::V2beta2::CloudTasks::GetQueue GetQueue}.
|
88
|
+
# @!attribute [rw] name
|
89
|
+
# @return [String]
|
90
|
+
# Required.
|
91
|
+
#
|
92
|
+
# The resource name of the queue. For example:
|
93
|
+
# +projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID+
|
94
|
+
class GetQueueRequest; end
|
95
|
+
|
96
|
+
# Request message for {Google::Cloud::Tasks::V2beta2::CloudTasks::CreateQueue CreateQueue}.
|
97
|
+
# @!attribute [rw] parent
|
98
|
+
# @return [String]
|
99
|
+
# Required.
|
100
|
+
#
|
101
|
+
# The location name in which the queue will be created.
|
102
|
+
# For example: +projects/PROJECT_ID/locations/LOCATION_ID+
|
103
|
+
#
|
104
|
+
# The list of allowed locations can be obtained by calling Cloud
|
105
|
+
# Tasks' implementation of
|
106
|
+
# {Google::Cloud::Location::Locations::ListLocations ListLocations}.
|
107
|
+
# @!attribute [rw] queue
|
108
|
+
# @return [Google::Cloud::Tasks::V2beta2::Queue]
|
109
|
+
# Required.
|
110
|
+
#
|
111
|
+
# The queue to create.
|
112
|
+
#
|
113
|
+
# {Google::Cloud::Tasks::V2beta2::Queue#name Queue's name} cannot be the same as an existing queue.
|
114
|
+
class CreateQueueRequest; end
|
115
|
+
|
116
|
+
# Request message for {Google::Cloud::Tasks::V2beta2::CloudTasks::UpdateQueue UpdateQueue}.
|
117
|
+
# @!attribute [rw] queue
|
118
|
+
# @return [Google::Cloud::Tasks::V2beta2::Queue]
|
119
|
+
# Required.
|
120
|
+
#
|
121
|
+
# The queue to create or update.
|
122
|
+
#
|
123
|
+
# The queue's {Google::Cloud::Tasks::V2beta2::Queue#name name} must be specified.
|
124
|
+
#
|
125
|
+
# Output only fields cannot be modified using UpdateQueue.
|
126
|
+
# Any value specified for an output only field will be ignored.
|
127
|
+
# The queue's {Google::Cloud::Tasks::V2beta2::Queue#name name} cannot be changed.
|
128
|
+
# @!attribute [rw] update_mask
|
129
|
+
# @return [Google::Protobuf::FieldMask]
|
130
|
+
# A mask used to specify which fields of the queue are being updated.
|
131
|
+
#
|
132
|
+
# If empty, then all fields will be updated.
|
133
|
+
class UpdateQueueRequest; end
|
134
|
+
|
135
|
+
# Request message for {Google::Cloud::Tasks::V2beta2::CloudTasks::DeleteQueue DeleteQueue}.
|
136
|
+
# @!attribute [rw] name
|
137
|
+
# @return [String]
|
138
|
+
# Required.
|
139
|
+
#
|
140
|
+
# The queue name. For example:
|
141
|
+
# +projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID+
|
142
|
+
class DeleteQueueRequest; end
|
143
|
+
|
144
|
+
# Request message for {Google::Cloud::Tasks::V2beta2::CloudTasks::PurgeQueue PurgeQueue}.
|
145
|
+
# @!attribute [rw] name
|
146
|
+
# @return [String]
|
147
|
+
# Required.
|
148
|
+
#
|
149
|
+
# The queue name. For example:
|
150
|
+
# +projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID+
|
151
|
+
class PurgeQueueRequest; end
|
152
|
+
|
153
|
+
# Request message for {Google::Cloud::Tasks::V2beta2::CloudTasks::PauseQueue PauseQueue}.
|
154
|
+
# @!attribute [rw] name
|
155
|
+
# @return [String]
|
156
|
+
# Required.
|
157
|
+
#
|
158
|
+
# The queue name. For example:
|
159
|
+
# +projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID+
|
160
|
+
class PauseQueueRequest; end
|
161
|
+
|
162
|
+
# Request message for {Google::Cloud::Tasks::V2beta2::CloudTasks::ResumeQueue ResumeQueue}.
|
163
|
+
# @!attribute [rw] name
|
164
|
+
# @return [String]
|
165
|
+
# Required.
|
166
|
+
#
|
167
|
+
# The queue name. For example:
|
168
|
+
# +projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID+
|
169
|
+
class ResumeQueueRequest; end
|
170
|
+
|
171
|
+
# Request message for listing tasks using {Google::Cloud::Tasks::V2beta2::CloudTasks::ListTasks ListTasks}.
|
172
|
+
# @!attribute [rw] parent
|
173
|
+
# @return [String]
|
174
|
+
# Required.
|
175
|
+
#
|
176
|
+
# The queue name. For example:
|
177
|
+
# +projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID+
|
178
|
+
# @!attribute [rw] response_view
|
179
|
+
# @return [Google::Cloud::Tasks::V2beta2::Task::View]
|
180
|
+
# The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta2::Task Task} will be
|
181
|
+
# returned.
|
182
|
+
#
|
183
|
+
# By default response_view is {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all
|
184
|
+
# information is retrieved by default because some data, such as
|
185
|
+
# payloads, might be desirable to return only when needed because
|
186
|
+
# of its large size or because of the sensitivity of data that it
|
187
|
+
# contains.
|
188
|
+
#
|
189
|
+
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} requires
|
190
|
+
# +cloudtasks.tasks.fullView+ [Google IAM](https://cloud.google.com/iam/) permission on the
|
191
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} resource.
|
192
|
+
# @!attribute [rw] order_by
|
193
|
+
# @return [String]
|
194
|
+
# Sort order used for the query. The only fields supported for sorting
|
195
|
+
# are +schedule_time+ and +pull_message.tag+. All results will be
|
196
|
+
# returned in approximately ascending order. The default ordering is by
|
197
|
+
# +schedule_time+.
|
198
|
+
# @!attribute [rw] page_size
|
199
|
+
# @return [Integer]
|
200
|
+
# Requested page size. Fewer tasks than requested might be returned.
|
201
|
+
#
|
202
|
+
# The maximum page size is 1000. If unspecified, the page size will
|
203
|
+
# be the maximum. Fewer tasks than requested might be returned,
|
204
|
+
# even if more tasks exist; use
|
205
|
+
# {Google::Cloud::Tasks::V2beta2::ListTasksResponse#next_page_token next_page_token} in the
|
206
|
+
# response to determine if more tasks exist.
|
207
|
+
# @!attribute [rw] page_token
|
208
|
+
# @return [String]
|
209
|
+
# A token identifying the page of results to return.
|
210
|
+
#
|
211
|
+
# To request the first page results, page_token must be empty. To
|
212
|
+
# request the next page of results, page_token must be the value of
|
213
|
+
# {Google::Cloud::Tasks::V2beta2::ListTasksResponse#next_page_token next_page_token} returned
|
214
|
+
# from the previous call to {Google::Cloud::Tasks::V2beta2::CloudTasks::ListTasks ListTasks}
|
215
|
+
# method.
|
216
|
+
#
|
217
|
+
# The page token is valid for only 2 hours.
|
218
|
+
class ListTasksRequest; end
|
219
|
+
|
220
|
+
# Response message for listing tasks using {Google::Cloud::Tasks::V2beta2::CloudTasks::ListTasks ListTasks}.
|
221
|
+
# @!attribute [rw] tasks
|
222
|
+
# @return [Array<Google::Cloud::Tasks::V2beta2::Task>]
|
223
|
+
# The list of tasks.
|
224
|
+
# @!attribute [rw] next_page_token
|
225
|
+
# @return [String]
|
226
|
+
# A token to retrieve next page of results.
|
227
|
+
#
|
228
|
+
# To return the next page of results, call
|
229
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::ListTasks ListTasks} with this value as the
|
230
|
+
# {Google::Cloud::Tasks::V2beta2::ListTasksRequest#page_token page_token}.
|
231
|
+
#
|
232
|
+
# If the next_page_token is empty, there are no more results.
|
233
|
+
class ListTasksResponse; end
|
234
|
+
|
235
|
+
# Request message for getting a task using {Google::Cloud::Tasks::V2beta2::CloudTasks::GetTask GetTask}.
|
236
|
+
# @!attribute [rw] name
|
237
|
+
# @return [String]
|
238
|
+
# Required.
|
239
|
+
#
|
240
|
+
# The task name. For example:
|
241
|
+
# +projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID+
|
242
|
+
# @!attribute [rw] response_view
|
243
|
+
# @return [Google::Cloud::Tasks::V2beta2::Task::View]
|
244
|
+
# The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta2::Task Task} will be
|
245
|
+
# returned.
|
246
|
+
#
|
247
|
+
# By default response_view is {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all
|
248
|
+
# information is retrieved by default because some data, such as
|
249
|
+
# payloads, might be desirable to return only when needed because
|
250
|
+
# of its large size or because of the sensitivity of data that it
|
251
|
+
# contains.
|
252
|
+
#
|
253
|
+
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} requires
|
254
|
+
# +cloudtasks.tasks.fullView+ [Google IAM](https://cloud.google.com/iam/) permission on the
|
255
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} resource.
|
256
|
+
class GetTaskRequest; end
|
257
|
+
|
258
|
+
# Request message for {Google::Cloud::Tasks::V2beta2::CloudTasks::CreateTask CreateTask}.
|
259
|
+
# @!attribute [rw] parent
|
260
|
+
# @return [String]
|
261
|
+
# Required.
|
262
|
+
#
|
263
|
+
# The queue name. For example:
|
264
|
+
# +projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID+
|
265
|
+
#
|
266
|
+
# The queue must already exist.
|
267
|
+
# @!attribute [rw] task
|
268
|
+
# @return [Google::Cloud::Tasks::V2beta2::Task]
|
269
|
+
# Required.
|
270
|
+
#
|
271
|
+
# The task to add.
|
272
|
+
#
|
273
|
+
# Task names have the following format:
|
274
|
+
# +projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID+.
|
275
|
+
# The user can optionally specify a task {Google::Cloud::Tasks::V2beta2::Task#name name}. If a
|
276
|
+
# name is not specified then the system will generate a random
|
277
|
+
# unique task id, which will be set in the task returned in the
|
278
|
+
# {Google::Cloud::Tasks::V2beta2::Task#name response}.
|
279
|
+
#
|
280
|
+
# If {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} is not set or is in the
|
281
|
+
# past then Cloud Tasks will set it to the current time.
|
282
|
+
#
|
283
|
+
# Task De-duplication:
|
284
|
+
#
|
285
|
+
# Explicitly specifying a task ID enables task de-duplication. If
|
286
|
+
# a task's ID is identical to that of an existing task or a task
|
287
|
+
# that was deleted or completed recently then the call will fail
|
288
|
+
# with {Google::Rpc::Code::ALREADY_EXISTS ALREADY_EXISTS}.
|
289
|
+
# If the task's queue was created using Cloud Tasks, then another task with
|
290
|
+
# the same name can't be created for ~1hour after the original task was
|
291
|
+
# deleted or completed. If the task's queue was created using queue.yaml or
|
292
|
+
# queue.xml, then another task with the same name can't be created
|
293
|
+
# for ~9days after the original task was deleted or completed.
|
294
|
+
#
|
295
|
+
# Because there is an extra lookup cost to identify duplicate task
|
296
|
+
# names, these {Google::Cloud::Tasks::V2beta2::CloudTasks::CreateTask CreateTask} calls have significantly
|
297
|
+
# increased latency. Using hashed strings for the task id or for
|
298
|
+
# the prefix of the task id is recommended. Choosing task ids that
|
299
|
+
# are sequential or have sequential prefixes, for example using a
|
300
|
+
# timestamp, causes an increase in latency and error rates in all
|
301
|
+
# task commands. The infrastructure relies on an approximately
|
302
|
+
# uniform distribution of task ids to store and serve tasks
|
303
|
+
# efficiently.
|
304
|
+
# @!attribute [rw] response_view
|
305
|
+
# @return [Google::Cloud::Tasks::V2beta2::Task::View]
|
306
|
+
# The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta2::Task Task} will be
|
307
|
+
# returned.
|
308
|
+
#
|
309
|
+
# By default response_view is {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all
|
310
|
+
# information is retrieved by default because some data, such as
|
311
|
+
# payloads, might be desirable to return only when needed because
|
312
|
+
# of its large size or because of the sensitivity of data that it
|
313
|
+
# contains.
|
314
|
+
#
|
315
|
+
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} requires
|
316
|
+
# +cloudtasks.tasks.fullView+ [Google IAM](https://cloud.google.com/iam/) permission on the
|
317
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} resource.
|
318
|
+
class CreateTaskRequest; end
|
319
|
+
|
320
|
+
# Request message for deleting a task using
|
321
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::DeleteTask DeleteTask}.
|
322
|
+
# @!attribute [rw] name
|
323
|
+
# @return [String]
|
324
|
+
# Required.
|
325
|
+
#
|
326
|
+
# The task name. For example:
|
327
|
+
# +projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID+
|
328
|
+
class DeleteTaskRequest; end
|
329
|
+
|
330
|
+
# Request message for leasing tasks using {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks}.
|
331
|
+
# @!attribute [rw] parent
|
332
|
+
# @return [String]
|
333
|
+
# Required.
|
334
|
+
#
|
335
|
+
# The queue name. For example:
|
336
|
+
# +projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID+
|
337
|
+
# @!attribute [rw] max_tasks
|
338
|
+
# @return [Integer]
|
339
|
+
# The maximum number of tasks to lease.
|
340
|
+
#
|
341
|
+
# The system will make a best effort to return as close to as
|
342
|
+
# +max_tasks+ as possible.
|
343
|
+
#
|
344
|
+
# The largest that +max_tasks+ can be is 1000.
|
345
|
+
# @!attribute [rw] lease_duration
|
346
|
+
# @return [Google::Protobuf::Duration]
|
347
|
+
# After the worker has successfully finished the work associated
|
348
|
+
# with the task, the worker must call via
|
349
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::AcknowledgeTask AcknowledgeTask} before the
|
350
|
+
# {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. Otherwise the task will be
|
351
|
+
# returned to a later {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} call so
|
352
|
+
# that another worker can retry it.
|
353
|
+
#
|
354
|
+
# The maximum lease duration is 1 week.
|
355
|
+
# +lease_duration+ will be truncated to the nearest second.
|
356
|
+
# @!attribute [rw] response_view
|
357
|
+
# @return [Google::Cloud::Tasks::V2beta2::Task::View]
|
358
|
+
# The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta2::Task Task} will be
|
359
|
+
# returned.
|
360
|
+
#
|
361
|
+
# By default response_view is {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all
|
362
|
+
# information is retrieved by default because some data, such as
|
363
|
+
# payloads, might be desirable to return only when needed because
|
364
|
+
# of its large size or because of the sensitivity of data that it
|
365
|
+
# contains.
|
366
|
+
#
|
367
|
+
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} requires
|
368
|
+
# +cloudtasks.tasks.fullView+ [Google IAM](https://cloud.google.com/iam/) permission on the
|
369
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} resource.
|
370
|
+
# @!attribute [rw] filter
|
371
|
+
# @return [String]
|
372
|
+
# +filter+ can be used to specify a subset of tasks to lease.
|
373
|
+
#
|
374
|
+
# When +filter+ is set to +tag=<my-tag>+ then the
|
375
|
+
# {Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will contain only tasks whose
|
376
|
+
# {Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} is equal to +<my-tag>+. +<my-tag>+ must be
|
377
|
+
# less than 500 characters.
|
378
|
+
#
|
379
|
+
# When +filter+ is set to +tag_function=oldest_tag()+, only tasks which have
|
380
|
+
# the same tag as the task with the oldest
|
381
|
+
# {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be returned.
|
382
|
+
#
|
383
|
+
# Grammar Syntax:
|
384
|
+
#
|
385
|
+
# * +filter = "tag=" tag | "tag_function=" function+
|
386
|
+
#
|
387
|
+
# * +tag = string+
|
388
|
+
#
|
389
|
+
# * +function = "oldest_tag()"+
|
390
|
+
#
|
391
|
+
# The +oldest_tag()+ function returns tasks which have the same tag as the
|
392
|
+
# oldest task (ordered by schedule time).
|
393
|
+
#
|
394
|
+
# SDK compatibility: Although the SDK allows tags to be either
|
395
|
+
# string or
|
396
|
+
# [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
|
397
|
+
# only UTF-8 encoded tags can be used in Cloud Tasks. Tag which
|
398
|
+
# aren't UTF-8 encoded can't be used in the
|
399
|
+
# {Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter filter} and the task's
|
400
|
+
# {Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} will be displayed as empty in Cloud Tasks.
|
401
|
+
class LeaseTasksRequest; end
|
402
|
+
|
403
|
+
# Response message for leasing tasks using {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks}.
|
404
|
+
# @!attribute [rw] tasks
|
405
|
+
# @return [Array<Google::Cloud::Tasks::V2beta2::Task>]
|
406
|
+
# The leased tasks.
|
407
|
+
class LeaseTasksResponse; end
|
408
|
+
|
409
|
+
# Request message for acknowledging a task using
|
410
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::AcknowledgeTask AcknowledgeTask}.
|
411
|
+
# @!attribute [rw] name
|
412
|
+
# @return [String]
|
413
|
+
# Required.
|
414
|
+
#
|
415
|
+
# The task name. For example:
|
416
|
+
# +projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID+
|
417
|
+
# @!attribute [rw] schedule_time
|
418
|
+
# @return [Google::Protobuf::Timestamp]
|
419
|
+
# Required.
|
420
|
+
#
|
421
|
+
# The task's current schedule time, available in the
|
422
|
+
# {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by
|
423
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} response or
|
424
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::RenewLease RenewLease} response. This restriction is
|
425
|
+
# to ensure that your worker currently holds the lease.
|
426
|
+
class AcknowledgeTaskRequest; end
|
427
|
+
|
428
|
+
# Request message for renewing a lease using
|
429
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::RenewLease RenewLease}.
|
430
|
+
# @!attribute [rw] name
|
431
|
+
# @return [String]
|
432
|
+
# Required.
|
433
|
+
#
|
434
|
+
# The task name. For example:
|
435
|
+
# +projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID+
|
436
|
+
# @!attribute [rw] schedule_time
|
437
|
+
# @return [Google::Protobuf::Timestamp]
|
438
|
+
# Required.
|
439
|
+
#
|
440
|
+
# The task's current schedule time, available in the
|
441
|
+
# {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by
|
442
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} response or
|
443
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::RenewLease RenewLease} response. This restriction is
|
444
|
+
# to ensure that your worker currently holds the lease.
|
445
|
+
# @!attribute [rw] lease_duration
|
446
|
+
# @return [Google::Protobuf::Duration]
|
447
|
+
# Required.
|
448
|
+
#
|
449
|
+
# The desired new lease duration, starting from now.
|
450
|
+
#
|
451
|
+
#
|
452
|
+
# The maximum lease duration is 1 week.
|
453
|
+
# +lease_duration+ will be truncated to the nearest second.
|
454
|
+
# @!attribute [rw] response_view
|
455
|
+
# @return [Google::Cloud::Tasks::V2beta2::Task::View]
|
456
|
+
# The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta2::Task Task} will be
|
457
|
+
# returned.
|
458
|
+
#
|
459
|
+
# By default response_view is {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all
|
460
|
+
# information is retrieved by default because some data, such as
|
461
|
+
# payloads, might be desirable to return only when needed because
|
462
|
+
# of its large size or because of the sensitivity of data that it
|
463
|
+
# contains.
|
464
|
+
#
|
465
|
+
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} requires
|
466
|
+
# +cloudtasks.tasks.fullView+ [Google IAM](https://cloud.google.com/iam/) permission on the
|
467
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} resource.
|
468
|
+
class RenewLeaseRequest; end
|
469
|
+
|
470
|
+
# Request message for canceling a lease using
|
471
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::CancelLease CancelLease}.
|
472
|
+
# @!attribute [rw] name
|
473
|
+
# @return [String]
|
474
|
+
# Required.
|
475
|
+
#
|
476
|
+
# The task name. For example:
|
477
|
+
# +projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID+
|
478
|
+
# @!attribute [rw] schedule_time
|
479
|
+
# @return [Google::Protobuf::Timestamp]
|
480
|
+
# Required.
|
481
|
+
#
|
482
|
+
# The task's current schedule time, available in the
|
483
|
+
# {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by
|
484
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} response or
|
485
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::RenewLease RenewLease} response. This restriction is
|
486
|
+
# to ensure that your worker currently holds the lease.
|
487
|
+
# @!attribute [rw] response_view
|
488
|
+
# @return [Google::Cloud::Tasks::V2beta2::Task::View]
|
489
|
+
# The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta2::Task Task} will be
|
490
|
+
# returned.
|
491
|
+
#
|
492
|
+
# By default response_view is {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all
|
493
|
+
# information is retrieved by default because some data, such as
|
494
|
+
# payloads, might be desirable to return only when needed because
|
495
|
+
# of its large size or because of the sensitivity of data that it
|
496
|
+
# contains.
|
497
|
+
#
|
498
|
+
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} requires
|
499
|
+
# +cloudtasks.tasks.fullView+ [Google IAM](https://cloud.google.com/iam/) permission on the
|
500
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} resource.
|
501
|
+
class CancelLeaseRequest; end
|
502
|
+
|
503
|
+
# Request message for forcing a task to run now using
|
504
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::RunTask RunTask}.
|
505
|
+
# @!attribute [rw] name
|
506
|
+
# @return [String]
|
507
|
+
# Required.
|
508
|
+
#
|
509
|
+
# The task name. For example:
|
510
|
+
# +projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID+
|
511
|
+
# @!attribute [rw] response_view
|
512
|
+
# @return [Google::Cloud::Tasks::V2beta2::Task::View]
|
513
|
+
# The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta2::Task Task} will be
|
514
|
+
# returned.
|
515
|
+
#
|
516
|
+
# By default response_view is {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all
|
517
|
+
# information is retrieved by default because some data, such as
|
518
|
+
# payloads, might be desirable to return only when needed because
|
519
|
+
# of its large size or because of the sensitivity of data that it
|
520
|
+
# contains.
|
521
|
+
#
|
522
|
+
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} requires
|
523
|
+
# +cloudtasks.tasks.fullView+ [Google IAM](https://cloud.google.com/iam/) permission on the
|
524
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} resource.
|
525
|
+
class RunTaskRequest; end
|
526
|
+
end
|
527
|
+
end
|
528
|
+
end
|
529
|
+
end
|