google-cloud-tasks 1.5.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -54
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +274 -0
  6. data/README.md +37 -24
  7. data/lib/{google/cloud/tasks/v2beta2/doc/google/protobuf/empty.rb → google-cloud-tasks.rb} +4 -14
  8. data/lib/google/cloud/tasks.rb +82 -117
  9. data/lib/google/cloud/tasks/version.rb +6 -2
  10. metadata +104 -113
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/tasks/v2.rb +0 -147
  13. data/lib/google/cloud/tasks/v2/cloud_tasks_client.rb +0 -1233
  14. data/lib/google/cloud/tasks/v2/cloud_tasks_client_config.json +0 -106
  15. data/lib/google/cloud/tasks/v2/cloudtasks_pb.rb +0 -100
  16. data/lib/google/cloud/tasks/v2/cloudtasks_services_pb.rb +0 -203
  17. data/lib/google/cloud/tasks/v2/credentials.rb +0 -41
  18. data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/cloudtasks.rb +0 -312
  19. data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/queue.rb +0 -348
  20. data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/target.rb +0 -414
  21. data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/task.rb +0 -175
  22. data/lib/google/cloud/tasks/v2/doc/google/iam/v1/iam_policy.rb +0 -64
  23. data/lib/google/cloud/tasks/v2/doc/google/iam/v1/options.rb +0 -33
  24. data/lib/google/cloud/tasks/v2/doc/google/iam/v1/policy.rb +0 -151
  25. data/lib/google/cloud/tasks/v2/doc/google/protobuf/any.rb +0 -131
  26. data/lib/google/cloud/tasks/v2/doc/google/protobuf/duration.rb +0 -91
  27. data/lib/google/cloud/tasks/v2/doc/google/protobuf/empty.rb +0 -29
  28. data/lib/google/cloud/tasks/v2/doc/google/protobuf/field_mask.rb +0 -222
  29. data/lib/google/cloud/tasks/v2/doc/google/protobuf/timestamp.rb +0 -113
  30. data/lib/google/cloud/tasks/v2/doc/google/rpc/status.rb +0 -39
  31. data/lib/google/cloud/tasks/v2/doc/google/type/expr.rb +0 -45
  32. data/lib/google/cloud/tasks/v2/helpers.rb +0 -49
  33. data/lib/google/cloud/tasks/v2/queue_pb.rb +0 -56
  34. data/lib/google/cloud/tasks/v2/target_pb.rb +0 -66
  35. data/lib/google/cloud/tasks/v2/task_pb.rb +0 -51
  36. data/lib/google/cloud/tasks/v2beta2.rb +0 -147
  37. data/lib/google/cloud/tasks/v2beta2/cloud_tasks_client.rb +0 -1605
  38. data/lib/google/cloud/tasks/v2beta2/cloud_tasks_client_config.json +0 -126
  39. data/lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb +0 -133
  40. data/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb +0 -258
  41. data/lib/google/cloud/tasks/v2beta2/credentials.rb +0 -41
  42. data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/cloudtasks.rb +0 -483
  43. data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/queue.rb +0 -336
  44. data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/target.rb +0 -377
  45. data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/task.rb +0 -166
  46. data/lib/google/cloud/tasks/v2beta2/doc/google/iam/v1/iam_policy.rb +0 -64
  47. data/lib/google/cloud/tasks/v2beta2/doc/google/iam/v1/options.rb +0 -33
  48. data/lib/google/cloud/tasks/v2beta2/doc/google/iam/v1/policy.rb +0 -151
  49. data/lib/google/cloud/tasks/v2beta2/doc/google/protobuf/any.rb +0 -131
  50. data/lib/google/cloud/tasks/v2beta2/doc/google/protobuf/duration.rb +0 -91
  51. data/lib/google/cloud/tasks/v2beta2/doc/google/protobuf/field_mask.rb +0 -222
  52. data/lib/google/cloud/tasks/v2beta2/doc/google/protobuf/timestamp.rb +0 -113
  53. data/lib/google/cloud/tasks/v2beta2/doc/google/rpc/status.rb +0 -39
  54. data/lib/google/cloud/tasks/v2beta2/doc/google/type/expr.rb +0 -45
  55. data/lib/google/cloud/tasks/v2beta2/helpers.rb +0 -49
  56. data/lib/google/cloud/tasks/v2beta2/queue_pb.rb +0 -58
  57. data/lib/google/cloud/tasks/v2beta2/target_pb.rb +0 -54
  58. data/lib/google/cloud/tasks/v2beta2/task_pb.rb +0 -54
  59. data/lib/google/cloud/tasks/v2beta3.rb +0 -147
  60. data/lib/google/cloud/tasks/v2beta3/cloud_tasks_client.rb +0 -1233
  61. data/lib/google/cloud/tasks/v2beta3/cloud_tasks_client_config.json +0 -106
  62. data/lib/google/cloud/tasks/v2beta3/cloudtasks_pb.rb +0 -101
  63. data/lib/google/cloud/tasks/v2beta3/cloudtasks_services_pb.rb +0 -203
  64. data/lib/google/cloud/tasks/v2beta3/credentials.rb +0 -41
  65. data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/cloudtasks.rb +0 -312
  66. data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/queue.rb +0 -342
  67. data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/target.rb +0 -431
  68. data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/task.rb +0 -177
  69. data/lib/google/cloud/tasks/v2beta3/doc/google/iam/v1/iam_policy.rb +0 -64
  70. data/lib/google/cloud/tasks/v2beta3/doc/google/iam/v1/options.rb +0 -33
  71. data/lib/google/cloud/tasks/v2beta3/doc/google/iam/v1/policy.rb +0 -151
  72. data/lib/google/cloud/tasks/v2beta3/doc/google/protobuf/any.rb +0 -131
  73. data/lib/google/cloud/tasks/v2beta3/doc/google/protobuf/duration.rb +0 -91
  74. data/lib/google/cloud/tasks/v2beta3/doc/google/protobuf/empty.rb +0 -29
  75. data/lib/google/cloud/tasks/v2beta3/doc/google/protobuf/field_mask.rb +0 -222
  76. data/lib/google/cloud/tasks/v2beta3/doc/google/protobuf/timestamp.rb +0 -113
  77. data/lib/google/cloud/tasks/v2beta3/doc/google/rpc/status.rb +0 -39
  78. data/lib/google/cloud/tasks/v2beta3/doc/google/type/expr.rb +0 -45
  79. data/lib/google/cloud/tasks/v2beta3/helpers.rb +0 -49
  80. data/lib/google/cloud/tasks/v2beta3/queue_pb.rb +0 -59
  81. data/lib/google/cloud/tasks/v2beta3/target_pb.rb +0 -69
  82. data/lib/google/cloud/tasks/v2beta3/task_pb.rb +0 -52
