blob: 23a392b8f0ac54bf04e013a657221fe40613dede [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 Kim65020912020-05-20 12:08:20 -070087 <code><a href="#list">list(parent, responseView=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Lists the tasks in a queue.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#run">run(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Forces a task to run now.</p>
95<h3>Method Details</h3>
96<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070097 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098 <pre>Creates a task and adds it to a queue.
99
100Tasks cannot be updated after creation; there is no UpdateTask command.
101
102* The maximum task size is 100KB.
103
104Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 parent: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
107
108The queue must already exist. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110 The object takes the form of:
111
112{ # Request message for CreateTask.
Bu Sun Kim65020912020-05-20 12:08:20 -0700113 &quot;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;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the worker.
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 #
160 # An HTTP task is a task that has HttpRequest set.
161 #
162 # The task will be pushed to the worker as an HTTP request. If the worker
163 # or the redirected worker acknowledges the task by returning a successful HTTP
164 # response code ([`200` - `299`]), the task will be removed from the queue. If
165 # any other HTTP response code is returned or no response is received, the
166 # task will be retried according to the following:
167 #
168 # * User-specified throttling: retry configuration,
Bu Sun Kim65020912020-05-20 12:08:20 -0700169 # rate limits, and the queue&#x27;s state.
Dan O'Mearadd494642020-05-01 07:42:23 -0700170 #
171 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
Bu Sun Kim65020912020-05-20 12:08:20 -0700172 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
Dan O'Mearadd494642020-05-01 07:42:23 -0700173 # will not be changed.
174 #
175 # System throttling happens because:
176 #
177 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
178 # rate limits will be used. But if the worker returns
179 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
180 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
181 # specified in the `Retry-After` HTTP response header is considered.
182 #
183 # * To prevent traffic spikes and to smooth sudden increases in traffic,
184 # dispatches ramp up slowly when the queue is newly created or idle and
185 # if large numbers of tasks suddenly become available to dispatch (due to
186 # spikes in create task rates, the queue being unpaused, or many tasks
187 # that are scheduled at the same time).
Bu Sun Kim65020912020-05-20 12:08:20 -0700188 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
Dan O'Mearadd494642020-05-01 07:42:23 -0700189 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
190 # will be generated and attached as an `Authorization` header in the HTTP
191 # request.
192 #
193 # This type of authorization should generally only be used when calling
194 # Google APIs hosted on *.googleapis.com.
195 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
196 # This type of authorization should generally only be used when calling Google
197 # APIs hosted on *.googleapis.com.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700198 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
199 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
200 # will be used.
Bu Sun Kim65020912020-05-20 12:08:20 -0700201 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
Dan O'Mearadd494642020-05-01 07:42:23 -0700202 # to be used for generating OAuth token.
203 # The service account must be within the same project as the queue. The
204 # caller must have iam.serviceAccounts.actAs permission for the service
205 # account.
206 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700207 &quot;headers&quot;: { # HTTP request headers.
208 #
209 # This map contains the header field names and values.
210 # Headers can be set when the
211 # task is created.
212 #
213 # These headers represent a subset of the headers that will accompany the
214 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
215 #
216 # A partial list of headers that will be ignored or replaced is:
217 #
218 # * Host: This will be computed by Cloud Tasks and derived from
219 # HttpRequest.url.
220 # * Content-Length: This will be computed by Cloud Tasks.
221 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
222 # * X-Google-*: Google use only.
223 # * X-AppEngine-*: Google use only.
224 #
225 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
226 # `Content-Type` to a media type when the
227 # task is created.
228 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
229 # `&quot;application/json&quot;`.
230 #
231 # Headers which can have multiple values (according to RFC2616) can be
232 # specified using comma-separated values.
233 #
234 # The size of the headers must be less than 80KB.
235 &quot;a_key&quot;: &quot;A String&quot;,
236 },
237 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
238 #
239 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
240 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
241 # encode some characters for safety and compatibility. The maximum allowed
242 # URL length is 2083 characters after encoding.
243 #
244 # The `Location` header response from a redirect response [`300` - `399`]
245 # may be followed. The redirect is not counted as a separate attempt.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700246 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
247 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
248 # token will be generated and attached as an `Authorization` header in the
249 # HTTP request.
250 #
251 # This type of authorization can be used for many scenarios, including
252 # calling Cloud Run, or endpoints where you intend to validate the token
253 # yourself.
254 # [OpenID Connect
255 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
256 # This type of authorization can be used for many scenarios, including
257 # calling Cloud Run, or endpoints where you intend to validate the token
258 # yourself.
259 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
260 # specified in target will be used.
261 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
262 # to be used for generating OIDC token.
263 # The service account must be within the same project as the queue. The
264 # caller must have iam.serviceAccounts.actAs permission for the service
265 # account.
266 },
267 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
268 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
269 #
270 # A request body is allowed only if the
271 # HTTP method is POST, PUT, or PATCH. It is an
272 # error to set body on a task with an incompatible HttpMethod.
Dan O'Mearadd494642020-05-01 07:42:23 -0700273 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700274 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
275 #
276 # The task name.
277 #
278 # The task name must have the following format:
279 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
280 #
281 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
282 # hyphens (-), colons (:), or periods (.).
283 # For more information, see
284 # [Identifying
285 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
286 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
287 # The list of available locations can be obtained by calling
288 # ListLocations.
289 # For more information, see https://cloud.google.com/about/locations/.
290 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
291 # hyphens (-). The maximum length is 100 characters.
292 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
293 # hyphens (-), or underscores (_). The maximum length is 500 characters.
294 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
295 # respond by this deadline then the request is cancelled and the attempt
296 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
297 # task according to the RetryConfig.
298 #
299 # Note that when the request is cancelled, Cloud Tasks will stop listing for
300 # the response, but whether the worker stops processing depends on the
301 # worker. For example, if the worker is stuck, it may not react to cancelled
302 # requests.
303 #
304 # The default and maximum values depend on the type of request:
305 #
306 # * For HTTP tasks, the default is 10 minutes. The deadline
307 # must be in the interval [15 seconds, 30 minutes].
308 #
309 # * For App Engine tasks, 0 indicates that the
310 # request has the default deadline. The default deadline depends on the
311 # [scaling
312 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
313 # of the service: 10 minutes for standard apps with automatic scaling, 24
314 # hours for standard apps with manual and basic scaling, and 60 minutes for
315 # flex apps. If the request deadline is set, it must be in the interval [15
316 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
317 # `dispatch_deadline`, the app handler will not run for longer than than
318 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
319 # at most a few seconds more than the app handler&#x27;s timeout. For more
320 # information see
321 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
322 #
323 # `dispatch_deadline` will be truncated to the nearest millisecond. The
324 # deadline is an approximate deadline.
325 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
326 #
327 # This count includes attempts which have been dispatched but haven&#x27;t
328 # received a response.
329 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
330 #
331 # Only dispatch_time will be set.
332 # The other Attempt information is not retained by Cloud Tasks.
Bu Sun Kim65020912020-05-20 12:08:20 -0700333 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
334 #
335 # `response_time` will be truncated to the nearest microsecond.
336 &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.
337 #
338 # If `response_time` is unset, then the task has not been attempted or is
339 # currently running and the `response_status` field is meaningless.
340 # different programming environments, including REST APIs and RPC APIs. It is
341 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
342 # three pieces of data: error code, error message, and error details.
343 #
344 # You can find out more about this error model and how to work with it in the
345 # [API Design Guide](https://cloud.google.com/apis/design/errors).
346 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
347 # message types for APIs to use.
348 {
349 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
350 },
351 ],
352 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
353 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
354 # user-facing error message should be localized and sent in the
355 # google.rpc.Status.details field, or localized by the client.
356 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700357 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
358 #
359 # `schedule_time` will be truncated to the nearest microsecond.
360 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
361 #
362 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -0700363 },
364 &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 -0700365 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
366 #
367 # `response_time` will be truncated to the nearest microsecond.
368 &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.
369 #
370 # If `response_time` is unset, then the task has not been attempted or is
371 # currently running and the `response_status` field is meaningless.
372 # different programming environments, including REST APIs and RPC APIs. It is
373 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
374 # three pieces of data: error code, error message, and error details.
375 #
376 # You can find out more about this error model and how to work with it in the
377 # [API Design Guide](https://cloud.google.com/apis/design/errors).
378 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
379 # message types for APIs to use.
380 {
381 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
382 },
383 ],
384 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
385 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
386 # user-facing error message should be localized and sent in the
387 # google.rpc.Status.details field, or localized by the client.
388 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700389 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
390 #
391 # `schedule_time` will be truncated to the nearest microsecond.
392 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
393 #
394 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -0700395 },
396 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
397 &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 -0700398 #
399 # An App Engine task is a task that has AppEngineHttpRequest set.
400 #
401 # The message defines the HTTP request that is sent to an App Engine app when
402 # the task is dispatched.
403 #
404 # Using AppEngineHttpRequest requires
405 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
406 # Google IAM permission for the project
407 # and the following scope:
408 #
409 # `https://www.googleapis.com/auth/cloud-platform`
410 #
411 # The task will be delivered to the App Engine app which belongs to the same
412 # project as the queue. For more information, see
413 # [How Requests are
414 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
415 # and how routing is affected by
416 # [dispatch
417 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
418 # Traffic is encrypted during transport and never leaves Google datacenters.
419 # Because this traffic is carried over a communication mechanism internal to
420 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
421 # The request to the handler, however, will appear to have used the HTTP
422 # protocol.
423 #
424 # The AppEngineRouting used to construct the URL that the task is
425 # delivered to can be set at the queue-level or task-level:
426 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700427 # * If app_engine_routing_override is set on the
428 # queue, this value is used for all
429 # tasks in the queue, no matter what the setting is for the task-level
430 # app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700431 #
432 #
433 # The `url` that the task will be sent to is:
434 #
435 # * `url =` host `+`
436 # relative_uri
437 #
438 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
439 # URIs restricted with
440 # [`login:
441 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
442 # Because tasks are not run as any user, they cannot be dispatched to URIs
443 # restricted with
444 # [`login:
445 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
446 # Task dispatches also do not follow redirects.
447 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700448 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700449 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -0700450 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700451 # not receive response before the deadline. Failed
452 # tasks will be retried according to the
453 # retry configuration. `503` (Service Unavailable) is
454 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -0700455 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
456 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700457 # Requests) response from an app handler does not cause traffic congestion
458 # control to throttle the queue.
Bu Sun Kim65020912020-05-20 12:08:20 -0700459 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700460 #
461 # This map contains the header field names and values.
462 # Headers can be set when the
463 # task is created.
464 # Repeated headers are not supported but a header value can contain commas.
465 #
466 # Cloud Tasks sets some headers to default values:
467 #
468 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -0700469 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700470 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -0700471 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700472 # modified `User-Agent`.
473 #
474 # If the task has a body, Cloud
475 # Tasks sets the following headers:
476 #
477 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -0700478 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700479 # setting `Content-Type` to a particular media type when the
480 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700481 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700482 # * `Content-Length`: This is computed by Cloud Tasks. This value is
483 # output only. It cannot be changed.
484 #
485 # The headers below cannot be set or overridden:
486 #
487 # * `Host`
488 # * `X-Google-*`
489 # * `X-AppEngine-*`
490 #
491 # In addition, Cloud Tasks sets some headers when the task is dispatched,
492 # such as headers containing information about the task; see
493 # [request
Dan O'Mearadd494642020-05-01 07:42:23 -0700494 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700495 # These headers are set only when the task is dispatched, so they are not
496 # visible when the task is returned in a Cloud Tasks response.
497 #
498 # Although there is no specific limit for the maximum number of headers or
499 # the size, there is a limit on the maximum size of the Task. For more
500 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700501 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700502 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700503 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700504 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700505 # * If app_engine_routing_override is set on the
506 # queue, this value is used for all
507 # tasks in the queue, no matter what the setting is for the task-level
508 # app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700509 #
510 # Defines routing characteristics specific to App Engine - service, version,
511 # and instance.
512 #
513 # For more information about services, versions, and instances see
514 # [An Overview of App
515 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
516 # [Microservices Architecture on Google App
517 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
518 # [App Engine Standard request
519 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
520 # and [App Engine Flex request
521 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Dan O'Mearadd494642020-05-01 07:42:23 -0700522 #
523 # Using AppEngineRouting requires
524 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
525 # Google IAM permission for the project
526 # and the following scope:
527 #
528 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -0700529 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700530 #
531 # By default, the task is sent to the service which is the default
532 # service when the task is attempted.
533 #
534 # For some queues or tasks which were created using the App Engine
535 # Task Queue API, host is not parsable
536 # into service,
537 # version, and
538 # instance. For example, some tasks
539 # which were created using the App Engine SDK use a custom domain
540 # name; custom domains are not parsed by Cloud Tasks. If
541 # host is not parsable, then
542 # service,
543 # version, and
544 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -0700545 &quot;instance&quot;: &quot;A String&quot;, # App instance.
546 #
547 # By default, the task is sent to an instance which is available when
548 # the task is attempted.
549 #
550 # Requests can only be sent to a specific instance if
551 # [manual scaling is used in App Engine
552 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
553 # App Engine Flex does not support instances. For more information, see
554 # [App Engine Standard request
555 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
556 # and [App Engine Flex request
557 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
558 &quot;version&quot;: &quot;A String&quot;, # App version.
559 #
560 # By default, the task is sent to the version which is the default
561 # version when the task is attempted.
562 #
563 # For some queues or tasks which were created using the App Engine
564 # Task Queue API, host is not parsable
565 # into service,
566 # version, and
567 # instance. For example, some tasks
568 # which were created using the App Engine SDK use a custom domain
569 # name; custom domains are not parsed by Cloud Tasks. If
570 # host is not parsable, then
571 # service,
572 # version, and
573 # instance are the empty string.
574 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
575 #
576 # The host is constructed from the domain name of the app associated with
577 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
578 # service, version,
579 # and instance. Tasks which were created using
580 # the App Engine SDK might have a custom domain name.
581 #
582 # For more information, see
583 # [How Requests are
584 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700585 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700586 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700587 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700588 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
Dan O'Mearadd494642020-05-01 07:42:23 -0700589 # HTTP requests with this http_method, otherwise the task attempt fails with
590 # error code 405 (Method Not Allowed). See [Writing a push task request
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700591 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
Dan O'Mearadd494642020-05-01 07:42:23 -0700592 # and the App Engine documentation for your runtime on [How Requests are
593 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
Bu Sun Kim65020912020-05-20 12:08:20 -0700594 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
595 #
596 # A request body is allowed only if the HTTP method is POST or PUT. It is
597 # an error to set a body on a task with an incompatible HttpMethod.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700598 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
599 #
600 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
601 # It can contain a path and query string arguments.
602 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
603 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700604 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700605 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700606 # been returned.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700607 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted or retried.
608 #
609 # `schedule_time` will be truncated to the nearest microsecond.
610 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
611 #
612 # `create_time` will be truncated to the nearest second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700613 },
614 }
615
616 x__xgafv: string, V1 error format.
617 Allowed values
618 1 - v1 error format
619 2 - v2 error format
620
621Returns:
622 An object of the form:
623
624 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -0700625 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the worker.
Dan O'Mearadd494642020-05-01 07:42:23 -0700626 #
627 # An HTTP task is a task that has HttpRequest set.
628 #
629 # The task will be pushed to the worker as an HTTP request. If the worker
630 # or the redirected worker acknowledges the task by returning a successful HTTP
631 # response code ([`200` - `299`]), the task will be removed from the queue. If
632 # any other HTTP response code is returned or no response is received, the
633 # task will be retried according to the following:
634 #
635 # * User-specified throttling: retry configuration,
Bu Sun Kim65020912020-05-20 12:08:20 -0700636 # rate limits, and the queue&#x27;s state.
Dan O'Mearadd494642020-05-01 07:42:23 -0700637 #
638 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
Bu Sun Kim65020912020-05-20 12:08:20 -0700639 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
Dan O'Mearadd494642020-05-01 07:42:23 -0700640 # will not be changed.
641 #
642 # System throttling happens because:
643 #
644 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
645 # rate limits will be used. But if the worker returns
646 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
647 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
648 # specified in the `Retry-After` HTTP response header is considered.
649 #
650 # * To prevent traffic spikes and to smooth sudden increases in traffic,
651 # dispatches ramp up slowly when the queue is newly created or idle and
652 # if large numbers of tasks suddenly become available to dispatch (due to
653 # spikes in create task rates, the queue being unpaused, or many tasks
654 # that are scheduled at the same time).
Bu Sun Kim65020912020-05-20 12:08:20 -0700655 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
Dan O'Mearadd494642020-05-01 07:42:23 -0700656 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
657 # will be generated and attached as an `Authorization` header in the HTTP
658 # request.
659 #
660 # This type of authorization should generally only be used when calling
661 # Google APIs hosted on *.googleapis.com.
662 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
663 # This type of authorization should generally only be used when calling Google
664 # APIs hosted on *.googleapis.com.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700665 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
666 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
667 # will be used.
Bu Sun Kim65020912020-05-20 12:08:20 -0700668 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
Dan O'Mearadd494642020-05-01 07:42:23 -0700669 # to be used for generating OAuth token.
670 # The service account must be within the same project as the queue. The
671 # caller must have iam.serviceAccounts.actAs permission for the service
672 # account.
673 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700674 &quot;headers&quot;: { # HTTP request headers.
675 #
676 # This map contains the header field names and values.
677 # Headers can be set when the
678 # task is created.
679 #
680 # These headers represent a subset of the headers that will accompany the
681 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
682 #
683 # A partial list of headers that will be ignored or replaced is:
684 #
685 # * Host: This will be computed by Cloud Tasks and derived from
686 # HttpRequest.url.
687 # * Content-Length: This will be computed by Cloud Tasks.
688 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
689 # * X-Google-*: Google use only.
690 # * X-AppEngine-*: Google use only.
691 #
692 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
693 # `Content-Type` to a media type when the
694 # task is created.
695 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
696 # `&quot;application/json&quot;`.
697 #
698 # Headers which can have multiple values (according to RFC2616) can be
699 # specified using comma-separated values.
700 #
701 # The size of the headers must be less than 80KB.
702 &quot;a_key&quot;: &quot;A String&quot;,
703 },
704 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
705 #
706 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
707 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
708 # encode some characters for safety and compatibility. The maximum allowed
709 # URL length is 2083 characters after encoding.
710 #
711 # The `Location` header response from a redirect response [`300` - `399`]
712 # may be followed. The redirect is not counted as a separate attempt.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700713 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
714 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
715 # token will be generated and attached as an `Authorization` header in the
716 # HTTP request.
717 #
718 # This type of authorization can be used for many scenarios, including
719 # calling Cloud Run, or endpoints where you intend to validate the token
720 # yourself.
721 # [OpenID Connect
722 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
723 # This type of authorization can be used for many scenarios, including
724 # calling Cloud Run, or endpoints where you intend to validate the token
725 # yourself.
726 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
727 # specified in target will be used.
728 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
729 # to be used for generating OIDC token.
730 # The service account must be within the same project as the queue. The
731 # caller must have iam.serviceAccounts.actAs permission for the service
732 # account.
733 },
734 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
735 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
736 #
737 # A request body is allowed only if the
738 # HTTP method is POST, PUT, or PATCH. It is an
739 # error to set body on a task with an incompatible HttpMethod.
Dan O'Mearadd494642020-05-01 07:42:23 -0700740 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700741 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
742 #
743 # The task name.
744 #
745 # The task name must have the following format:
746 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
747 #
748 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
749 # hyphens (-), colons (:), or periods (.).
750 # For more information, see
751 # [Identifying
752 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
753 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
754 # The list of available locations can be obtained by calling
755 # ListLocations.
756 # For more information, see https://cloud.google.com/about/locations/.
757 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
758 # hyphens (-). The maximum length is 100 characters.
759 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
760 # hyphens (-), or underscores (_). The maximum length is 500 characters.
761 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
762 # respond by this deadline then the request is cancelled and the attempt
763 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
764 # task according to the RetryConfig.
765 #
766 # Note that when the request is cancelled, Cloud Tasks will stop listing for
767 # the response, but whether the worker stops processing depends on the
768 # worker. For example, if the worker is stuck, it may not react to cancelled
769 # requests.
770 #
771 # The default and maximum values depend on the type of request:
772 #
773 # * For HTTP tasks, the default is 10 minutes. The deadline
774 # must be in the interval [15 seconds, 30 minutes].
775 #
776 # * For App Engine tasks, 0 indicates that the
777 # request has the default deadline. The default deadline depends on the
778 # [scaling
779 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
780 # of the service: 10 minutes for standard apps with automatic scaling, 24
781 # hours for standard apps with manual and basic scaling, and 60 minutes for
782 # flex apps. If the request deadline is set, it must be in the interval [15
783 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
784 # `dispatch_deadline`, the app handler will not run for longer than than
785 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
786 # at most a few seconds more than the app handler&#x27;s timeout. For more
787 # information see
788 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
789 #
790 # `dispatch_deadline` will be truncated to the nearest millisecond. The
791 # deadline is an approximate deadline.
792 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
793 #
794 # This count includes attempts which have been dispatched but haven&#x27;t
795 # received a response.
796 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
797 #
798 # Only dispatch_time will be set.
799 # The other Attempt information is not retained by Cloud Tasks.
Bu Sun Kim65020912020-05-20 12:08:20 -0700800 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
801 #
802 # `response_time` will be truncated to the nearest microsecond.
803 &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.
804 #
805 # If `response_time` is unset, then the task has not been attempted or is
806 # currently running and the `response_status` field is meaningless.
807 # different programming environments, including REST APIs and RPC APIs. It is
808 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
809 # three pieces of data: error code, error message, and error details.
810 #
811 # You can find out more about this error model and how to work with it in the
812 # [API Design Guide](https://cloud.google.com/apis/design/errors).
813 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
814 # message types for APIs to use.
815 {
816 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
817 },
818 ],
819 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
820 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
821 # user-facing error message should be localized and sent in the
822 # google.rpc.Status.details field, or localized by the client.
823 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700824 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
825 #
826 # `schedule_time` will be truncated to the nearest microsecond.
827 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
828 #
829 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -0700830 },
831 &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 -0700832 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
833 #
834 # `response_time` will be truncated to the nearest microsecond.
835 &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.
836 #
837 # If `response_time` is unset, then the task has not been attempted or is
838 # currently running and the `response_status` field is meaningless.
839 # different programming environments, including REST APIs and RPC APIs. It is
840 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
841 # three pieces of data: error code, error message, and error details.
842 #
843 # You can find out more about this error model and how to work with it in the
844 # [API Design Guide](https://cloud.google.com/apis/design/errors).
845 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
846 # message types for APIs to use.
847 {
848 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
849 },
850 ],
851 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
852 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
853 # user-facing error message should be localized and sent in the
854 # google.rpc.Status.details field, or localized by the client.
855 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700856 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
857 #
858 # `schedule_time` will be truncated to the nearest microsecond.
859 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
860 #
861 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -0700862 },
863 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
864 &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 -0700865 #
866 # An App Engine task is a task that has AppEngineHttpRequest set.
867 #
868 # The message defines the HTTP request that is sent to an App Engine app when
869 # the task is dispatched.
870 #
871 # Using AppEngineHttpRequest requires
872 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
873 # Google IAM permission for the project
874 # and the following scope:
875 #
876 # `https://www.googleapis.com/auth/cloud-platform`
877 #
878 # The task will be delivered to the App Engine app which belongs to the same
879 # project as the queue. For more information, see
880 # [How Requests are
881 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
882 # and how routing is affected by
883 # [dispatch
884 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
885 # Traffic is encrypted during transport and never leaves Google datacenters.
886 # Because this traffic is carried over a communication mechanism internal to
887 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
888 # The request to the handler, however, will appear to have used the HTTP
889 # protocol.
890 #
891 # The AppEngineRouting used to construct the URL that the task is
892 # delivered to can be set at the queue-level or task-level:
893 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700894 # * If app_engine_routing_override is set on the
895 # queue, this value is used for all
896 # tasks in the queue, no matter what the setting is for the task-level
897 # app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700898 #
899 #
900 # The `url` that the task will be sent to is:
901 #
902 # * `url =` host `+`
903 # relative_uri
904 #
905 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
906 # URIs restricted with
907 # [`login:
908 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
909 # Because tasks are not run as any user, they cannot be dispatched to URIs
910 # restricted with
911 # [`login:
912 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
913 # Task dispatches also do not follow redirects.
914 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700915 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700916 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -0700917 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700918 # not receive response before the deadline. Failed
919 # tasks will be retried according to the
920 # retry configuration. `503` (Service Unavailable) is
921 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -0700922 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
923 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700924 # Requests) response from an app handler does not cause traffic congestion
925 # control to throttle the queue.
Bu Sun Kim65020912020-05-20 12:08:20 -0700926 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700927 #
928 # This map contains the header field names and values.
929 # Headers can be set when the
930 # task is created.
931 # Repeated headers are not supported but a header value can contain commas.
932 #
933 # Cloud Tasks sets some headers to default values:
934 #
935 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -0700936 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700937 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -0700938 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700939 # modified `User-Agent`.
940 #
941 # If the task has a body, Cloud
942 # Tasks sets the following headers:
943 #
944 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -0700945 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700946 # setting `Content-Type` to a particular media type when the
947 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700948 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700949 # * `Content-Length`: This is computed by Cloud Tasks. This value is
950 # output only. It cannot be changed.
951 #
952 # The headers below cannot be set or overridden:
953 #
954 # * `Host`
955 # * `X-Google-*`
956 # * `X-AppEngine-*`
957 #
958 # In addition, Cloud Tasks sets some headers when the task is dispatched,
959 # such as headers containing information about the task; see
960 # [request
Dan O'Mearadd494642020-05-01 07:42:23 -0700961 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700962 # These headers are set only when the task is dispatched, so they are not
963 # visible when the task is returned in a Cloud Tasks response.
964 #
965 # Although there is no specific limit for the maximum number of headers or
966 # the size, there is a limit on the maximum size of the Task. For more
967 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700968 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700969 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700970 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700971 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700972 # * If app_engine_routing_override is set on the
973 # queue, this value is used for all
974 # tasks in the queue, no matter what the setting is for the task-level
975 # app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700976 #
977 # Defines routing characteristics specific to App Engine - service, version,
978 # and instance.
979 #
980 # For more information about services, versions, and instances see
981 # [An Overview of App
982 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
983 # [Microservices Architecture on Google App
984 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
985 # [App Engine Standard request
986 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
987 # and [App Engine Flex request
988 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Dan O'Mearadd494642020-05-01 07:42:23 -0700989 #
990 # Using AppEngineRouting requires
991 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
992 # Google IAM permission for the project
993 # and the following scope:
994 #
995 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -0700996 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700997 #
998 # By default, the task is sent to the service which is the default
999 # service when the task is attempted.
1000 #
1001 # For some queues or tasks which were created using the App Engine
1002 # Task Queue API, host is not parsable
1003 # into service,
1004 # version, and
1005 # instance. For example, some tasks
1006 # which were created using the App Engine SDK use a custom domain
1007 # name; custom domains are not parsed by Cloud Tasks. If
1008 # host is not parsable, then
1009 # service,
1010 # version, and
1011 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07001012 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1013 #
1014 # By default, the task is sent to an instance which is available when
1015 # the task is attempted.
1016 #
1017 # Requests can only be sent to a specific instance if
1018 # [manual scaling is used in App Engine
1019 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1020 # App Engine Flex does not support instances. For more information, see
1021 # [App Engine Standard request
1022 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1023 # and [App Engine Flex request
1024 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1025 &quot;version&quot;: &quot;A String&quot;, # App version.
1026 #
1027 # By default, the task is sent to the version which is the default
1028 # version when the task is attempted.
1029 #
1030 # For some queues or tasks which were created using the App Engine
1031 # Task Queue API, host is not parsable
1032 # into service,
1033 # version, and
1034 # instance. For example, some tasks
1035 # which were created using the App Engine SDK use a custom domain
1036 # name; custom domains are not parsed by Cloud Tasks. If
1037 # host is not parsable, then
1038 # service,
1039 # version, and
1040 # instance are the empty string.
1041 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1042 #
1043 # The host is constructed from the domain name of the app associated with
1044 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1045 # service, version,
1046 # and instance. Tasks which were created using
1047 # the App Engine SDK might have a custom domain name.
1048 #
1049 # For more information, see
1050 # [How Requests are
1051 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001052 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001053 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001054 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001055 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
Dan O'Mearadd494642020-05-01 07:42:23 -07001056 # HTTP requests with this http_method, otherwise the task attempt fails with
1057 # error code 405 (Method Not Allowed). See [Writing a push task request
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001058 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
Dan O'Mearadd494642020-05-01 07:42:23 -07001059 # and the App Engine documentation for your runtime on [How Requests are
1060 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
Bu Sun Kim65020912020-05-20 12:08:20 -07001061 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
1062 #
1063 # A request body is allowed only if the HTTP method is POST or PUT. It is
1064 # an error to set a body on a task with an incompatible HttpMethod.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001065 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
1066 #
1067 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
1068 # It can contain a path and query string arguments.
1069 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
1070 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001071 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001072 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001073 # been returned.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001074 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted or retried.
1075 #
1076 # `schedule_time` will be truncated to the nearest microsecond.
1077 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
1078 #
1079 # `create_time` will be truncated to the nearest second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001080 }</pre>
1081</div>
1082
1083<div class="method">
1084 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
1085 <pre>Deletes a task.
1086
1087A task can be deleted if it is scheduled or dispatched. A task
1088cannot be deleted if it has executed successfully or permanently
1089failed.
1090
1091Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001092 name: string, Required. The task name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001093`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required)
1094 x__xgafv: string, V1 error format.
1095 Allowed values
1096 1 - v1 error format
1097 2 - v2 error format
1098
1099Returns:
1100 An object of the form:
1101
1102 { # A generic empty message that you can re-use to avoid defining duplicated
1103 # empty messages in your APIs. A typical example is to use it as the request
1104 # or the response type of an API method. For instance:
1105 #
1106 # service Foo {
1107 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1108 # }
1109 #
1110 # The JSON representation for `Empty` is empty JSON object `{}`.
1111 }</pre>
1112</div>
1113
1114<div class="method">
1115 <code class="details" id="get">get(name, responseView=None, x__xgafv=None)</code>
1116 <pre>Gets a task.
1117
1118Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001119 name: string, Required. The task name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001120`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required)
1121 responseView: string, The response_view specifies which subset of the Task will be
1122returned.
1123
1124By default response_view is BASIC; not all
1125information is retrieved by default because some data, such as
1126payloads, might be desirable to return only when needed because
1127of its large size or because of the sensitivity of data that it
1128contains.
1129
1130Authorization for FULL requires
1131`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
1132permission on the Task resource.
1133 x__xgafv: string, V1 error format.
1134 Allowed values
1135 1 - v1 error format
1136 2 - v2 error format
1137
1138Returns:
1139 An object of the form:
1140
1141 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -07001142 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the worker.
Dan O'Mearadd494642020-05-01 07:42:23 -07001143 #
1144 # An HTTP task is a task that has HttpRequest set.
1145 #
1146 # The task will be pushed to the worker as an HTTP request. If the worker
1147 # or the redirected worker acknowledges the task by returning a successful HTTP
1148 # response code ([`200` - `299`]), the task will be removed from the queue. If
1149 # any other HTTP response code is returned or no response is received, the
1150 # task will be retried according to the following:
1151 #
1152 # * User-specified throttling: retry configuration,
Bu Sun Kim65020912020-05-20 12:08:20 -07001153 # rate limits, and the queue&#x27;s state.
Dan O'Mearadd494642020-05-01 07:42:23 -07001154 #
1155 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
Bu Sun Kim65020912020-05-20 12:08:20 -07001156 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
Dan O'Mearadd494642020-05-01 07:42:23 -07001157 # will not be changed.
1158 #
1159 # System throttling happens because:
1160 #
1161 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
1162 # rate limits will be used. But if the worker returns
1163 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
1164 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
1165 # specified in the `Retry-After` HTTP response header is considered.
1166 #
1167 # * To prevent traffic spikes and to smooth sudden increases in traffic,
1168 # dispatches ramp up slowly when the queue is newly created or idle and
1169 # if large numbers of tasks suddenly become available to dispatch (due to
1170 # spikes in create task rates, the queue being unpaused, or many tasks
1171 # that are scheduled at the same time).
Bu Sun Kim65020912020-05-20 12:08:20 -07001172 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
Dan O'Mearadd494642020-05-01 07:42:23 -07001173 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
1174 # will be generated and attached as an `Authorization` header in the HTTP
1175 # request.
1176 #
1177 # This type of authorization should generally only be used when calling
1178 # Google APIs hosted on *.googleapis.com.
1179 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
1180 # This type of authorization should generally only be used when calling Google
1181 # APIs hosted on *.googleapis.com.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001182 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
1183 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
1184 # will be used.
Bu Sun Kim65020912020-05-20 12:08:20 -07001185 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
Dan O'Mearadd494642020-05-01 07:42:23 -07001186 # to be used for generating OAuth token.
1187 # The service account must be within the same project as the queue. The
1188 # caller must have iam.serviceAccounts.actAs permission for the service
1189 # account.
1190 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001191 &quot;headers&quot;: { # HTTP request headers.
1192 #
1193 # This map contains the header field names and values.
1194 # Headers can be set when the
1195 # task is created.
1196 #
1197 # These headers represent a subset of the headers that will accompany the
1198 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
1199 #
1200 # A partial list of headers that will be ignored or replaced is:
1201 #
1202 # * Host: This will be computed by Cloud Tasks and derived from
1203 # HttpRequest.url.
1204 # * Content-Length: This will be computed by Cloud Tasks.
1205 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
1206 # * X-Google-*: Google use only.
1207 # * X-AppEngine-*: Google use only.
1208 #
1209 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
1210 # `Content-Type` to a media type when the
1211 # task is created.
1212 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
1213 # `&quot;application/json&quot;`.
1214 #
1215 # Headers which can have multiple values (according to RFC2616) can be
1216 # specified using comma-separated values.
1217 #
1218 # The size of the headers must be less than 80KB.
1219 &quot;a_key&quot;: &quot;A String&quot;,
1220 },
1221 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
1222 #
1223 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
1224 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
1225 # encode some characters for safety and compatibility. The maximum allowed
1226 # URL length is 2083 characters after encoding.
1227 #
1228 # The `Location` header response from a redirect response [`300` - `399`]
1229 # may be followed. The redirect is not counted as a separate attempt.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001230 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
1231 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
1232 # token will be generated and attached as an `Authorization` header in the
1233 # HTTP request.
1234 #
1235 # This type of authorization can be used for many scenarios, including
1236 # calling Cloud Run, or endpoints where you intend to validate the token
1237 # yourself.
1238 # [OpenID Connect
1239 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
1240 # This type of authorization can be used for many scenarios, including
1241 # calling Cloud Run, or endpoints where you intend to validate the token
1242 # yourself.
1243 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
1244 # specified in target will be used.
1245 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1246 # to be used for generating OIDC token.
1247 # The service account must be within the same project as the queue. The
1248 # caller must have iam.serviceAccounts.actAs permission for the service
1249 # account.
1250 },
1251 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
1252 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
1253 #
1254 # A request body is allowed only if the
1255 # HTTP method is POST, PUT, or PATCH. It is an
1256 # error to set body on a task with an incompatible HttpMethod.
Dan O'Mearadd494642020-05-01 07:42:23 -07001257 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001258 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
1259 #
1260 # The task name.
1261 #
1262 # The task name must have the following format:
1263 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
1264 #
1265 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1266 # hyphens (-), colons (:), or periods (.).
1267 # For more information, see
1268 # [Identifying
1269 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1270 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
1271 # The list of available locations can be obtained by calling
1272 # ListLocations.
1273 # For more information, see https://cloud.google.com/about/locations/.
1274 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1275 # hyphens (-). The maximum length is 100 characters.
1276 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1277 # hyphens (-), or underscores (_). The maximum length is 500 characters.
1278 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
1279 # respond by this deadline then the request is cancelled and the attempt
1280 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
1281 # task according to the RetryConfig.
1282 #
1283 # Note that when the request is cancelled, Cloud Tasks will stop listing for
1284 # the response, but whether the worker stops processing depends on the
1285 # worker. For example, if the worker is stuck, it may not react to cancelled
1286 # requests.
1287 #
1288 # The default and maximum values depend on the type of request:
1289 #
1290 # * For HTTP tasks, the default is 10 minutes. The deadline
1291 # must be in the interval [15 seconds, 30 minutes].
1292 #
1293 # * For App Engine tasks, 0 indicates that the
1294 # request has the default deadline. The default deadline depends on the
1295 # [scaling
1296 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
1297 # of the service: 10 minutes for standard apps with automatic scaling, 24
1298 # hours for standard apps with manual and basic scaling, and 60 minutes for
1299 # flex apps. If the request deadline is set, it must be in the interval [15
1300 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
1301 # `dispatch_deadline`, the app handler will not run for longer than than
1302 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
1303 # at most a few seconds more than the app handler&#x27;s timeout. For more
1304 # information see
1305 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
1306 #
1307 # `dispatch_deadline` will be truncated to the nearest millisecond. The
1308 # deadline is an approximate deadline.
1309 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
1310 #
1311 # This count includes attempts which have been dispatched but haven&#x27;t
1312 # received a response.
1313 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
1314 #
1315 # Only dispatch_time will be set.
1316 # The other Attempt information is not retained by Cloud Tasks.
Bu Sun Kim65020912020-05-20 12:08:20 -07001317 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
1318 #
1319 # `response_time` will be truncated to the nearest microsecond.
1320 &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.
1321 #
1322 # If `response_time` is unset, then the task has not been attempted or is
1323 # currently running and the `response_status` field is meaningless.
1324 # different programming environments, including REST APIs and RPC APIs. It is
1325 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1326 # three pieces of data: error code, error message, and error details.
1327 #
1328 # You can find out more about this error model and how to work with it in the
1329 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1330 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1331 # message types for APIs to use.
1332 {
1333 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1334 },
1335 ],
1336 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1337 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1338 # user-facing error message should be localized and sent in the
1339 # google.rpc.Status.details field, or localized by the client.
1340 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001341 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
1342 #
1343 # `schedule_time` will be truncated to the nearest microsecond.
1344 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
1345 #
1346 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07001347 },
1348 &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 -07001349 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
1350 #
1351 # `response_time` will be truncated to the nearest microsecond.
1352 &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.
1353 #
1354 # If `response_time` is unset, then the task has not been attempted or is
1355 # currently running and the `response_status` field is meaningless.
1356 # different programming environments, including REST APIs and RPC APIs. It is
1357 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1358 # three pieces of data: error code, error message, and error details.
1359 #
1360 # You can find out more about this error model and how to work with it in the
1361 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1362 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1363 # message types for APIs to use.
1364 {
1365 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1366 },
1367 ],
1368 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1369 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1370 # user-facing error message should be localized and sent in the
1371 # google.rpc.Status.details field, or localized by the client.
1372 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001373 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
1374 #
1375 # `schedule_time` will be truncated to the nearest microsecond.
1376 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
1377 #
1378 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07001379 },
1380 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
1381 &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 -07001382 #
1383 # An App Engine task is a task that has AppEngineHttpRequest set.
1384 #
1385 # The message defines the HTTP request that is sent to an App Engine app when
1386 # the task is dispatched.
1387 #
1388 # Using AppEngineHttpRequest requires
1389 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1390 # Google IAM permission for the project
1391 # and the following scope:
1392 #
1393 # `https://www.googleapis.com/auth/cloud-platform`
1394 #
1395 # The task will be delivered to the App Engine app which belongs to the same
1396 # project as the queue. For more information, see
1397 # [How Requests are
1398 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1399 # and how routing is affected by
1400 # [dispatch
1401 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
1402 # Traffic is encrypted during transport and never leaves Google datacenters.
1403 # Because this traffic is carried over a communication mechanism internal to
1404 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
1405 # The request to the handler, however, will appear to have used the HTTP
1406 # protocol.
1407 #
1408 # The AppEngineRouting used to construct the URL that the task is
1409 # delivered to can be set at the queue-level or task-level:
1410 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001411 # * If app_engine_routing_override is set on the
1412 # queue, this value is used for all
1413 # tasks in the queue, no matter what the setting is for the task-level
1414 # app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001415 #
1416 #
1417 # The `url` that the task will be sent to is:
1418 #
1419 # * `url =` host `+`
1420 # relative_uri
1421 #
1422 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
1423 # URIs restricted with
1424 # [`login:
1425 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
1426 # Because tasks are not run as any user, they cannot be dispatched to URIs
1427 # restricted with
1428 # [`login:
1429 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
1430 # Task dispatches also do not follow redirects.
1431 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001432 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001433 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -07001434 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001435 # not receive response before the deadline. Failed
1436 # tasks will be retried according to the
1437 # retry configuration. `503` (Service Unavailable) is
1438 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -07001439 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
1440 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001441 # Requests) response from an app handler does not cause traffic congestion
1442 # control to throttle the queue.
Bu Sun Kim65020912020-05-20 12:08:20 -07001443 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001444 #
1445 # This map contains the header field names and values.
1446 # Headers can be set when the
1447 # task is created.
1448 # Repeated headers are not supported but a header value can contain commas.
1449 #
1450 # Cloud Tasks sets some headers to default values:
1451 #
1452 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -07001453 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001454 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -07001455 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001456 # modified `User-Agent`.
1457 #
1458 # If the task has a body, Cloud
1459 # Tasks sets the following headers:
1460 #
1461 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -07001462 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001463 # setting `Content-Type` to a particular media type when the
1464 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07001465 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001466 # * `Content-Length`: This is computed by Cloud Tasks. This value is
1467 # output only. It cannot be changed.
1468 #
1469 # The headers below cannot be set or overridden:
1470 #
1471 # * `Host`
1472 # * `X-Google-*`
1473 # * `X-AppEngine-*`
1474 #
1475 # In addition, Cloud Tasks sets some headers when the task is dispatched,
1476 # such as headers containing information about the task; see
1477 # [request
Dan O'Mearadd494642020-05-01 07:42:23 -07001478 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001479 # These headers are set only when the task is dispatched, so they are not
1480 # visible when the task is returned in a Cloud Tasks response.
1481 #
1482 # Although there is no specific limit for the maximum number of headers or
1483 # the size, there is a limit on the maximum size of the Task. For more
1484 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001485 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001486 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001487 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001488 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001489 # * If app_engine_routing_override is set on the
1490 # queue, this value is used for all
1491 # tasks in the queue, no matter what the setting is for the task-level
1492 # app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001493 #
1494 # Defines routing characteristics specific to App Engine - service, version,
1495 # and instance.
1496 #
1497 # For more information about services, versions, and instances see
1498 # [An Overview of App
1499 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1500 # [Microservices Architecture on Google App
1501 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1502 # [App Engine Standard request
1503 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1504 # and [App Engine Flex request
1505 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Dan O'Mearadd494642020-05-01 07:42:23 -07001506 #
1507 # Using AppEngineRouting requires
1508 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1509 # Google IAM permission for the project
1510 # and the following scope:
1511 #
1512 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -07001513 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001514 #
1515 # By default, the task is sent to the service which is the default
1516 # service when the task is attempted.
1517 #
1518 # For some queues or tasks which were created using the App Engine
1519 # Task Queue API, host is not parsable
1520 # into service,
1521 # version, and
1522 # instance. For example, some tasks
1523 # which were created using the App Engine SDK use a custom domain
1524 # name; custom domains are not parsed by Cloud Tasks. If
1525 # host is not parsable, then
1526 # service,
1527 # version, and
1528 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07001529 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1530 #
1531 # By default, the task is sent to an instance which is available when
1532 # the task is attempted.
1533 #
1534 # Requests can only be sent to a specific instance if
1535 # [manual scaling is used in App Engine
1536 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1537 # App Engine Flex does not support instances. For more information, see
1538 # [App Engine Standard request
1539 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1540 # and [App Engine Flex request
1541 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1542 &quot;version&quot;: &quot;A String&quot;, # App version.
1543 #
1544 # By default, the task is sent to the version which is the default
1545 # version when the task is attempted.
1546 #
1547 # For some queues or tasks which were created using the App Engine
1548 # Task Queue API, host is not parsable
1549 # into service,
1550 # version, and
1551 # instance. For example, some tasks
1552 # which were created using the App Engine SDK use a custom domain
1553 # name; custom domains are not parsed by Cloud Tasks. If
1554 # host is not parsable, then
1555 # service,
1556 # version, and
1557 # instance are the empty string.
1558 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1559 #
1560 # The host is constructed from the domain name of the app associated with
1561 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1562 # service, version,
1563 # and instance. Tasks which were created using
1564 # the App Engine SDK might have a custom domain name.
1565 #
1566 # For more information, see
1567 # [How Requests are
1568 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001569 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001570 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001571 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001572 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
Dan O'Mearadd494642020-05-01 07:42:23 -07001573 # HTTP requests with this http_method, otherwise the task attempt fails with
1574 # error code 405 (Method Not Allowed). See [Writing a push task request
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001575 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
Dan O'Mearadd494642020-05-01 07:42:23 -07001576 # and the App Engine documentation for your runtime on [How Requests are
1577 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
Bu Sun Kim65020912020-05-20 12:08:20 -07001578 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
1579 #
1580 # A request body is allowed only if the HTTP method is POST or PUT. It is
1581 # an error to set a body on a task with an incompatible HttpMethod.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001582 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
1583 #
1584 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
1585 # It can contain a path and query string arguments.
1586 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
1587 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001588 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001589 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001590 # been returned.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001591 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted or retried.
1592 #
1593 # `schedule_time` will be truncated to the nearest microsecond.
1594 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
1595 #
1596 # `create_time` will be truncated to the nearest second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001597 }</pre>
1598</div>
1599
1600<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001601 <code class="details" id="list">list(parent, responseView=None, pageToken=None, pageSize=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001602 <pre>Lists the tasks in a queue.
1603
1604By default, only the BASIC view is retrieved
1605due to performance considerations;
1606response_view controls the
1607subset of information which is returned.
1608
1609The tasks may be returned in any order. The ordering may change at any
1610time.
1611
1612Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001613 parent: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001614`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
1615 responseView: string, The response_view specifies which subset of the Task will be
1616returned.
1617
1618By default response_view is BASIC; not all
1619information is retrieved by default because some data, such as
1620payloads, might be desirable to return only when needed because
1621of its large size or because of the sensitivity of data that it
1622contains.
1623
1624Authorization for FULL requires
1625`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
1626permission on the Task resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001627 pageToken: string, A token identifying the page of results to return.
1628
1629To request the first page results, page_token must be empty. To
1630request the next page of results, page_token must be the value of
1631next_page_token returned
1632from the previous call to ListTasks
1633method.
1634
1635The page token is valid for only 2 hours.
Bu Sun Kim65020912020-05-20 12:08:20 -07001636 pageSize: integer, Maximum page size.
1637
1638Fewer tasks than requested might be returned, even if more tasks exist; use
1639next_page_token in the response to
1640determine if more tasks exist.
1641
1642The maximum page size is 1000. If unspecified, the page size will be the
1643maximum.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001644 x__xgafv: string, V1 error format.
1645 Allowed values
1646 1 - v1 error format
1647 2 - v2 error format
1648
1649Returns:
1650 An object of the form:
1651
1652 { # Response message for listing tasks using ListTasks.
Bu Sun Kim65020912020-05-20 12:08:20 -07001653 &quot;tasks&quot;: [ # The list of tasks.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001654 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -07001655 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the worker.
Dan O'Mearadd494642020-05-01 07:42:23 -07001656 #
1657 # An HTTP task is a task that has HttpRequest set.
1658 #
1659 # The task will be pushed to the worker as an HTTP request. If the worker
1660 # or the redirected worker acknowledges the task by returning a successful HTTP
1661 # response code ([`200` - `299`]), the task will be removed from the queue. If
1662 # any other HTTP response code is returned or no response is received, the
1663 # task will be retried according to the following:
1664 #
1665 # * User-specified throttling: retry configuration,
Bu Sun Kim65020912020-05-20 12:08:20 -07001666 # rate limits, and the queue&#x27;s state.
Dan O'Mearadd494642020-05-01 07:42:23 -07001667 #
1668 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
Bu Sun Kim65020912020-05-20 12:08:20 -07001669 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
Dan O'Mearadd494642020-05-01 07:42:23 -07001670 # will not be changed.
1671 #
1672 # System throttling happens because:
1673 #
1674 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
1675 # rate limits will be used. But if the worker returns
1676 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
1677 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
1678 # specified in the `Retry-After` HTTP response header is considered.
1679 #
1680 # * To prevent traffic spikes and to smooth sudden increases in traffic,
1681 # dispatches ramp up slowly when the queue is newly created or idle and
1682 # if large numbers of tasks suddenly become available to dispatch (due to
1683 # spikes in create task rates, the queue being unpaused, or many tasks
1684 # that are scheduled at the same time).
Bu Sun Kim65020912020-05-20 12:08:20 -07001685 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
Dan O'Mearadd494642020-05-01 07:42:23 -07001686 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
1687 # will be generated and attached as an `Authorization` header in the HTTP
1688 # request.
1689 #
1690 # This type of authorization should generally only be used when calling
1691 # Google APIs hosted on *.googleapis.com.
1692 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
1693 # This type of authorization should generally only be used when calling Google
1694 # APIs hosted on *.googleapis.com.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001695 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
1696 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
1697 # will be used.
Bu Sun Kim65020912020-05-20 12:08:20 -07001698 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
Dan O'Mearadd494642020-05-01 07:42:23 -07001699 # to be used for generating OAuth token.
1700 # The service account must be within the same project as the queue. The
1701 # caller must have iam.serviceAccounts.actAs permission for the service
1702 # account.
1703 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001704 &quot;headers&quot;: { # HTTP request headers.
1705 #
1706 # This map contains the header field names and values.
1707 # Headers can be set when the
1708 # task is created.
1709 #
1710 # These headers represent a subset of the headers that will accompany the
1711 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
1712 #
1713 # A partial list of headers that will be ignored or replaced is:
1714 #
1715 # * Host: This will be computed by Cloud Tasks and derived from
1716 # HttpRequest.url.
1717 # * Content-Length: This will be computed by Cloud Tasks.
1718 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
1719 # * X-Google-*: Google use only.
1720 # * X-AppEngine-*: Google use only.
1721 #
1722 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
1723 # `Content-Type` to a media type when the
1724 # task is created.
1725 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
1726 # `&quot;application/json&quot;`.
1727 #
1728 # Headers which can have multiple values (according to RFC2616) can be
1729 # specified using comma-separated values.
1730 #
1731 # The size of the headers must be less than 80KB.
1732 &quot;a_key&quot;: &quot;A String&quot;,
1733 },
1734 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
1735 #
1736 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
1737 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
1738 # encode some characters for safety and compatibility. The maximum allowed
1739 # URL length is 2083 characters after encoding.
1740 #
1741 # The `Location` header response from a redirect response [`300` - `399`]
1742 # may be followed. The redirect is not counted as a separate attempt.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001743 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
1744 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
1745 # token will be generated and attached as an `Authorization` header in the
1746 # HTTP request.
1747 #
1748 # This type of authorization can be used for many scenarios, including
1749 # calling Cloud Run, or endpoints where you intend to validate the token
1750 # yourself.
1751 # [OpenID Connect
1752 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
1753 # This type of authorization can be used for many scenarios, including
1754 # calling Cloud Run, or endpoints where you intend to validate the token
1755 # yourself.
1756 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
1757 # specified in target will be used.
1758 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1759 # to be used for generating OIDC token.
1760 # The service account must be within the same project as the queue. The
1761 # caller must have iam.serviceAccounts.actAs permission for the service
1762 # account.
1763 },
1764 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
1765 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
1766 #
1767 # A request body is allowed only if the
1768 # HTTP method is POST, PUT, or PATCH. It is an
1769 # error to set body on a task with an incompatible HttpMethod.
Dan O'Mearadd494642020-05-01 07:42:23 -07001770 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001771 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
1772 #
1773 # The task name.
1774 #
1775 # The task name must have the following format:
1776 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
1777 #
1778 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1779 # hyphens (-), colons (:), or periods (.).
1780 # For more information, see
1781 # [Identifying
1782 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1783 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
1784 # The list of available locations can be obtained by calling
1785 # ListLocations.
1786 # For more information, see https://cloud.google.com/about/locations/.
1787 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1788 # hyphens (-). The maximum length is 100 characters.
1789 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1790 # hyphens (-), or underscores (_). The maximum length is 500 characters.
1791 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
1792 # respond by this deadline then the request is cancelled and the attempt
1793 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
1794 # task according to the RetryConfig.
1795 #
1796 # Note that when the request is cancelled, Cloud Tasks will stop listing for
1797 # the response, but whether the worker stops processing depends on the
1798 # worker. For example, if the worker is stuck, it may not react to cancelled
1799 # requests.
1800 #
1801 # The default and maximum values depend on the type of request:
1802 #
1803 # * For HTTP tasks, the default is 10 minutes. The deadline
1804 # must be in the interval [15 seconds, 30 minutes].
1805 #
1806 # * For App Engine tasks, 0 indicates that the
1807 # request has the default deadline. The default deadline depends on the
1808 # [scaling
1809 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
1810 # of the service: 10 minutes for standard apps with automatic scaling, 24
1811 # hours for standard apps with manual and basic scaling, and 60 minutes for
1812 # flex apps. If the request deadline is set, it must be in the interval [15
1813 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
1814 # `dispatch_deadline`, the app handler will not run for longer than than
1815 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
1816 # at most a few seconds more than the app handler&#x27;s timeout. For more
1817 # information see
1818 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
1819 #
1820 # `dispatch_deadline` will be truncated to the nearest millisecond. The
1821 # deadline is an approximate deadline.
1822 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
1823 #
1824 # This count includes attempts which have been dispatched but haven&#x27;t
1825 # received a response.
1826 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
1827 #
1828 # Only dispatch_time will be set.
1829 # The other Attempt information is not retained by Cloud Tasks.
Bu Sun Kim65020912020-05-20 12:08:20 -07001830 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
1831 #
1832 # `response_time` will be truncated to the nearest microsecond.
1833 &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.
1834 #
1835 # If `response_time` is unset, then the task has not been attempted or is
1836 # currently running and the `response_status` field is meaningless.
1837 # different programming environments, including REST APIs and RPC APIs. It is
1838 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1839 # three pieces of data: error code, error message, and error details.
1840 #
1841 # You can find out more about this error model and how to work with it in the
1842 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1843 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1844 # message types for APIs to use.
1845 {
1846 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1847 },
1848 ],
1849 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1850 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1851 # user-facing error message should be localized and sent in the
1852 # google.rpc.Status.details field, or localized by the client.
1853 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001854 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
1855 #
1856 # `schedule_time` will be truncated to the nearest microsecond.
1857 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
1858 #
1859 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07001860 },
1861 &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 -07001862 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
1863 #
1864 # `response_time` will be truncated to the nearest microsecond.
1865 &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.
1866 #
1867 # If `response_time` is unset, then the task has not been attempted or is
1868 # currently running and the `response_status` field is meaningless.
1869 # different programming environments, including REST APIs and RPC APIs. It is
1870 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1871 # three pieces of data: error code, error message, and error details.
1872 #
1873 # You can find out more about this error model and how to work with it in the
1874 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1875 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1876 # message types for APIs to use.
1877 {
1878 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1879 },
1880 ],
1881 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1882 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1883 # user-facing error message should be localized and sent in the
1884 # google.rpc.Status.details field, or localized by the client.
1885 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001886 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
1887 #
1888 # `schedule_time` will be truncated to the nearest microsecond.
1889 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
1890 #
1891 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07001892 },
1893 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
1894 &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 -07001895 #
1896 # An App Engine task is a task that has AppEngineHttpRequest set.
1897 #
1898 # The message defines the HTTP request that is sent to an App Engine app when
1899 # the task is dispatched.
1900 #
1901 # Using AppEngineHttpRequest requires
1902 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1903 # Google IAM permission for the project
1904 # and the following scope:
1905 #
1906 # `https://www.googleapis.com/auth/cloud-platform`
1907 #
1908 # The task will be delivered to the App Engine app which belongs to the same
1909 # project as the queue. For more information, see
1910 # [How Requests are
1911 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1912 # and how routing is affected by
1913 # [dispatch
1914 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
1915 # Traffic is encrypted during transport and never leaves Google datacenters.
1916 # Because this traffic is carried over a communication mechanism internal to
1917 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
1918 # The request to the handler, however, will appear to have used the HTTP
1919 # protocol.
1920 #
1921 # The AppEngineRouting used to construct the URL that the task is
1922 # delivered to can be set at the queue-level or task-level:
1923 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001924 # * If app_engine_routing_override is set on the
1925 # queue, this value is used for all
1926 # tasks in the queue, no matter what the setting is for the task-level
1927 # app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001928 #
1929 #
1930 # The `url` that the task will be sent to is:
1931 #
1932 # * `url =` host `+`
1933 # relative_uri
1934 #
1935 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
1936 # URIs restricted with
1937 # [`login:
1938 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
1939 # Because tasks are not run as any user, they cannot be dispatched to URIs
1940 # restricted with
1941 # [`login:
1942 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
1943 # Task dispatches also do not follow redirects.
1944 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001945 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001946 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -07001947 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001948 # not receive response before the deadline. Failed
1949 # tasks will be retried according to the
1950 # retry configuration. `503` (Service Unavailable) is
1951 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -07001952 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
1953 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001954 # Requests) response from an app handler does not cause traffic congestion
1955 # control to throttle the queue.
Bu Sun Kim65020912020-05-20 12:08:20 -07001956 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001957 #
1958 # This map contains the header field names and values.
1959 # Headers can be set when the
1960 # task is created.
1961 # Repeated headers are not supported but a header value can contain commas.
1962 #
1963 # Cloud Tasks sets some headers to default values:
1964 #
1965 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -07001966 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001967 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -07001968 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001969 # modified `User-Agent`.
1970 #
1971 # If the task has a body, Cloud
1972 # Tasks sets the following headers:
1973 #
1974 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -07001975 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001976 # setting `Content-Type` to a particular media type when the
1977 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07001978 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001979 # * `Content-Length`: This is computed by Cloud Tasks. This value is
1980 # output only. It cannot be changed.
1981 #
1982 # The headers below cannot be set or overridden:
1983 #
1984 # * `Host`
1985 # * `X-Google-*`
1986 # * `X-AppEngine-*`
1987 #
1988 # In addition, Cloud Tasks sets some headers when the task is dispatched,
1989 # such as headers containing information about the task; see
1990 # [request
Dan O'Mearadd494642020-05-01 07:42:23 -07001991 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001992 # These headers are set only when the task is dispatched, so they are not
1993 # visible when the task is returned in a Cloud Tasks response.
1994 #
1995 # Although there is no specific limit for the maximum number of headers or
1996 # the size, there is a limit on the maximum size of the Task. For more
1997 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001998 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001999 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002000 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002001 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002002 # * If app_engine_routing_override is set on the
2003 # queue, this value is used for all
2004 # tasks in the queue, no matter what the setting is for the task-level
2005 # app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002006 #
2007 # Defines routing characteristics specific to App Engine - service, version,
2008 # and instance.
2009 #
2010 # For more information about services, versions, and instances see
2011 # [An Overview of App
2012 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2013 # [Microservices Architecture on Google App
2014 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2015 # [App Engine Standard request
2016 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2017 # and [App Engine Flex request
2018 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Dan O'Mearadd494642020-05-01 07:42:23 -07002019 #
2020 # Using AppEngineRouting requires
2021 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2022 # Google IAM permission for the project
2023 # and the following scope:
2024 #
2025 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -07002026 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002027 #
2028 # By default, the task is sent to the service which is the default
2029 # service when the task is attempted.
2030 #
2031 # For some queues or tasks which were created using the App Engine
2032 # Task Queue API, host is not parsable
2033 # into service,
2034 # version, and
2035 # instance. For example, some tasks
2036 # which were created using the App Engine SDK use a custom domain
2037 # name; custom domains are not parsed by Cloud Tasks. If
2038 # host is not parsable, then
2039 # service,
2040 # version, and
2041 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07002042 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2043 #
2044 # By default, the task is sent to an instance which is available when
2045 # the task is attempted.
2046 #
2047 # Requests can only be sent to a specific instance if
2048 # [manual scaling is used in App Engine
2049 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2050 # App Engine Flex does not support instances. For more information, see
2051 # [App Engine Standard request
2052 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2053 # and [App Engine Flex request
2054 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2055 &quot;version&quot;: &quot;A String&quot;, # App version.
2056 #
2057 # By default, the task is sent to the version which is the default
2058 # version when the task is attempted.
2059 #
2060 # For some queues or tasks which were created using the App Engine
2061 # Task Queue API, host is not parsable
2062 # into service,
2063 # version, and
2064 # instance. For example, some tasks
2065 # which were created using the App Engine SDK use a custom domain
2066 # name; custom domains are not parsed by Cloud Tasks. If
2067 # host is not parsable, then
2068 # service,
2069 # version, and
2070 # instance are the empty string.
2071 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2072 #
2073 # The host is constructed from the domain name of the app associated with
2074 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2075 # service, version,
2076 # and instance. Tasks which were created using
2077 # the App Engine SDK might have a custom domain name.
2078 #
2079 # For more information, see
2080 # [How Requests are
2081 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002082 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002083 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002084 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002085 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
Dan O'Mearadd494642020-05-01 07:42:23 -07002086 # HTTP requests with this http_method, otherwise the task attempt fails with
2087 # error code 405 (Method Not Allowed). See [Writing a push task request
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002088 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
Dan O'Mearadd494642020-05-01 07:42:23 -07002089 # and the App Engine documentation for your runtime on [How Requests are
2090 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
Bu Sun Kim65020912020-05-20 12:08:20 -07002091 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
2092 #
2093 # A request body is allowed only if the HTTP method is POST or PUT. It is
2094 # an error to set a body on a task with an incompatible HttpMethod.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002095 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
2096 #
2097 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
2098 # It can contain a path and query string arguments.
2099 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
2100 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002101 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002102 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002103 # been returned.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002104 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted or retried.
2105 #
2106 # `schedule_time` will be truncated to the nearest microsecond.
2107 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
2108 #
2109 # `create_time` will be truncated to the nearest second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002110 },
2111 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002112 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results.
2113 #
2114 # To return the next page of results, call
2115 # ListTasks with this value as the
2116 # page_token.
2117 #
2118 # If the next_page_token is empty, there are no more results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002119 }</pre>
2120</div>
2121
2122<div class="method">
2123 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2124 <pre>Retrieves the next page of results.
2125
2126Args:
2127 previous_request: The request for the previous page. (required)
2128 previous_response: The response from the request for the previous page. (required)
2129
2130Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002131 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002132 page. Returns None if there are no more items in the collection.
2133 </pre>
2134</div>
2135
2136<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002137 <code class="details" id="run">run(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002138 <pre>Forces a task to run now.
2139
2140When this method is called, Cloud Tasks will dispatch the task, even if
2141the task is already running, the queue has reached its RateLimits or
2142is PAUSED.
2143
2144This command is meant to be used for manual debugging. For
2145example, RunTask can be used to retry a failed
2146task after a fix has been made or to manually force a task to be
2147dispatched now.
2148
2149The dispatched task is returned. That is, the task that is returned
2150contains the status after the task is dispatched but
2151before the task is received by its target.
2152
Bu Sun Kim65020912020-05-20 12:08:20 -07002153If Cloud Tasks receives a successful response from the task&#x27;s
2154target, then the task will be deleted; otherwise the task&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002155schedule_time will be reset to the time that
2156RunTask was called plus the retry delay specified
Bu Sun Kim65020912020-05-20 12:08:20 -07002157in the queue&#x27;s RetryConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002158
2159RunTask returns
2160NOT_FOUND when it is called on a
2161task that has already succeeded or permanently failed.
2162
2163Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002164 name: string, Required. The task name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002165`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002166 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002167 The object takes the form of:
2168
2169{ # Request message for forcing a task to run now using
2170 # RunTask.
Bu Sun Kim65020912020-05-20 12:08:20 -07002171 &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 -07002172 # returned.
2173 #
2174 # By default response_view is BASIC; not all
2175 # information is retrieved by default because some data, such as
2176 # payloads, might be desirable to return only when needed because
2177 # of its large size or because of the sensitivity of data that it
2178 # contains.
2179 #
2180 # Authorization for FULL requires
2181 # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
2182 # permission on the Task resource.
2183 }
2184
2185 x__xgafv: string, V1 error format.
2186 Allowed values
2187 1 - v1 error format
2188 2 - v2 error format
2189
2190Returns:
2191 An object of the form:
2192
2193 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -07002194 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the worker.
Dan O'Mearadd494642020-05-01 07:42:23 -07002195 #
2196 # An HTTP task is a task that has HttpRequest set.
2197 #
2198 # The task will be pushed to the worker as an HTTP request. If the worker
2199 # or the redirected worker acknowledges the task by returning a successful HTTP
2200 # response code ([`200` - `299`]), the task will be removed from the queue. If
2201 # any other HTTP response code is returned or no response is received, the
2202 # task will be retried according to the following:
2203 #
2204 # * User-specified throttling: retry configuration,
Bu Sun Kim65020912020-05-20 12:08:20 -07002205 # rate limits, and the queue&#x27;s state.
Dan O'Mearadd494642020-05-01 07:42:23 -07002206 #
2207 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
Bu Sun Kim65020912020-05-20 12:08:20 -07002208 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
Dan O'Mearadd494642020-05-01 07:42:23 -07002209 # will not be changed.
2210 #
2211 # System throttling happens because:
2212 #
2213 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
2214 # rate limits will be used. But if the worker returns
2215 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
2216 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
2217 # specified in the `Retry-After` HTTP response header is considered.
2218 #
2219 # * To prevent traffic spikes and to smooth sudden increases in traffic,
2220 # dispatches ramp up slowly when the queue is newly created or idle and
2221 # if large numbers of tasks suddenly become available to dispatch (due to
2222 # spikes in create task rates, the queue being unpaused, or many tasks
2223 # that are scheduled at the same time).
Bu Sun Kim65020912020-05-20 12:08:20 -07002224 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
Dan O'Mearadd494642020-05-01 07:42:23 -07002225 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
2226 # will be generated and attached as an `Authorization` header in the HTTP
2227 # request.
2228 #
2229 # This type of authorization should generally only be used when calling
2230 # Google APIs hosted on *.googleapis.com.
2231 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
2232 # This type of authorization should generally only be used when calling Google
2233 # APIs hosted on *.googleapis.com.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002234 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
2235 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
2236 # will be used.
Bu Sun Kim65020912020-05-20 12:08:20 -07002237 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
Dan O'Mearadd494642020-05-01 07:42:23 -07002238 # to be used for generating OAuth token.
2239 # The service account must be within the same project as the queue. The
2240 # caller must have iam.serviceAccounts.actAs permission for the service
2241 # account.
2242 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002243 &quot;headers&quot;: { # HTTP request headers.
2244 #
2245 # This map contains the header field names and values.
2246 # Headers can be set when the
2247 # task is created.
2248 #
2249 # These headers represent a subset of the headers that will accompany the
2250 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
2251 #
2252 # A partial list of headers that will be ignored or replaced is:
2253 #
2254 # * Host: This will be computed by Cloud Tasks and derived from
2255 # HttpRequest.url.
2256 # * Content-Length: This will be computed by Cloud Tasks.
2257 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
2258 # * X-Google-*: Google use only.
2259 # * X-AppEngine-*: Google use only.
2260 #
2261 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
2262 # `Content-Type` to a media type when the
2263 # task is created.
2264 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
2265 # `&quot;application/json&quot;`.
2266 #
2267 # Headers which can have multiple values (according to RFC2616) can be
2268 # specified using comma-separated values.
2269 #
2270 # The size of the headers must be less than 80KB.
2271 &quot;a_key&quot;: &quot;A String&quot;,
2272 },
2273 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
2274 #
2275 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
2276 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
2277 # encode some characters for safety and compatibility. The maximum allowed
2278 # URL length is 2083 characters after encoding.
2279 #
2280 # The `Location` header response from a redirect response [`300` - `399`]
2281 # may be followed. The redirect is not counted as a separate attempt.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002282 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
2283 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
2284 # token will be generated and attached as an `Authorization` header in the
2285 # HTTP request.
2286 #
2287 # This type of authorization can be used for many scenarios, including
2288 # calling Cloud Run, or endpoints where you intend to validate the token
2289 # yourself.
2290 # [OpenID Connect
2291 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
2292 # This type of authorization can be used for many scenarios, including
2293 # calling Cloud Run, or endpoints where you intend to validate the token
2294 # yourself.
2295 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
2296 # specified in target will be used.
2297 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2298 # to be used for generating OIDC token.
2299 # The service account must be within the same project as the queue. The
2300 # caller must have iam.serviceAccounts.actAs permission for the service
2301 # account.
2302 },
2303 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
2304 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
2305 #
2306 # A request body is allowed only if the
2307 # HTTP method is POST, PUT, or PATCH. It is an
2308 # error to set body on a task with an incompatible HttpMethod.
Dan O'Mearadd494642020-05-01 07:42:23 -07002309 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002310 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
2311 #
2312 # The task name.
2313 #
2314 # The task name must have the following format:
2315 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
2316 #
2317 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2318 # hyphens (-), colons (:), or periods (.).
2319 # For more information, see
2320 # [Identifying
2321 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2322 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
2323 # The list of available locations can be obtained by calling
2324 # ListLocations.
2325 # For more information, see https://cloud.google.com/about/locations/.
2326 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2327 # hyphens (-). The maximum length is 100 characters.
2328 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
2329 # hyphens (-), or underscores (_). The maximum length is 500 characters.
2330 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
2331 # respond by this deadline then the request is cancelled and the attempt
2332 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
2333 # task according to the RetryConfig.
2334 #
2335 # Note that when the request is cancelled, Cloud Tasks will stop listing for
2336 # the response, but whether the worker stops processing depends on the
2337 # worker. For example, if the worker is stuck, it may not react to cancelled
2338 # requests.
2339 #
2340 # The default and maximum values depend on the type of request:
2341 #
2342 # * For HTTP tasks, the default is 10 minutes. The deadline
2343 # must be in the interval [15 seconds, 30 minutes].
2344 #
2345 # * For App Engine tasks, 0 indicates that the
2346 # request has the default deadline. The default deadline depends on the
2347 # [scaling
2348 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
2349 # of the service: 10 minutes for standard apps with automatic scaling, 24
2350 # hours for standard apps with manual and basic scaling, and 60 minutes for
2351 # flex apps. If the request deadline is set, it must be in the interval [15
2352 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
2353 # `dispatch_deadline`, the app handler will not run for longer than than
2354 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
2355 # at most a few seconds more than the app handler&#x27;s timeout. For more
2356 # information see
2357 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
2358 #
2359 # `dispatch_deadline` will be truncated to the nearest millisecond. The
2360 # deadline is an approximate deadline.
2361 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
2362 #
2363 # This count includes attempts which have been dispatched but haven&#x27;t
2364 # received a response.
2365 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
2366 #
2367 # Only dispatch_time will be set.
2368 # The other Attempt information is not retained by Cloud Tasks.
Bu Sun Kim65020912020-05-20 12:08:20 -07002369 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
2370 #
2371 # `response_time` will be truncated to the nearest microsecond.
2372 &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.
2373 #
2374 # If `response_time` is unset, then the task has not been attempted or is
2375 # currently running and the `response_status` field is meaningless.
2376 # different programming environments, including REST APIs and RPC APIs. It is
2377 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2378 # three pieces of data: error code, error message, and error details.
2379 #
2380 # You can find out more about this error model and how to work with it in the
2381 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2382 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2383 # message types for APIs to use.
2384 {
2385 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2386 },
2387 ],
2388 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2389 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2390 # user-facing error message should be localized and sent in the
2391 # google.rpc.Status.details field, or localized by the client.
2392 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002393 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
2394 #
2395 # `schedule_time` will be truncated to the nearest microsecond.
2396 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
2397 #
2398 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07002399 },
2400 &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 -07002401 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
2402 #
2403 # `response_time` will be truncated to the nearest microsecond.
2404 &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.
2405 #
2406 # If `response_time` is unset, then the task has not been attempted or is
2407 # currently running and the `response_status` field is meaningless.
2408 # different programming environments, including REST APIs and RPC APIs. It is
2409 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2410 # three pieces of data: error code, error message, and error details.
2411 #
2412 # You can find out more about this error model and how to work with it in the
2413 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2414 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2415 # message types for APIs to use.
2416 {
2417 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2418 },
2419 ],
2420 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2421 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2422 # user-facing error message should be localized and sent in the
2423 # google.rpc.Status.details field, or localized by the client.
2424 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002425 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
2426 #
2427 # `schedule_time` will be truncated to the nearest microsecond.
2428 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
2429 #
2430 # `dispatch_time` will be truncated to the nearest microsecond.
Bu Sun Kim65020912020-05-20 12:08:20 -07002431 },
2432 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
2433 &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 -07002434 #
2435 # An App Engine task is a task that has AppEngineHttpRequest set.
2436 #
2437 # The message defines the HTTP request that is sent to an App Engine app when
2438 # the task is dispatched.
2439 #
2440 # Using AppEngineHttpRequest requires
2441 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2442 # Google IAM permission for the project
2443 # and the following scope:
2444 #
2445 # `https://www.googleapis.com/auth/cloud-platform`
2446 #
2447 # The task will be delivered to the App Engine app which belongs to the same
2448 # project as the queue. For more information, see
2449 # [How Requests are
2450 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2451 # and how routing is affected by
2452 # [dispatch
2453 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
2454 # Traffic is encrypted during transport and never leaves Google datacenters.
2455 # Because this traffic is carried over a communication mechanism internal to
2456 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
2457 # The request to the handler, however, will appear to have used the HTTP
2458 # protocol.
2459 #
2460 # The AppEngineRouting used to construct the URL that the task is
2461 # delivered to can be set at the queue-level or task-level:
2462 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002463 # * If app_engine_routing_override is set on the
2464 # queue, this value is used for all
2465 # tasks in the queue, no matter what the setting is for the task-level
2466 # app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002467 #
2468 #
2469 # The `url` that the task will be sent to is:
2470 #
2471 # * `url =` host `+`
2472 # relative_uri
2473 #
2474 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
2475 # URIs restricted with
2476 # [`login:
2477 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
2478 # Because tasks are not run as any user, they cannot be dispatched to URIs
2479 # restricted with
2480 # [`login:
2481 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
2482 # Task dispatches also do not follow redirects.
2483 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002484 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002485 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -07002486 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002487 # not receive response before the deadline. Failed
2488 # tasks will be retried according to the
2489 # retry configuration. `503` (Service Unavailable) is
2490 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -07002491 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
2492 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002493 # Requests) response from an app handler does not cause traffic congestion
2494 # control to throttle the queue.
Bu Sun Kim65020912020-05-20 12:08:20 -07002495 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002496 #
2497 # This map contains the header field names and values.
2498 # Headers can be set when the
2499 # task is created.
2500 # Repeated headers are not supported but a header value can contain commas.
2501 #
2502 # Cloud Tasks sets some headers to default values:
2503 #
2504 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -07002505 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002506 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -07002507 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002508 # modified `User-Agent`.
2509 #
2510 # If the task has a body, Cloud
2511 # Tasks sets the following headers:
2512 #
2513 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -07002514 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002515 # setting `Content-Type` to a particular media type when the
2516 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07002517 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002518 # * `Content-Length`: This is computed by Cloud Tasks. This value is
2519 # output only. It cannot be changed.
2520 #
2521 # The headers below cannot be set or overridden:
2522 #
2523 # * `Host`
2524 # * `X-Google-*`
2525 # * `X-AppEngine-*`
2526 #
2527 # In addition, Cloud Tasks sets some headers when the task is dispatched,
2528 # such as headers containing information about the task; see
2529 # [request
Dan O'Mearadd494642020-05-01 07:42:23 -07002530 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002531 # These headers are set only when the task is dispatched, so they are not
2532 # visible when the task is returned in a Cloud Tasks response.
2533 #
2534 # Although there is no specific limit for the maximum number of headers or
2535 # the size, there is a limit on the maximum size of the Task. For more
2536 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002537 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002538 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002539 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002540 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002541 # * If app_engine_routing_override is set on the
2542 # queue, this value is used for all
2543 # tasks in the queue, no matter what the setting is for the task-level
2544 # app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002545 #
2546 # Defines routing characteristics specific to App Engine - service, version,
2547 # and instance.
2548 #
2549 # For more information about services, versions, and instances see
2550 # [An Overview of App
2551 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2552 # [Microservices Architecture on Google App
2553 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2554 # [App Engine Standard request
2555 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2556 # and [App Engine Flex request
2557 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Dan O'Mearadd494642020-05-01 07:42:23 -07002558 #
2559 # Using AppEngineRouting requires
2560 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2561 # Google IAM permission for the project
2562 # and the following scope:
2563 #
2564 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -07002565 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002566 #
2567 # By default, the task is sent to the service which is the default
2568 # service when the task is attempted.
2569 #
2570 # For some queues or tasks which were created using the App Engine
2571 # Task Queue API, host is not parsable
2572 # into service,
2573 # version, and
2574 # instance. For example, some tasks
2575 # which were created using the App Engine SDK use a custom domain
2576 # name; custom domains are not parsed by Cloud Tasks. If
2577 # host is not parsable, then
2578 # service,
2579 # version, and
2580 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07002581 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2582 #
2583 # By default, the task is sent to an instance which is available when
2584 # the task is attempted.
2585 #
2586 # Requests can only be sent to a specific instance if
2587 # [manual scaling is used in App Engine
2588 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2589 # App Engine Flex does not support instances. For more information, see
2590 # [App Engine Standard request
2591 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2592 # and [App Engine Flex request
2593 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2594 &quot;version&quot;: &quot;A String&quot;, # App version.
2595 #
2596 # By default, the task is sent to the version which is the default
2597 # version when the task is attempted.
2598 #
2599 # For some queues or tasks which were created using the App Engine
2600 # Task Queue API, host is not parsable
2601 # into service,
2602 # version, and
2603 # instance. For example, some tasks
2604 # which were created using the App Engine SDK use a custom domain
2605 # name; custom domains are not parsed by Cloud Tasks. If
2606 # host is not parsable, then
2607 # service,
2608 # version, and
2609 # instance are the empty string.
2610 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2611 #
2612 # The host is constructed from the domain name of the app associated with
2613 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2614 # service, version,
2615 # and instance. Tasks which were created using
2616 # the App Engine SDK might have a custom domain name.
2617 #
2618 # For more information, see
2619 # [How Requests are
2620 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002621 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002622 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002623 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002624 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
Dan O'Mearadd494642020-05-01 07:42:23 -07002625 # HTTP requests with this http_method, otherwise the task attempt fails with
2626 # error code 405 (Method Not Allowed). See [Writing a push task request
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002627 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
Dan O'Mearadd494642020-05-01 07:42:23 -07002628 # and the App Engine documentation for your runtime on [How Requests are
2629 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
Bu Sun Kim65020912020-05-20 12:08:20 -07002630 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
2631 #
2632 # A request body is allowed only if the HTTP method is POST or PUT. It is
2633 # an error to set a body on a task with an incompatible HttpMethod.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002634 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
2635 #
2636 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
2637 # It can contain a path and query string arguments.
2638 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
2639 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002640 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002641 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002642 # been returned.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002643 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted or retried.
2644 #
2645 # `schedule_time` will be truncated to the nearest microsecond.
2646 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
2647 #
2648 # `create_time` will be truncated to the nearest second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002649 }</pre>
2650</div>
2651
2652</body></html>