blob: c41a79fed0c8759cd6e250dc5c1d29893919ee32 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="cloudtasks_v2beta3.html">Cloud Tasks API</a> . <a href="cloudtasks_v2beta3.projects.html">projects</a> . <a href="cloudtasks_v2beta3.projects.locations.html">locations</a> . <a href="cloudtasks_v2beta3.projects.locations.queues.html">queues</a> . <a href="cloudtasks_v2beta3.projects.locations.queues.tasks.html">tasks</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Creates a task and adds it to a queue.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a task.</p>
83<p class="toc_element">
84 <code><a href="#get">get(name, responseView=None, x__xgafv=None)</a></code></p>
85<p class="firstline">Gets a task.</p>
86<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070087 <code><a href="#list">list(parent, responseView=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Lists the tasks in a queue.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#run">run(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Forces a task to run now.</p>
95<h3>Method Details</h3>
96<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070097 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098 <pre>Creates a task and adds it to a queue.
99
100Tasks cannot be updated after creation; there is no UpdateTask command.
101
102* The maximum task size is 100KB.
103
104Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 parent: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
107
108The queue must already exist. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110 The object takes the form of:
111
112{ # Request message for CreateTask.
Bu Sun Kim65020912020-05-20 12:08:20 -0700113 &quot;task&quot;: { # A unit of scheduled work. # Required. The task to add.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114 #
115 # Task names have the following format:
116 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
117 # The user can optionally specify a task name. If a
118 # name is not specified then the system will generate a random
119 # unique task id, which will be set in the task returned in the
120 # response.
121 #
122 # If schedule_time is not set or is in the
123 # past then Cloud Tasks will set it to the current time.
124 #
125 # Task De-duplication:
126 #
127 # Explicitly specifying a task ID enables task de-duplication. If
Bu Sun Kim65020912020-05-20 12:08:20 -0700128 # a task&#x27;s ID is identical to that of an existing task or a task
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700129 # that was deleted or executed recently then the call will fail
130 # with ALREADY_EXISTS.
Bu Sun Kim65020912020-05-20 12:08:20 -0700131 # If the task&#x27;s queue was created using Cloud Tasks, then another task with
132 # the same name can&#x27;t be created for ~1hour after the original task was
133 # deleted or executed. If the task&#x27;s queue was created using queue.yaml or
134 # queue.xml, then another task with the same name can&#x27;t be created
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700135 # for ~9days after the original task was deleted or executed.
136 #
137 # Because there is an extra lookup cost to identify duplicate task
138 # names, these CreateTask calls have significantly
139 # increased latency. Using hashed strings for the task id or for
140 # the prefix of the task id is recommended. Choosing task ids that
141 # are sequential or have sequential prefixes, for example using a
142 # timestamp, causes an increase in latency and error rates in all
143 # task commands. The infrastructure relies on an approximately
144 # uniform distribution of task ids to store and serve tasks
145 # efficiently.
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
147 # respond by this deadline then the request is cancelled and the attempt
148 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
149 # task according to the RetryConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700150 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700151 # Note that when the request is cancelled, Cloud Tasks will stop listing for
152 # the response, but whether the worker stops processing depends on the
153 # worker. For example, if the worker is stuck, it may not react to cancelled
154 # requests.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700155 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700156 # The default and maximum values depend on the type of request:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700157 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700158 # * For HTTP tasks, the default is 10 minutes. The deadline
159 # must be in the interval [15 seconds, 30 minutes].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700160 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700161 # * For App Engine tasks, 0 indicates that the
162 # request has the default deadline. The default deadline depends on the
163 # [scaling
164 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
165 # of the service: 10 minutes for standard apps with automatic scaling, 24
166 # hours for standard apps with manual and basic scaling, and 60 minutes for
167 # flex apps. If the request deadline is set, it must be in the interval [15
168 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
169 # `dispatch_deadline`, the app handler will not run for longer than than
170 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
171 # at most a few seconds more than the app handler&#x27;s timeout. For more
172 # information see
173 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700174 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700175 # `dispatch_deadline` will be truncated to the nearest millisecond. The
176 # deadline is an approximate deadline.
177 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700178 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700179 # Only dispatch_time will be set.
180 # The other Attempt information is not retained by Cloud Tasks.
181 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700182 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700183 # `schedule_time` will be truncated to the nearest microsecond.
184 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
Dan O'Mearadd494642020-05-01 07:42:23 -0700185 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700186 # `dispatch_time` will be truncated to the nearest microsecond.
187 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
Dan O'Mearadd494642020-05-01 07:42:23 -0700188 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700189 # `response_time` will be truncated to the nearest microsecond.
190 &quot;responseStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the worker for this attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -0700191 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700192 # If `response_time` is unset, then the task has not been attempted or is
193 # currently running and the `response_status` field is meaningless.
194 # different programming environments, including REST APIs and RPC APIs. It is
195 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
196 # three pieces of data: error code, error message, and error details.
Dan O'Mearadd494642020-05-01 07:42:23 -0700197 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700198 # You can find out more about this error model and how to work with it in the
199 # [API Design Guide](https://cloud.google.com/apis/design/errors).
200 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
201 # user-facing error message should be localized and sent in the
202 # google.rpc.Status.details field, or localized by the client.
203 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
204 # message types for APIs to use.
205 {
206 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
207 },
208 ],
209 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dan O'Mearadd494642020-05-01 07:42:23 -0700210 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700211 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700212 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
213 #
214 # This count includes attempts which have been dispatched but haven&#x27;t
215 # received a response.
216 &quot;lastAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s last attempt.
217 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
218 #
219 # `schedule_time` will be truncated to the nearest microsecond.
220 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
221 #
222 # `dispatch_time` will be truncated to the nearest microsecond.
223 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
224 #
225 # `response_time` will be truncated to the nearest microsecond.
226 &quot;responseStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the worker for this attempt.
227 #
228 # If `response_time` is unset, then the task has not been attempted or is
229 # currently running and the `response_status` field is meaningless.
230 # different programming environments, including REST APIs and RPC APIs. It is
231 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
232 # three pieces of data: error code, error message, and error details.
233 #
234 # You can find out more about this error model and how to work with it in the
235 # [API Design Guide](https://cloud.google.com/apis/design/errors).
236 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
237 # user-facing error message should be localized and sent in the
238 # google.rpc.Status.details field, or localized by the client.
239 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
240 # message types for APIs to use.
241 {
242 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
243 },
244 ],
245 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
246 },
247 },
248 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
249 &quot;appEngineHttpRequest&quot;: { # App Engine HTTP request. # HTTP request that is sent to the App Engine app handler.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700250 #
251 # An App Engine task is a task that has AppEngineHttpRequest set.
252 #
253 # The message defines the HTTP request that is sent to an App Engine app when
254 # the task is dispatched.
255 #
256 # Using AppEngineHttpRequest requires
257 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
258 # Google IAM permission for the project
259 # and the following scope:
260 #
261 # `https://www.googleapis.com/auth/cloud-platform`
262 #
263 # The task will be delivered to the App Engine app which belongs to the same
264 # project as the queue. For more information, see
265 # [How Requests are
266 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
267 # and how routing is affected by
268 # [dispatch
269 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
270 # Traffic is encrypted during transport and never leaves Google datacenters.
271 # Because this traffic is carried over a communication mechanism internal to
272 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
273 # The request to the handler, however, will appear to have used the HTTP
274 # protocol.
275 #
276 # The AppEngineRouting used to construct the URL that the task is
277 # delivered to can be set at the queue-level or task-level:
278 #
279 # * If set,
Dan O'Mearadd494642020-05-01 07:42:23 -0700280 # app_engine_routing_override
281 # is used for all tasks in the queue, no matter what the setting
282 # is for the
283 # task-level app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700284 #
285 #
286 # The `url` that the task will be sent to is:
287 #
288 # * `url =` host `+`
289 # relative_uri
290 #
291 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
292 # URIs restricted with
293 # [`login:
294 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
295 # Because tasks are not run as any user, they cannot be dispatched to URIs
296 # restricted with
297 # [`login:
298 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
299 # Task dispatches also do not follow redirects.
300 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700301 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700302 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -0700303 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700304 # not receive response before the deadline. Failed
305 # tasks will be retried according to the
306 # retry configuration. `503` (Service Unavailable) is
307 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -0700308 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
309 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700310 # Requests) response from an app handler does not cause traffic congestion
311 # control to throttle the queue.
Bu Sun Kim65020912020-05-20 12:08:20 -0700312 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700314 # This map contains the header field names and values.
315 # Headers can be set when the
316 # task is created.
317 # Repeated headers are not supported but a header value can contain commas.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700318 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700319 # Cloud Tasks sets some headers to default values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700320 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700321 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -0700322 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700323 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -0700324 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Dan O'Mearadd494642020-05-01 07:42:23 -0700325 # modified `User-Agent`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700326 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700327 # If the task has a body, Cloud
328 # Tasks sets the following headers:
329 #
330 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -0700331 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Dan O'Mearadd494642020-05-01 07:42:23 -0700332 # setting `Content-Type` to a particular media type when the
333 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700334 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700335 # * `Content-Length`: This is computed by Cloud Tasks. This value is
336 # output only. It cannot be changed.
337 #
338 # The headers below cannot be set or overridden:
339 #
340 # * `Host`
341 # * `X-Google-*`
342 # * `X-AppEngine-*`
343 #
344 # In addition, Cloud Tasks sets some headers when the task is dispatched,
345 # such as headers containing information about the task; see
346 # [request
347 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
348 # These headers are set only when the task is dispatched, so they are not
349 # visible when the task is returned in a Cloud Tasks response.
350 #
351 # Although there is no specific limit for the maximum number of headers or
352 # the size, there is a limit on the maximum size of the Task. For more
353 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700354 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700355 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700356 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
357 #
358 # If set,
359 # app_engine_routing_override
360 # is used for all tasks in the queue, no matter what the setting is for the
361 # task-level app_engine_routing.
362 #
363 # Defines routing characteristics specific to App Engine - service, version,
364 # and instance.
365 #
366 # For more information about services, versions, and instances see
367 # [An Overview of App
368 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
369 # [Microservices Architecture on Google App
370 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
371 # [App Engine Standard request
372 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
373 # and [App Engine Flex request
374 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
375 &quot;version&quot;: &quot;A String&quot;, # App version.
376 #
377 # By default, the task is sent to the version which is the default
378 # version when the task is attempted.
379 #
380 # For some queues or tasks which were created using the App Engine
381 # Task Queue API, host is not parsable
382 # into service,
383 # version, and
384 # instance. For example, some tasks
385 # which were created using the App Engine SDK use a custom domain
386 # name; custom domains are not parsed by Cloud Tasks. If
387 # host is not parsable, then
388 # service,
389 # version, and
390 # instance are the empty string.
391 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
392 #
393 # The host is constructed from the domain name of the app associated with
394 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
395 # service, version,
396 # and instance. Tasks which were created using
397 # the App Engine SDK might have a custom domain name.
398 #
399 # For more information, see
400 # [How Requests are
401 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
402 &quot;service&quot;: &quot;A String&quot;, # App service.
403 #
404 # By default, the task is sent to the service which is the default
405 # service when the task is attempted.
406 #
407 # For some queues or tasks which were created using the App Engine
408 # Task Queue API, host is not parsable
409 # into service,
410 # version, and
411 # instance. For example, some tasks
412 # which were created using the App Engine SDK use a custom domain
413 # name; custom domains are not parsed by Cloud Tasks. If
414 # host is not parsable, then
415 # service,
416 # version, and
417 # instance are the empty string.
418 &quot;instance&quot;: &quot;A String&quot;, # App instance.
419 #
420 # By default, the task is sent to an instance which is available when
421 # the task is attempted.
422 #
423 # Requests can only be sent to a specific instance if
424 # [manual scaling is used in App Engine
425 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
426 # App Engine Flex does not support instances. For more information, see
427 # [App Engine Standard request
428 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
429 # and [App Engine Flex request
430 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
431 },
432 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
433 #
434 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
435 # HTTP requests with this http_method, otherwise the task attempt fails with
436 # error code 405 (Method Not Allowed). See [Writing a push task request
437 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
438 # and the App Engine documentation for your runtime on [How Requests are
439 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
440 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
441 #
442 # A request body is allowed only if the HTTP method is POST or PUT. It is
443 # an error to set a body on a task with an incompatible HttpMethod.
444 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
445 #
446 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
447 # It can contain a path and query string arguments.
448 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
449 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700450 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700451 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
452 # been returned.
453 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700454 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700455 # `create_time` will be truncated to the nearest second.
456 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted.
457 #
458 # For App Engine queues, this is when the task will be attempted or retried.
459 #
460 # `schedule_time` will be truncated to the nearest microsecond.
461 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the task&#x27;s target.
462 #
463 # An HTTP task is a task that has HttpRequest set.
464 #
465 # The task will be pushed to the worker as an HTTP request. If the worker
466 # or the redirected worker acknowledges the task by returning a successful HTTP
467 # response code ([`200` - `299`]), the task will be removed from the queue. If
468 # any other HTTP response code is returned or no response is received, the
469 # task will be retried according to the following:
470 #
471 # * User-specified throttling: retry configuration,
472 # rate limits, and the queue&#x27;s state.
473 #
474 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
475 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
476 # will not be changed.
477 #
478 # System throttling happens because:
479 #
480 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
481 # rate limits will be used. But if the worker returns
482 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
483 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
484 # specified in the `Retry-After` HTTP response header is considered.
485 #
486 # * To prevent traffic spikes and to smooth sudden increases in traffic,
487 # dispatches ramp up slowly when the queue is newly created or idle and
488 # if large numbers of tasks suddenly become available to dispatch (due to
489 # spikes in create task rates, the queue being unpaused, or many tasks
490 # that are scheduled at the same time).
491 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700492 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700493 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
494 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
495 # encode some characters for safety and compatibility. The maximum allowed
496 # URL length is 2083 characters after encoding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700497 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700498 # The `Location` header response from a redirect response [`300` - `399`]
499 # may be followed. The redirect is not counted as a separate attempt.
500 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
501 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
502 # token will be generated and attached as an `Authorization` header in the
503 # HTTP request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700504 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700505 # This type of authorization can be used for many scenarios, including
506 # calling Cloud Run, or endpoints where you intend to validate the token
507 # yourself.
508 # [OpenID Connect
509 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
510 # This type of authorization can be used for many scenarios, including
511 # calling Cloud Run, or endpoints where you intend to validate the token
512 # yourself.
513 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
514 # specified in target will be used.
515 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
516 # to be used for generating OIDC token.
517 # The service account must be within the same project as the queue. The
518 # caller must have iam.serviceAccounts.actAs permission for the service
519 # account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700520 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700521 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
522 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700523 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700524 # A request body is allowed only if the
525 # HTTP method is POST, PUT, or PATCH. It is an
526 # error to set body on a task with an incompatible HttpMethod.
527 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
528 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
529 # will be generated and attached as an `Authorization` header in the HTTP
530 # request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700531 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700532 # This type of authorization should generally only be used when calling
533 # Google APIs hosted on *.googleapis.com.
534 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
535 # This type of authorization should generally only be used when calling Google
536 # APIs hosted on *.googleapis.com.
537 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
538 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
539 # will be used.
540 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
541 # to be used for generating OAuth token.
542 # The service account must be within the same project as the queue. The
543 # caller must have iam.serviceAccounts.actAs permission for the service
544 # account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700545 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700546 &quot;headers&quot;: { # HTTP request headers.
Dan O'Mearadd494642020-05-01 07:42:23 -0700547 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700548 # This map contains the header field names and values.
549 # Headers can be set when the
550 # task is created.
Dan O'Mearadd494642020-05-01 07:42:23 -0700551 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700552 # These headers represent a subset of the headers that will accompany the
553 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
554 #
555 # A partial list of headers that will be ignored or replaced is:
556 #
557 # * Host: This will be computed by Cloud Tasks and derived from
558 # HttpRequest.url.
559 # * Content-Length: This will be computed by Cloud Tasks.
560 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
561 # * X-Google-*: Google use only.
562 # * X-AppEngine-*: Google use only.
563 #
564 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
565 # `Content-Type` to a media type when the
566 # task is created.
567 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
568 # `&quot;application/json&quot;`.
569 #
570 # Headers which can have multiple values (according to RFC2616) can be
571 # specified using comma-separated values.
572 #
573 # The size of the headers must be less than 80KB.
574 &quot;a_key&quot;: &quot;A String&quot;,
575 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700576 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700577 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
Dan O'Mearadd494642020-05-01 07:42:23 -0700578 #
579 # The task name.
580 #
581 # The task name must have the following format:
582 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
583 #
584 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
585 # hyphens (-), colons (:), or periods (.).
586 # For more information, see
587 # [Identifying
588 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -0700589 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
Dan O'Mearadd494642020-05-01 07:42:23 -0700590 # The list of available locations can be obtained by calling
591 # ListLocations.
592 # For more information, see https://cloud.google.com/about/locations/.
593 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
594 # hyphens (-). The maximum length is 100 characters.
595 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
596 # hyphens (-), or underscores (_). The maximum length is 500 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700597 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700598 &quot;responseView&quot;: &quot;A String&quot;, # The response_view specifies which subset of the Task will be
599 # returned.
600 #
601 # By default response_view is BASIC; not all
602 # information is retrieved by default because some data, such as
603 # payloads, might be desirable to return only when needed because
604 # of its large size or because of the sensitivity of data that it
605 # contains.
606 #
607 # Authorization for FULL requires
608 # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
609 # permission on the Task resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700610 }
611
612 x__xgafv: string, V1 error format.
613 Allowed values
614 1 - v1 error format
615 2 - v2 error format
616
617Returns:
618 An object of the form:
619
620 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -0700621 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
622 # respond by this deadline then the request is cancelled and the attempt
623 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
624 # task according to the RetryConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700625 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700626 # Note that when the request is cancelled, Cloud Tasks will stop listing for
627 # the response, but whether the worker stops processing depends on the
628 # worker. For example, if the worker is stuck, it may not react to cancelled
629 # requests.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700630 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700631 # The default and maximum values depend on the type of request:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700632 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700633 # * For HTTP tasks, the default is 10 minutes. The deadline
634 # must be in the interval [15 seconds, 30 minutes].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700635 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700636 # * For App Engine tasks, 0 indicates that the
637 # request has the default deadline. The default deadline depends on the
638 # [scaling
639 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
640 # of the service: 10 minutes for standard apps with automatic scaling, 24
641 # hours for standard apps with manual and basic scaling, and 60 minutes for
642 # flex apps. If the request deadline is set, it must be in the interval [15
643 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
644 # `dispatch_deadline`, the app handler will not run for longer than than
645 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
646 # at most a few seconds more than the app handler&#x27;s timeout. For more
647 # information see
648 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700649 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700650 # `dispatch_deadline` will be truncated to the nearest millisecond. The
651 # deadline is an approximate deadline.
652 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700653 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700654 # Only dispatch_time will be set.
655 # The other Attempt information is not retained by Cloud Tasks.
656 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700657 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700658 # `schedule_time` will be truncated to the nearest microsecond.
659 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
Dan O'Mearadd494642020-05-01 07:42:23 -0700660 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700661 # `dispatch_time` will be truncated to the nearest microsecond.
662 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
Dan O'Mearadd494642020-05-01 07:42:23 -0700663 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700664 # `response_time` will be truncated to the nearest microsecond.
665 &quot;responseStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the worker for this attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -0700666 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700667 # If `response_time` is unset, then the task has not been attempted or is
668 # currently running and the `response_status` field is meaningless.
669 # different programming environments, including REST APIs and RPC APIs. It is
670 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
671 # three pieces of data: error code, error message, and error details.
Dan O'Mearadd494642020-05-01 07:42:23 -0700672 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700673 # You can find out more about this error model and how to work with it in the
674 # [API Design Guide](https://cloud.google.com/apis/design/errors).
675 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
676 # user-facing error message should be localized and sent in the
677 # google.rpc.Status.details field, or localized by the client.
678 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
679 # message types for APIs to use.
680 {
681 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
682 },
683 ],
684 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dan O'Mearadd494642020-05-01 07:42:23 -0700685 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700686 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700687 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
688 #
689 # This count includes attempts which have been dispatched but haven&#x27;t
690 # received a response.
691 &quot;lastAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s last attempt.
692 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
693 #
694 # `schedule_time` will be truncated to the nearest microsecond.
695 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
696 #
697 # `dispatch_time` will be truncated to the nearest microsecond.
698 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
699 #
700 # `response_time` will be truncated to the nearest microsecond.
701 &quot;responseStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the worker for this attempt.
702 #
703 # If `response_time` is unset, then the task has not been attempted or is
704 # currently running and the `response_status` field is meaningless.
705 # different programming environments, including REST APIs and RPC APIs. It is
706 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
707 # three pieces of data: error code, error message, and error details.
708 #
709 # You can find out more about this error model and how to work with it in the
710 # [API Design Guide](https://cloud.google.com/apis/design/errors).
711 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
712 # user-facing error message should be localized and sent in the
713 # google.rpc.Status.details field, or localized by the client.
714 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
715 # message types for APIs to use.
716 {
717 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
718 },
719 ],
720 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
721 },
722 },
723 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
724 &quot;appEngineHttpRequest&quot;: { # App Engine HTTP request. # HTTP request that is sent to the App Engine app handler.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700725 #
726 # An App Engine task is a task that has AppEngineHttpRequest set.
727 #
728 # The message defines the HTTP request that is sent to an App Engine app when
729 # the task is dispatched.
730 #
731 # Using AppEngineHttpRequest requires
732 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
733 # Google IAM permission for the project
734 # and the following scope:
735 #
736 # `https://www.googleapis.com/auth/cloud-platform`
737 #
738 # The task will be delivered to the App Engine app which belongs to the same
739 # project as the queue. For more information, see
740 # [How Requests are
741 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
742 # and how routing is affected by
743 # [dispatch
744 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
745 # Traffic is encrypted during transport and never leaves Google datacenters.
746 # Because this traffic is carried over a communication mechanism internal to
747 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
748 # The request to the handler, however, will appear to have used the HTTP
749 # protocol.
750 #
751 # The AppEngineRouting used to construct the URL that the task is
752 # delivered to can be set at the queue-level or task-level:
753 #
754 # * If set,
Dan O'Mearadd494642020-05-01 07:42:23 -0700755 # app_engine_routing_override
756 # is used for all tasks in the queue, no matter what the setting
757 # is for the
758 # task-level app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700759 #
760 #
761 # The `url` that the task will be sent to is:
762 #
763 # * `url =` host `+`
764 # relative_uri
765 #
766 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
767 # URIs restricted with
768 # [`login:
769 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
770 # Because tasks are not run as any user, they cannot be dispatched to URIs
771 # restricted with
772 # [`login:
773 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
774 # Task dispatches also do not follow redirects.
775 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700776 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700777 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -0700778 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700779 # not receive response before the deadline. Failed
780 # tasks will be retried according to the
781 # retry configuration. `503` (Service Unavailable) is
782 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -0700783 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
784 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700785 # Requests) response from an app handler does not cause traffic congestion
786 # control to throttle the queue.
Bu Sun Kim65020912020-05-20 12:08:20 -0700787 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700788 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700789 # This map contains the header field names and values.
790 # Headers can be set when the
791 # task is created.
792 # Repeated headers are not supported but a header value can contain commas.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700793 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700794 # Cloud Tasks sets some headers to default values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700795 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700796 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -0700797 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700798 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -0700799 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Dan O'Mearadd494642020-05-01 07:42:23 -0700800 # modified `User-Agent`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700801 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700802 # If the task has a body, Cloud
803 # Tasks sets the following headers:
804 #
805 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -0700806 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Dan O'Mearadd494642020-05-01 07:42:23 -0700807 # setting `Content-Type` to a particular media type when the
808 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700809 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700810 # * `Content-Length`: This is computed by Cloud Tasks. This value is
811 # output only. It cannot be changed.
812 #
813 # The headers below cannot be set or overridden:
814 #
815 # * `Host`
816 # * `X-Google-*`
817 # * `X-AppEngine-*`
818 #
819 # In addition, Cloud Tasks sets some headers when the task is dispatched,
820 # such as headers containing information about the task; see
821 # [request
822 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
823 # These headers are set only when the task is dispatched, so they are not
824 # visible when the task is returned in a Cloud Tasks response.
825 #
826 # Although there is no specific limit for the maximum number of headers or
827 # the size, there is a limit on the maximum size of the Task. For more
828 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700829 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700830 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700831 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
832 #
833 # If set,
834 # app_engine_routing_override
835 # is used for all tasks in the queue, no matter what the setting is for the
836 # task-level app_engine_routing.
837 #
838 # Defines routing characteristics specific to App Engine - service, version,
839 # and instance.
840 #
841 # For more information about services, versions, and instances see
842 # [An Overview of App
843 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
844 # [Microservices Architecture on Google App
845 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
846 # [App Engine Standard request
847 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
848 # and [App Engine Flex request
849 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
850 &quot;version&quot;: &quot;A String&quot;, # App version.
851 #
852 # By default, the task is sent to the version which is the default
853 # version when the task is attempted.
854 #
855 # For some queues or tasks which were created using the App Engine
856 # Task Queue API, host is not parsable
857 # into service,
858 # version, and
859 # instance. For example, some tasks
860 # which were created using the App Engine SDK use a custom domain
861 # name; custom domains are not parsed by Cloud Tasks. If
862 # host is not parsable, then
863 # service,
864 # version, and
865 # instance are the empty string.
866 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
867 #
868 # The host is constructed from the domain name of the app associated with
869 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
870 # service, version,
871 # and instance. Tasks which were created using
872 # the App Engine SDK might have a custom domain name.
873 #
874 # For more information, see
875 # [How Requests are
876 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
877 &quot;service&quot;: &quot;A String&quot;, # App service.
878 #
879 # By default, the task is sent to the service which is the default
880 # service when the task is attempted.
881 #
882 # For some queues or tasks which were created using the App Engine
883 # Task Queue API, host is not parsable
884 # into service,
885 # version, and
886 # instance. For example, some tasks
887 # which were created using the App Engine SDK use a custom domain
888 # name; custom domains are not parsed by Cloud Tasks. If
889 # host is not parsable, then
890 # service,
891 # version, and
892 # instance are the empty string.
893 &quot;instance&quot;: &quot;A String&quot;, # App instance.
894 #
895 # By default, the task is sent to an instance which is available when
896 # the task is attempted.
897 #
898 # Requests can only be sent to a specific instance if
899 # [manual scaling is used in App Engine
900 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
901 # App Engine Flex does not support instances. For more information, see
902 # [App Engine Standard request
903 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
904 # and [App Engine Flex request
905 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
906 },
907 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
908 #
909 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
910 # HTTP requests with this http_method, otherwise the task attempt fails with
911 # error code 405 (Method Not Allowed). See [Writing a push task request
912 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
913 # and the App Engine documentation for your runtime on [How Requests are
914 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
915 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
916 #
917 # A request body is allowed only if the HTTP method is POST or PUT. It is
918 # an error to set a body on a task with an incompatible HttpMethod.
919 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
920 #
921 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
922 # It can contain a path and query string arguments.
923 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
924 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700925 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700926 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
927 # been returned.
928 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700929 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700930 # `create_time` will be truncated to the nearest second.
931 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted.
932 #
933 # For App Engine queues, this is when the task will be attempted or retried.
934 #
935 # `schedule_time` will be truncated to the nearest microsecond.
936 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the task&#x27;s target.
937 #
938 # An HTTP task is a task that has HttpRequest set.
939 #
940 # The task will be pushed to the worker as an HTTP request. If the worker
941 # or the redirected worker acknowledges the task by returning a successful HTTP
942 # response code ([`200` - `299`]), the task will be removed from the queue. If
943 # any other HTTP response code is returned or no response is received, the
944 # task will be retried according to the following:
945 #
946 # * User-specified throttling: retry configuration,
947 # rate limits, and the queue&#x27;s state.
948 #
949 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
950 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
951 # will not be changed.
952 #
953 # System throttling happens because:
954 #
955 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
956 # rate limits will be used. But if the worker returns
957 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
958 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
959 # specified in the `Retry-After` HTTP response header is considered.
960 #
961 # * To prevent traffic spikes and to smooth sudden increases in traffic,
962 # dispatches ramp up slowly when the queue is newly created or idle and
963 # if large numbers of tasks suddenly become available to dispatch (due to
964 # spikes in create task rates, the queue being unpaused, or many tasks
965 # that are scheduled at the same time).
966 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700967 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700968 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
969 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
970 # encode some characters for safety and compatibility. The maximum allowed
971 # URL length is 2083 characters after encoding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700972 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700973 # The `Location` header response from a redirect response [`300` - `399`]
974 # may be followed. The redirect is not counted as a separate attempt.
975 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
976 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
977 # token will be generated and attached as an `Authorization` header in the
978 # HTTP request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700979 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700980 # This type of authorization can be used for many scenarios, including
981 # calling Cloud Run, or endpoints where you intend to validate the token
982 # yourself.
983 # [OpenID Connect
984 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
985 # This type of authorization can be used for many scenarios, including
986 # calling Cloud Run, or endpoints where you intend to validate the token
987 # yourself.
988 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
989 # specified in target will be used.
990 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
991 # to be used for generating OIDC token.
992 # The service account must be within the same project as the queue. The
993 # caller must have iam.serviceAccounts.actAs permission for the service
994 # account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700995 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700996 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
997 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700998 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700999 # A request body is allowed only if the
1000 # HTTP method is POST, PUT, or PATCH. It is an
1001 # error to set body on a task with an incompatible HttpMethod.
1002 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
1003 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
1004 # will be generated and attached as an `Authorization` header in the HTTP
1005 # request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001006 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001007 # This type of authorization should generally only be used when calling
1008 # Google APIs hosted on *.googleapis.com.
1009 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
1010 # This type of authorization should generally only be used when calling Google
1011 # APIs hosted on *.googleapis.com.
1012 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
1013 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
1014 # will be used.
1015 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1016 # to be used for generating OAuth token.
1017 # The service account must be within the same project as the queue. The
1018 # caller must have iam.serviceAccounts.actAs permission for the service
1019 # account.
Dan O'Mearadd494642020-05-01 07:42:23 -07001020 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001021 &quot;headers&quot;: { # HTTP request headers.
Dan O'Mearadd494642020-05-01 07:42:23 -07001022 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001023 # This map contains the header field names and values.
1024 # Headers can be set when the
1025 # task is created.
Dan O'Mearadd494642020-05-01 07:42:23 -07001026 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001027 # These headers represent a subset of the headers that will accompany the
1028 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
1029 #
1030 # A partial list of headers that will be ignored or replaced is:
1031 #
1032 # * Host: This will be computed by Cloud Tasks and derived from
1033 # HttpRequest.url.
1034 # * Content-Length: This will be computed by Cloud Tasks.
1035 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
1036 # * X-Google-*: Google use only.
1037 # * X-AppEngine-*: Google use only.
1038 #
1039 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
1040 # `Content-Type` to a media type when the
1041 # task is created.
1042 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
1043 # `&quot;application/json&quot;`.
1044 #
1045 # Headers which can have multiple values (according to RFC2616) can be
1046 # specified using comma-separated values.
1047 #
1048 # The size of the headers must be less than 80KB.
1049 &quot;a_key&quot;: &quot;A String&quot;,
1050 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001051 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001052 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
Dan O'Mearadd494642020-05-01 07:42:23 -07001053 #
1054 # The task name.
1055 #
1056 # The task name must have the following format:
1057 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
1058 #
1059 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1060 # hyphens (-), colons (:), or periods (.).
1061 # For more information, see
1062 # [Identifying
1063 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -07001064 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
Dan O'Mearadd494642020-05-01 07:42:23 -07001065 # The list of available locations can be obtained by calling
1066 # ListLocations.
1067 # For more information, see https://cloud.google.com/about/locations/.
1068 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1069 # hyphens (-). The maximum length is 100 characters.
1070 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1071 # hyphens (-), or underscores (_). The maximum length is 500 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001072 }</pre>
1073</div>
1074
1075<div class="method">
1076 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
1077 <pre>Deletes a task.
1078
1079A task can be deleted if it is scheduled or dispatched. A task
1080cannot be deleted if it has executed successfully or permanently
1081failed.
1082
1083Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001084 name: string, Required. The task name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001085`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required)
1086 x__xgafv: string, V1 error format.
1087 Allowed values
1088 1 - v1 error format
1089 2 - v2 error format
1090
1091Returns:
1092 An object of the form:
1093
1094 { # A generic empty message that you can re-use to avoid defining duplicated
1095 # empty messages in your APIs. A typical example is to use it as the request
1096 # or the response type of an API method. For instance:
1097 #
1098 # service Foo {
1099 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1100 # }
1101 #
1102 # The JSON representation for `Empty` is empty JSON object `{}`.
1103 }</pre>
1104</div>
1105
1106<div class="method">
1107 <code class="details" id="get">get(name, responseView=None, x__xgafv=None)</code>
1108 <pre>Gets a task.
1109
1110Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001111 name: string, Required. The task name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001112`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required)
1113 responseView: string, The response_view specifies which subset of the Task will be
1114returned.
1115
1116By default response_view is BASIC; not all
1117information is retrieved by default because some data, such as
1118payloads, might be desirable to return only when needed because
1119of its large size or because of the sensitivity of data that it
1120contains.
1121
1122Authorization for FULL requires
1123`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
1124permission on the Task resource.
1125 x__xgafv: string, V1 error format.
1126 Allowed values
1127 1 - v1 error format
1128 2 - v2 error format
1129
1130Returns:
1131 An object of the form:
1132
1133 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -07001134 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
1135 # respond by this deadline then the request is cancelled and the attempt
1136 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
1137 # task according to the RetryConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001138 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001139 # Note that when the request is cancelled, Cloud Tasks will stop listing for
1140 # the response, but whether the worker stops processing depends on the
1141 # worker. For example, if the worker is stuck, it may not react to cancelled
1142 # requests.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001143 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001144 # The default and maximum values depend on the type of request:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001145 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001146 # * For HTTP tasks, the default is 10 minutes. The deadline
1147 # must be in the interval [15 seconds, 30 minutes].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001148 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001149 # * For App Engine tasks, 0 indicates that the
1150 # request has the default deadline. The default deadline depends on the
1151 # [scaling
1152 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
1153 # of the service: 10 minutes for standard apps with automatic scaling, 24
1154 # hours for standard apps with manual and basic scaling, and 60 minutes for
1155 # flex apps. If the request deadline is set, it must be in the interval [15
1156 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
1157 # `dispatch_deadline`, the app handler will not run for longer than than
1158 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
1159 # at most a few seconds more than the app handler&#x27;s timeout. For more
1160 # information see
1161 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001162 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001163 # `dispatch_deadline` will be truncated to the nearest millisecond. The
1164 # deadline is an approximate deadline.
1165 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001166 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001167 # Only dispatch_time will be set.
1168 # The other Attempt information is not retained by Cloud Tasks.
1169 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001170 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001171 # `schedule_time` will be truncated to the nearest microsecond.
1172 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
Dan O'Mearadd494642020-05-01 07:42:23 -07001173 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001174 # `dispatch_time` will be truncated to the nearest microsecond.
1175 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
Dan O'Mearadd494642020-05-01 07:42:23 -07001176 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001177 # `response_time` will be truncated to the nearest microsecond.
1178 &quot;responseStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the worker for this attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07001179 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001180 # If `response_time` is unset, then the task has not been attempted or is
1181 # currently running and the `response_status` field is meaningless.
1182 # different programming environments, including REST APIs and RPC APIs. It is
1183 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1184 # three pieces of data: error code, error message, and error details.
Dan O'Mearadd494642020-05-01 07:42:23 -07001185 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001186 # You can find out more about this error model and how to work with it in the
1187 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1188 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1189 # user-facing error message should be localized and sent in the
1190 # google.rpc.Status.details field, or localized by the client.
1191 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1192 # message types for APIs to use.
1193 {
1194 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1195 },
1196 ],
1197 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dan O'Mearadd494642020-05-01 07:42:23 -07001198 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001199 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001200 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
1201 #
1202 # This count includes attempts which have been dispatched but haven&#x27;t
1203 # received a response.
1204 &quot;lastAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s last attempt.
1205 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
1206 #
1207 # `schedule_time` will be truncated to the nearest microsecond.
1208 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
1209 #
1210 # `dispatch_time` will be truncated to the nearest microsecond.
1211 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
1212 #
1213 # `response_time` will be truncated to the nearest microsecond.
1214 &quot;responseStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the worker for this attempt.
1215 #
1216 # If `response_time` is unset, then the task has not been attempted or is
1217 # currently running and the `response_status` field is meaningless.
1218 # different programming environments, including REST APIs and RPC APIs. It is
1219 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1220 # three pieces of data: error code, error message, and error details.
1221 #
1222 # You can find out more about this error model and how to work with it in the
1223 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1224 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1225 # user-facing error message should be localized and sent in the
1226 # google.rpc.Status.details field, or localized by the client.
1227 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1228 # message types for APIs to use.
1229 {
1230 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1231 },
1232 ],
1233 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1234 },
1235 },
1236 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
1237 &quot;appEngineHttpRequest&quot;: { # App Engine HTTP request. # HTTP request that is sent to the App Engine app handler.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001238 #
1239 # An App Engine task is a task that has AppEngineHttpRequest set.
1240 #
1241 # The message defines the HTTP request that is sent to an App Engine app when
1242 # the task is dispatched.
1243 #
1244 # Using AppEngineHttpRequest requires
1245 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1246 # Google IAM permission for the project
1247 # and the following scope:
1248 #
1249 # `https://www.googleapis.com/auth/cloud-platform`
1250 #
1251 # The task will be delivered to the App Engine app which belongs to the same
1252 # project as the queue. For more information, see
1253 # [How Requests are
1254 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1255 # and how routing is affected by
1256 # [dispatch
1257 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
1258 # Traffic is encrypted during transport and never leaves Google datacenters.
1259 # Because this traffic is carried over a communication mechanism internal to
1260 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
1261 # The request to the handler, however, will appear to have used the HTTP
1262 # protocol.
1263 #
1264 # The AppEngineRouting used to construct the URL that the task is
1265 # delivered to can be set at the queue-level or task-level:
1266 #
1267 # * If set,
Dan O'Mearadd494642020-05-01 07:42:23 -07001268 # app_engine_routing_override
1269 # is used for all tasks in the queue, no matter what the setting
1270 # is for the
1271 # task-level app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001272 #
1273 #
1274 # The `url` that the task will be sent to is:
1275 #
1276 # * `url =` host `+`
1277 # relative_uri
1278 #
1279 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
1280 # URIs restricted with
1281 # [`login:
1282 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
1283 # Because tasks are not run as any user, they cannot be dispatched to URIs
1284 # restricted with
1285 # [`login:
1286 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
1287 # Task dispatches also do not follow redirects.
1288 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001289 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001290 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -07001291 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001292 # not receive response before the deadline. Failed
1293 # tasks will be retried according to the
1294 # retry configuration. `503` (Service Unavailable) is
1295 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -07001296 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
1297 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001298 # Requests) response from an app handler does not cause traffic congestion
1299 # control to throttle the queue.
Bu Sun Kim65020912020-05-20 12:08:20 -07001300 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001301 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001302 # This map contains the header field names and values.
1303 # Headers can be set when the
1304 # task is created.
1305 # Repeated headers are not supported but a header value can contain commas.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001306 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001307 # Cloud Tasks sets some headers to default values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001308 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001309 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -07001310 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -07001311 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -07001312 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Dan O'Mearadd494642020-05-01 07:42:23 -07001313 # modified `User-Agent`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001314 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001315 # If the task has a body, Cloud
1316 # Tasks sets the following headers:
1317 #
1318 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -07001319 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Dan O'Mearadd494642020-05-01 07:42:23 -07001320 # setting `Content-Type` to a particular media type when the
1321 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07001322 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -07001323 # * `Content-Length`: This is computed by Cloud Tasks. This value is
1324 # output only. It cannot be changed.
1325 #
1326 # The headers below cannot be set or overridden:
1327 #
1328 # * `Host`
1329 # * `X-Google-*`
1330 # * `X-AppEngine-*`
1331 #
1332 # In addition, Cloud Tasks sets some headers when the task is dispatched,
1333 # such as headers containing information about the task; see
1334 # [request
1335 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
1336 # These headers are set only when the task is dispatched, so they are not
1337 # visible when the task is returned in a Cloud Tasks response.
1338 #
1339 # Although there is no specific limit for the maximum number of headers or
1340 # the size, there is a limit on the maximum size of the Task. For more
1341 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001342 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001343 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001344 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
1345 #
1346 # If set,
1347 # app_engine_routing_override
1348 # is used for all tasks in the queue, no matter what the setting is for the
1349 # task-level app_engine_routing.
1350 #
1351 # Defines routing characteristics specific to App Engine - service, version,
1352 # and instance.
1353 #
1354 # For more information about services, versions, and instances see
1355 # [An Overview of App
1356 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1357 # [Microservices Architecture on Google App
1358 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1359 # [App Engine Standard request
1360 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1361 # and [App Engine Flex request
1362 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1363 &quot;version&quot;: &quot;A String&quot;, # App version.
1364 #
1365 # By default, the task is sent to the version which is the default
1366 # version when the task is attempted.
1367 #
1368 # For some queues or tasks which were created using the App Engine
1369 # Task Queue API, host is not parsable
1370 # into service,
1371 # version, and
1372 # instance. For example, some tasks
1373 # which were created using the App Engine SDK use a custom domain
1374 # name; custom domains are not parsed by Cloud Tasks. If
1375 # host is not parsable, then
1376 # service,
1377 # version, and
1378 # instance are the empty string.
1379 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1380 #
1381 # The host is constructed from the domain name of the app associated with
1382 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1383 # service, version,
1384 # and instance. Tasks which were created using
1385 # the App Engine SDK might have a custom domain name.
1386 #
1387 # For more information, see
1388 # [How Requests are
1389 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1390 &quot;service&quot;: &quot;A String&quot;, # App service.
1391 #
1392 # By default, the task is sent to the service which is the default
1393 # service when the task is attempted.
1394 #
1395 # For some queues or tasks which were created using the App Engine
1396 # Task Queue API, host is not parsable
1397 # into service,
1398 # version, and
1399 # instance. For example, some tasks
1400 # which were created using the App Engine SDK use a custom domain
1401 # name; custom domains are not parsed by Cloud Tasks. If
1402 # host is not parsable, then
1403 # service,
1404 # version, and
1405 # instance are the empty string.
1406 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1407 #
1408 # By default, the task is sent to an instance which is available when
1409 # the task is attempted.
1410 #
1411 # Requests can only be sent to a specific instance if
1412 # [manual scaling is used in App Engine
1413 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1414 # App Engine Flex does not support instances. For more information, see
1415 # [App Engine Standard request
1416 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1417 # and [App Engine Flex request
1418 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1419 },
1420 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
1421 #
1422 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
1423 # HTTP requests with this http_method, otherwise the task attempt fails with
1424 # error code 405 (Method Not Allowed). See [Writing a push task request
1425 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
1426 # and the App Engine documentation for your runtime on [How Requests are
1427 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
1428 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
1429 #
1430 # A request body is allowed only if the HTTP method is POST or PUT. It is
1431 # an error to set a body on a task with an incompatible HttpMethod.
1432 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
1433 #
1434 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
1435 # It can contain a path and query string arguments.
1436 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
1437 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001438 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001439 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
1440 # been returned.
1441 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001442 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001443 # `create_time` will be truncated to the nearest second.
1444 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted.
1445 #
1446 # For App Engine queues, this is when the task will be attempted or retried.
1447 #
1448 # `schedule_time` will be truncated to the nearest microsecond.
1449 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the task&#x27;s target.
1450 #
1451 # An HTTP task is a task that has HttpRequest set.
1452 #
1453 # The task will be pushed to the worker as an HTTP request. If the worker
1454 # or the redirected worker acknowledges the task by returning a successful HTTP
1455 # response code ([`200` - `299`]), the task will be removed from the queue. If
1456 # any other HTTP response code is returned or no response is received, the
1457 # task will be retried according to the following:
1458 #
1459 # * User-specified throttling: retry configuration,
1460 # rate limits, and the queue&#x27;s state.
1461 #
1462 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
1463 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
1464 # will not be changed.
1465 #
1466 # System throttling happens because:
1467 #
1468 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
1469 # rate limits will be used. But if the worker returns
1470 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
1471 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
1472 # specified in the `Retry-After` HTTP response header is considered.
1473 #
1474 # * To prevent traffic spikes and to smooth sudden increases in traffic,
1475 # dispatches ramp up slowly when the queue is newly created or idle and
1476 # if large numbers of tasks suddenly become available to dispatch (due to
1477 # spikes in create task rates, the queue being unpaused, or many tasks
1478 # that are scheduled at the same time).
1479 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001480 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001481 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
1482 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
1483 # encode some characters for safety and compatibility. The maximum allowed
1484 # URL length is 2083 characters after encoding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001485 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001486 # The `Location` header response from a redirect response [`300` - `399`]
1487 # may be followed. The redirect is not counted as a separate attempt.
1488 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
1489 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
1490 # token will be generated and attached as an `Authorization` header in the
1491 # HTTP request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001493 # This type of authorization can be used for many scenarios, including
1494 # calling Cloud Run, or endpoints where you intend to validate the token
1495 # yourself.
1496 # [OpenID Connect
1497 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
1498 # This type of authorization can be used for many scenarios, including
1499 # calling Cloud Run, or endpoints where you intend to validate the token
1500 # yourself.
1501 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
1502 # specified in target will be used.
1503 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1504 # to be used for generating OIDC token.
1505 # The service account must be within the same project as the queue. The
1506 # caller must have iam.serviceAccounts.actAs permission for the service
1507 # account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001508 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001509 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
1510 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001511 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001512 # A request body is allowed only if the
1513 # HTTP method is POST, PUT, or PATCH. It is an
1514 # error to set body on a task with an incompatible HttpMethod.
1515 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
1516 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
1517 # will be generated and attached as an `Authorization` header in the HTTP
1518 # request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001519 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001520 # This type of authorization should generally only be used when calling
1521 # Google APIs hosted on *.googleapis.com.
1522 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
1523 # This type of authorization should generally only be used when calling Google
1524 # APIs hosted on *.googleapis.com.
1525 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
1526 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
1527 # will be used.
1528 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1529 # to be used for generating OAuth token.
1530 # The service account must be within the same project as the queue. The
1531 # caller must have iam.serviceAccounts.actAs permission for the service
1532 # account.
Dan O'Mearadd494642020-05-01 07:42:23 -07001533 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001534 &quot;headers&quot;: { # HTTP request headers.
Dan O'Mearadd494642020-05-01 07:42:23 -07001535 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001536 # This map contains the header field names and values.
1537 # Headers can be set when the
1538 # task is created.
Dan O'Mearadd494642020-05-01 07:42:23 -07001539 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001540 # These headers represent a subset of the headers that will accompany the
1541 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
1542 #
1543 # A partial list of headers that will be ignored or replaced is:
1544 #
1545 # * Host: This will be computed by Cloud Tasks and derived from
1546 # HttpRequest.url.
1547 # * Content-Length: This will be computed by Cloud Tasks.
1548 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
1549 # * X-Google-*: Google use only.
1550 # * X-AppEngine-*: Google use only.
1551 #
1552 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
1553 # `Content-Type` to a media type when the
1554 # task is created.
1555 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
1556 # `&quot;application/json&quot;`.
1557 #
1558 # Headers which can have multiple values (according to RFC2616) can be
1559 # specified using comma-separated values.
1560 #
1561 # The size of the headers must be less than 80KB.
1562 &quot;a_key&quot;: &quot;A String&quot;,
1563 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001564 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001565 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
Dan O'Mearadd494642020-05-01 07:42:23 -07001566 #
1567 # The task name.
1568 #
1569 # The task name must have the following format:
1570 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
1571 #
1572 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1573 # hyphens (-), colons (:), or periods (.).
1574 # For more information, see
1575 # [Identifying
1576 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -07001577 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
Dan O'Mearadd494642020-05-01 07:42:23 -07001578 # The list of available locations can be obtained by calling
1579 # ListLocations.
1580 # For more information, see https://cloud.google.com/about/locations/.
1581 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1582 # hyphens (-). The maximum length is 100 characters.
1583 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1584 # hyphens (-), or underscores (_). The maximum length is 500 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001585 }</pre>
1586</div>
1587
1588<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001589 <code class="details" id="list">list(parent, responseView=None, pageToken=None, pageSize=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001590 <pre>Lists the tasks in a queue.
1591
1592By default, only the BASIC view is retrieved
1593due to performance considerations;
1594response_view controls the
1595subset of information which is returned.
1596
1597The tasks may be returned in any order. The ordering may change at any
1598time.
1599
1600Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001601 parent: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001602`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
1603 responseView: string, The response_view specifies which subset of the Task will be
1604returned.
1605
1606By default response_view is BASIC; not all
1607information is retrieved by default because some data, such as
1608payloads, might be desirable to return only when needed because
1609of its large size or because of the sensitivity of data that it
1610contains.
1611
1612Authorization for FULL requires
1613`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
1614permission on the Task resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001615 pageToken: string, A token identifying the page of results to return.
1616
1617To request the first page results, page_token must be empty. To
1618request the next page of results, page_token must be the value of
1619next_page_token returned
1620from the previous call to ListTasks
1621method.
1622
1623The page token is valid for only 2 hours.
Bu Sun Kim65020912020-05-20 12:08:20 -07001624 pageSize: integer, Maximum page size.
1625
1626Fewer tasks than requested might be returned, even if more tasks exist; use
1627next_page_token in the response to
1628determine if more tasks exist.
1629
1630The maximum page size is 1000. If unspecified, the page size will be the
1631maximum.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001632 x__xgafv: string, V1 error format.
1633 Allowed values
1634 1 - v1 error format
1635 2 - v2 error format
1636
1637Returns:
1638 An object of the form:
1639
1640 { # Response message for listing tasks using ListTasks.
Bu Sun Kim65020912020-05-20 12:08:20 -07001641 &quot;tasks&quot;: [ # The list of tasks.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001642 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -07001643 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
1644 # respond by this deadline then the request is cancelled and the attempt
1645 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
1646 # task according to the RetryConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001647 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001648 # Note that when the request is cancelled, Cloud Tasks will stop listing for
1649 # the response, but whether the worker stops processing depends on the
1650 # worker. For example, if the worker is stuck, it may not react to cancelled
1651 # requests.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001652 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001653 # The default and maximum values depend on the type of request:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001654 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001655 # * For HTTP tasks, the default is 10 minutes. The deadline
1656 # must be in the interval [15 seconds, 30 minutes].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001657 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001658 # * For App Engine tasks, 0 indicates that the
1659 # request has the default deadline. The default deadline depends on the
1660 # [scaling
1661 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
1662 # of the service: 10 minutes for standard apps with automatic scaling, 24
1663 # hours for standard apps with manual and basic scaling, and 60 minutes for
1664 # flex apps. If the request deadline is set, it must be in the interval [15
1665 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
1666 # `dispatch_deadline`, the app handler will not run for longer than than
1667 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
1668 # at most a few seconds more than the app handler&#x27;s timeout. For more
1669 # information see
1670 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001671 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001672 # `dispatch_deadline` will be truncated to the nearest millisecond. The
1673 # deadline is an approximate deadline.
1674 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001675 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001676 # Only dispatch_time will be set.
1677 # The other Attempt information is not retained by Cloud Tasks.
1678 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001679 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001680 # `schedule_time` will be truncated to the nearest microsecond.
1681 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
Dan O'Mearadd494642020-05-01 07:42:23 -07001682 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001683 # `dispatch_time` will be truncated to the nearest microsecond.
1684 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
Dan O'Mearadd494642020-05-01 07:42:23 -07001685 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001686 # `response_time` will be truncated to the nearest microsecond.
1687 &quot;responseStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the worker for this attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07001688 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001689 # If `response_time` is unset, then the task has not been attempted or is
1690 # currently running and the `response_status` field is meaningless.
1691 # different programming environments, including REST APIs and RPC APIs. It is
1692 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1693 # three pieces of data: error code, error message, and error details.
Dan O'Mearadd494642020-05-01 07:42:23 -07001694 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001695 # You can find out more about this error model and how to work with it in the
1696 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1697 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1698 # user-facing error message should be localized and sent in the
1699 # google.rpc.Status.details field, or localized by the client.
1700 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1701 # message types for APIs to use.
1702 {
1703 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1704 },
1705 ],
1706 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dan O'Mearadd494642020-05-01 07:42:23 -07001707 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001708 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001709 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
1710 #
1711 # This count includes attempts which have been dispatched but haven&#x27;t
1712 # received a response.
1713 &quot;lastAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s last attempt.
1714 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
1715 #
1716 # `schedule_time` will be truncated to the nearest microsecond.
1717 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
1718 #
1719 # `dispatch_time` will be truncated to the nearest microsecond.
1720 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
1721 #
1722 # `response_time` will be truncated to the nearest microsecond.
1723 &quot;responseStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the worker for this attempt.
1724 #
1725 # If `response_time` is unset, then the task has not been attempted or is
1726 # currently running and the `response_status` field is meaningless.
1727 # different programming environments, including REST APIs and RPC APIs. It is
1728 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1729 # three pieces of data: error code, error message, and error details.
1730 #
1731 # You can find out more about this error model and how to work with it in the
1732 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1733 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1734 # user-facing error message should be localized and sent in the
1735 # google.rpc.Status.details field, or localized by the client.
1736 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1737 # message types for APIs to use.
1738 {
1739 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1740 },
1741 ],
1742 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1743 },
1744 },
1745 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
1746 &quot;appEngineHttpRequest&quot;: { # App Engine HTTP request. # HTTP request that is sent to the App Engine app handler.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001747 #
1748 # An App Engine task is a task that has AppEngineHttpRequest set.
1749 #
1750 # The message defines the HTTP request that is sent to an App Engine app when
1751 # the task is dispatched.
1752 #
1753 # Using AppEngineHttpRequest requires
1754 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1755 # Google IAM permission for the project
1756 # and the following scope:
1757 #
1758 # `https://www.googleapis.com/auth/cloud-platform`
1759 #
1760 # The task will be delivered to the App Engine app which belongs to the same
1761 # project as the queue. For more information, see
1762 # [How Requests are
1763 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1764 # and how routing is affected by
1765 # [dispatch
1766 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
1767 # Traffic is encrypted during transport and never leaves Google datacenters.
1768 # Because this traffic is carried over a communication mechanism internal to
1769 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
1770 # The request to the handler, however, will appear to have used the HTTP
1771 # protocol.
1772 #
1773 # The AppEngineRouting used to construct the URL that the task is
1774 # delivered to can be set at the queue-level or task-level:
1775 #
1776 # * If set,
Dan O'Mearadd494642020-05-01 07:42:23 -07001777 # app_engine_routing_override
1778 # is used for all tasks in the queue, no matter what the setting
1779 # is for the
1780 # task-level app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001781 #
1782 #
1783 # The `url` that the task will be sent to is:
1784 #
1785 # * `url =` host `+`
1786 # relative_uri
1787 #
1788 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
1789 # URIs restricted with
1790 # [`login:
1791 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
1792 # Because tasks are not run as any user, they cannot be dispatched to URIs
1793 # restricted with
1794 # [`login:
1795 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
1796 # Task dispatches also do not follow redirects.
1797 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001798 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001799 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -07001800 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001801 # not receive response before the deadline. Failed
1802 # tasks will be retried according to the
1803 # retry configuration. `503` (Service Unavailable) is
1804 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -07001805 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
1806 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001807 # Requests) response from an app handler does not cause traffic congestion
1808 # control to throttle the queue.
Bu Sun Kim65020912020-05-20 12:08:20 -07001809 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001810 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001811 # This map contains the header field names and values.
1812 # Headers can be set when the
1813 # task is created.
1814 # Repeated headers are not supported but a header value can contain commas.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001815 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001816 # Cloud Tasks sets some headers to default values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001817 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001818 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -07001819 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -07001820 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -07001821 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Dan O'Mearadd494642020-05-01 07:42:23 -07001822 # modified `User-Agent`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001823 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001824 # If the task has a body, Cloud
1825 # Tasks sets the following headers:
1826 #
1827 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -07001828 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Dan O'Mearadd494642020-05-01 07:42:23 -07001829 # setting `Content-Type` to a particular media type when the
1830 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07001831 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -07001832 # * `Content-Length`: This is computed by Cloud Tasks. This value is
1833 # output only. It cannot be changed.
1834 #
1835 # The headers below cannot be set or overridden:
1836 #
1837 # * `Host`
1838 # * `X-Google-*`
1839 # * `X-AppEngine-*`
1840 #
1841 # In addition, Cloud Tasks sets some headers when the task is dispatched,
1842 # such as headers containing information about the task; see
1843 # [request
1844 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
1845 # These headers are set only when the task is dispatched, so they are not
1846 # visible when the task is returned in a Cloud Tasks response.
1847 #
1848 # Although there is no specific limit for the maximum number of headers or
1849 # the size, there is a limit on the maximum size of the Task. For more
1850 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001851 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001852 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001853 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
1854 #
1855 # If set,
1856 # app_engine_routing_override
1857 # is used for all tasks in the queue, no matter what the setting is for the
1858 # task-level app_engine_routing.
1859 #
1860 # Defines routing characteristics specific to App Engine - service, version,
1861 # and instance.
1862 #
1863 # For more information about services, versions, and instances see
1864 # [An Overview of App
1865 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1866 # [Microservices Architecture on Google App
1867 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1868 # [App Engine Standard request
1869 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1870 # and [App Engine Flex request
1871 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1872 &quot;version&quot;: &quot;A String&quot;, # App version.
1873 #
1874 # By default, the task is sent to the version which is the default
1875 # version when the task is attempted.
1876 #
1877 # For some queues or tasks which were created using the App Engine
1878 # Task Queue API, host is not parsable
1879 # into service,
1880 # version, and
1881 # instance. For example, some tasks
1882 # which were created using the App Engine SDK use a custom domain
1883 # name; custom domains are not parsed by Cloud Tasks. If
1884 # host is not parsable, then
1885 # service,
1886 # version, and
1887 # instance are the empty string.
1888 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1889 #
1890 # The host is constructed from the domain name of the app associated with
1891 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1892 # service, version,
1893 # and instance. Tasks which were created using
1894 # the App Engine SDK might have a custom domain name.
1895 #
1896 # For more information, see
1897 # [How Requests are
1898 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1899 &quot;service&quot;: &quot;A String&quot;, # App service.
1900 #
1901 # By default, the task is sent to the service which is the default
1902 # service when the task is attempted.
1903 #
1904 # For some queues or tasks which were created using the App Engine
1905 # Task Queue API, host is not parsable
1906 # into service,
1907 # version, and
1908 # instance. For example, some tasks
1909 # which were created using the App Engine SDK use a custom domain
1910 # name; custom domains are not parsed by Cloud Tasks. If
1911 # host is not parsable, then
1912 # service,
1913 # version, and
1914 # instance are the empty string.
1915 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1916 #
1917 # By default, the task is sent to an instance which is available when
1918 # the task is attempted.
1919 #
1920 # Requests can only be sent to a specific instance if
1921 # [manual scaling is used in App Engine
1922 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1923 # App Engine Flex does not support instances. For more information, see
1924 # [App Engine Standard request
1925 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1926 # and [App Engine Flex request
1927 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1928 },
1929 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
1930 #
1931 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
1932 # HTTP requests with this http_method, otherwise the task attempt fails with
1933 # error code 405 (Method Not Allowed). See [Writing a push task request
1934 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
1935 # and the App Engine documentation for your runtime on [How Requests are
1936 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
1937 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
1938 #
1939 # A request body is allowed only if the HTTP method is POST or PUT. It is
1940 # an error to set a body on a task with an incompatible HttpMethod.
1941 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
1942 #
1943 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
1944 # It can contain a path and query string arguments.
1945 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
1946 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001947 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001948 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
1949 # been returned.
1950 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001951 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001952 # `create_time` will be truncated to the nearest second.
1953 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted.
1954 #
1955 # For App Engine queues, this is when the task will be attempted or retried.
1956 #
1957 # `schedule_time` will be truncated to the nearest microsecond.
1958 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the task&#x27;s target.
1959 #
1960 # An HTTP task is a task that has HttpRequest set.
1961 #
1962 # The task will be pushed to the worker as an HTTP request. If the worker
1963 # or the redirected worker acknowledges the task by returning a successful HTTP
1964 # response code ([`200` - `299`]), the task will be removed from the queue. If
1965 # any other HTTP response code is returned or no response is received, the
1966 # task will be retried according to the following:
1967 #
1968 # * User-specified throttling: retry configuration,
1969 # rate limits, and the queue&#x27;s state.
1970 #
1971 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
1972 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
1973 # will not be changed.
1974 #
1975 # System throttling happens because:
1976 #
1977 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
1978 # rate limits will be used. But if the worker returns
1979 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
1980 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
1981 # specified in the `Retry-After` HTTP response header is considered.
1982 #
1983 # * To prevent traffic spikes and to smooth sudden increases in traffic,
1984 # dispatches ramp up slowly when the queue is newly created or idle and
1985 # if large numbers of tasks suddenly become available to dispatch (due to
1986 # spikes in create task rates, the queue being unpaused, or many tasks
1987 # that are scheduled at the same time).
1988 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001989 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001990 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
1991 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
1992 # encode some characters for safety and compatibility. The maximum allowed
1993 # URL length is 2083 characters after encoding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001994 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001995 # The `Location` header response from a redirect response [`300` - `399`]
1996 # may be followed. The redirect is not counted as a separate attempt.
1997 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
1998 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
1999 # token will be generated and attached as an `Authorization` header in the
2000 # HTTP request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002001 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002002 # This type of authorization can be used for many scenarios, including
2003 # calling Cloud Run, or endpoints where you intend to validate the token
2004 # yourself.
2005 # [OpenID Connect
2006 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
2007 # This type of authorization can be used for many scenarios, including
2008 # calling Cloud Run, or endpoints where you intend to validate the token
2009 # yourself.
2010 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
2011 # specified in target will be used.
2012 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2013 # to be used for generating OIDC token.
2014 # The service account must be within the same project as the queue. The
2015 # caller must have iam.serviceAccounts.actAs permission for the service
2016 # account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002017 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002018 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
2019 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002020 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002021 # A request body is allowed only if the
2022 # HTTP method is POST, PUT, or PATCH. It is an
2023 # error to set body on a task with an incompatible HttpMethod.
2024 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
2025 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
2026 # will be generated and attached as an `Authorization` header in the HTTP
2027 # request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002028 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002029 # This type of authorization should generally only be used when calling
2030 # Google APIs hosted on *.googleapis.com.
2031 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
2032 # This type of authorization should generally only be used when calling Google
2033 # APIs hosted on *.googleapis.com.
2034 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
2035 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
2036 # will be used.
2037 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2038 # to be used for generating OAuth token.
2039 # The service account must be within the same project as the queue. The
2040 # caller must have iam.serviceAccounts.actAs permission for the service
2041 # account.
Dan O'Mearadd494642020-05-01 07:42:23 -07002042 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002043 &quot;headers&quot;: { # HTTP request headers.
Dan O'Mearadd494642020-05-01 07:42:23 -07002044 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002045 # This map contains the header field names and values.
2046 # Headers can be set when the
2047 # task is created.
Dan O'Mearadd494642020-05-01 07:42:23 -07002048 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002049 # These headers represent a subset of the headers that will accompany the
2050 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
2051 #
2052 # A partial list of headers that will be ignored or replaced is:
2053 #
2054 # * Host: This will be computed by Cloud Tasks and derived from
2055 # HttpRequest.url.
2056 # * Content-Length: This will be computed by Cloud Tasks.
2057 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
2058 # * X-Google-*: Google use only.
2059 # * X-AppEngine-*: Google use only.
2060 #
2061 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
2062 # `Content-Type` to a media type when the
2063 # task is created.
2064 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
2065 # `&quot;application/json&quot;`.
2066 #
2067 # Headers which can have multiple values (according to RFC2616) can be
2068 # specified using comma-separated values.
2069 #
2070 # The size of the headers must be less than 80KB.
2071 &quot;a_key&quot;: &quot;A String&quot;,
2072 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002073 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002074 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
Dan O'Mearadd494642020-05-01 07:42:23 -07002075 #
2076 # The task name.
2077 #
2078 # The task name must have the following format:
2079 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
2080 #
2081 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2082 # hyphens (-), colons (:), or periods (.).
2083 # For more information, see
2084 # [Identifying
2085 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -07002086 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
Dan O'Mearadd494642020-05-01 07:42:23 -07002087 # The list of available locations can be obtained by calling
2088 # ListLocations.
2089 # For more information, see https://cloud.google.com/about/locations/.
2090 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2091 # hyphens (-). The maximum length is 100 characters.
2092 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
2093 # hyphens (-), or underscores (_). The maximum length is 500 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002094 },
2095 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002096 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results.
2097 #
2098 # To return the next page of results, call
2099 # ListTasks with this value as the
2100 # page_token.
2101 #
2102 # If the next_page_token is empty, there are no more results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002103 }</pre>
2104</div>
2105
2106<div class="method">
2107 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2108 <pre>Retrieves the next page of results.
2109
2110Args:
2111 previous_request: The request for the previous page. (required)
2112 previous_response: The response from the request for the previous page. (required)
2113
2114Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002115 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002116 page. Returns None if there are no more items in the collection.
2117 </pre>
2118</div>
2119
2120<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002121 <code class="details" id="run">run(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002122 <pre>Forces a task to run now.
2123
2124When this method is called, Cloud Tasks will dispatch the task, even if
2125the task is already running, the queue has reached its RateLimits or
2126is PAUSED.
2127
2128This command is meant to be used for manual debugging. For
2129example, RunTask can be used to retry a failed
2130task after a fix has been made or to manually force a task to be
2131dispatched now.
2132
2133The dispatched task is returned. That is, the task that is returned
2134contains the status after the task is dispatched but
2135before the task is received by its target.
2136
Bu Sun Kim65020912020-05-20 12:08:20 -07002137If Cloud Tasks receives a successful response from the task&#x27;s
2138target, then the task will be deleted; otherwise the task&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002139schedule_time will be reset to the time that
2140RunTask was called plus the retry delay specified
Bu Sun Kim65020912020-05-20 12:08:20 -07002141in the queue&#x27;s RetryConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002142
2143RunTask returns
2144NOT_FOUND when it is called on a
2145task that has already succeeded or permanently failed.
2146
2147Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002148 name: string, Required. The task name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002149`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002150 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002151 The object takes the form of:
2152
2153{ # Request message for forcing a task to run now using
2154 # RunTask.
Bu Sun Kim65020912020-05-20 12:08:20 -07002155 &quot;responseView&quot;: &quot;A String&quot;, # The response_view specifies which subset of the Task will be
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002156 # returned.
2157 #
2158 # By default response_view is BASIC; not all
2159 # information is retrieved by default because some data, such as
2160 # payloads, might be desirable to return only when needed because
2161 # of its large size or because of the sensitivity of data that it
2162 # contains.
2163 #
2164 # Authorization for FULL requires
2165 # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
2166 # permission on the Task resource.
2167 }
2168
2169 x__xgafv: string, V1 error format.
2170 Allowed values
2171 1 - v1 error format
2172 2 - v2 error format
2173
2174Returns:
2175 An object of the form:
2176
2177 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -07002178 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
2179 # respond by this deadline then the request is cancelled and the attempt
2180 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
2181 # task according to the RetryConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002182 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002183 # Note that when the request is cancelled, Cloud Tasks will stop listing for
2184 # the response, but whether the worker stops processing depends on the
2185 # worker. For example, if the worker is stuck, it may not react to cancelled
2186 # requests.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002187 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002188 # The default and maximum values depend on the type of request:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002189 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002190 # * For HTTP tasks, the default is 10 minutes. The deadline
2191 # must be in the interval [15 seconds, 30 minutes].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002192 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002193 # * For App Engine tasks, 0 indicates that the
2194 # request has the default deadline. The default deadline depends on the
2195 # [scaling
2196 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
2197 # of the service: 10 minutes for standard apps with automatic scaling, 24
2198 # hours for standard apps with manual and basic scaling, and 60 minutes for
2199 # flex apps. If the request deadline is set, it must be in the interval [15
2200 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
2201 # `dispatch_deadline`, the app handler will not run for longer than than
2202 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
2203 # at most a few seconds more than the app handler&#x27;s timeout. For more
2204 # information see
2205 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002206 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002207 # `dispatch_deadline` will be truncated to the nearest millisecond. The
2208 # deadline is an approximate deadline.
2209 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002210 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002211 # Only dispatch_time will be set.
2212 # The other Attempt information is not retained by Cloud Tasks.
2213 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002214 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002215 # `schedule_time` will be truncated to the nearest microsecond.
2216 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
Dan O'Mearadd494642020-05-01 07:42:23 -07002217 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002218 # `dispatch_time` will be truncated to the nearest microsecond.
2219 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
Dan O'Mearadd494642020-05-01 07:42:23 -07002220 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002221 # `response_time` will be truncated to the nearest microsecond.
2222 &quot;responseStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the worker for this attempt.
Dan O'Mearadd494642020-05-01 07:42:23 -07002223 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002224 # If `response_time` is unset, then the task has not been attempted or is
2225 # currently running and the `response_status` field is meaningless.
2226 # different programming environments, including REST APIs and RPC APIs. It is
2227 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2228 # three pieces of data: error code, error message, and error details.
Dan O'Mearadd494642020-05-01 07:42:23 -07002229 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002230 # You can find out more about this error model and how to work with it in the
2231 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2232 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2233 # user-facing error message should be localized and sent in the
2234 # google.rpc.Status.details field, or localized by the client.
2235 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2236 # message types for APIs to use.
2237 {
2238 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2239 },
2240 ],
2241 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Dan O'Mearadd494642020-05-01 07:42:23 -07002242 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002243 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002244 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
2245 #
2246 # This count includes attempts which have been dispatched but haven&#x27;t
2247 # received a response.
2248 &quot;lastAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s last attempt.
2249 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
2250 #
2251 # `schedule_time` will be truncated to the nearest microsecond.
2252 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
2253 #
2254 # `dispatch_time` will be truncated to the nearest microsecond.
2255 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
2256 #
2257 # `response_time` will be truncated to the nearest microsecond.
2258 &quot;responseStatus&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the worker for this attempt.
2259 #
2260 # If `response_time` is unset, then the task has not been attempted or is
2261 # currently running and the `response_status` field is meaningless.
2262 # different programming environments, including REST APIs and RPC APIs. It is
2263 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2264 # three pieces of data: error code, error message, and error details.
2265 #
2266 # You can find out more about this error model and how to work with it in the
2267 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2268 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2269 # user-facing error message should be localized and sent in the
2270 # google.rpc.Status.details field, or localized by the client.
2271 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2272 # message types for APIs to use.
2273 {
2274 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2275 },
2276 ],
2277 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2278 },
2279 },
2280 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
2281 &quot;appEngineHttpRequest&quot;: { # App Engine HTTP request. # HTTP request that is sent to the App Engine app handler.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002282 #
2283 # An App Engine task is a task that has AppEngineHttpRequest set.
2284 #
2285 # The message defines the HTTP request that is sent to an App Engine app when
2286 # the task is dispatched.
2287 #
2288 # Using AppEngineHttpRequest requires
2289 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2290 # Google IAM permission for the project
2291 # and the following scope:
2292 #
2293 # `https://www.googleapis.com/auth/cloud-platform`
2294 #
2295 # The task will be delivered to the App Engine app which belongs to the same
2296 # project as the queue. For more information, see
2297 # [How Requests are
2298 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2299 # and how routing is affected by
2300 # [dispatch
2301 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
2302 # Traffic is encrypted during transport and never leaves Google datacenters.
2303 # Because this traffic is carried over a communication mechanism internal to
2304 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
2305 # The request to the handler, however, will appear to have used the HTTP
2306 # protocol.
2307 #
2308 # The AppEngineRouting used to construct the URL that the task is
2309 # delivered to can be set at the queue-level or task-level:
2310 #
2311 # * If set,
Dan O'Mearadd494642020-05-01 07:42:23 -07002312 # app_engine_routing_override
2313 # is used for all tasks in the queue, no matter what the setting
2314 # is for the
2315 # task-level app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002316 #
2317 #
2318 # The `url` that the task will be sent to is:
2319 #
2320 # * `url =` host `+`
2321 # relative_uri
2322 #
2323 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
2324 # URIs restricted with
2325 # [`login:
2326 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
2327 # Because tasks are not run as any user, they cannot be dispatched to URIs
2328 # restricted with
2329 # [`login:
2330 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
2331 # Task dispatches also do not follow redirects.
2332 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002333 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002334 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -07002335 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002336 # not receive response before the deadline. Failed
2337 # tasks will be retried according to the
2338 # retry configuration. `503` (Service Unavailable) is
2339 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -07002340 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
2341 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002342 # Requests) response from an app handler does not cause traffic congestion
2343 # control to throttle the queue.
Bu Sun Kim65020912020-05-20 12:08:20 -07002344 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002345 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002346 # This map contains the header field names and values.
2347 # Headers can be set when the
2348 # task is created.
2349 # Repeated headers are not supported but a header value can contain commas.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002350 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002351 # Cloud Tasks sets some headers to default values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002352 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002353 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -07002354 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -07002355 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -07002356 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Dan O'Mearadd494642020-05-01 07:42:23 -07002357 # modified `User-Agent`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002358 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002359 # If the task has a body, Cloud
2360 # Tasks sets the following headers:
2361 #
2362 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -07002363 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Dan O'Mearadd494642020-05-01 07:42:23 -07002364 # setting `Content-Type` to a particular media type when the
2365 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07002366 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -07002367 # * `Content-Length`: This is computed by Cloud Tasks. This value is
2368 # output only. It cannot be changed.
2369 #
2370 # The headers below cannot be set or overridden:
2371 #
2372 # * `Host`
2373 # * `X-Google-*`
2374 # * `X-AppEngine-*`
2375 #
2376 # In addition, Cloud Tasks sets some headers when the task is dispatched,
2377 # such as headers containing information about the task; see
2378 # [request
2379 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
2380 # These headers are set only when the task is dispatched, so they are not
2381 # visible when the task is returned in a Cloud Tasks response.
2382 #
2383 # Although there is no specific limit for the maximum number of headers or
2384 # the size, there is a limit on the maximum size of the Task. For more
2385 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002386 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002387 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002388 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
2389 #
2390 # If set,
2391 # app_engine_routing_override
2392 # is used for all tasks in the queue, no matter what the setting is for the
2393 # task-level app_engine_routing.
2394 #
2395 # Defines routing characteristics specific to App Engine - service, version,
2396 # and instance.
2397 #
2398 # For more information about services, versions, and instances see
2399 # [An Overview of App
2400 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2401 # [Microservices Architecture on Google App
2402 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2403 # [App Engine Standard request
2404 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2405 # and [App Engine Flex request
2406 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2407 &quot;version&quot;: &quot;A String&quot;, # App version.
2408 #
2409 # By default, the task is sent to the version which is the default
2410 # version when the task is attempted.
2411 #
2412 # For some queues or tasks which were created using the App Engine
2413 # Task Queue API, host is not parsable
2414 # into service,
2415 # version, and
2416 # instance. For example, some tasks
2417 # which were created using the App Engine SDK use a custom domain
2418 # name; custom domains are not parsed by Cloud Tasks. If
2419 # host is not parsable, then
2420 # service,
2421 # version, and
2422 # instance are the empty string.
2423 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2424 #
2425 # The host is constructed from the domain name of the app associated with
2426 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2427 # service, version,
2428 # and instance. Tasks which were created using
2429 # the App Engine SDK might have a custom domain name.
2430 #
2431 # For more information, see
2432 # [How Requests are
2433 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2434 &quot;service&quot;: &quot;A String&quot;, # App service.
2435 #
2436 # By default, the task is sent to the service which is the default
2437 # service when the task is attempted.
2438 #
2439 # For some queues or tasks which were created using the App Engine
2440 # Task Queue API, host is not parsable
2441 # into service,
2442 # version, and
2443 # instance. For example, some tasks
2444 # which were created using the App Engine SDK use a custom domain
2445 # name; custom domains are not parsed by Cloud Tasks. If
2446 # host is not parsable, then
2447 # service,
2448 # version, and
2449 # instance are the empty string.
2450 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2451 #
2452 # By default, the task is sent to an instance which is available when
2453 # the task is attempted.
2454 #
2455 # Requests can only be sent to a specific instance if
2456 # [manual scaling is used in App Engine
2457 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2458 # App Engine Flex does not support instances. For more information, see
2459 # [App Engine Standard request
2460 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2461 # and [App Engine Flex request
2462 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2463 },
2464 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
2465 #
2466 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
2467 # HTTP requests with this http_method, otherwise the task attempt fails with
2468 # error code 405 (Method Not Allowed). See [Writing a push task request
2469 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
2470 # and the App Engine documentation for your runtime on [How Requests are
2471 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
2472 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
2473 #
2474 # A request body is allowed only if the HTTP method is POST or PUT. It is
2475 # an error to set a body on a task with an incompatible HttpMethod.
2476 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
2477 #
2478 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
2479 # It can contain a path and query string arguments.
2480 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
2481 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002482 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002483 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
2484 # been returned.
2485 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002486 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002487 # `create_time` will be truncated to the nearest second.
2488 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted.
2489 #
2490 # For App Engine queues, this is when the task will be attempted or retried.
2491 #
2492 # `schedule_time` will be truncated to the nearest microsecond.
2493 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the task&#x27;s target.
2494 #
2495 # An HTTP task is a task that has HttpRequest set.
2496 #
2497 # The task will be pushed to the worker as an HTTP request. If the worker
2498 # or the redirected worker acknowledges the task by returning a successful HTTP
2499 # response code ([`200` - `299`]), the task will be removed from the queue. If
2500 # any other HTTP response code is returned or no response is received, the
2501 # task will be retried according to the following:
2502 #
2503 # * User-specified throttling: retry configuration,
2504 # rate limits, and the queue&#x27;s state.
2505 #
2506 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
2507 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
2508 # will not be changed.
2509 #
2510 # System throttling happens because:
2511 #
2512 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
2513 # rate limits will be used. But if the worker returns
2514 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
2515 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
2516 # specified in the `Retry-After` HTTP response header is considered.
2517 #
2518 # * To prevent traffic spikes and to smooth sudden increases in traffic,
2519 # dispatches ramp up slowly when the queue is newly created or idle and
2520 # if large numbers of tasks suddenly become available to dispatch (due to
2521 # spikes in create task rates, the queue being unpaused, or many tasks
2522 # that are scheduled at the same time).
2523 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002524 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002525 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
2526 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
2527 # encode some characters for safety and compatibility. The maximum allowed
2528 # URL length is 2083 characters after encoding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002529 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002530 # The `Location` header response from a redirect response [`300` - `399`]
2531 # may be followed. The redirect is not counted as a separate attempt.
2532 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
2533 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
2534 # token will be generated and attached as an `Authorization` header in the
2535 # HTTP request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002536 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002537 # This type of authorization can be used for many scenarios, including
2538 # calling Cloud Run, or endpoints where you intend to validate the token
2539 # yourself.
2540 # [OpenID Connect
2541 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
2542 # This type of authorization can be used for many scenarios, including
2543 # calling Cloud Run, or endpoints where you intend to validate the token
2544 # yourself.
2545 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
2546 # specified in target will be used.
2547 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2548 # to be used for generating OIDC token.
2549 # The service account must be within the same project as the queue. The
2550 # caller must have iam.serviceAccounts.actAs permission for the service
2551 # account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002552 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002553 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
2554 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002555 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002556 # A request body is allowed only if the
2557 # HTTP method is POST, PUT, or PATCH. It is an
2558 # error to set body on a task with an incompatible HttpMethod.
2559 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
2560 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
2561 # will be generated and attached as an `Authorization` header in the HTTP
2562 # request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002563 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002564 # This type of authorization should generally only be used when calling
2565 # Google APIs hosted on *.googleapis.com.
2566 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
2567 # This type of authorization should generally only be used when calling Google
2568 # APIs hosted on *.googleapis.com.
2569 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
2570 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
2571 # will be used.
2572 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2573 # to be used for generating OAuth token.
2574 # The service account must be within the same project as the queue. The
2575 # caller must have iam.serviceAccounts.actAs permission for the service
2576 # account.
Dan O'Mearadd494642020-05-01 07:42:23 -07002577 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002578 &quot;headers&quot;: { # HTTP request headers.
Dan O'Mearadd494642020-05-01 07:42:23 -07002579 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002580 # This map contains the header field names and values.
2581 # Headers can be set when the
2582 # task is created.
Dan O'Mearadd494642020-05-01 07:42:23 -07002583 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002584 # These headers represent a subset of the headers that will accompany the
2585 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
2586 #
2587 # A partial list of headers that will be ignored or replaced is:
2588 #
2589 # * Host: This will be computed by Cloud Tasks and derived from
2590 # HttpRequest.url.
2591 # * Content-Length: This will be computed by Cloud Tasks.
2592 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
2593 # * X-Google-*: Google use only.
2594 # * X-AppEngine-*: Google use only.
2595 #
2596 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
2597 # `Content-Type` to a media type when the
2598 # task is created.
2599 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
2600 # `&quot;application/json&quot;`.
2601 #
2602 # Headers which can have multiple values (according to RFC2616) can be
2603 # specified using comma-separated values.
2604 #
2605 # The size of the headers must be less than 80KB.
2606 &quot;a_key&quot;: &quot;A String&quot;,
2607 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002608 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002609 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
Dan O'Mearadd494642020-05-01 07:42:23 -07002610 #
2611 # The task name.
2612 #
2613 # The task name must have the following format:
2614 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
2615 #
2616 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2617 # hyphens (-), colons (:), or periods (.).
2618 # For more information, see
2619 # [Identifying
2620 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -07002621 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
Dan O'Mearadd494642020-05-01 07:42:23 -07002622 # The list of available locations can be obtained by calling
2623 # ListLocations.
2624 # For more information, see https://cloud.google.com/about/locations/.
2625 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2626 # hyphens (-). The maximum length is 100 characters.
2627 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
2628 # hyphens (-), or underscores (_). The maximum length is 500 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002629 }</pre>
2630</div>
2631
2632</body></html>