blob: 1759b3cd8aaebad70ab0fc290fa11cb47449a0dc [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_v2.html">Cloud Tasks API</a> . <a href="cloudtasks_v2.projects.html">projects</a> . <a href="cloudtasks_v2.projects.locations.html">locations</a> . <a href="cloudtasks_v2.projects.locations.queues.html">queues</a> . <a href="cloudtasks_v2.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 Kimd059ad82020-07-22 17:02:09 -070087 <code><a href="#list">list(parent, pageSize=None, responseView=None, pageToken=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;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 -0700114 # returned.
115 #
116 # By default response_view is BASIC; not all
117 # information is retrieved by default because some data, such as
118 # payloads, might be desirable to return only when needed because
119 # of its large size or because of the sensitivity of data that it
120 # contains.
121 #
122 # Authorization for FULL requires
123 # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
124 # permission on the Task resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700125 &quot;task&quot;: { # A unit of scheduled work. # Required. The task to add.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700126 #
127 # Task names have the following format:
128 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
129 # The user can optionally specify a task name. If a
130 # name is not specified then the system will generate a random
131 # unique task id, which will be set in the task returned in the
132 # response.
133 #
134 # If schedule_time is not set or is in the
135 # past then Cloud Tasks will set it to the current time.
136 #
137 # Task De-duplication:
138 #
139 # Explicitly specifying a task ID enables task de-duplication. If
Bu Sun Kim65020912020-05-20 12:08:20 -0700140 # a task&#x27;s ID is identical to that of an existing task or a task
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700141 # that was deleted or executed recently then the call will fail
142 # with ALREADY_EXISTS.
Bu Sun Kim65020912020-05-20 12:08:20 -0700143 # If the task&#x27;s queue was created using Cloud Tasks, then another task with
144 # the same name can&#x27;t be created for ~1hour after the original task was
145 # deleted or executed. If the task&#x27;s queue was created using queue.yaml or
146 # queue.xml, then another task with the same name can&#x27;t be created
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700147 # for ~9days after the original task was deleted or executed.
148 #
149 # Because there is an extra lookup cost to identify duplicate task
150 # names, these CreateTask calls have significantly
151 # increased latency. Using hashed strings for the task id or for
152 # the prefix of the task id is recommended. Choosing task ids that
153 # are sequential or have sequential prefixes, for example using a
154 # timestamp, causes an increase in latency and error rates in all
155 # task commands. The infrastructure relies on an approximately
156 # uniform distribution of task ids to store and serve tasks
157 # efficiently.
Bu Sun Kim65020912020-05-20 12:08:20 -0700158 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
159 #
160 # Only dispatch_time will be set.
161 # The other Attempt information is not retained by Cloud Tasks.
Bu Sun Kim65020912020-05-20 12:08:20 -0700162 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
163 #
164 # `response_time` will be truncated to the nearest microsecond.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700165 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
166 #
167 # `schedule_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 &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.
169 #
170 # If `response_time` is unset, then the task has not been attempted or is
171 # currently running and the `response_status` field is meaningless.
172 # different programming environments, including REST APIs and RPC APIs. It is
173 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
174 # three pieces of data: error code, error message, and error details.
175 #
176 # You can find out more about this error model and how to work with it in the
177 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700178 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
179 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
180 # user-facing error message should be localized and sent in the
181 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700182 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
183 # message types for APIs to use.
184 {
185 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
186 },
187 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700188 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700189 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
190 #
191 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -0700192 },
193 &quot;lastAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s last attempt.
Bu Sun Kim65020912020-05-20 12:08:20 -0700194 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
195 #
196 # `response_time` will be truncated to the nearest microsecond.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700197 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
198 #
199 # `schedule_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -0700200 &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.
201 #
202 # If `response_time` is unset, then the task has not been attempted or is
203 # currently running and the `response_status` field is meaningless.
204 # different programming environments, including REST APIs and RPC APIs. It is
205 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
206 # three pieces of data: error code, error message, and error details.
207 #
208 # You can find out more about this error model and how to work with it in the
209 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700210 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
211 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
212 # user-facing error message should be localized and sent in the
213 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700214 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
215 # message types for APIs to use.
216 {
217 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
218 },
219 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700220 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700221 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
222 #
223 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -0700224 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700225 &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 -0700226 #
227 # An App Engine task is a task that has AppEngineHttpRequest set.
228 #
229 # The message defines the HTTP request that is sent to an App Engine app when
230 # the task is dispatched.
231 #
232 # Using AppEngineHttpRequest requires
233 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
234 # Google IAM permission for the project
235 # and the following scope:
236 #
237 # `https://www.googleapis.com/auth/cloud-platform`
238 #
239 # The task will be delivered to the App Engine app which belongs to the same
240 # project as the queue. For more information, see
241 # [How Requests are
242 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
243 # and how routing is affected by
244 # [dispatch
245 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
246 # Traffic is encrypted during transport and never leaves Google datacenters.
247 # Because this traffic is carried over a communication mechanism internal to
248 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
249 # The request to the handler, however, will appear to have used the HTTP
250 # protocol.
251 #
252 # The AppEngineRouting used to construct the URL that the task is
253 # delivered to can be set at the queue-level or task-level:
254 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700255 # * If app_engine_routing_override is set on the
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700256 # queue, this value
257 # is used for all tasks in the queue, no matter what the setting is for the
258 # task-level
Dan O'Mearadd494642020-05-01 07:42:23 -0700259 # app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700260 #
261 #
262 # The `url` that the task will be sent to is:
263 #
264 # * `url =` host `+`
265 # relative_uri
266 #
267 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
268 # URIs restricted with
269 # [`login:
270 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
271 # Because tasks are not run as any user, they cannot be dispatched to URIs
272 # restricted with
273 # [`login:
274 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
275 # Task dispatches also do not follow redirects.
276 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700277 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700278 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -0700279 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 # not receive response before the deadline. Failed
281 # tasks will be retried according to the
282 # retry configuration. `503` (Service Unavailable) is
283 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -0700284 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
285 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700286 # Requests) response from an app handler does not cause traffic congestion
287 # control to throttle the queue.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700288 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
289 #
290 # A request body is allowed only if the HTTP method is POST or PUT. It is
291 # an error to set a body on a task with an incompatible HttpMethod.
292 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
293 #
294 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
295 # HTTP requests with this http_method, otherwise the task attempt fails with
296 # error code 405 (Method Not Allowed). See [Writing a push task request
297 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
298 # and the App Engine documentation for your runtime on [How Requests are
299 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
300 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
301 #
302 # * If app_engine_routing_override is set on the
303 # queue, this
304 # value is used for all tasks in the queue, no matter what the setting is
305 # for the task-level
306 # app_engine_routing.
307 #
308 # Defines routing characteristics specific to App Engine - service, version,
309 # and instance.
310 #
311 # For more information about services, versions, and instances see
312 # [An Overview of App
313 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
314 # [Microservices Architecture on Google App
315 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
316 # [App Engine Standard request
317 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
318 # and [App Engine Flex request
319 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
320 #
321 # Using AppEngineRouting requires
322 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
323 # Google IAM permission for the project
324 # and the following scope:
325 #
326 # `https://www.googleapis.com/auth/cloud-platform`
327 &quot;instance&quot;: &quot;A String&quot;, # App instance.
328 #
329 # By default, the task is sent to an instance which is available when
330 # the task is attempted.
331 #
332 # Requests can only be sent to a specific instance if
333 # [manual scaling is used in App Engine
334 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
335 # App Engine Flex does not support instances. For more information, see
336 # [App Engine Standard request
337 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
338 # and [App Engine Flex request
339 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
340 &quot;version&quot;: &quot;A String&quot;, # App version.
341 #
342 # By default, the task is sent to the version which is the default
343 # version when the task is attempted.
344 #
345 # For some queues or tasks which were created using the App Engine
346 # Task Queue API, host is not parsable
347 # into service,
348 # version, and
349 # instance. For example, some tasks
350 # which were created using the App Engine SDK use a custom domain
351 # name; custom domains are not parsed by Cloud Tasks. If
352 # host is not parsable, then
353 # service,
354 # version, and
355 # instance are the empty string.
356 &quot;service&quot;: &quot;A String&quot;, # App service.
357 #
358 # By default, the task is sent to the service which is the default
359 # service when the task is attempted.
360 #
361 # For some queues or tasks which were created using the App Engine
362 # Task Queue API, host is not parsable
363 # into service,
364 # version, and
365 # instance. For example, some tasks
366 # which were created using the App Engine SDK use a custom domain
367 # name; custom domains are not parsed by Cloud Tasks. If
368 # host is not parsable, then
369 # service,
370 # version, and
371 # instance are the empty string.
372 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
373 #
374 # The host is constructed from the domain name of the app associated with
375 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
376 # service, version,
377 # and instance. Tasks which were created using
378 # the App Engine SDK might have a custom domain name.
379 #
380 # For more information, see
381 # [How Requests are
382 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
383 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700384 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 #
386 # This map contains the header field names and values.
387 # Headers can be set when the
388 # task is created.
389 # Repeated headers are not supported but a header value can contain commas.
390 #
391 # Cloud Tasks sets some headers to default values:
392 #
393 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -0700394 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700395 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -0700396 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700397 # modified `User-Agent`.
398 #
399 # If the task has a body, Cloud
400 # Tasks sets the following headers:
401 #
402 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -0700403 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700404 # setting `Content-Type` to a particular media type when the
405 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700406 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700407 # * `Content-Length`: This is computed by Cloud Tasks. This value is
408 # output only. It cannot be changed.
409 #
410 # The headers below cannot be set or overridden:
411 #
412 # * `Host`
413 # * `X-Google-*`
414 # * `X-AppEngine-*`
415 #
416 # In addition, Cloud Tasks sets some headers when the task is dispatched,
417 # such as headers containing information about the task; see
418 # [request
Dan O'Mearadd494642020-05-01 07:42:23 -0700419 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700420 # These headers are set only when the task is dispatched, so they are not
421 # visible when the task is returned in a Cloud Tasks response.
422 #
423 # Although there is no specific limit for the maximum number of headers or
424 # the size, there is a limit on the maximum size of the Task. For more
425 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700426 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700428 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
429 #
430 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
431 # It can contain a path and query string arguments.
432 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
433 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700434 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700435 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted or retried.
436 #
437 # `schedule_time` will be truncated to the nearest microsecond.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700438 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
439 #
440 # The task name.
441 #
442 # The task name must have the following format:
443 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
444 #
445 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
446 # hyphens (-), colons (:), or periods (.).
447 # For more information, see
448 # [Identifying
449 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
450 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
451 # The list of available locations can be obtained by calling
452 # ListLocations.
453 # For more information, see https://cloud.google.com/about/locations/.
454 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
455 # hyphens (-). The maximum length is 100 characters.
456 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
457 # hyphens (-), or underscores (_). The maximum length is 500 characters.
458 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
459 # been returned.
460 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700461 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
462 #
463 # `create_time` will be truncated to the nearest second.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700464 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the worker.
465 #
466 # An HTTP task is a task that has HttpRequest set.
467 #
468 # The task will be pushed to the worker as an HTTP request. If the worker
469 # or the redirected worker acknowledges the task by returning a successful HTTP
470 # response code ([`200` - `299`]), the task will be removed from the queue. If
471 # any other HTTP response code is returned or no response is received, the
472 # task will be retried according to the following:
473 #
474 # * User-specified throttling: retry configuration,
475 # rate limits, and the queue&#x27;s state.
476 #
477 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
478 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
479 # will not be changed.
480 #
481 # System throttling happens because:
482 #
483 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
484 # rate limits will be used. But if the worker returns
485 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
486 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
487 # specified in the `Retry-After` HTTP response header is considered.
488 #
489 # * To prevent traffic spikes and to smooth sudden increases in traffic,
490 # dispatches ramp up slowly when the queue is newly created or idle and
491 # if large numbers of tasks suddenly become available to dispatch (due to
492 # spikes in create task rates, the queue being unpaused, or many tasks
493 # that are scheduled at the same time).
494 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
495 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
496 # token will be generated and attached as an `Authorization` header in the
497 # HTTP request.
498 #
499 # This type of authorization can be used for many scenarios, including
500 # calling Cloud Run, or endpoints where you intend to validate the token
501 # yourself.
502 # [OpenID Connect
503 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
504 # This type of authorization can be used for many scenarios, including
505 # calling Cloud Run, or endpoints where you intend to validate the token
506 # yourself.
507 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
508 # to be used for generating OIDC token.
509 # The service account must be within the same project as the queue. The
510 # caller must have iam.serviceAccounts.actAs permission for the service
511 # account.
512 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
513 # specified in target will be used.
514 },
515 &quot;headers&quot;: { # HTTP request headers.
516 #
517 # This map contains the header field names and values.
518 # Headers can be set when the
519 # task is created.
520 #
521 # These headers represent a subset of the headers that will accompany the
522 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
523 #
524 # A partial list of headers that will be ignored or replaced is:
525 #
526 # * Host: This will be computed by Cloud Tasks and derived from
527 # HttpRequest.url.
528 # * Content-Length: This will be computed by Cloud Tasks.
529 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
530 # * X-Google-*: Google use only.
531 # * X-AppEngine-*: Google use only.
532 #
533 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
534 # `Content-Type` to a media type when the
535 # task is created.
536 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
537 # `&quot;application/json&quot;`.
538 #
539 # Headers which can have multiple values (according to RFC2616) can be
540 # specified using comma-separated values.
541 #
542 # The size of the headers must be less than 80KB.
543 &quot;a_key&quot;: &quot;A String&quot;,
544 },
545 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
546 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
547 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
548 # will be generated and attached as an `Authorization` header in the HTTP
549 # request.
550 #
551 # This type of authorization should generally only be used when calling
552 # Google APIs hosted on *.googleapis.com.
553 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
554 # This type of authorization should generally only be used when calling Google
555 # APIs hosted on *.googleapis.com.
556 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
557 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
558 # will be used.
559 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
560 # to be used for generating OAuth token.
561 # The service account must be within the same project as the queue. The
562 # caller must have iam.serviceAccounts.actAs permission for the service
563 # account.
564 },
565 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
566 #
567 # A request body is allowed only if the
568 # HTTP method is POST, PUT, or PATCH. It is an
569 # error to set body on a task with an incompatible HttpMethod.
570 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
571 #
572 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
573 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
574 # encode some characters for safety and compatibility. The maximum allowed
575 # URL length is 2083 characters after encoding.
576 #
577 # The `Location` header response from a redirect response [`300` - `399`]
578 # may be followed. The redirect is not counted as a separate attempt.
579 },
580 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
581 #
582 # This count includes attempts which have been dispatched but haven&#x27;t
583 # received a response.
584 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
585 # respond by this deadline then the request is cancelled and the attempt
586 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
587 # task according to the RetryConfig.
588 #
589 # Note that when the request is cancelled, Cloud Tasks will stop listening
590 # for the response, but whether the worker stops processing depends on the
591 # worker. For example, if the worker is stuck, it may not react to cancelled
592 # requests.
593 #
594 # The default and maximum values depend on the type of request:
595 #
596 # * For HTTP tasks, the default is 10 minutes. The deadline
597 # must be in the interval [15 seconds, 30 minutes].
598 #
599 # * For App Engine tasks, 0 indicates that the
600 # request has the default deadline. The default deadline depends on the
601 # [scaling
602 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
603 # of the service: 10 minutes for standard apps with automatic scaling, 24
604 # hours for standard apps with manual and basic scaling, and 60 minutes for
605 # flex apps. If the request deadline is set, it must be in the interval [15
606 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
607 # `dispatch_deadline`, the app handler will not run for longer than than
608 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
609 # at most a few seconds more than the app handler&#x27;s timeout. For more
610 # information see
611 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
612 #
613 # `dispatch_deadline` will be truncated to the nearest millisecond. The
614 # deadline is an approximate deadline.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700615 },
616 }
617
618 x__xgafv: string, V1 error format.
619 Allowed values
620 1 - v1 error format
621 2 - v2 error format
622
623Returns:
624 An object of the form:
625
626 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -0700627 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
628 #
629 # Only dispatch_time will be set.
630 # The other Attempt information is not retained by Cloud Tasks.
Bu Sun Kim65020912020-05-20 12:08:20 -0700631 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
632 #
633 # `response_time` will be truncated to the nearest microsecond.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700634 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
635 #
636 # `schedule_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -0700637 &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.
638 #
639 # If `response_time` is unset, then the task has not been attempted or is
640 # currently running and the `response_status` field is meaningless.
641 # different programming environments, including REST APIs and RPC APIs. It is
642 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
643 # three pieces of data: error code, error message, and error details.
644 #
645 # You can find out more about this error model and how to work with it in the
646 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700647 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
648 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
649 # user-facing error message should be localized and sent in the
650 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700651 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
652 # message types for APIs to use.
653 {
654 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
655 },
656 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700657 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700658 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
659 #
660 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -0700661 },
662 &quot;lastAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s last attempt.
Bu Sun Kim65020912020-05-20 12:08:20 -0700663 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
664 #
665 # `response_time` will be truncated to the nearest microsecond.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700666 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
667 #
668 # `schedule_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -0700669 &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.
670 #
671 # If `response_time` is unset, then the task has not been attempted or is
672 # currently running and the `response_status` field is meaningless.
673 # different programming environments, including REST APIs and RPC APIs. It is
674 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
675 # three pieces of data: error code, error message, and error details.
676 #
677 # You can find out more about this error model and how to work with it in the
678 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700679 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
680 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
681 # user-facing error message should be localized and sent in the
682 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700683 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
684 # message types for APIs to use.
685 {
686 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
687 },
688 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700689 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700690 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
691 #
692 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -0700693 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700694 &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 -0700695 #
696 # An App Engine task is a task that has AppEngineHttpRequest set.
697 #
698 # The message defines the HTTP request that is sent to an App Engine app when
699 # the task is dispatched.
700 #
701 # Using AppEngineHttpRequest requires
702 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
703 # Google IAM permission for the project
704 # and the following scope:
705 #
706 # `https://www.googleapis.com/auth/cloud-platform`
707 #
708 # The task will be delivered to the App Engine app which belongs to the same
709 # project as the queue. For more information, see
710 # [How Requests are
711 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
712 # and how routing is affected by
713 # [dispatch
714 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
715 # Traffic is encrypted during transport and never leaves Google datacenters.
716 # Because this traffic is carried over a communication mechanism internal to
717 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
718 # The request to the handler, however, will appear to have used the HTTP
719 # protocol.
720 #
721 # The AppEngineRouting used to construct the URL that the task is
722 # delivered to can be set at the queue-level or task-level:
723 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700724 # * If app_engine_routing_override is set on the
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700725 # queue, this value
726 # is used for all tasks in the queue, no matter what the setting is for the
727 # task-level
Dan O'Mearadd494642020-05-01 07:42:23 -0700728 # app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700729 #
730 #
731 # The `url` that the task will be sent to is:
732 #
733 # * `url =` host `+`
734 # relative_uri
735 #
736 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
737 # URIs restricted with
738 # [`login:
739 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
740 # Because tasks are not run as any user, they cannot be dispatched to URIs
741 # restricted with
742 # [`login:
743 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
744 # Task dispatches also do not follow redirects.
745 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700746 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700747 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -0700748 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700749 # not receive response before the deadline. Failed
750 # tasks will be retried according to the
751 # retry configuration. `503` (Service Unavailable) is
752 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -0700753 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
754 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700755 # Requests) response from an app handler does not cause traffic congestion
756 # control to throttle the queue.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700757 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
758 #
759 # A request body is allowed only if the HTTP method is POST or PUT. It is
760 # an error to set a body on a task with an incompatible HttpMethod.
761 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
762 #
763 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
764 # HTTP requests with this http_method, otherwise the task attempt fails with
765 # error code 405 (Method Not Allowed). See [Writing a push task request
766 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
767 # and the App Engine documentation for your runtime on [How Requests are
768 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
769 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
770 #
771 # * If app_engine_routing_override is set on the
772 # queue, this
773 # value is used for all tasks in the queue, no matter what the setting is
774 # for the task-level
775 # app_engine_routing.
776 #
777 # Defines routing characteristics specific to App Engine - service, version,
778 # and instance.
779 #
780 # For more information about services, versions, and instances see
781 # [An Overview of App
782 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
783 # [Microservices Architecture on Google App
784 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
785 # [App Engine Standard request
786 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
787 # and [App Engine Flex request
788 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
789 #
790 # Using AppEngineRouting requires
791 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
792 # Google IAM permission for the project
793 # and the following scope:
794 #
795 # `https://www.googleapis.com/auth/cloud-platform`
796 &quot;instance&quot;: &quot;A String&quot;, # App instance.
797 #
798 # By default, the task is sent to an instance which is available when
799 # the task is attempted.
800 #
801 # Requests can only be sent to a specific instance if
802 # [manual scaling is used in App Engine
803 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
804 # App Engine Flex does not support instances. For more information, see
805 # [App Engine Standard request
806 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
807 # and [App Engine Flex request
808 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
809 &quot;version&quot;: &quot;A String&quot;, # App version.
810 #
811 # By default, the task is sent to the version which is the default
812 # version when the task is attempted.
813 #
814 # For some queues or tasks which were created using the App Engine
815 # Task Queue API, host is not parsable
816 # into service,
817 # version, and
818 # instance. For example, some tasks
819 # which were created using the App Engine SDK use a custom domain
820 # name; custom domains are not parsed by Cloud Tasks. If
821 # host is not parsable, then
822 # service,
823 # version, and
824 # instance are the empty string.
825 &quot;service&quot;: &quot;A String&quot;, # App service.
826 #
827 # By default, the task is sent to the service which is the default
828 # service when the task is attempted.
829 #
830 # For some queues or tasks which were created using the App Engine
831 # Task Queue API, host is not parsable
832 # into service,
833 # version, and
834 # instance. For example, some tasks
835 # which were created using the App Engine SDK use a custom domain
836 # name; custom domains are not parsed by Cloud Tasks. If
837 # host is not parsable, then
838 # service,
839 # version, and
840 # instance are the empty string.
841 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
842 #
843 # The host is constructed from the domain name of the app associated with
844 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
845 # service, version,
846 # and instance. Tasks which were created using
847 # the App Engine SDK might have a custom domain name.
848 #
849 # For more information, see
850 # [How Requests are
851 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
852 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700853 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700854 #
855 # This map contains the header field names and values.
856 # Headers can be set when the
857 # task is created.
858 # Repeated headers are not supported but a header value can contain commas.
859 #
860 # Cloud Tasks sets some headers to default values:
861 #
862 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -0700863 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700864 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -0700865 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700866 # modified `User-Agent`.
867 #
868 # If the task has a body, Cloud
869 # Tasks sets the following headers:
870 #
871 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -0700872 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700873 # setting `Content-Type` to a particular media type when the
874 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700875 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700876 # * `Content-Length`: This is computed by Cloud Tasks. This value is
877 # output only. It cannot be changed.
878 #
879 # The headers below cannot be set or overridden:
880 #
881 # * `Host`
882 # * `X-Google-*`
883 # * `X-AppEngine-*`
884 #
885 # In addition, Cloud Tasks sets some headers when the task is dispatched,
886 # such as headers containing information about the task; see
887 # [request
Dan O'Mearadd494642020-05-01 07:42:23 -0700888 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700889 # These headers are set only when the task is dispatched, so they are not
890 # visible when the task is returned in a Cloud Tasks response.
891 #
892 # Although there is no specific limit for the maximum number of headers or
893 # the size, there is a limit on the maximum size of the Task. For more
894 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700895 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700896 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700897 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
898 #
899 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
900 # It can contain a path and query string arguments.
901 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
902 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700903 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700904 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted or retried.
905 #
906 # `schedule_time` will be truncated to the nearest microsecond.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700907 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
908 #
909 # The task name.
910 #
911 # The task name must have the following format:
912 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
913 #
914 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
915 # hyphens (-), colons (:), or periods (.).
916 # For more information, see
917 # [Identifying
918 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
919 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
920 # The list of available locations can be obtained by calling
921 # ListLocations.
922 # For more information, see https://cloud.google.com/about/locations/.
923 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
924 # hyphens (-). The maximum length is 100 characters.
925 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
926 # hyphens (-), or underscores (_). The maximum length is 500 characters.
927 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
928 # been returned.
929 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700930 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
931 #
932 # `create_time` will be truncated to the nearest second.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700933 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the worker.
934 #
935 # An HTTP task is a task that has HttpRequest set.
936 #
937 # The task will be pushed to the worker as an HTTP request. If the worker
938 # or the redirected worker acknowledges the task by returning a successful HTTP
939 # response code ([`200` - `299`]), the task will be removed from the queue. If
940 # any other HTTP response code is returned or no response is received, the
941 # task will be retried according to the following:
942 #
943 # * User-specified throttling: retry configuration,
944 # rate limits, and the queue&#x27;s state.
945 #
946 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
947 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
948 # will not be changed.
949 #
950 # System throttling happens because:
951 #
952 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
953 # rate limits will be used. But if the worker returns
954 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
955 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
956 # specified in the `Retry-After` HTTP response header is considered.
957 #
958 # * To prevent traffic spikes and to smooth sudden increases in traffic,
959 # dispatches ramp up slowly when the queue is newly created or idle and
960 # if large numbers of tasks suddenly become available to dispatch (due to
961 # spikes in create task rates, the queue being unpaused, or many tasks
962 # that are scheduled at the same time).
963 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
964 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
965 # token will be generated and attached as an `Authorization` header in the
966 # HTTP request.
967 #
968 # This type of authorization can be used for many scenarios, including
969 # calling Cloud Run, or endpoints where you intend to validate the token
970 # yourself.
971 # [OpenID Connect
972 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
973 # This type of authorization can be used for many scenarios, including
974 # calling Cloud Run, or endpoints where you intend to validate the token
975 # yourself.
976 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
977 # to be used for generating OIDC token.
978 # The service account must be within the same project as the queue. The
979 # caller must have iam.serviceAccounts.actAs permission for the service
980 # account.
981 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
982 # specified in target will be used.
983 },
984 &quot;headers&quot;: { # HTTP request headers.
985 #
986 # This map contains the header field names and values.
987 # Headers can be set when the
988 # task is created.
989 #
990 # These headers represent a subset of the headers that will accompany the
991 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
992 #
993 # A partial list of headers that will be ignored or replaced is:
994 #
995 # * Host: This will be computed by Cloud Tasks and derived from
996 # HttpRequest.url.
997 # * Content-Length: This will be computed by Cloud Tasks.
998 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
999 # * X-Google-*: Google use only.
1000 # * X-AppEngine-*: Google use only.
1001 #
1002 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
1003 # `Content-Type` to a media type when the
1004 # task is created.
1005 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
1006 # `&quot;application/json&quot;`.
1007 #
1008 # Headers which can have multiple values (according to RFC2616) can be
1009 # specified using comma-separated values.
1010 #
1011 # The size of the headers must be less than 80KB.
1012 &quot;a_key&quot;: &quot;A String&quot;,
1013 },
1014 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
1015 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
1016 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
1017 # will be generated and attached as an `Authorization` header in the HTTP
1018 # request.
1019 #
1020 # This type of authorization should generally only be used when calling
1021 # Google APIs hosted on *.googleapis.com.
1022 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
1023 # This type of authorization should generally only be used when calling Google
1024 # APIs hosted on *.googleapis.com.
1025 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
1026 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
1027 # will be used.
1028 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1029 # to be used for generating OAuth token.
1030 # The service account must be within the same project as the queue. The
1031 # caller must have iam.serviceAccounts.actAs permission for the service
1032 # account.
1033 },
1034 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
1035 #
1036 # A request body is allowed only if the
1037 # HTTP method is POST, PUT, or PATCH. It is an
1038 # error to set body on a task with an incompatible HttpMethod.
1039 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
1040 #
1041 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
1042 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
1043 # encode some characters for safety and compatibility. The maximum allowed
1044 # URL length is 2083 characters after encoding.
1045 #
1046 # The `Location` header response from a redirect response [`300` - `399`]
1047 # may be followed. The redirect is not counted as a separate attempt.
1048 },
1049 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
1050 #
1051 # This count includes attempts which have been dispatched but haven&#x27;t
1052 # received a response.
1053 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
1054 # respond by this deadline then the request is cancelled and the attempt
1055 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
1056 # task according to the RetryConfig.
1057 #
1058 # Note that when the request is cancelled, Cloud Tasks will stop listening
1059 # for the response, but whether the worker stops processing depends on the
1060 # worker. For example, if the worker is stuck, it may not react to cancelled
1061 # requests.
1062 #
1063 # The default and maximum values depend on the type of request:
1064 #
1065 # * For HTTP tasks, the default is 10 minutes. The deadline
1066 # must be in the interval [15 seconds, 30 minutes].
1067 #
1068 # * For App Engine tasks, 0 indicates that the
1069 # request has the default deadline. The default deadline depends on the
1070 # [scaling
1071 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
1072 # of the service: 10 minutes for standard apps with automatic scaling, 24
1073 # hours for standard apps with manual and basic scaling, and 60 minutes for
1074 # flex apps. If the request deadline is set, it must be in the interval [15
1075 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
1076 # `dispatch_deadline`, the app handler will not run for longer than than
1077 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
1078 # at most a few seconds more than the app handler&#x27;s timeout. For more
1079 # information see
1080 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
1081 #
1082 # `dispatch_deadline` will be truncated to the nearest millisecond. The
1083 # deadline is an approximate deadline.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001084 }</pre>
1085</div>
1086
1087<div class="method">
1088 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
1089 <pre>Deletes a task.
1090
1091A task can be deleted if it is scheduled or dispatched. A task
1092cannot be deleted if it has executed successfully or permanently
1093failed.
1094
1095Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001096 name: string, Required. The task name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001097`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required)
1098 x__xgafv: string, V1 error format.
1099 Allowed values
1100 1 - v1 error format
1101 2 - v2 error format
1102
1103Returns:
1104 An object of the form:
1105
1106 { # A generic empty message that you can re-use to avoid defining duplicated
1107 # empty messages in your APIs. A typical example is to use it as the request
1108 # or the response type of an API method. For instance:
1109 #
1110 # service Foo {
1111 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1112 # }
1113 #
1114 # The JSON representation for `Empty` is empty JSON object `{}`.
1115 }</pre>
1116</div>
1117
1118<div class="method">
1119 <code class="details" id="get">get(name, responseView=None, x__xgafv=None)</code>
1120 <pre>Gets a task.
1121
1122Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001123 name: string, Required. The task name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001124`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required)
1125 responseView: string, The response_view specifies which subset of the Task will be
1126returned.
1127
1128By default response_view is BASIC; not all
1129information is retrieved by default because some data, such as
1130payloads, might be desirable to return only when needed because
1131of its large size or because of the sensitivity of data that it
1132contains.
1133
1134Authorization for FULL requires
1135`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
1136permission on the Task resource.
1137 x__xgafv: string, V1 error format.
1138 Allowed values
1139 1 - v1 error format
1140 2 - v2 error format
1141
1142Returns:
1143 An object of the form:
1144
1145 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -07001146 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
1147 #
1148 # Only dispatch_time will be set.
1149 # The other Attempt information is not retained by Cloud Tasks.
Bu Sun Kim65020912020-05-20 12:08:20 -07001150 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
1151 #
1152 # `response_time` will be truncated to the nearest microsecond.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001153 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
1154 #
1155 # `schedule_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07001156 &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.
1157 #
1158 # If `response_time` is unset, then the task has not been attempted or is
1159 # currently running and the `response_status` field is meaningless.
1160 # different programming environments, including REST APIs and RPC APIs. It is
1161 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1162 # three pieces of data: error code, error message, and error details.
1163 #
1164 # You can find out more about this error model and how to work with it in the
1165 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001166 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1167 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1168 # user-facing error message should be localized and sent in the
1169 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -07001170 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1171 # message types for APIs to use.
1172 {
1173 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1174 },
1175 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001176 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001177 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
1178 #
1179 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07001180 },
1181 &quot;lastAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s last attempt.
Bu Sun Kim65020912020-05-20 12:08:20 -07001182 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
1183 #
1184 # `response_time` will be truncated to the nearest microsecond.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001185 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
1186 #
1187 # `schedule_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07001188 &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.
1189 #
1190 # If `response_time` is unset, then the task has not been attempted or is
1191 # currently running and the `response_status` field is meaningless.
1192 # different programming environments, including REST APIs and RPC APIs. It is
1193 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1194 # three pieces of data: error code, error message, and error details.
1195 #
1196 # You can find out more about this error model and how to work with it in the
1197 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001198 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1199 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1200 # user-facing error message should be localized and sent in the
1201 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -07001202 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1203 # message types for APIs to use.
1204 {
1205 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1206 },
1207 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001208 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001209 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
1210 #
1211 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07001212 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001213 &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 -07001214 #
1215 # An App Engine task is a task that has AppEngineHttpRequest set.
1216 #
1217 # The message defines the HTTP request that is sent to an App Engine app when
1218 # the task is dispatched.
1219 #
1220 # Using AppEngineHttpRequest requires
1221 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1222 # Google IAM permission for the project
1223 # and the following scope:
1224 #
1225 # `https://www.googleapis.com/auth/cloud-platform`
1226 #
1227 # The task will be delivered to the App Engine app which belongs to the same
1228 # project as the queue. For more information, see
1229 # [How Requests are
1230 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1231 # and how routing is affected by
1232 # [dispatch
1233 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
1234 # Traffic is encrypted during transport and never leaves Google datacenters.
1235 # Because this traffic is carried over a communication mechanism internal to
1236 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
1237 # The request to the handler, however, will appear to have used the HTTP
1238 # protocol.
1239 #
1240 # The AppEngineRouting used to construct the URL that the task is
1241 # delivered to can be set at the queue-level or task-level:
1242 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001243 # * If app_engine_routing_override is set on the
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001244 # queue, this value
1245 # is used for all tasks in the queue, no matter what the setting is for the
1246 # task-level
Dan O'Mearadd494642020-05-01 07:42:23 -07001247 # app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001248 #
1249 #
1250 # The `url` that the task will be sent to is:
1251 #
1252 # * `url =` host `+`
1253 # relative_uri
1254 #
1255 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
1256 # URIs restricted with
1257 # [`login:
1258 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
1259 # Because tasks are not run as any user, they cannot be dispatched to URIs
1260 # restricted with
1261 # [`login:
1262 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
1263 # Task dispatches also do not follow redirects.
1264 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001265 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001266 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -07001267 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001268 # not receive response before the deadline. Failed
1269 # tasks will be retried according to the
1270 # retry configuration. `503` (Service Unavailable) is
1271 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -07001272 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
1273 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001274 # Requests) response from an app handler does not cause traffic congestion
1275 # control to throttle the queue.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001276 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
1277 #
1278 # A request body is allowed only if the HTTP method is POST or PUT. It is
1279 # an error to set a body on a task with an incompatible HttpMethod.
1280 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
1281 #
1282 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
1283 # HTTP requests with this http_method, otherwise the task attempt fails with
1284 # error code 405 (Method Not Allowed). See [Writing a push task request
1285 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
1286 # and the App Engine documentation for your runtime on [How Requests are
1287 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
1288 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
1289 #
1290 # * If app_engine_routing_override is set on the
1291 # queue, this
1292 # value is used for all tasks in the queue, no matter what the setting is
1293 # for the task-level
1294 # app_engine_routing.
1295 #
1296 # Defines routing characteristics specific to App Engine - service, version,
1297 # and instance.
1298 #
1299 # For more information about services, versions, and instances see
1300 # [An Overview of App
1301 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1302 # [Microservices Architecture on Google App
1303 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1304 # [App Engine Standard request
1305 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1306 # and [App Engine Flex request
1307 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1308 #
1309 # Using AppEngineRouting requires
1310 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1311 # Google IAM permission for the project
1312 # and the following scope:
1313 #
1314 # `https://www.googleapis.com/auth/cloud-platform`
1315 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1316 #
1317 # By default, the task is sent to an instance which is available when
1318 # the task is attempted.
1319 #
1320 # Requests can only be sent to a specific instance if
1321 # [manual scaling is used in App Engine
1322 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1323 # App Engine Flex does not support instances. For more information, see
1324 # [App Engine Standard request
1325 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1326 # and [App Engine Flex request
1327 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1328 &quot;version&quot;: &quot;A String&quot;, # App version.
1329 #
1330 # By default, the task is sent to the version which is the default
1331 # version when the task is attempted.
1332 #
1333 # For some queues or tasks which were created using the App Engine
1334 # Task Queue API, host is not parsable
1335 # into service,
1336 # version, and
1337 # instance. For example, some tasks
1338 # which were created using the App Engine SDK use a custom domain
1339 # name; custom domains are not parsed by Cloud Tasks. If
1340 # host is not parsable, then
1341 # service,
1342 # version, and
1343 # instance are the empty string.
1344 &quot;service&quot;: &quot;A String&quot;, # App service.
1345 #
1346 # By default, the task is sent to the service which is the default
1347 # service when the task is attempted.
1348 #
1349 # For some queues or tasks which were created using the App Engine
1350 # Task Queue API, host is not parsable
1351 # into service,
1352 # version, and
1353 # instance. For example, some tasks
1354 # which were created using the App Engine SDK use a custom domain
1355 # name; custom domains are not parsed by Cloud Tasks. If
1356 # host is not parsable, then
1357 # service,
1358 # version, and
1359 # instance are the empty string.
1360 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1361 #
1362 # The host is constructed from the domain name of the app associated with
1363 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1364 # service, version,
1365 # and instance. Tasks which were created using
1366 # the App Engine SDK might have a custom domain name.
1367 #
1368 # For more information, see
1369 # [How Requests are
1370 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1371 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001372 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001373 #
1374 # This map contains the header field names and values.
1375 # Headers can be set when the
1376 # task is created.
1377 # Repeated headers are not supported but a header value can contain commas.
1378 #
1379 # Cloud Tasks sets some headers to default values:
1380 #
1381 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -07001382 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001383 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -07001384 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001385 # modified `User-Agent`.
1386 #
1387 # If the task has a body, Cloud
1388 # Tasks sets the following headers:
1389 #
1390 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -07001391 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001392 # setting `Content-Type` to a particular media type when the
1393 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07001394 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001395 # * `Content-Length`: This is computed by Cloud Tasks. This value is
1396 # output only. It cannot be changed.
1397 #
1398 # The headers below cannot be set or overridden:
1399 #
1400 # * `Host`
1401 # * `X-Google-*`
1402 # * `X-AppEngine-*`
1403 #
1404 # In addition, Cloud Tasks sets some headers when the task is dispatched,
1405 # such as headers containing information about the task; see
1406 # [request
Dan O'Mearadd494642020-05-01 07:42:23 -07001407 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001408 # These headers are set only when the task is dispatched, so they are not
1409 # visible when the task is returned in a Cloud Tasks response.
1410 #
1411 # Although there is no specific limit for the maximum number of headers or
1412 # the size, there is a limit on the maximum size of the Task. For more
1413 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001414 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001415 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001416 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
1417 #
1418 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
1419 # It can contain a path and query string arguments.
1420 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
1421 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001422 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001423 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted or retried.
1424 #
1425 # `schedule_time` will be truncated to the nearest microsecond.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001426 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
1427 #
1428 # The task name.
1429 #
1430 # The task name must have the following format:
1431 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
1432 #
1433 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1434 # hyphens (-), colons (:), or periods (.).
1435 # For more information, see
1436 # [Identifying
1437 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1438 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
1439 # The list of available locations can be obtained by calling
1440 # ListLocations.
1441 # For more information, see https://cloud.google.com/about/locations/.
1442 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1443 # hyphens (-). The maximum length is 100 characters.
1444 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1445 # hyphens (-), or underscores (_). The maximum length is 500 characters.
1446 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
1447 # been returned.
1448 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001449 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
1450 #
1451 # `create_time` will be truncated to the nearest second.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001452 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the worker.
1453 #
1454 # An HTTP task is a task that has HttpRequest set.
1455 #
1456 # The task will be pushed to the worker as an HTTP request. If the worker
1457 # or the redirected worker acknowledges the task by returning a successful HTTP
1458 # response code ([`200` - `299`]), the task will be removed from the queue. If
1459 # any other HTTP response code is returned or no response is received, the
1460 # task will be retried according to the following:
1461 #
1462 # * User-specified throttling: retry configuration,
1463 # rate limits, and the queue&#x27;s state.
1464 #
1465 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
1466 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
1467 # will not be changed.
1468 #
1469 # System throttling happens because:
1470 #
1471 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
1472 # rate limits will be used. But if the worker returns
1473 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
1474 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
1475 # specified in the `Retry-After` HTTP response header is considered.
1476 #
1477 # * To prevent traffic spikes and to smooth sudden increases in traffic,
1478 # dispatches ramp up slowly when the queue is newly created or idle and
1479 # if large numbers of tasks suddenly become available to dispatch (due to
1480 # spikes in create task rates, the queue being unpaused, or many tasks
1481 # that are scheduled at the same time).
1482 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
1483 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
1484 # token will be generated and attached as an `Authorization` header in the
1485 # HTTP request.
1486 #
1487 # This type of authorization can be used for many scenarios, including
1488 # calling Cloud Run, or endpoints where you intend to validate the token
1489 # yourself.
1490 # [OpenID Connect
1491 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
1492 # This type of authorization can be used for many scenarios, including
1493 # calling Cloud Run, or endpoints where you intend to validate the token
1494 # yourself.
1495 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1496 # to be used for generating OIDC token.
1497 # The service account must be within the same project as the queue. The
1498 # caller must have iam.serviceAccounts.actAs permission for the service
1499 # account.
1500 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
1501 # specified in target will be used.
1502 },
1503 &quot;headers&quot;: { # HTTP request headers.
1504 #
1505 # This map contains the header field names and values.
1506 # Headers can be set when the
1507 # task is created.
1508 #
1509 # These headers represent a subset of the headers that will accompany the
1510 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
1511 #
1512 # A partial list of headers that will be ignored or replaced is:
1513 #
1514 # * Host: This will be computed by Cloud Tasks and derived from
1515 # HttpRequest.url.
1516 # * Content-Length: This will be computed by Cloud Tasks.
1517 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
1518 # * X-Google-*: Google use only.
1519 # * X-AppEngine-*: Google use only.
1520 #
1521 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
1522 # `Content-Type` to a media type when the
1523 # task is created.
1524 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
1525 # `&quot;application/json&quot;`.
1526 #
1527 # Headers which can have multiple values (according to RFC2616) can be
1528 # specified using comma-separated values.
1529 #
1530 # The size of the headers must be less than 80KB.
1531 &quot;a_key&quot;: &quot;A String&quot;,
1532 },
1533 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
1534 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
1535 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
1536 # will be generated and attached as an `Authorization` header in the HTTP
1537 # request.
1538 #
1539 # This type of authorization should generally only be used when calling
1540 # Google APIs hosted on *.googleapis.com.
1541 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
1542 # This type of authorization should generally only be used when calling Google
1543 # APIs hosted on *.googleapis.com.
1544 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
1545 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
1546 # will be used.
1547 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1548 # to be used for generating OAuth token.
1549 # The service account must be within the same project as the queue. The
1550 # caller must have iam.serviceAccounts.actAs permission for the service
1551 # account.
1552 },
1553 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
1554 #
1555 # A request body is allowed only if the
1556 # HTTP method is POST, PUT, or PATCH. It is an
1557 # error to set body on a task with an incompatible HttpMethod.
1558 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
1559 #
1560 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
1561 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
1562 # encode some characters for safety and compatibility. The maximum allowed
1563 # URL length is 2083 characters after encoding.
1564 #
1565 # The `Location` header response from a redirect response [`300` - `399`]
1566 # may be followed. The redirect is not counted as a separate attempt.
1567 },
1568 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
1569 #
1570 # This count includes attempts which have been dispatched but haven&#x27;t
1571 # received a response.
1572 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
1573 # respond by this deadline then the request is cancelled and the attempt
1574 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
1575 # task according to the RetryConfig.
1576 #
1577 # Note that when the request is cancelled, Cloud Tasks will stop listening
1578 # for the response, but whether the worker stops processing depends on the
1579 # worker. For example, if the worker is stuck, it may not react to cancelled
1580 # requests.
1581 #
1582 # The default and maximum values depend on the type of request:
1583 #
1584 # * For HTTP tasks, the default is 10 minutes. The deadline
1585 # must be in the interval [15 seconds, 30 minutes].
1586 #
1587 # * For App Engine tasks, 0 indicates that the
1588 # request has the default deadline. The default deadline depends on the
1589 # [scaling
1590 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
1591 # of the service: 10 minutes for standard apps with automatic scaling, 24
1592 # hours for standard apps with manual and basic scaling, and 60 minutes for
1593 # flex apps. If the request deadline is set, it must be in the interval [15
1594 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
1595 # `dispatch_deadline`, the app handler will not run for longer than than
1596 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
1597 # at most a few seconds more than the app handler&#x27;s timeout. For more
1598 # information see
1599 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
1600 #
1601 # `dispatch_deadline` will be truncated to the nearest millisecond. The
1602 # deadline is an approximate deadline.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001603 }</pre>
1604</div>
1605
1606<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001607 <code class="details" id="list">list(parent, pageSize=None, responseView=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001608 <pre>Lists the tasks in a queue.
1609
1610By default, only the BASIC view is retrieved
1611due to performance considerations;
1612response_view controls the
1613subset of information which is returned.
1614
1615The tasks may be returned in any order. The ordering may change at any
1616time.
1617
1618Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001619 parent: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001620`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001621 pageSize: integer, Maximum page size.
1622
1623Fewer tasks than requested might be returned, even if more tasks exist; use
1624next_page_token in the response to
1625determine if more tasks exist.
1626
1627The maximum page size is 1000. If unspecified, the page size will be the
1628maximum.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001629 responseView: string, The response_view specifies which subset of the Task will be
1630returned.
1631
1632By default response_view is BASIC; not all
1633information is retrieved by default because some data, such as
1634payloads, might be desirable to return only when needed because
1635of its large size or because of the sensitivity of data that it
1636contains.
1637
1638Authorization for FULL requires
1639`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
1640permission on the Task resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001641 pageToken: string, A token identifying the page of results to return.
1642
1643To request the first page results, page_token must be empty. To
1644request the next page of results, page_token must be the value of
1645next_page_token returned
1646from the previous call to ListTasks
1647method.
1648
1649The page token is valid for only 2 hours.
1650 x__xgafv: string, V1 error format.
1651 Allowed values
1652 1 - v1 error format
1653 2 - v2 error format
1654
1655Returns:
1656 An object of the form:
1657
1658 { # Response message for listing tasks using ListTasks.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001659 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results.
1660 #
1661 # To return the next page of results, call
1662 # ListTasks with this value as the
1663 # page_token.
1664 #
1665 # If the next_page_token is empty, there are no more results.
Bu Sun Kim65020912020-05-20 12:08:20 -07001666 &quot;tasks&quot;: [ # The list of tasks.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001667 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -07001668 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
1669 #
1670 # Only dispatch_time will be set.
1671 # The other Attempt information is not retained by Cloud Tasks.
Bu Sun Kim65020912020-05-20 12:08:20 -07001672 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
1673 #
1674 # `response_time` will be truncated to the nearest microsecond.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001675 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
1676 #
1677 # `schedule_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07001678 &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.
1679 #
1680 # If `response_time` is unset, then the task has not been attempted or is
1681 # currently running and the `response_status` field is meaningless.
1682 # different programming environments, including REST APIs and RPC APIs. It is
1683 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1684 # three pieces of data: error code, error message, and error details.
1685 #
1686 # You can find out more about this error model and how to work with it in the
1687 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001688 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1689 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1690 # user-facing error message should be localized and sent in the
1691 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -07001692 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1693 # message types for APIs to use.
1694 {
1695 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1696 },
1697 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001698 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001699 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
1700 #
1701 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07001702 },
1703 &quot;lastAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s last attempt.
Bu Sun Kim65020912020-05-20 12:08:20 -07001704 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
1705 #
1706 # `response_time` will be truncated to the nearest microsecond.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001707 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
1708 #
1709 # `schedule_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07001710 &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.
1711 #
1712 # If `response_time` is unset, then the task has not been attempted or is
1713 # currently running and the `response_status` field is meaningless.
1714 # different programming environments, including REST APIs and RPC APIs. It is
1715 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1716 # three pieces of data: error code, error message, and error details.
1717 #
1718 # You can find out more about this error model and how to work with it in the
1719 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001720 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1721 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1722 # user-facing error message should be localized and sent in the
1723 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -07001724 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1725 # message types for APIs to use.
1726 {
1727 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1728 },
1729 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001730 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001731 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
1732 #
1733 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07001734 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001735 &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 -07001736 #
1737 # An App Engine task is a task that has AppEngineHttpRequest set.
1738 #
1739 # The message defines the HTTP request that is sent to an App Engine app when
1740 # the task is dispatched.
1741 #
1742 # Using AppEngineHttpRequest requires
1743 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1744 # Google IAM permission for the project
1745 # and the following scope:
1746 #
1747 # `https://www.googleapis.com/auth/cloud-platform`
1748 #
1749 # The task will be delivered to the App Engine app which belongs to the same
1750 # project as the queue. For more information, see
1751 # [How Requests are
1752 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1753 # and how routing is affected by
1754 # [dispatch
1755 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
1756 # Traffic is encrypted during transport and never leaves Google datacenters.
1757 # Because this traffic is carried over a communication mechanism internal to
1758 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
1759 # The request to the handler, however, will appear to have used the HTTP
1760 # protocol.
1761 #
1762 # The AppEngineRouting used to construct the URL that the task is
1763 # delivered to can be set at the queue-level or task-level:
1764 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001765 # * If app_engine_routing_override is set on the
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001766 # queue, this value
1767 # is used for all tasks in the queue, no matter what the setting is for the
1768 # task-level
Dan O'Mearadd494642020-05-01 07:42:23 -07001769 # app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001770 #
1771 #
1772 # The `url` that the task will be sent to is:
1773 #
1774 # * `url =` host `+`
1775 # relative_uri
1776 #
1777 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
1778 # URIs restricted with
1779 # [`login:
1780 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
1781 # Because tasks are not run as any user, they cannot be dispatched to URIs
1782 # restricted with
1783 # [`login:
1784 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
1785 # Task dispatches also do not follow redirects.
1786 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001787 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001788 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -07001789 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001790 # not receive response before the deadline. Failed
1791 # tasks will be retried according to the
1792 # retry configuration. `503` (Service Unavailable) is
1793 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -07001794 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
1795 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001796 # Requests) response from an app handler does not cause traffic congestion
1797 # control to throttle the queue.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001798 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
1799 #
1800 # A request body is allowed only if the HTTP method is POST or PUT. It is
1801 # an error to set a body on a task with an incompatible HttpMethod.
1802 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
1803 #
1804 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
1805 # HTTP requests with this http_method, otherwise the task attempt fails with
1806 # error code 405 (Method Not Allowed). See [Writing a push task request
1807 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
1808 # and the App Engine documentation for your runtime on [How Requests are
1809 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
1810 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
1811 #
1812 # * If app_engine_routing_override is set on the
1813 # queue, this
1814 # value is used for all tasks in the queue, no matter what the setting is
1815 # for the task-level
1816 # app_engine_routing.
1817 #
1818 # Defines routing characteristics specific to App Engine - service, version,
1819 # and instance.
1820 #
1821 # For more information about services, versions, and instances see
1822 # [An Overview of App
1823 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1824 # [Microservices Architecture on Google App
1825 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1826 # [App Engine Standard request
1827 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1828 # and [App Engine Flex request
1829 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1830 #
1831 # Using AppEngineRouting requires
1832 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1833 # Google IAM permission for the project
1834 # and the following scope:
1835 #
1836 # `https://www.googleapis.com/auth/cloud-platform`
1837 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1838 #
1839 # By default, the task is sent to an instance which is available when
1840 # the task is attempted.
1841 #
1842 # Requests can only be sent to a specific instance if
1843 # [manual scaling is used in App Engine
1844 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1845 # App Engine Flex does not support instances. For more information, see
1846 # [App Engine Standard request
1847 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1848 # and [App Engine Flex request
1849 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1850 &quot;version&quot;: &quot;A String&quot;, # App version.
1851 #
1852 # By default, the task is sent to the version which is the default
1853 # version when the task is attempted.
1854 #
1855 # For some queues or tasks which were created using the App Engine
1856 # Task Queue API, host is not parsable
1857 # into service,
1858 # version, and
1859 # instance. For example, some tasks
1860 # which were created using the App Engine SDK use a custom domain
1861 # name; custom domains are not parsed by Cloud Tasks. If
1862 # host is not parsable, then
1863 # service,
1864 # version, and
1865 # instance are the empty string.
1866 &quot;service&quot;: &quot;A String&quot;, # App service.
1867 #
1868 # By default, the task is sent to the service which is the default
1869 # service when the task is attempted.
1870 #
1871 # For some queues or tasks which were created using the App Engine
1872 # Task Queue API, host is not parsable
1873 # into service,
1874 # version, and
1875 # instance. For example, some tasks
1876 # which were created using the App Engine SDK use a custom domain
1877 # name; custom domains are not parsed by Cloud Tasks. If
1878 # host is not parsable, then
1879 # service,
1880 # version, and
1881 # instance are the empty string.
1882 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1883 #
1884 # The host is constructed from the domain name of the app associated with
1885 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1886 # service, version,
1887 # and instance. Tasks which were created using
1888 # the App Engine SDK might have a custom domain name.
1889 #
1890 # For more information, see
1891 # [How Requests are
1892 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1893 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001894 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001895 #
1896 # This map contains the header field names and values.
1897 # Headers can be set when the
1898 # task is created.
1899 # Repeated headers are not supported but a header value can contain commas.
1900 #
1901 # Cloud Tasks sets some headers to default values:
1902 #
1903 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -07001904 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001905 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -07001906 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001907 # modified `User-Agent`.
1908 #
1909 # If the task has a body, Cloud
1910 # Tasks sets the following headers:
1911 #
1912 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -07001913 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001914 # setting `Content-Type` to a particular media type when the
1915 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07001916 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001917 # * `Content-Length`: This is computed by Cloud Tasks. This value is
1918 # output only. It cannot be changed.
1919 #
1920 # The headers below cannot be set or overridden:
1921 #
1922 # * `Host`
1923 # * `X-Google-*`
1924 # * `X-AppEngine-*`
1925 #
1926 # In addition, Cloud Tasks sets some headers when the task is dispatched,
1927 # such as headers containing information about the task; see
1928 # [request
Dan O'Mearadd494642020-05-01 07:42:23 -07001929 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001930 # These headers are set only when the task is dispatched, so they are not
1931 # visible when the task is returned in a Cloud Tasks response.
1932 #
1933 # Although there is no specific limit for the maximum number of headers or
1934 # the size, there is a limit on the maximum size of the Task. For more
1935 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001936 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001937 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001938 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
1939 #
1940 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
1941 # It can contain a path and query string arguments.
1942 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
1943 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001944 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001945 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted or retried.
1946 #
1947 # `schedule_time` will be truncated to the nearest microsecond.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001948 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
1949 #
1950 # The task name.
1951 #
1952 # The task name must have the following format:
1953 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
1954 #
1955 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1956 # hyphens (-), colons (:), or periods (.).
1957 # For more information, see
1958 # [Identifying
1959 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1960 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
1961 # The list of available locations can be obtained by calling
1962 # ListLocations.
1963 # For more information, see https://cloud.google.com/about/locations/.
1964 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1965 # hyphens (-). The maximum length is 100 characters.
1966 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1967 # hyphens (-), or underscores (_). The maximum length is 500 characters.
1968 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
1969 # been returned.
1970 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001971 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
1972 #
1973 # `create_time` will be truncated to the nearest second.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001974 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the worker.
1975 #
1976 # An HTTP task is a task that has HttpRequest set.
1977 #
1978 # The task will be pushed to the worker as an HTTP request. If the worker
1979 # or the redirected worker acknowledges the task by returning a successful HTTP
1980 # response code ([`200` - `299`]), the task will be removed from the queue. If
1981 # any other HTTP response code is returned or no response is received, the
1982 # task will be retried according to the following:
1983 #
1984 # * User-specified throttling: retry configuration,
1985 # rate limits, and the queue&#x27;s state.
1986 #
1987 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
1988 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
1989 # will not be changed.
1990 #
1991 # System throttling happens because:
1992 #
1993 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
1994 # rate limits will be used. But if the worker returns
1995 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
1996 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
1997 # specified in the `Retry-After` HTTP response header is considered.
1998 #
1999 # * To prevent traffic spikes and to smooth sudden increases in traffic,
2000 # dispatches ramp up slowly when the queue is newly created or idle and
2001 # if large numbers of tasks suddenly become available to dispatch (due to
2002 # spikes in create task rates, the queue being unpaused, or many tasks
2003 # that are scheduled at the same time).
2004 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
2005 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
2006 # token will be generated and attached as an `Authorization` header in the
2007 # HTTP request.
2008 #
2009 # This type of authorization can be used for many scenarios, including
2010 # calling Cloud Run, or endpoints where you intend to validate the token
2011 # yourself.
2012 # [OpenID Connect
2013 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
2014 # This type of authorization can be used for many scenarios, including
2015 # calling Cloud Run, or endpoints where you intend to validate the token
2016 # yourself.
2017 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2018 # to be used for generating OIDC token.
2019 # The service account must be within the same project as the queue. The
2020 # caller must have iam.serviceAccounts.actAs permission for the service
2021 # account.
2022 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
2023 # specified in target will be used.
2024 },
2025 &quot;headers&quot;: { # HTTP request headers.
2026 #
2027 # This map contains the header field names and values.
2028 # Headers can be set when the
2029 # task is created.
2030 #
2031 # These headers represent a subset of the headers that will accompany the
2032 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
2033 #
2034 # A partial list of headers that will be ignored or replaced is:
2035 #
2036 # * Host: This will be computed by Cloud Tasks and derived from
2037 # HttpRequest.url.
2038 # * Content-Length: This will be computed by Cloud Tasks.
2039 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
2040 # * X-Google-*: Google use only.
2041 # * X-AppEngine-*: Google use only.
2042 #
2043 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
2044 # `Content-Type` to a media type when the
2045 # task is created.
2046 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
2047 # `&quot;application/json&quot;`.
2048 #
2049 # Headers which can have multiple values (according to RFC2616) can be
2050 # specified using comma-separated values.
2051 #
2052 # The size of the headers must be less than 80KB.
2053 &quot;a_key&quot;: &quot;A String&quot;,
2054 },
2055 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
2056 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
2057 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
2058 # will be generated and attached as an `Authorization` header in the HTTP
2059 # request.
2060 #
2061 # This type of authorization should generally only be used when calling
2062 # Google APIs hosted on *.googleapis.com.
2063 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
2064 # This type of authorization should generally only be used when calling Google
2065 # APIs hosted on *.googleapis.com.
2066 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
2067 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
2068 # will be used.
2069 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2070 # to be used for generating OAuth token.
2071 # The service account must be within the same project as the queue. The
2072 # caller must have iam.serviceAccounts.actAs permission for the service
2073 # account.
2074 },
2075 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
2076 #
2077 # A request body is allowed only if the
2078 # HTTP method is POST, PUT, or PATCH. It is an
2079 # error to set body on a task with an incompatible HttpMethod.
2080 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
2081 #
2082 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
2083 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
2084 # encode some characters for safety and compatibility. The maximum allowed
2085 # URL length is 2083 characters after encoding.
2086 #
2087 # The `Location` header response from a redirect response [`300` - `399`]
2088 # may be followed. The redirect is not counted as a separate attempt.
2089 },
2090 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
2091 #
2092 # This count includes attempts which have been dispatched but haven&#x27;t
2093 # received a response.
2094 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
2095 # respond by this deadline then the request is cancelled and the attempt
2096 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
2097 # task according to the RetryConfig.
2098 #
2099 # Note that when the request is cancelled, Cloud Tasks will stop listening
2100 # for the response, but whether the worker stops processing depends on the
2101 # worker. For example, if the worker is stuck, it may not react to cancelled
2102 # requests.
2103 #
2104 # The default and maximum values depend on the type of request:
2105 #
2106 # * For HTTP tasks, the default is 10 minutes. The deadline
2107 # must be in the interval [15 seconds, 30 minutes].
2108 #
2109 # * For App Engine tasks, 0 indicates that the
2110 # request has the default deadline. The default deadline depends on the
2111 # [scaling
2112 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
2113 # of the service: 10 minutes for standard apps with automatic scaling, 24
2114 # hours for standard apps with manual and basic scaling, and 60 minutes for
2115 # flex apps. If the request deadline is set, it must be in the interval [15
2116 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
2117 # `dispatch_deadline`, the app handler will not run for longer than than
2118 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
2119 # at most a few seconds more than the app handler&#x27;s timeout. For more
2120 # information see
2121 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
2122 #
2123 # `dispatch_deadline` will be truncated to the nearest millisecond. The
2124 # deadline is an approximate deadline.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002125 },
2126 ],
2127 }</pre>
2128</div>
2129
2130<div class="method">
2131 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2132 <pre>Retrieves the next page of results.
2133
2134Args:
2135 previous_request: The request for the previous page. (required)
2136 previous_response: The response from the request for the previous page. (required)
2137
2138Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002139 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002140 page. Returns None if there are no more items in the collection.
2141 </pre>
2142</div>
2143
2144<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002145 <code class="details" id="run">run(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002146 <pre>Forces a task to run now.
2147
2148When this method is called, Cloud Tasks will dispatch the task, even if
2149the task is already running, the queue has reached its RateLimits or
2150is PAUSED.
2151
2152This command is meant to be used for manual debugging. For
2153example, RunTask can be used to retry a failed
2154task after a fix has been made or to manually force a task to be
2155dispatched now.
2156
2157The dispatched task is returned. That is, the task that is returned
2158contains the status after the task is dispatched but
2159before the task is received by its target.
2160
Bu Sun Kim65020912020-05-20 12:08:20 -07002161If Cloud Tasks receives a successful response from the task&#x27;s
2162target, then the task will be deleted; otherwise the task&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002163schedule_time will be reset to the time that
2164RunTask was called plus the retry delay specified
Bu Sun Kim65020912020-05-20 12:08:20 -07002165in the queue&#x27;s RetryConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002166
2167RunTask returns
2168NOT_FOUND when it is called on a
2169task that has already succeeded or permanently failed.
2170
2171Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002172 name: string, Required. The task name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002173`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002174 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002175 The object takes the form of:
2176
2177{ # Request message for forcing a task to run now using
2178 # RunTask.
Bu Sun Kim65020912020-05-20 12:08:20 -07002179 &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 -07002180 # returned.
2181 #
2182 # By default response_view is BASIC; not all
2183 # information is retrieved by default because some data, such as
2184 # payloads, might be desirable to return only when needed because
2185 # of its large size or because of the sensitivity of data that it
2186 # contains.
2187 #
2188 # Authorization for FULL requires
2189 # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
2190 # permission on the Task resource.
2191 }
2192
2193 x__xgafv: string, V1 error format.
2194 Allowed values
2195 1 - v1 error format
2196 2 - v2 error format
2197
2198Returns:
2199 An object of the form:
2200
2201 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -07002202 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
2203 #
2204 # Only dispatch_time will be set.
2205 # The other Attempt information is not retained by Cloud Tasks.
Bu Sun Kim65020912020-05-20 12:08:20 -07002206 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
2207 #
2208 # `response_time` will be truncated to the nearest microsecond.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002209 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
2210 #
2211 # `schedule_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07002212 &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.
2213 #
2214 # If `response_time` is unset, then the task has not been attempted or is
2215 # currently running and the `response_status` field is meaningless.
2216 # different programming environments, including REST APIs and RPC APIs. It is
2217 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2218 # three pieces of data: error code, error message, and error details.
2219 #
2220 # You can find out more about this error model and how to work with it in the
2221 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002222 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2223 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2224 # user-facing error message should be localized and sent in the
2225 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -07002226 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2227 # message types for APIs to use.
2228 {
2229 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2230 },
2231 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002232 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002233 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
2234 #
2235 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07002236 },
2237 &quot;lastAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s last attempt.
Bu Sun Kim65020912020-05-20 12:08:20 -07002238 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
2239 #
2240 # `response_time` will be truncated to the nearest microsecond.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002241 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
2242 #
2243 # `schedule_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07002244 &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.
2245 #
2246 # If `response_time` is unset, then the task has not been attempted or is
2247 # currently running and the `response_status` field is meaningless.
2248 # different programming environments, including REST APIs and RPC APIs. It is
2249 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2250 # three pieces of data: error code, error message, and error details.
2251 #
2252 # You can find out more about this error model and how to work with it in the
2253 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002254 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2255 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2256 # user-facing error message should be localized and sent in the
2257 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -07002258 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2259 # message types for APIs to use.
2260 {
2261 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2262 },
2263 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002264 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002265 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
2266 #
2267 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07002268 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002269 &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 -07002270 #
2271 # An App Engine task is a task that has AppEngineHttpRequest set.
2272 #
2273 # The message defines the HTTP request that is sent to an App Engine app when
2274 # the task is dispatched.
2275 #
2276 # Using AppEngineHttpRequest requires
2277 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2278 # Google IAM permission for the project
2279 # and the following scope:
2280 #
2281 # `https://www.googleapis.com/auth/cloud-platform`
2282 #
2283 # The task will be delivered to the App Engine app which belongs to the same
2284 # project as the queue. For more information, see
2285 # [How Requests are
2286 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2287 # and how routing is affected by
2288 # [dispatch
2289 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
2290 # Traffic is encrypted during transport and never leaves Google datacenters.
2291 # Because this traffic is carried over a communication mechanism internal to
2292 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
2293 # The request to the handler, however, will appear to have used the HTTP
2294 # protocol.
2295 #
2296 # The AppEngineRouting used to construct the URL that the task is
2297 # delivered to can be set at the queue-level or task-level:
2298 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002299 # * If app_engine_routing_override is set on the
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002300 # queue, this value
2301 # is used for all tasks in the queue, no matter what the setting is for the
2302 # task-level
Dan O'Mearadd494642020-05-01 07:42:23 -07002303 # app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002304 #
2305 #
2306 # The `url` that the task will be sent to is:
2307 #
2308 # * `url =` host `+`
2309 # relative_uri
2310 #
2311 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
2312 # URIs restricted with
2313 # [`login:
2314 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
2315 # Because tasks are not run as any user, they cannot be dispatched to URIs
2316 # restricted with
2317 # [`login:
2318 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
2319 # Task dispatches also do not follow redirects.
2320 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002321 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002322 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -07002323 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002324 # not receive response before the deadline. Failed
2325 # tasks will be retried according to the
2326 # retry configuration. `503` (Service Unavailable) is
2327 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -07002328 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
2329 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002330 # Requests) response from an app handler does not cause traffic congestion
2331 # control to throttle the queue.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002332 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
2333 #
2334 # A request body is allowed only if the HTTP method is POST or PUT. It is
2335 # an error to set a body on a task with an incompatible HttpMethod.
2336 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
2337 #
2338 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
2339 # HTTP requests with this http_method, otherwise the task attempt fails with
2340 # error code 405 (Method Not Allowed). See [Writing a push task request
2341 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
2342 # and the App Engine documentation for your runtime on [How Requests are
2343 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
2344 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
2345 #
2346 # * If app_engine_routing_override is set on the
2347 # queue, this
2348 # value is used for all tasks in the queue, no matter what the setting is
2349 # for the task-level
2350 # app_engine_routing.
2351 #
2352 # Defines routing characteristics specific to App Engine - service, version,
2353 # and instance.
2354 #
2355 # For more information about services, versions, and instances see
2356 # [An Overview of App
2357 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2358 # [Microservices Architecture on Google App
2359 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2360 # [App Engine Standard request
2361 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2362 # and [App Engine Flex request
2363 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2364 #
2365 # Using AppEngineRouting requires
2366 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2367 # Google IAM permission for the project
2368 # and the following scope:
2369 #
2370 # `https://www.googleapis.com/auth/cloud-platform`
2371 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2372 #
2373 # By default, the task is sent to an instance which is available when
2374 # the task is attempted.
2375 #
2376 # Requests can only be sent to a specific instance if
2377 # [manual scaling is used in App Engine
2378 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2379 # App Engine Flex does not support instances. For more information, see
2380 # [App Engine Standard request
2381 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2382 # and [App Engine Flex request
2383 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2384 &quot;version&quot;: &quot;A String&quot;, # App version.
2385 #
2386 # By default, the task is sent to the version which is the default
2387 # version when the task is attempted.
2388 #
2389 # For some queues or tasks which were created using the App Engine
2390 # Task Queue API, host is not parsable
2391 # into service,
2392 # version, and
2393 # instance. For example, some tasks
2394 # which were created using the App Engine SDK use a custom domain
2395 # name; custom domains are not parsed by Cloud Tasks. If
2396 # host is not parsable, then
2397 # service,
2398 # version, and
2399 # instance are the empty string.
2400 &quot;service&quot;: &quot;A String&quot;, # App service.
2401 #
2402 # By default, the task is sent to the service which is the default
2403 # service when the task is attempted.
2404 #
2405 # For some queues or tasks which were created using the App Engine
2406 # Task Queue API, host is not parsable
2407 # into service,
2408 # version, and
2409 # instance. For example, some tasks
2410 # which were created using the App Engine SDK use a custom domain
2411 # name; custom domains are not parsed by Cloud Tasks. If
2412 # host is not parsable, then
2413 # service,
2414 # version, and
2415 # instance are the empty string.
2416 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2417 #
2418 # The host is constructed from the domain name of the app associated with
2419 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2420 # service, version,
2421 # and instance. Tasks which were created using
2422 # the App Engine SDK might have a custom domain name.
2423 #
2424 # For more information, see
2425 # [How Requests are
2426 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2427 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002428 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002429 #
2430 # This map contains the header field names and values.
2431 # Headers can be set when the
2432 # task is created.
2433 # Repeated headers are not supported but a header value can contain commas.
2434 #
2435 # Cloud Tasks sets some headers to default values:
2436 #
2437 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -07002438 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002439 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -07002440 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002441 # modified `User-Agent`.
2442 #
2443 # If the task has a body, Cloud
2444 # Tasks sets the following headers:
2445 #
2446 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -07002447 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002448 # setting `Content-Type` to a particular media type when the
2449 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07002450 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002451 # * `Content-Length`: This is computed by Cloud Tasks. This value is
2452 # output only. It cannot be changed.
2453 #
2454 # The headers below cannot be set or overridden:
2455 #
2456 # * `Host`
2457 # * `X-Google-*`
2458 # * `X-AppEngine-*`
2459 #
2460 # In addition, Cloud Tasks sets some headers when the task is dispatched,
2461 # such as headers containing information about the task; see
2462 # [request
Dan O'Mearadd494642020-05-01 07:42:23 -07002463 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002464 # These headers are set only when the task is dispatched, so they are not
2465 # visible when the task is returned in a Cloud Tasks response.
2466 #
2467 # Although there is no specific limit for the maximum number of headers or
2468 # the size, there is a limit on the maximum size of the Task. For more
2469 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002470 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002471 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002472 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
2473 #
2474 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
2475 # It can contain a path and query string arguments.
2476 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
2477 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002478 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002479 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted or retried.
2480 #
2481 # `schedule_time` will be truncated to the nearest microsecond.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002482 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
2483 #
2484 # The task name.
2485 #
2486 # The task name must have the following format:
2487 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
2488 #
2489 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2490 # hyphens (-), colons (:), or periods (.).
2491 # For more information, see
2492 # [Identifying
2493 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2494 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
2495 # The list of available locations can be obtained by calling
2496 # ListLocations.
2497 # For more information, see https://cloud.google.com/about/locations/.
2498 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2499 # hyphens (-). The maximum length is 100 characters.
2500 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
2501 # hyphens (-), or underscores (_). The maximum length is 500 characters.
2502 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
2503 # been returned.
2504 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002505 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
2506 #
2507 # `create_time` will be truncated to the nearest second.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002508 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the worker.
2509 #
2510 # An HTTP task is a task that has HttpRequest set.
2511 #
2512 # The task will be pushed to the worker as an HTTP request. If the worker
2513 # or the redirected worker acknowledges the task by returning a successful HTTP
2514 # response code ([`200` - `299`]), the task will be removed from the queue. If
2515 # any other HTTP response code is returned or no response is received, the
2516 # task will be retried according to the following:
2517 #
2518 # * User-specified throttling: retry configuration,
2519 # rate limits, and the queue&#x27;s state.
2520 #
2521 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
2522 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
2523 # will not be changed.
2524 #
2525 # System throttling happens because:
2526 #
2527 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
2528 # rate limits will be used. But if the worker returns
2529 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
2530 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
2531 # specified in the `Retry-After` HTTP response header is considered.
2532 #
2533 # * To prevent traffic spikes and to smooth sudden increases in traffic,
2534 # dispatches ramp up slowly when the queue is newly created or idle and
2535 # if large numbers of tasks suddenly become available to dispatch (due to
2536 # spikes in create task rates, the queue being unpaused, or many tasks
2537 # that are scheduled at the same time).
2538 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
2539 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
2540 # token will be generated and attached as an `Authorization` header in the
2541 # HTTP request.
2542 #
2543 # This type of authorization can be used for many scenarios, including
2544 # calling Cloud Run, or endpoints where you intend to validate the token
2545 # yourself.
2546 # [OpenID Connect
2547 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
2548 # This type of authorization can be used for many scenarios, including
2549 # calling Cloud Run, or endpoints where you intend to validate the token
2550 # yourself.
2551 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2552 # to be used for generating OIDC token.
2553 # The service account must be within the same project as the queue. The
2554 # caller must have iam.serviceAccounts.actAs permission for the service
2555 # account.
2556 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
2557 # specified in target will be used.
2558 },
2559 &quot;headers&quot;: { # HTTP request headers.
2560 #
2561 # This map contains the header field names and values.
2562 # Headers can be set when the
2563 # task is created.
2564 #
2565 # These headers represent a subset of the headers that will accompany the
2566 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
2567 #
2568 # A partial list of headers that will be ignored or replaced is:
2569 #
2570 # * Host: This will be computed by Cloud Tasks and derived from
2571 # HttpRequest.url.
2572 # * Content-Length: This will be computed by Cloud Tasks.
2573 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
2574 # * X-Google-*: Google use only.
2575 # * X-AppEngine-*: Google use only.
2576 #
2577 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
2578 # `Content-Type` to a media type when the
2579 # task is created.
2580 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
2581 # `&quot;application/json&quot;`.
2582 #
2583 # Headers which can have multiple values (according to RFC2616) can be
2584 # specified using comma-separated values.
2585 #
2586 # The size of the headers must be less than 80KB.
2587 &quot;a_key&quot;: &quot;A String&quot;,
2588 },
2589 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
2590 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
2591 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
2592 # will be generated and attached as an `Authorization` header in the HTTP
2593 # request.
2594 #
2595 # This type of authorization should generally only be used when calling
2596 # Google APIs hosted on *.googleapis.com.
2597 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
2598 # This type of authorization should generally only be used when calling Google
2599 # APIs hosted on *.googleapis.com.
2600 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
2601 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
2602 # will be used.
2603 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2604 # to be used for generating OAuth token.
2605 # The service account must be within the same project as the queue. The
2606 # caller must have iam.serviceAccounts.actAs permission for the service
2607 # account.
2608 },
2609 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
2610 #
2611 # A request body is allowed only if the
2612 # HTTP method is POST, PUT, or PATCH. It is an
2613 # error to set body on a task with an incompatible HttpMethod.
2614 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
2615 #
2616 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
2617 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
2618 # encode some characters for safety and compatibility. The maximum allowed
2619 # URL length is 2083 characters after encoding.
2620 #
2621 # The `Location` header response from a redirect response [`300` - `399`]
2622 # may be followed. The redirect is not counted as a separate attempt.
2623 },
2624 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
2625 #
2626 # This count includes attempts which have been dispatched but haven&#x27;t
2627 # received a response.
2628 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
2629 # respond by this deadline then the request is cancelled and the attempt
2630 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
2631 # task according to the RetryConfig.
2632 #
2633 # Note that when the request is cancelled, Cloud Tasks will stop listening
2634 # for the response, but whether the worker stops processing depends on the
2635 # worker. For example, if the worker is stuck, it may not react to cancelled
2636 # requests.
2637 #
2638 # The default and maximum values depend on the type of request:
2639 #
2640 # * For HTTP tasks, the default is 10 minutes. The deadline
2641 # must be in the interval [15 seconds, 30 minutes].
2642 #
2643 # * For App Engine tasks, 0 indicates that the
2644 # request has the default deadline. The default deadline depends on the
2645 # [scaling
2646 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
2647 # of the service: 10 minutes for standard apps with automatic scaling, 24
2648 # hours for standard apps with manual and basic scaling, and 60 minutes for
2649 # flex apps. If the request deadline is set, it must be in the interval [15
2650 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
2651 # `dispatch_deadline`, the app handler will not run for longer than than
2652 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
2653 # at most a few seconds more than the app handler&#x27;s timeout. For more
2654 # information see
2655 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
2656 #
2657 # `dispatch_deadline` will be truncated to the nearest millisecond. The
2658 # deadline is an approximate deadline.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002659 }</pre>
2660</div>
2661
2662</body></html>