@@ -1,431 +0,0 @@
1
- # Copyright 2020 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
-
16
- module Google
17
- module Cloud
18
- module Tasks
19
- module V2beta3
20
- # HTTP request.
21
- #
22
- # The task will be pushed to the worker as an HTTP request. If the worker
23
- # or the redirected worker acknowledges the task by returning a successful HTTP
24
- # response code ([`200` - `299`]), the task will be removed from the queue. If
25
- # any other HTTP response code is returned or no response is received, the
26
- # task will be retried according to the following:
27
- #
28
- # * User-specified throttling: {Google::Cloud::Tasks::V2beta3::Queue#retry_config retry configuration},
29
- # {Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate limits}, and the {Google::Cloud::Tasks::V2beta3::Queue#state queue's state}.
30
- #
31
- # * System throttling: To prevent the worker from overloading, Cloud Tasks may
32
- # temporarily reduce the queue's effective rate. User-specified settings
33
- # will not be changed.
34
- #
35
- # System throttling happens because:
36
- #
37
- # * Cloud Tasks backs off on all errors. Normally the backoff specified in
38
- # {Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate limits} will be used. But if the worker returns
39
- # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
40
- # errors is high, Cloud Tasks will use a higher backoff rate. The retry
41
- # specified in the `Retry-After` HTTP response header is considered.
42
- #
43
- # * To prevent traffic spikes and to smooth sudden increases in traffic,
44
- # dispatches ramp up slowly when the queue is newly created or idle and
45
- # if large numbers of tasks suddenly become available to dispatch (due to
46
- # spikes in create task rates, the queue being unpaused, or many tasks
47
- # that are scheduled at the same time).
48
- # @!attribute [rw] url
49
- # @return [String]
50
- # Required. The full url path that the request will be sent to.
51
- #
52
- # This string must begin with either "http://" or "https://". Some examples
53
- # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
54
- # encode some characters for safety and compatibility. The maximum allowed
55
- # URL length is 2083 characters after encoding.
56
- #
57
- # The `Location` header response from a redirect response [`300` - `399`]
58
- # may be followed. The redirect is not counted as a separate attempt.
59
- # @!attribute [rw] http_method
60
- # @return [Google::Cloud::Tasks::V2beta3::HttpMethod]
61
- # The HTTP method to use for the request. The default is POST.
62
- # @!attribute [rw] headers
63
- # @return [Hash{String => String}]
64
- # HTTP request headers.
65
- #
66
- # This map contains the header field names and values.
67
- # Headers can be set when the
68
- # {Google::Cloud::Tasks::V2beta3::CloudTasks::CreateTask task is created}.
69
- #
70
- # These headers represent a subset of the headers that will accompany the
71
- # task's HTTP request. Some HTTP request headers will be ignored or replaced.
72
- #
73
- # A partial list of headers that will be ignored or replaced is:
74
- #
75
- # * Host: This will be computed by Cloud Tasks and derived from
76
- # {Google::Cloud::Tasks::V2beta3::HttpRequest#url HttpRequest#url}.
77
- # * Content-Length: This will be computed by Cloud Tasks.
78
- # * User-Agent: This will be set to `"Google-Cloud-Tasks"`.
79
- # * X-Google-*: Google use only.
80
- # * X-AppEngine-*: Google use only.
81
- #
82
- # `Content-Type` won't be set by Cloud Tasks. You can explicitly set
83
- # `Content-Type` to a media type when the
84
- # {Google::Cloud::Tasks::V2beta3::CloudTasks::CreateTask task is created}.
85
- # For example, `Content-Type` can be set to `"application/octet-stream"` or
86
- # `"application/json"`.
87
- #
88
- # Headers which can have multiple values (according to RFC2616) can be
89
- # specified using comma-separated values.
90
- #
91
- # The size of the headers must be less than 80KB.
92
- # @!attribute [rw] body
93
- # @return [String]
94
- # HTTP request body.
95
- #
96
- # A request body is allowed only if the
97
- # {Google::Cloud::Tasks::V2beta3::HttpRequest#http_method HTTP method} is POST, PUT, or PATCH. It is an
98
- # error to set body on a task with an incompatible {Google::Cloud::Tasks::V2beta3::HttpMethod HttpMethod}.
99
- # @!attribute [rw] oauth_token
100
- # @return [Google::Cloud::Tasks::V2beta3::OAuthToken]
101
- # If specified, an
102
- # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
103
- # will be generated and attached as an `Authorization` header in the HTTP
104
- # request.
105
- #
106
- # This type of authorization should generally only be used when calling
107
- # Google APIs hosted on *.googleapis.com.
108
- # @!attribute [rw] oidc_token
109
- # @return [Google::Cloud::Tasks::V2beta3::OidcToken]
110
- # If specified, an
111
- # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
112
- # token will be generated and attached as an `Authorization` header in the
113
- # HTTP request.
114
- #
115
- # This type of authorization can be used for many scenarios, including
116
- # calling Cloud Run, or endpoints where you intend to validate the token
117
- # yourself.
118
- class HttpRequest; end
119
-
120
- # App Engine HTTP queue.
121
- #
122
- # The task will be delivered to the App Engine application hostname
123
- # specified by its {Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue AppEngineHttpQueue} and {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest}.
124
- # The documentation for {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest} explains how the
125
- # task's host URL is constructed.
126
- #
127
- # Using {Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue AppEngineHttpQueue} requires
128
- # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
129
- # Google IAM permission for the project
130
- # and the following scope:
131
- #
132
- # `https://www.googleapis.com/auth/cloud-platform`
133
- # @!attribute [rw] app_engine_routing_override
134
- # @return [Google::Cloud::Tasks::V2beta3::AppEngineRouting]
135
- # Overrides for the
136
- # {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
137
- #
138
- # If set, `app_engine_routing_override` is used for all tasks in
139
- # the queue, no matter what the setting is for the
140
- # {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
141
- class AppEngineHttpQueue; end
142
-
143
- # App Engine HTTP request.
144
- #
145
- # The message defines the HTTP request that is sent to an App Engine app when
146
- # the task is dispatched.
147
- #
148
- # Using {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest} requires
149
- # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
150
- # Google IAM permission for the project
151
- # and the following scope:
152
- #
153
- # `https://www.googleapis.com/auth/cloud-platform`
154
- #
155
- # The task will be delivered to the App Engine app which belongs to the same
156
- # project as the queue. For more information, see
157
- # [How Requests are
158
- # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
159
- # and how routing is affected by
160
- # [dispatch
161
- # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
162
- # Traffic is encrypted during transport and never leaves Google datacenters.
163
- # Because this traffic is carried over a communication mechanism internal to
164
- # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
165
- # The request to the handler, however, will appear to have used the HTTP
166
- # protocol.
167
- #
168
- # The {Google::Cloud::Tasks::V2beta3::AppEngineRouting AppEngineRouting} used to construct the URL that the task is
169
- # delivered to can be set at the queue-level or task-level:
170
- #
171
- # * If set,
172
- # {Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue#app_engine_routing_override app_engine_routing_override}
173
- # is used for all tasks in the queue, no matter what the setting
174
- # is for the
175
- # {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
176
- #
177
- #
178
- # The `url` that the task will be sent to is:
179
- #
180
- # * `url =` {Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} `+`
181
- # {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#relative_uri relative_uri}
182
- #
183
- # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
184
- # URIs restricted with
185
- # [`login:
186
- # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
187
- # Because tasks are not run as any user, they cannot be dispatched to URIs
188
- # restricted with
189
- # [`login:
190
- # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
191
- # Task dispatches also do not follow redirects.
192
- #
193
- # The task attempt has succeeded if the app's request handler returns an HTTP
194
- # response code in the range [`200` - `299`]. The task attempt has failed if
195
- # the app's handler returns a non-2xx response code or Cloud Tasks does
196
- # not receive response before the {Google::Cloud::Tasks::V2beta3::Task#dispatch_deadline deadline}. Failed
197
- # tasks will be retried according to the
198
- # {Google::Cloud::Tasks::V2beta3::Queue#retry_config retry configuration}. `503` (Service Unavailable) is
199
- # considered an App Engine system error instead of an application error and
200
- # will cause Cloud Tasks' traffic congestion control to temporarily throttle
201
- # the queue's dispatches. Unlike other types of task targets, a `429` (Too Many
202
- # Requests) response from an app handler does not cause traffic congestion
203
- # control to throttle the queue.
204
- # @!attribute [rw] http_method
205
- # @return [Google::Cloud::Tasks::V2beta3::HttpMethod]
206
- # The HTTP method to use for the request. The default is POST.
207
- #
208
- # The app's request handler for the task's target URL must be able to handle
209
- # HTTP requests with this http_method, otherwise the task attempt will fail
210
- # with error code 405 (Method Not Allowed). See
211
- # [Writing a push task request
212
- # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
213
- # and the documentation for the request handlers in the language your app is
214
- # written in e.g.
215
- # [Python Request
216
- # Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
217
- # @!attribute [rw] app_engine_routing
218
- # @return [Google::Cloud::Tasks::V2beta3::AppEngineRouting]
219
- # Task-level setting for App Engine routing.
220
- #
221
- # If set,
222
- # {Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue#app_engine_routing_override app_engine_routing_override}
223
- # is used for all tasks in the queue, no matter what the setting is for the
224
- # {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
225
- # @!attribute [rw] relative_uri
226
- # @return [String]
227
- # The relative URI.
228
- #
229
- # The relative URI must begin with "/" and must be a valid HTTP relative URI.
230
- # It can contain a path and query string arguments.
231
- # If the relative URI is empty, then the root path "/" will be used.
232
- # No spaces are allowed, and the maximum length allowed is 2083 characters.
233
- # @!attribute [rw] headers
234
- # @return [Hash{String => String}]
235
- # HTTP request headers.
236
- #
237
- # This map contains the header field names and values.
238
- # Headers can be set when the
239
- # {Google::Cloud::Tasks::V2beta3::CloudTasks::CreateTask task is created}.
240
- # Repeated headers are not supported but a header value can contain commas.
241
- #
242
- # Cloud Tasks sets some headers to default values:
243
- #
244
- # * `User-Agent`: By default, this header is
245
- # `"AppEngine-Google; (+http://code.google.com/appengine)"`.
246
- # This header can be modified, but Cloud Tasks will append
247
- # `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
248
- # modified `User-Agent`.
249
- #
250
- # If the task has a {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#body body}, Cloud
251
- # Tasks sets the following headers:
252
- #
253
- # * `Content-Type`: By default, the `Content-Type` header is set to
254
- # `"application/octet-stream"`. The default can be overridden by explicitly
255
- # setting `Content-Type` to a particular media type when the
256
- # {Google::Cloud::Tasks::V2beta3::CloudTasks::CreateTask task is created}.
257
- # For example, `Content-Type` can be set to `"application/json"`.
258
- # * `Content-Length`: This is computed by Cloud Tasks. This value is
259
- # output only. It cannot be changed.
260
- #
261
- # The headers below cannot be set or overridden:
262
- #
263
- # * `Host`
264
- # * `X-Google-*`
265
- # * `X-AppEngine-*`
266
- #
267
- # In addition, Cloud Tasks sets some headers when the task is dispatched,
268
- # such as headers containing information about the task; see
269
- # [request
270
- # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
271
- # These headers are set only when the task is dispatched, so they are not
272
- # visible when the task is returned in a Cloud Tasks response.
273
- #
274
- # Although there is no specific limit for the maximum number of headers or
275
- # the size, there is a limit on the maximum size of the {Google::Cloud::Tasks::V2beta3::Task Task}. For more
276
- # information, see the {Google::Cloud::Tasks::V2beta3::CloudTasks::CreateTask CreateTask} documentation.
277
- # @!attribute [rw] body
278
- # @return [String]
279
- # HTTP request body.
280
- #
281
- # A request body is allowed only if the HTTP method is POST or PUT. It is
282
- # an error to set a body on a task with an incompatible {Google::Cloud::Tasks::V2beta3::HttpMethod HttpMethod}.
283
- class AppEngineHttpRequest; end
284
-
285
- # App Engine Routing.
286
- #
287
- # Defines routing characteristics specific to App Engine - service, version,
288
- # and instance.
289
- #
290
- # For more information about services, versions, and instances see
291
- # [An Overview of App
292
- # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
293
- # [Microservices Architecture on Google App
294
- # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
295
- # [App Engine Standard request
296
- # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
297
- # and [App Engine Flex request
298
- # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
299
- # @!attribute [rw] service
300
- # @return [String]
301
- # App service.
302
- #
303
- # By default, the task is sent to the service which is the default
304
- # service when the task is attempted.
305
- #
306
- # For some queues or tasks which were created using the App Engine
307
- # Task Queue API, {Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is not parsable
308
- # into {Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service},
309
- # {Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and
310
- # {Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}. For example, some tasks
311
- # which were created using the App Engine SDK use a custom domain
312
- # name; custom domains are not parsed by Cloud Tasks. If
313
- # {Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is not parsable, then
314
- # {Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service},
315
- # {Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and
316
- # {Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance} are the empty string.
317
- # @!attribute [rw] version
318
- # @return [String]
319
- # App version.
320
- #
321
- # By default, the task is sent to the version which is the default
322
- # version when the task is attempted.
323
- #
324
- # For some queues or tasks which were created using the App Engine
325
- # Task Queue API, {Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is not parsable
326
- # into {Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service},
327
- # {Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and
328
- # {Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}. For example, some tasks
329
- # which were created using the App Engine SDK use a custom domain
330
- # name; custom domains are not parsed by Cloud Tasks. If
331
- # {Google::Cloud::Tasks::V2beta3::AppEngineRouting#host host} is not parsable, then
332
- # {Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service},
333
- # {Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version}, and
334
- # {Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance} are the empty string.
335
- # @!attribute [rw] instance
336
- # @return [String]
337
- # App instance.
338
- #
339
- # By default, the task is sent to an instance which is available when
340
- # the task is attempted.
341
- #
342
- # Requests can only be sent to a specific instance if
343
- # [manual scaling is used in App Engine
344
- # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
345
- # App Engine Flex does not support instances. For more information, see
346
- # [App Engine Standard request
347
- # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
348
- # and [App Engine Flex request
349
- # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
350
- # @!attribute [rw] host
351
- # @return [String]
352
- # Output only. The host that the task is sent to.
353
- #
354
- # The host is constructed from the domain name of the app associated with
355
- # the queue's project ID (for example <app-id>.appspot.com), and the
356
- # {Google::Cloud::Tasks::V2beta3::AppEngineRouting#service service}, {Google::Cloud::Tasks::V2beta3::AppEngineRouting#version version},
357
- # and {Google::Cloud::Tasks::V2beta3::AppEngineRouting#instance instance}. Tasks which were created using
358
- # the App Engine SDK might have a custom domain name.
359
- #
360
- # For more information, see
361
- # [How Requests are
362
- # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
363
- class AppEngineRouting; end
364
-
365
- # Contains information needed for generating an
366
- # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
367
- # This type of authorization should generally only be used when calling Google
368
- # APIs hosted on *.googleapis.com.
369
- # @!attribute [rw] service_account_email
370
- # @return [String]
371
- # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
372
- # to be used for generating OAuth token.
373
- # The service account must be within the same project as the queue. The
374
- # caller must have iam.serviceAccounts.actAs permission for the service
375
- # account.
376
- # @!attribute [rw] scope
377
- # @return [String]
378
- # OAuth scope to be used for generating OAuth access token.
379
- # If not specified, "https://www.googleapis.com/auth/cloud-platform"
380
- # will be used.
381
- class OAuthToken; end
382
-
383
- # Contains information needed for generating an
384
- # [OpenID Connect
385
- # token](https://developers.google.com/identity/protocols/OpenIDConnect).
386
- # This type of authorization can be used for many scenarios, including
387
- # calling Cloud Run, or endpoints where you intend to validate the token
388
- # yourself.
389
- # @!attribute [rw] service_account_email
390
- # @return [String]
391
- # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
392
- # to be used for generating OIDC token.
393
- # The service account must be within the same project as the queue. The
394
- # caller must have iam.serviceAccounts.actAs permission for the service
395
- # account.
396
- # @!attribute [rw] audience
397
- # @return [String]
398
- # Audience to be used when generating OIDC token. If not specified, the URI
399
- # specified in target will be used.
400
- class OidcToken; end
401
-
402
- # The HTTP method used to execute the task.
403
- module HttpMethod
404
- # HTTP method unspecified
405
- HTTP_METHOD_UNSPECIFIED = 0
406
-
407
- # HTTP POST
408
- POST = 1
409
-
410
- # HTTP GET
411
- GET = 2
412
-
413
- # HTTP HEAD
414
- HEAD = 3
415
-
416
- # HTTP PUT
417
- PUT = 4
418
-
419
- # HTTP DELETE
420
- DELETE = 5
421
-
422
- # HTTP PATCH
423
- PATCH = 6
424
-
425
- # HTTP OPTIONS
426
- OPTIONS = 7
427
- end
428
- end
429
- end
430
- end
431
- end
@@ -1,177 +0,0 @@
1
- # Copyright 2020 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
-
16
- module Google
17
- module Cloud
18
- module Tasks
19
- module V2beta3
20
- # A unit of scheduled work.
21
- # @!attribute [rw] name
22
- # @return [String]
23
- # Optionally caller-specified in {Google::Cloud::Tasks::V2beta3::CloudTasks::CreateTask CreateTask}.
24
- #
25
- # The task name.
26
- #
27
- # The task name must have the following format:
28
- # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
29
- #
30
- # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
31
- # hyphens (-), colons (:), or periods (.).
32
- # For more information, see
33
- # [Identifying
34
- # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
35
- # * `LOCATION_ID` is the canonical ID for the task's location.
36
- # The list of available locations can be obtained by calling
37
- # {Google::Cloud::Location::Locations::ListLocations ListLocations}.
38
- # For more information, see https://cloud.google.com/about/locations/.
39
- # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
40
- # hyphens (-). The maximum length is 100 characters.
41
- # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
42
- # hyphens (-), or underscores (_). The maximum length is 500 characters.
43
- # @!attribute [rw] app_engine_http_request
44
- # @return [Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest]
45
- # HTTP request that is sent to the App Engine app handler.
46
- #
47
- # An App Engine task is a task that has {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest} set.
48
- # @!attribute [rw] http_request
49
- # @return [Google::Cloud::Tasks::V2beta3::HttpRequest]
50
- # HTTP request that is sent to the task's target.
51
- #
52
- # An HTTP task is a task that has {Google::Cloud::Tasks::V2beta3::HttpRequest HttpRequest} set.
53
- # @!attribute [rw] schedule_time
54
- # @return [Google::Protobuf::Timestamp]
55
- # The time when the task is scheduled to be attempted.
56
- #
57
- # For App Engine queues, this is when the task will be attempted or retried.
58
- #
59
- # `schedule_time` will be truncated to the nearest microsecond.
60
- # @!attribute [rw] create_time
61
- # @return [Google::Protobuf::Timestamp]
62
- # Output only. The time that the task was created.
63
- #
64
- # `create_time` will be truncated to the nearest second.
65
- # @!attribute [rw] dispatch_deadline
66
- # @return [Google::Protobuf::Duration]
67
- # The deadline for requests sent to the worker. If the worker does not
68
- # respond by this deadline then the request is cancelled and the attempt
69
- # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
70
- # task according to the {Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig}.
71
- #
72
- # Note that when the request is cancelled, Cloud Tasks will stop listing for
73
- # the response, but whether the worker stops processing depends on the
74
- # worker. For example, if the worker is stuck, it may not react to cancelled
75
- # requests.
76
- #
77
- # The default and maximum values depend on the type of request:
78
- #
79
- # * For {Google::Cloud::Tasks::V2beta3::HttpRequest HTTP tasks}, the default is 10 minutes. The deadline
80
- # must be in the interval [15 seconds, 30 minutes].
81
- #
82
- # * For {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest App Engine tasks}, 0 indicates that the
83
- # request has the default deadline. The default deadline depends on the
84
- # [scaling
85
- # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
86
- # of the service: 10 minutes for standard apps with automatic scaling, 24
87
- # hours for standard apps with manual and basic scaling, and 60 minutes for
88
- # flex apps. If the request deadline is set, it must be in the interval [15
89
- # seconds, 24 hours 15 seconds]. Regardless of the task's
90
- # `dispatch_deadline`, the app handler will not run for longer than than
91
- # the service's timeout. We recommend setting the `dispatch_deadline` to
92
- # at most a few seconds more than the app handler's timeout. For more
93
- # information see
94
- # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
95
- #
96
- # `dispatch_deadline` will be truncated to the nearest millisecond. The
97
- # deadline is an approximate deadline.
98
- # @!attribute [rw] dispatch_count
99
- # @return [Integer]
100
- # Output only. The number of attempts dispatched.
101
- #
102
- # This count includes attempts which have been dispatched but haven't
103
- # received a response.
104
- # @!attribute [rw] response_count
105
- # @return [Integer]
106
- # Output only. The number of attempts which have received a response.
107
- # @!attribute [rw] first_attempt
108
- # @return [Google::Cloud::Tasks::V2beta3::Attempt]
109
- # Output only. The status of the task's first attempt.
110
- #
111
- # Only {Google::Cloud::Tasks::V2beta3::Attempt#dispatch_time dispatch_time} will be set.
112
- # The other {Google::Cloud::Tasks::V2beta3::Attempt Attempt} information is not retained by Cloud Tasks.
113
- # @!attribute [rw] last_attempt
114
- # @return [Google::Cloud::Tasks::V2beta3::Attempt]
115
- # Output only. The status of the task's last attempt.
116
- # @!attribute [rw] view
117
- # @return [Google::Cloud::Tasks::V2beta3::Task::View]
118
- # Output only. The view specifies which subset of the {Google::Cloud::Tasks::V2beta3::Task Task} has
119
- # been returned.
120
- class Task
121
- # The view specifies a subset of {Google::Cloud::Tasks::V2beta3::Task Task} data.
122
- #
123
- # When a task is returned in a response, not all
124
- # information is retrieved by default because some data, such as
125
- # payloads, might be desirable to return only when needed because
126
- # of its large size or because of the sensitivity of data that it
127
- # contains.
128
- module View
129
- # Unspecified. Defaults to BASIC.
130
- VIEW_UNSPECIFIED = 0
131
-
132
- # The basic view omits fields which can be large or can contain
133
- # sensitive data.
134
- #
135
- # This view does not include the
136
- # {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#body body in AppEngineHttpRequest}.
137
- # Bodies are desirable to return only when needed, because they
138
- # can be large and because of the sensitivity of the data that you
139
- # choose to store in it.
140
- BASIC = 1
141
-
142
- # All information is returned.
143
- #
144
- # Authorization for {Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} requires
145
- # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
146
- # permission on the {Google::Cloud::Tasks::V2beta3::Queue Queue} resource.
147
- FULL = 2
148
- end
149
- end
150
-
151
- # The status of a task attempt.
152
- # @!attribute [rw] schedule_time
153
- # @return [Google::Protobuf::Timestamp]
154
- # Output only. The time that this attempt was scheduled.
155
- #
156
- # `schedule_time` will be truncated to the nearest microsecond.
157
- # @!attribute [rw] dispatch_time
158
- # @return [Google::Protobuf::Timestamp]
159
- # Output only. The time that this attempt was dispatched.
160
- #
161
- # `dispatch_time` will be truncated to the nearest microsecond.
162
- # @!attribute [rw] response_time
163
- # @return [Google::Protobuf::Timestamp]
164
- # Output only. The time that this attempt response was received.
165
- #
166
- # `response_time` will be truncated to the nearest microsecond.
167
- # @!attribute [rw] response_status
168
- # @return [Google::Rpc::Status]
169
- # Output only. The response from the worker for this attempt.
170
- #
171
- # If `response_time` is unset, then the task has not been attempted or is
172
- # currently running and the `response_status` field is meaningless.
173
- class Attempt; end
174
- end
175
- end
176
- end
177
- end