blob: bcc4c8422f65a2615091b06a4cf6453564401803 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="cloudtasks_v2beta3.html">Cloud Tasks API</a> . <a href="cloudtasks_v2beta3.projects.html">projects</a> . <a href="cloudtasks_v2beta3.projects.locations.html">locations</a> . <a href="cloudtasks_v2beta3.projects.locations.queues.html">queues</a> . <a href="cloudtasks_v2beta3.projects.locations.queues.tasks.html">tasks</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Creates a task and adds it to a queue.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a task.</p>
83<p class="toc_element">
84 <code><a href="#get">get(name, responseView=None, x__xgafv=None)</a></code></p>
85<p class="firstline">Gets a task.</p>
86<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070087 <code><a href="#list">list(parent, responseView=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Lists the tasks in a queue.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#run">run(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Forces a task to run now.</p>
95<h3>Method Details</h3>
96<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070097 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098 <pre>Creates a task and adds it to a queue.
99
100Tasks cannot be updated after creation; there is no UpdateTask command.
101
102* The maximum task size is 100KB.
103
104Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 parent: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
107
108The queue must already exist. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110 The object takes the form of:
111
112{ # Request message for CreateTask.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700113 &quot;responseView&quot;: &quot;A String&quot;, # The response_view specifies which subset of the Task will be
114 # 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;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
159 &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 -0700160 #
161 # An App Engine task is a task that has AppEngineHttpRequest set.
162 #
163 # The message defines the HTTP request that is sent to an App Engine app when
164 # the task is dispatched.
165 #
166 # Using AppEngineHttpRequest requires
167 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
168 # Google IAM permission for the project
169 # and the following scope:
170 #
171 # `https://www.googleapis.com/auth/cloud-platform`
172 #
173 # The task will be delivered to the App Engine app which belongs to the same
174 # project as the queue. For more information, see
175 # [How Requests are
176 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
177 # and how routing is affected by
178 # [dispatch
179 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
180 # Traffic is encrypted during transport and never leaves Google datacenters.
181 # Because this traffic is carried over a communication mechanism internal to
182 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
183 # The request to the handler, however, will appear to have used the HTTP
184 # protocol.
185 #
186 # The AppEngineRouting used to construct the URL that the task is
187 # delivered to can be set at the queue-level or task-level:
188 #
189 # * If set,
Dan O'Mearadd494642020-05-01 07:42:23 -0700190 # app_engine_routing_override
191 # is used for all tasks in the queue, no matter what the setting
192 # is for the
193 # task-level app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700194 #
195 #
196 # The `url` that the task will be sent to is:
197 #
198 # * `url =` host `+`
199 # relative_uri
200 #
201 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
202 # URIs restricted with
203 # [`login:
204 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
205 # Because tasks are not run as any user, they cannot be dispatched to URIs
206 # restricted with
207 # [`login:
208 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
209 # Task dispatches also do not follow redirects.
210 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700211 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700212 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -0700213 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700214 # not receive response before the deadline. Failed
215 # tasks will be retried according to the
216 # retry configuration. `503` (Service Unavailable) is
217 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -0700218 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
219 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220 # Requests) response from an app handler does not cause traffic congestion
221 # control to throttle the queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700222 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
223 #
224 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
225 # HTTP requests with this http_method, otherwise the task attempt fails with
226 # error code 405 (Method Not Allowed). See [Writing a push task request
227 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
228 # and the App Engine documentation for your runtime on [How Requests are
229 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
230 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
231 #
232 # A request body is allowed only if the HTTP method is POST or PUT. It is
233 # an error to set a body on a task with an incompatible HttpMethod.
234 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
235 #
236 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
237 # It can contain a path and query string arguments.
238 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
239 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700240 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700241 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700242 # This map contains the header field names and values.
243 # Headers can be set when the
244 # task is created.
245 # Repeated headers are not supported but a header value can contain commas.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700246 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700247 # Cloud Tasks sets some headers to default values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700249 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -0700250 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700251 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Dan O'Mearadd494642020-05-01 07:42:23 -0700253 # modified `User-Agent`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700255 # If the task has a body, Cloud
256 # Tasks sets the following headers:
257 #
258 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -0700259 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Dan O'Mearadd494642020-05-01 07:42:23 -0700260 # setting `Content-Type` to a particular media type when the
261 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700262 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700263 # * `Content-Length`: This is computed by Cloud Tasks. This value is
264 # output only. It cannot be changed.
265 #
266 # The headers below cannot be set or overridden:
267 #
268 # * `Host`
269 # * `X-Google-*`
270 # * `X-AppEngine-*`
271 #
272 # In addition, Cloud Tasks sets some headers when the task is dispatched,
273 # such as headers containing information about the task; see
274 # [request
275 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
276 # These headers are set only when the task is dispatched, so they are not
277 # visible when the task is returned in a Cloud Tasks response.
278 #
279 # Although there is no specific limit for the maximum number of headers or
280 # the size, there is a limit on the maximum size of the Task. For more
281 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700282 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700283 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700284 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
285 #
286 # If set,
287 # app_engine_routing_override
288 # is used for all tasks in the queue, no matter what the setting is for the
289 # task-level app_engine_routing.
290 #
291 # Defines routing characteristics specific to App Engine - service, version,
292 # and instance.
293 #
294 # For more information about services, versions, and instances see
295 # [An Overview of App
296 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
297 # [Microservices Architecture on Google App
298 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
299 # [App Engine Standard request
300 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
301 # and [App Engine Flex request
302 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -0700303 &quot;service&quot;: &quot;A String&quot;, # App service.
304 #
305 # By default, the task is sent to the service which is the default
306 # service when the task is attempted.
307 #
308 # For some queues or tasks which were created using the App Engine
309 # Task Queue API, host is not parsable
310 # into service,
311 # version, and
312 # instance. For example, some tasks
313 # which were created using the App Engine SDK use a custom domain
314 # name; custom domains are not parsed by Cloud Tasks. If
315 # host is not parsable, then
316 # service,
317 # version, and
318 # instance are the empty string.
319 &quot;instance&quot;: &quot;A String&quot;, # App instance.
320 #
321 # By default, the task is sent to an instance which is available when
322 # the task is attempted.
323 #
324 # Requests can only be sent to a specific instance if
325 # [manual scaling is used in App Engine
326 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
327 # App Engine Flex does not support instances. For more information, see
328 # [App Engine Standard request
329 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
330 # and [App Engine Flex request
331 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700332 &quot;version&quot;: &quot;A String&quot;, # App version.
333 #
334 # By default, the task is sent to the version which is the default
335 # version when the task is attempted.
336 #
337 # For some queues or tasks which were created using the App Engine
338 # Task Queue API, host is not parsable
339 # into service,
340 # version, and
341 # instance. For example, some tasks
342 # which were created using the App Engine SDK use a custom domain
343 # name; custom domains are not parsed by Cloud Tasks. If
344 # host is not parsable, then
345 # service,
346 # version, and
347 # instance are the empty string.
348 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
349 #
350 # The host is constructed from the domain name of the app associated with
351 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
352 # service, version,
353 # and instance. Tasks which were created using
354 # the App Engine SDK might have a custom domain name.
355 #
356 # For more information, see
357 # [How Requests are
358 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700360 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700361 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
362 # been returned.
363 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700364 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700365 # `create_time` will be truncated to the nearest second.
366 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted.
367 #
368 # For App Engine queues, this is when the task will be attempted or retried.
369 #
370 # `schedule_time` will be truncated to the nearest microsecond.
371 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the task&#x27;s target.
372 #
373 # An HTTP task is a task that has HttpRequest set.
374 #
375 # The task will be pushed to the worker as an HTTP request. If the worker
376 # or the redirected worker acknowledges the task by returning a successful HTTP
377 # response code ([`200` - `299`]), the task will be removed from the queue. If
378 # any other HTTP response code is returned or no response is received, the
379 # task will be retried according to the following:
380 #
381 # * User-specified throttling: retry configuration,
382 # rate limits, and the queue&#x27;s state.
383 #
384 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
385 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
386 # will not be changed.
387 #
388 # System throttling happens because:
389 #
390 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
391 # rate limits will be used. But if the worker returns
392 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
393 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
394 # specified in the `Retry-After` HTTP response header is considered.
395 #
396 # * To prevent traffic spikes and to smooth sudden increases in traffic,
397 # dispatches ramp up slowly when the queue is newly created or idle and
398 # if large numbers of tasks suddenly become available to dispatch (due to
399 # spikes in create task rates, the queue being unpaused, or many tasks
400 # that are scheduled at the same time).
Bu Sun Kim65020912020-05-20 12:08:20 -0700401 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
402 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
403 # will be generated and attached as an `Authorization` header in the HTTP
404 # request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700405 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700406 # This type of authorization should generally only be used when calling
407 # Google APIs hosted on *.googleapis.com.
408 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
409 # This type of authorization should generally only be used when calling Google
410 # APIs hosted on *.googleapis.com.
411 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
412 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
413 # will be used.
414 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
415 # to be used for generating OAuth token.
416 # The service account must be within the same project as the queue. The
417 # caller must have iam.serviceAccounts.actAs permission for the service
418 # account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700419 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700420 &quot;headers&quot;: { # HTTP request headers.
Dan O'Mearadd494642020-05-01 07:42:23 -0700421 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700422 # This map contains the header field names and values.
423 # Headers can be set when the
424 # task is created.
Dan O'Mearadd494642020-05-01 07:42:23 -0700425 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700426 # These headers represent a subset of the headers that will accompany the
427 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
428 #
429 # A partial list of headers that will be ignored or replaced is:
430 #
431 # * Host: This will be computed by Cloud Tasks and derived from
432 # HttpRequest.url.
433 # * Content-Length: This will be computed by Cloud Tasks.
434 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
435 # * X-Google-*: Google use only.
436 # * X-AppEngine-*: Google use only.
437 #
438 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
439 # `Content-Type` to a media type when the
440 # task is created.
441 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
442 # `&quot;application/json&quot;`.
443 #
444 # Headers which can have multiple values (according to RFC2616) can be
445 # specified using comma-separated values.
446 #
447 # The size of the headers must be less than 80KB.
448 &quot;a_key&quot;: &quot;A String&quot;,
449 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700450 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
451 #
452 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
453 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
454 # encode some characters for safety and compatibility. The maximum allowed
455 # URL length is 2083 characters after encoding.
456 #
457 # The `Location` header response from a redirect response [`300` - `399`]
458 # may be followed. The redirect is not counted as a separate attempt.
459 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
460 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
461 # token will be generated and attached as an `Authorization` header in the
462 # HTTP request.
463 #
464 # This type of authorization can be used for many scenarios, including
465 # calling Cloud Run, or endpoints where you intend to validate the token
466 # yourself.
467 # [OpenID Connect
468 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
469 # This type of authorization can be used for many scenarios, including
470 # calling Cloud Run, or endpoints where you intend to validate the token
471 # yourself.
472 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
473 # specified in target will be used.
474 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
475 # to be used for generating OIDC token.
476 # The service account must be within the same project as the queue. The
477 # caller must have iam.serviceAccounts.actAs permission for the service
478 # account.
479 },
480 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
481 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
482 #
483 # A request body is allowed only if the
484 # HTTP method is POST, PUT, or PATCH. It is an
485 # error to set body on a task with an incompatible HttpMethod.
Dan O'Mearadd494642020-05-01 07:42:23 -0700486 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700487 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
Dan O'Mearadd494642020-05-01 07:42:23 -0700488 #
489 # The task name.
490 #
491 # The task name must have the following format:
492 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
493 #
494 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
495 # hyphens (-), colons (:), or periods (.).
496 # For more information, see
497 # [Identifying
498 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -0700499 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
Dan O'Mearadd494642020-05-01 07:42:23 -0700500 # The list of available locations can be obtained by calling
501 # ListLocations.
502 # For more information, see https://cloud.google.com/about/locations/.
503 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
504 # hyphens (-). The maximum length is 100 characters.
505 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
506 # hyphens (-), or underscores (_). The maximum length is 500 characters.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700507 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
508 # respond by this deadline then the request is cancelled and the attempt
509 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
510 # task according to the RetryConfig.
511 #
512 # Note that when the request is cancelled, Cloud Tasks will stop listing for
513 # the response, but whether the worker stops processing depends on the
514 # worker. For example, if the worker is stuck, it may not react to cancelled
515 # requests.
516 #
517 # The default and maximum values depend on the type of request:
518 #
519 # * For HTTP tasks, the default is 10 minutes. The deadline
520 # must be in the interval [15 seconds, 30 minutes].
521 #
522 # * For App Engine tasks, 0 indicates that the
523 # request has the default deadline. The default deadline depends on the
524 # [scaling
525 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
526 # of the service: 10 minutes for standard apps with automatic scaling, 24
527 # hours for standard apps with manual and basic scaling, and 60 minutes for
528 # flex apps. If the request deadline is set, it must be in the interval [15
529 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
530 # `dispatch_deadline`, the app handler will not run for longer than than
531 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
532 # at most a few seconds more than the app handler&#x27;s timeout. For more
533 # information see
534 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
535 #
536 # `dispatch_deadline` will be truncated to the nearest millisecond. The
537 # deadline is an approximate deadline.
538 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
539 #
540 # Only dispatch_time will be set.
541 # The other Attempt information is not retained by Cloud Tasks.
542 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
543 #
544 # `schedule_time` will be truncated to the nearest microsecond.
545 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
546 #
547 # `dispatch_time` will be truncated to the nearest microsecond.
548 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
549 #
550 # `response_time` will be truncated to the nearest microsecond.
551 &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.
552 #
553 # If `response_time` is unset, then the task has not been attempted or is
554 # currently running and the `response_status` field is meaningless.
555 # different programming environments, including REST APIs and RPC APIs. It is
556 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
557 # three pieces of data: error code, error message, and error details.
558 #
559 # You can find out more about this error model and how to work with it in the
560 # [API Design Guide](https://cloud.google.com/apis/design/errors).
561 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
562 # message types for APIs to use.
563 {
564 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
565 },
566 ],
567 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
568 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
569 # user-facing error message should be localized and sent in the
570 # google.rpc.Status.details field, or localized by the client.
571 },
572 },
573 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
574 #
575 # This count includes attempts which have been dispatched but haven&#x27;t
576 # received a response.
577 &quot;lastAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s last attempt.
578 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
579 #
580 # `schedule_time` will be truncated to the nearest microsecond.
581 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
582 #
583 # `dispatch_time` will be truncated to the nearest microsecond.
584 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
585 #
586 # `response_time` will be truncated to the nearest microsecond.
587 &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.
588 #
589 # If `response_time` is unset, then the task has not been attempted or is
590 # currently running and the `response_status` field is meaningless.
591 # different programming environments, including REST APIs and RPC APIs. It is
592 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
593 # three pieces of data: error code, error message, and error details.
594 #
595 # You can find out more about this error model and how to work with it in the
596 # [API Design Guide](https://cloud.google.com/apis/design/errors).
597 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
598 # message types for APIs to use.
599 {
600 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
601 },
602 ],
603 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
604 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
605 # user-facing error message should be localized and sent in the
606 # google.rpc.Status.details field, or localized by the client.
607 },
608 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700609 },
610 }
611
612 x__xgafv: string, V1 error format.
613 Allowed values
614 1 - v1 error format
615 2 - v2 error format
616
617Returns:
618 An object of the form:
619
620 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -0700621 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
622 &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 -0700623 #
624 # An App Engine task is a task that has AppEngineHttpRequest set.
625 #
626 # The message defines the HTTP request that is sent to an App Engine app when
627 # the task is dispatched.
628 #
629 # Using AppEngineHttpRequest requires
630 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
631 # Google IAM permission for the project
632 # and the following scope:
633 #
634 # `https://www.googleapis.com/auth/cloud-platform`
635 #
636 # The task will be delivered to the App Engine app which belongs to the same
637 # project as the queue. For more information, see
638 # [How Requests are
639 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
640 # and how routing is affected by
641 # [dispatch
642 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
643 # Traffic is encrypted during transport and never leaves Google datacenters.
644 # Because this traffic is carried over a communication mechanism internal to
645 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
646 # The request to the handler, however, will appear to have used the HTTP
647 # protocol.
648 #
649 # The AppEngineRouting used to construct the URL that the task is
650 # delivered to can be set at the queue-level or task-level:
651 #
652 # * If set,
Dan O'Mearadd494642020-05-01 07:42:23 -0700653 # app_engine_routing_override
654 # is used for all tasks in the queue, no matter what the setting
655 # is for the
656 # task-level app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700657 #
658 #
659 # The `url` that the task will be sent to is:
660 #
661 # * `url =` host `+`
662 # relative_uri
663 #
664 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
665 # URIs restricted with
666 # [`login:
667 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
668 # Because tasks are not run as any user, they cannot be dispatched to URIs
669 # restricted with
670 # [`login:
671 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
672 # Task dispatches also do not follow redirects.
673 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700674 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700675 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -0700676 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700677 # not receive response before the deadline. Failed
678 # tasks will be retried according to the
679 # retry configuration. `503` (Service Unavailable) is
680 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -0700681 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
682 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700683 # Requests) response from an app handler does not cause traffic congestion
684 # control to throttle the queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700685 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
686 #
687 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
688 # HTTP requests with this http_method, otherwise the task attempt fails with
689 # error code 405 (Method Not Allowed). See [Writing a push task request
690 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
691 # and the App Engine documentation for your runtime on [How Requests are
692 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
693 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
694 #
695 # A request body is allowed only if the HTTP method is POST or PUT. It is
696 # an error to set a body on a task with an incompatible HttpMethod.
697 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
698 #
699 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
700 # It can contain a path and query string arguments.
701 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
702 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700703 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700704 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700705 # This map contains the header field names and values.
706 # Headers can be set when the
707 # task is created.
708 # Repeated headers are not supported but a header value can contain commas.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700709 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700710 # Cloud Tasks sets some headers to default values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700711 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700712 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -0700713 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700714 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -0700715 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Dan O'Mearadd494642020-05-01 07:42:23 -0700716 # modified `User-Agent`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700717 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700718 # If the task has a body, Cloud
719 # Tasks sets the following headers:
720 #
721 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -0700722 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Dan O'Mearadd494642020-05-01 07:42:23 -0700723 # setting `Content-Type` to a particular media type when the
724 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700725 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -0700726 # * `Content-Length`: This is computed by Cloud Tasks. This value is
727 # output only. It cannot be changed.
728 #
729 # The headers below cannot be set or overridden:
730 #
731 # * `Host`
732 # * `X-Google-*`
733 # * `X-AppEngine-*`
734 #
735 # In addition, Cloud Tasks sets some headers when the task is dispatched,
736 # such as headers containing information about the task; see
737 # [request
738 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
739 # These headers are set only when the task is dispatched, so they are not
740 # visible when the task is returned in a Cloud Tasks response.
741 #
742 # Although there is no specific limit for the maximum number of headers or
743 # the size, there is a limit on the maximum size of the Task. For more
744 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700745 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700746 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700747 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
748 #
749 # If set,
750 # app_engine_routing_override
751 # is used for all tasks in the queue, no matter what the setting is for the
752 # task-level app_engine_routing.
753 #
754 # Defines routing characteristics specific to App Engine - service, version,
755 # and instance.
756 #
757 # For more information about services, versions, and instances see
758 # [An Overview of App
759 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
760 # [Microservices Architecture on Google App
761 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
762 # [App Engine Standard request
763 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
764 # and [App Engine Flex request
765 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -0700766 &quot;service&quot;: &quot;A String&quot;, # App service.
767 #
768 # By default, the task is sent to the service which is the default
769 # service when the task is attempted.
770 #
771 # For some queues or tasks which were created using the App Engine
772 # Task Queue API, host is not parsable
773 # into service,
774 # version, and
775 # instance. For example, some tasks
776 # which were created using the App Engine SDK use a custom domain
777 # name; custom domains are not parsed by Cloud Tasks. If
778 # host is not parsable, then
779 # service,
780 # version, and
781 # instance are the empty string.
782 &quot;instance&quot;: &quot;A String&quot;, # App instance.
783 #
784 # By default, the task is sent to an instance which is available when
785 # the task is attempted.
786 #
787 # Requests can only be sent to a specific instance if
788 # [manual scaling is used in App Engine
789 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
790 # App Engine Flex does not support instances. For more information, see
791 # [App Engine Standard request
792 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
793 # and [App Engine Flex request
794 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700795 &quot;version&quot;: &quot;A String&quot;, # App version.
796 #
797 # By default, the task is sent to the version which is the default
798 # version when the task is attempted.
799 #
800 # For some queues or tasks which were created using the App Engine
801 # Task Queue API, host is not parsable
802 # into service,
803 # version, and
804 # instance. For example, some tasks
805 # which were created using the App Engine SDK use a custom domain
806 # name; custom domains are not parsed by Cloud Tasks. If
807 # host is not parsable, then
808 # service,
809 # version, and
810 # instance are the empty string.
811 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
812 #
813 # The host is constructed from the domain name of the app associated with
814 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
815 # service, version,
816 # and instance. Tasks which were created using
817 # the App Engine SDK might have a custom domain name.
818 #
819 # For more information, see
820 # [How Requests are
821 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -0700822 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700823 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700824 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
825 # been returned.
826 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700827 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700828 # `create_time` will be truncated to the nearest second.
829 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted.
830 #
831 # For App Engine queues, this is when the task will be attempted or retried.
832 #
833 # `schedule_time` will be truncated to the nearest microsecond.
834 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the task&#x27;s target.
835 #
836 # An HTTP task is a task that has HttpRequest set.
837 #
838 # The task will be pushed to the worker as an HTTP request. If the worker
839 # or the redirected worker acknowledges the task by returning a successful HTTP
840 # response code ([`200` - `299`]), the task will be removed from the queue. If
841 # any other HTTP response code is returned or no response is received, the
842 # task will be retried according to the following:
843 #
844 # * User-specified throttling: retry configuration,
845 # rate limits, and the queue&#x27;s state.
846 #
847 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
848 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
849 # will not be changed.
850 #
851 # System throttling happens because:
852 #
853 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
854 # rate limits will be used. But if the worker returns
855 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
856 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
857 # specified in the `Retry-After` HTTP response header is considered.
858 #
859 # * To prevent traffic spikes and to smooth sudden increases in traffic,
860 # dispatches ramp up slowly when the queue is newly created or idle and
861 # if large numbers of tasks suddenly become available to dispatch (due to
862 # spikes in create task rates, the queue being unpaused, or many tasks
863 # that are scheduled at the same time).
Bu Sun Kim65020912020-05-20 12:08:20 -0700864 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
865 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
866 # will be generated and attached as an `Authorization` header in the HTTP
867 # request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700868 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700869 # This type of authorization should generally only be used when calling
870 # Google APIs hosted on *.googleapis.com.
871 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
872 # This type of authorization should generally only be used when calling Google
873 # APIs hosted on *.googleapis.com.
874 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
875 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
876 # will be used.
877 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
878 # to be used for generating OAuth token.
879 # The service account must be within the same project as the queue. The
880 # caller must have iam.serviceAccounts.actAs permission for the service
881 # account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700882 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700883 &quot;headers&quot;: { # HTTP request headers.
Dan O'Mearadd494642020-05-01 07:42:23 -0700884 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700885 # This map contains the header field names and values.
886 # Headers can be set when the
887 # task is created.
Dan O'Mearadd494642020-05-01 07:42:23 -0700888 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700889 # These headers represent a subset of the headers that will accompany the
890 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
891 #
892 # A partial list of headers that will be ignored or replaced is:
893 #
894 # * Host: This will be computed by Cloud Tasks and derived from
895 # HttpRequest.url.
896 # * Content-Length: This will be computed by Cloud Tasks.
897 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
898 # * X-Google-*: Google use only.
899 # * X-AppEngine-*: Google use only.
900 #
901 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
902 # `Content-Type` to a media type when the
903 # task is created.
904 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
905 # `&quot;application/json&quot;`.
906 #
907 # Headers which can have multiple values (according to RFC2616) can be
908 # specified using comma-separated values.
909 #
910 # The size of the headers must be less than 80KB.
911 &quot;a_key&quot;: &quot;A String&quot;,
912 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700913 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
914 #
915 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
916 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
917 # encode some characters for safety and compatibility. The maximum allowed
918 # URL length is 2083 characters after encoding.
919 #
920 # The `Location` header response from a redirect response [`300` - `399`]
921 # may be followed. The redirect is not counted as a separate attempt.
922 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
923 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
924 # token will be generated and attached as an `Authorization` header in the
925 # HTTP request.
926 #
927 # This type of authorization can be used for many scenarios, including
928 # calling Cloud Run, or endpoints where you intend to validate the token
929 # yourself.
930 # [OpenID Connect
931 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
932 # This type of authorization can be used for many scenarios, including
933 # calling Cloud Run, or endpoints where you intend to validate the token
934 # yourself.
935 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
936 # specified in target will be used.
937 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
938 # to be used for generating OIDC token.
939 # The service account must be within the same project as the queue. The
940 # caller must have iam.serviceAccounts.actAs permission for the service
941 # account.
942 },
943 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
944 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
945 #
946 # A request body is allowed only if the
947 # HTTP method is POST, PUT, or PATCH. It is an
948 # error to set body on a task with an incompatible HttpMethod.
Dan O'Mearadd494642020-05-01 07:42:23 -0700949 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700950 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
Dan O'Mearadd494642020-05-01 07:42:23 -0700951 #
952 # The task name.
953 #
954 # The task name must have the following format:
955 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
956 #
957 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
958 # hyphens (-), colons (:), or periods (.).
959 # For more information, see
960 # [Identifying
961 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -0700962 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
Dan O'Mearadd494642020-05-01 07:42:23 -0700963 # The list of available locations can be obtained by calling
964 # ListLocations.
965 # For more information, see https://cloud.google.com/about/locations/.
966 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
967 # hyphens (-). The maximum length is 100 characters.
968 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
969 # hyphens (-), or underscores (_). The maximum length is 500 characters.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700970 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
971 # respond by this deadline then the request is cancelled and the attempt
972 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
973 # task according to the RetryConfig.
974 #
975 # Note that when the request is cancelled, Cloud Tasks will stop listing for
976 # the response, but whether the worker stops processing depends on the
977 # worker. For example, if the worker is stuck, it may not react to cancelled
978 # requests.
979 #
980 # The default and maximum values depend on the type of request:
981 #
982 # * For HTTP tasks, the default is 10 minutes. The deadline
983 # must be in the interval [15 seconds, 30 minutes].
984 #
985 # * For App Engine tasks, 0 indicates that the
986 # request has the default deadline. The default deadline depends on the
987 # [scaling
988 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
989 # of the service: 10 minutes for standard apps with automatic scaling, 24
990 # hours for standard apps with manual and basic scaling, and 60 minutes for
991 # flex apps. If the request deadline is set, it must be in the interval [15
992 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
993 # `dispatch_deadline`, the app handler will not run for longer than than
994 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
995 # at most a few seconds more than the app handler&#x27;s timeout. For more
996 # information see
997 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
998 #
999 # `dispatch_deadline` will be truncated to the nearest millisecond. The
1000 # deadline is an approximate deadline.
1001 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
1002 #
1003 # Only dispatch_time will be set.
1004 # The other Attempt information is not retained by Cloud Tasks.
1005 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
1006 #
1007 # `schedule_time` will be truncated to the nearest microsecond.
1008 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
1009 #
1010 # `dispatch_time` will be truncated to the nearest microsecond.
1011 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
1012 #
1013 # `response_time` will be truncated to the nearest microsecond.
1014 &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.
1015 #
1016 # If `response_time` is unset, then the task has not been attempted or is
1017 # currently running and the `response_status` field is meaningless.
1018 # different programming environments, including REST APIs and RPC APIs. It is
1019 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1020 # three pieces of data: error code, error message, and error details.
1021 #
1022 # You can find out more about this error model and how to work with it in the
1023 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1024 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1025 # message types for APIs to use.
1026 {
1027 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1028 },
1029 ],
1030 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1031 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1032 # user-facing error message should be localized and sent in the
1033 # google.rpc.Status.details field, or localized by the client.
1034 },
1035 },
1036 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
1037 #
1038 # This count includes attempts which have been dispatched but haven&#x27;t
1039 # received a response.
1040 &quot;lastAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s last attempt.
1041 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
1042 #
1043 # `schedule_time` will be truncated to the nearest microsecond.
1044 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
1045 #
1046 # `dispatch_time` will be truncated to the nearest microsecond.
1047 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
1048 #
1049 # `response_time` will be truncated to the nearest microsecond.
1050 &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.
1051 #
1052 # If `response_time` is unset, then the task has not been attempted or is
1053 # currently running and the `response_status` field is meaningless.
1054 # different programming environments, including REST APIs and RPC APIs. It is
1055 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1056 # three pieces of data: error code, error message, and error details.
1057 #
1058 # You can find out more about this error model and how to work with it in the
1059 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1060 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1061 # message types for APIs to use.
1062 {
1063 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1064 },
1065 ],
1066 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1067 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1068 # user-facing error message should be localized and sent in the
1069 # google.rpc.Status.details field, or localized by the client.
1070 },
1071 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001072 }</pre>
1073</div>
1074
1075<div class="method">
1076 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
1077 <pre>Deletes a task.
1078
1079A task can be deleted if it is scheduled or dispatched. A task
1080cannot be deleted if it has executed successfully or permanently
1081failed.
1082
1083Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001084 name: string, Required. The task name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001085`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required)
1086 x__xgafv: string, V1 error format.
1087 Allowed values
1088 1 - v1 error format
1089 2 - v2 error format
1090
1091Returns:
1092 An object of the form:
1093
1094 { # A generic empty message that you can re-use to avoid defining duplicated
1095 # empty messages in your APIs. A typical example is to use it as the request
1096 # or the response type of an API method. For instance:
1097 #
1098 # service Foo {
1099 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1100 # }
1101 #
1102 # The JSON representation for `Empty` is empty JSON object `{}`.
1103 }</pre>
1104</div>
1105
1106<div class="method">
1107 <code class="details" id="get">get(name, responseView=None, x__xgafv=None)</code>
1108 <pre>Gets a task.
1109
1110Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001111 name: string, Required. The task name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001112`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required)
1113 responseView: string, The response_view specifies which subset of the Task will be
1114returned.
1115
1116By default response_view is BASIC; not all
1117information is retrieved by default because some data, such as
1118payloads, might be desirable to return only when needed because
1119of its large size or because of the sensitivity of data that it
1120contains.
1121
1122Authorization for FULL requires
1123`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
1124permission on the Task resource.
1125 x__xgafv: string, V1 error format.
1126 Allowed values
1127 1 - v1 error format
1128 2 - v2 error format
1129
1130Returns:
1131 An object of the form:
1132
1133 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -07001134 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
1135 &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 -07001136 #
1137 # An App Engine task is a task that has AppEngineHttpRequest set.
1138 #
1139 # The message defines the HTTP request that is sent to an App Engine app when
1140 # the task is dispatched.
1141 #
1142 # Using AppEngineHttpRequest requires
1143 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1144 # Google IAM permission for the project
1145 # and the following scope:
1146 #
1147 # `https://www.googleapis.com/auth/cloud-platform`
1148 #
1149 # The task will be delivered to the App Engine app which belongs to the same
1150 # project as the queue. For more information, see
1151 # [How Requests are
1152 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1153 # and how routing is affected by
1154 # [dispatch
1155 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
1156 # Traffic is encrypted during transport and never leaves Google datacenters.
1157 # Because this traffic is carried over a communication mechanism internal to
1158 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
1159 # The request to the handler, however, will appear to have used the HTTP
1160 # protocol.
1161 #
1162 # The AppEngineRouting used to construct the URL that the task is
1163 # delivered to can be set at the queue-level or task-level:
1164 #
1165 # * If set,
Dan O'Mearadd494642020-05-01 07:42:23 -07001166 # app_engine_routing_override
1167 # is used for all tasks in the queue, no matter what the setting
1168 # is for the
1169 # task-level app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001170 #
1171 #
1172 # The `url` that the task will be sent to is:
1173 #
1174 # * `url =` host `+`
1175 # relative_uri
1176 #
1177 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
1178 # URIs restricted with
1179 # [`login:
1180 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
1181 # Because tasks are not run as any user, they cannot be dispatched to URIs
1182 # restricted with
1183 # [`login:
1184 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
1185 # Task dispatches also do not follow redirects.
1186 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001187 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001188 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -07001189 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001190 # not receive response before the deadline. Failed
1191 # tasks will be retried according to the
1192 # retry configuration. `503` (Service Unavailable) is
1193 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -07001194 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
1195 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001196 # Requests) response from an app handler does not cause traffic congestion
1197 # control to throttle the queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001198 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
1199 #
1200 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
1201 # HTTP requests with this http_method, otherwise the task attempt fails with
1202 # error code 405 (Method Not Allowed). See [Writing a push task request
1203 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
1204 # and the App Engine documentation for your runtime on [How Requests are
1205 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
1206 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
1207 #
1208 # A request body is allowed only if the HTTP method is POST or PUT. It is
1209 # an error to set a body on a task with an incompatible HttpMethod.
1210 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
1211 #
1212 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
1213 # It can contain a path and query string arguments.
1214 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
1215 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001216 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001217 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001218 # This map contains the header field names and values.
1219 # Headers can be set when the
1220 # task is created.
1221 # Repeated headers are not supported but a header value can contain commas.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001222 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001223 # Cloud Tasks sets some headers to default values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001224 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001225 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -07001226 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -07001227 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -07001228 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Dan O'Mearadd494642020-05-01 07:42:23 -07001229 # modified `User-Agent`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001230 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001231 # If the task has a body, Cloud
1232 # Tasks sets the following headers:
1233 #
1234 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -07001235 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Dan O'Mearadd494642020-05-01 07:42:23 -07001236 # setting `Content-Type` to a particular media type when the
1237 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07001238 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -07001239 # * `Content-Length`: This is computed by Cloud Tasks. This value is
1240 # output only. It cannot be changed.
1241 #
1242 # The headers below cannot be set or overridden:
1243 #
1244 # * `Host`
1245 # * `X-Google-*`
1246 # * `X-AppEngine-*`
1247 #
1248 # In addition, Cloud Tasks sets some headers when the task is dispatched,
1249 # such as headers containing information about the task; see
1250 # [request
1251 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
1252 # These headers are set only when the task is dispatched, so they are not
1253 # visible when the task is returned in a Cloud Tasks response.
1254 #
1255 # Although there is no specific limit for the maximum number of headers or
1256 # the size, there is a limit on the maximum size of the Task. For more
1257 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001258 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001259 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001260 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
1261 #
1262 # If set,
1263 # app_engine_routing_override
1264 # is used for all tasks in the queue, no matter what the setting is for the
1265 # task-level app_engine_routing.
1266 #
1267 # Defines routing characteristics specific to App Engine - service, version,
1268 # and instance.
1269 #
1270 # For more information about services, versions, and instances see
1271 # [An Overview of App
1272 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1273 # [Microservices Architecture on Google App
1274 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1275 # [App Engine Standard request
1276 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1277 # and [App Engine Flex request
1278 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -07001279 &quot;service&quot;: &quot;A String&quot;, # App service.
1280 #
1281 # By default, the task is sent to the service which is the default
1282 # service when the task is attempted.
1283 #
1284 # For some queues or tasks which were created using the App Engine
1285 # Task Queue API, host is not parsable
1286 # into service,
1287 # version, and
1288 # instance. For example, some tasks
1289 # which were created using the App Engine SDK use a custom domain
1290 # name; custom domains are not parsed by Cloud Tasks. If
1291 # host is not parsable, then
1292 # service,
1293 # version, and
1294 # instance are the empty string.
1295 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1296 #
1297 # By default, the task is sent to an instance which is available when
1298 # the task is attempted.
1299 #
1300 # Requests can only be sent to a specific instance if
1301 # [manual scaling is used in App Engine
1302 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1303 # App Engine Flex does not support instances. For more information, see
1304 # [App Engine Standard request
1305 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1306 # and [App Engine Flex request
1307 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001308 &quot;version&quot;: &quot;A String&quot;, # App version.
1309 #
1310 # By default, the task is sent to the version which is the default
1311 # version when the task is attempted.
1312 #
1313 # For some queues or tasks which were created using the App Engine
1314 # Task Queue API, host is not parsable
1315 # into service,
1316 # version, and
1317 # instance. For example, some tasks
1318 # which were created using the App Engine SDK use a custom domain
1319 # name; custom domains are not parsed by Cloud Tasks. If
1320 # host is not parsable, then
1321 # service,
1322 # version, and
1323 # instance are the empty string.
1324 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1325 #
1326 # The host is constructed from the domain name of the app associated with
1327 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1328 # service, version,
1329 # and instance. Tasks which were created using
1330 # the App Engine SDK might have a custom domain name.
1331 #
1332 # For more information, see
1333 # [How Requests are
1334 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -07001335 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001336 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001337 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
1338 # been returned.
1339 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001340 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001341 # `create_time` will be truncated to the nearest second.
1342 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted.
1343 #
1344 # For App Engine queues, this is when the task will be attempted or retried.
1345 #
1346 # `schedule_time` will be truncated to the nearest microsecond.
1347 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the task&#x27;s target.
1348 #
1349 # An HTTP task is a task that has HttpRequest set.
1350 #
1351 # The task will be pushed to the worker as an HTTP request. If the worker
1352 # or the redirected worker acknowledges the task by returning a successful HTTP
1353 # response code ([`200` - `299`]), the task will be removed from the queue. If
1354 # any other HTTP response code is returned or no response is received, the
1355 # task will be retried according to the following:
1356 #
1357 # * User-specified throttling: retry configuration,
1358 # rate limits, and the queue&#x27;s state.
1359 #
1360 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
1361 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
1362 # will not be changed.
1363 #
1364 # System throttling happens because:
1365 #
1366 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
1367 # rate limits will be used. But if the worker returns
1368 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
1369 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
1370 # specified in the `Retry-After` HTTP response header is considered.
1371 #
1372 # * To prevent traffic spikes and to smooth sudden increases in traffic,
1373 # dispatches ramp up slowly when the queue is newly created or idle and
1374 # if large numbers of tasks suddenly become available to dispatch (due to
1375 # spikes in create task rates, the queue being unpaused, or many tasks
1376 # that are scheduled at the same time).
Bu Sun Kim65020912020-05-20 12:08:20 -07001377 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
1378 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
1379 # will be generated and attached as an `Authorization` header in the HTTP
1380 # request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001381 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001382 # This type of authorization should generally only be used when calling
1383 # Google APIs hosted on *.googleapis.com.
1384 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
1385 # This type of authorization should generally only be used when calling Google
1386 # APIs hosted on *.googleapis.com.
1387 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
1388 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
1389 # will be used.
1390 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1391 # to be used for generating OAuth token.
1392 # The service account must be within the same project as the queue. The
1393 # caller must have iam.serviceAccounts.actAs permission for the service
1394 # account.
Dan O'Mearadd494642020-05-01 07:42:23 -07001395 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001396 &quot;headers&quot;: { # HTTP request headers.
Dan O'Mearadd494642020-05-01 07:42:23 -07001397 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001398 # This map contains the header field names and values.
1399 # Headers can be set when the
1400 # task is created.
Dan O'Mearadd494642020-05-01 07:42:23 -07001401 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001402 # These headers represent a subset of the headers that will accompany the
1403 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
1404 #
1405 # A partial list of headers that will be ignored or replaced is:
1406 #
1407 # * Host: This will be computed by Cloud Tasks and derived from
1408 # HttpRequest.url.
1409 # * Content-Length: This will be computed by Cloud Tasks.
1410 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
1411 # * X-Google-*: Google use only.
1412 # * X-AppEngine-*: Google use only.
1413 #
1414 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
1415 # `Content-Type` to a media type when the
1416 # task is created.
1417 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
1418 # `&quot;application/json&quot;`.
1419 #
1420 # Headers which can have multiple values (according to RFC2616) can be
1421 # specified using comma-separated values.
1422 #
1423 # The size of the headers must be less than 80KB.
1424 &quot;a_key&quot;: &quot;A String&quot;,
1425 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001426 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
1427 #
1428 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
1429 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
1430 # encode some characters for safety and compatibility. The maximum allowed
1431 # URL length is 2083 characters after encoding.
1432 #
1433 # The `Location` header response from a redirect response [`300` - `399`]
1434 # may be followed. The redirect is not counted as a separate attempt.
1435 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
1436 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
1437 # token will be generated and attached as an `Authorization` header in the
1438 # HTTP request.
1439 #
1440 # This type of authorization can be used for many scenarios, including
1441 # calling Cloud Run, or endpoints where you intend to validate the token
1442 # yourself.
1443 # [OpenID Connect
1444 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
1445 # This type of authorization can be used for many scenarios, including
1446 # calling Cloud Run, or endpoints where you intend to validate the token
1447 # yourself.
1448 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
1449 # specified in target will be used.
1450 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1451 # to be used for generating OIDC token.
1452 # The service account must be within the same project as the queue. The
1453 # caller must have iam.serviceAccounts.actAs permission for the service
1454 # account.
1455 },
1456 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
1457 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
1458 #
1459 # A request body is allowed only if the
1460 # HTTP method is POST, PUT, or PATCH. It is an
1461 # error to set body on a task with an incompatible HttpMethod.
Dan O'Mearadd494642020-05-01 07:42:23 -07001462 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001463 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
Dan O'Mearadd494642020-05-01 07:42:23 -07001464 #
1465 # The task name.
1466 #
1467 # The task name must have the following format:
1468 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
1469 #
1470 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1471 # hyphens (-), colons (:), or periods (.).
1472 # For more information, see
1473 # [Identifying
1474 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -07001475 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
Dan O'Mearadd494642020-05-01 07:42:23 -07001476 # The list of available locations can be obtained by calling
1477 # ListLocations.
1478 # For more information, see https://cloud.google.com/about/locations/.
1479 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1480 # hyphens (-). The maximum length is 100 characters.
1481 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1482 # hyphens (-), or underscores (_). The maximum length is 500 characters.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001483 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
1484 # respond by this deadline then the request is cancelled and the attempt
1485 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
1486 # task according to the RetryConfig.
1487 #
1488 # Note that when the request is cancelled, Cloud Tasks will stop listing for
1489 # the response, but whether the worker stops processing depends on the
1490 # worker. For example, if the worker is stuck, it may not react to cancelled
1491 # requests.
1492 #
1493 # The default and maximum values depend on the type of request:
1494 #
1495 # * For HTTP tasks, the default is 10 minutes. The deadline
1496 # must be in the interval [15 seconds, 30 minutes].
1497 #
1498 # * For App Engine tasks, 0 indicates that the
1499 # request has the default deadline. The default deadline depends on the
1500 # [scaling
1501 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
1502 # of the service: 10 minutes for standard apps with automatic scaling, 24
1503 # hours for standard apps with manual and basic scaling, and 60 minutes for
1504 # flex apps. If the request deadline is set, it must be in the interval [15
1505 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
1506 # `dispatch_deadline`, the app handler will not run for longer than than
1507 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
1508 # at most a few seconds more than the app handler&#x27;s timeout. For more
1509 # information see
1510 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
1511 #
1512 # `dispatch_deadline` will be truncated to the nearest millisecond. The
1513 # deadline is an approximate deadline.
1514 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
1515 #
1516 # Only dispatch_time will be set.
1517 # The other Attempt information is not retained by Cloud Tasks.
1518 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
1519 #
1520 # `schedule_time` will be truncated to the nearest microsecond.
1521 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
1522 #
1523 # `dispatch_time` will be truncated to the nearest microsecond.
1524 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
1525 #
1526 # `response_time` will be truncated to the nearest microsecond.
1527 &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.
1528 #
1529 # If `response_time` is unset, then the task has not been attempted or is
1530 # currently running and the `response_status` field is meaningless.
1531 # different programming environments, including REST APIs and RPC APIs. It is
1532 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1533 # three pieces of data: error code, error message, and error details.
1534 #
1535 # You can find out more about this error model and how to work with it in the
1536 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1537 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1538 # message types for APIs to use.
1539 {
1540 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1541 },
1542 ],
1543 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1544 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1545 # user-facing error message should be localized and sent in the
1546 # google.rpc.Status.details field, or localized by the client.
1547 },
1548 },
1549 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
1550 #
1551 # This count includes attempts which have been dispatched but haven&#x27;t
1552 # received a response.
1553 &quot;lastAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s last attempt.
1554 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
1555 #
1556 # `schedule_time` will be truncated to the nearest microsecond.
1557 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
1558 #
1559 # `dispatch_time` will be truncated to the nearest microsecond.
1560 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
1561 #
1562 # `response_time` will be truncated to the nearest microsecond.
1563 &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.
1564 #
1565 # If `response_time` is unset, then the task has not been attempted or is
1566 # currently running and the `response_status` field is meaningless.
1567 # different programming environments, including REST APIs and RPC APIs. It is
1568 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1569 # three pieces of data: error code, error message, and error details.
1570 #
1571 # You can find out more about this error model and how to work with it in the
1572 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1573 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1574 # message types for APIs to use.
1575 {
1576 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1577 },
1578 ],
1579 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1580 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1581 # user-facing error message should be localized and sent in the
1582 # google.rpc.Status.details field, or localized by the client.
1583 },
1584 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001585 }</pre>
1586</div>
1587
1588<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001589 <code class="details" id="list">list(parent, responseView=None, pageToken=None, pageSize=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001590 <pre>Lists the tasks in a queue.
1591
1592By default, only the BASIC view is retrieved
1593due to performance considerations;
1594response_view controls the
1595subset of information which is returned.
1596
1597The tasks may be returned in any order. The ordering may change at any
1598time.
1599
1600Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001601 parent: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001602`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
1603 responseView: string, The response_view specifies which subset of the Task will be
1604returned.
1605
1606By default response_view is BASIC; not all
1607information is retrieved by default because some data, such as
1608payloads, might be desirable to return only when needed because
1609of its large size or because of the sensitivity of data that it
1610contains.
1611
1612Authorization for FULL requires
1613`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
1614permission on the Task resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001615 pageToken: string, A token identifying the page of results to return.
1616
1617To request the first page results, page_token must be empty. To
1618request the next page of results, page_token must be the value of
1619next_page_token returned
1620from the previous call to ListTasks
1621method.
1622
1623The page token is valid for only 2 hours.
Bu Sun Kim65020912020-05-20 12:08:20 -07001624 pageSize: integer, Maximum page size.
1625
1626Fewer tasks than requested might be returned, even if more tasks exist; use
1627next_page_token in the response to
1628determine if more tasks exist.
1629
1630The maximum page size is 1000. If unspecified, the page size will be the
1631maximum.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001632 x__xgafv: string, V1 error format.
1633 Allowed values
1634 1 - v1 error format
1635 2 - v2 error format
1636
1637Returns:
1638 An object of the form:
1639
1640 { # Response message for listing tasks using ListTasks.
Bu Sun Kim65020912020-05-20 12:08:20 -07001641 &quot;tasks&quot;: [ # The list of tasks.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001642 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -07001643 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
1644 &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 -07001645 #
1646 # An App Engine task is a task that has AppEngineHttpRequest set.
1647 #
1648 # The message defines the HTTP request that is sent to an App Engine app when
1649 # the task is dispatched.
1650 #
1651 # Using AppEngineHttpRequest requires
1652 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1653 # Google IAM permission for the project
1654 # and the following scope:
1655 #
1656 # `https://www.googleapis.com/auth/cloud-platform`
1657 #
1658 # The task will be delivered to the App Engine app which belongs to the same
1659 # project as the queue. For more information, see
1660 # [How Requests are
1661 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1662 # and how routing is affected by
1663 # [dispatch
1664 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
1665 # Traffic is encrypted during transport and never leaves Google datacenters.
1666 # Because this traffic is carried over a communication mechanism internal to
1667 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
1668 # The request to the handler, however, will appear to have used the HTTP
1669 # protocol.
1670 #
1671 # The AppEngineRouting used to construct the URL that the task is
1672 # delivered to can be set at the queue-level or task-level:
1673 #
1674 # * If set,
Dan O'Mearadd494642020-05-01 07:42:23 -07001675 # app_engine_routing_override
1676 # is used for all tasks in the queue, no matter what the setting
1677 # is for the
1678 # task-level app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001679 #
1680 #
1681 # The `url` that the task will be sent to is:
1682 #
1683 # * `url =` host `+`
1684 # relative_uri
1685 #
1686 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
1687 # URIs restricted with
1688 # [`login:
1689 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
1690 # Because tasks are not run as any user, they cannot be dispatched to URIs
1691 # restricted with
1692 # [`login:
1693 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
1694 # Task dispatches also do not follow redirects.
1695 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001696 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001697 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -07001698 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001699 # not receive response before the deadline. Failed
1700 # tasks will be retried according to the
1701 # retry configuration. `503` (Service Unavailable) is
1702 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -07001703 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
1704 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001705 # Requests) response from an app handler does not cause traffic congestion
1706 # control to throttle the queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001707 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
1708 #
1709 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
1710 # HTTP requests with this http_method, otherwise the task attempt fails with
1711 # error code 405 (Method Not Allowed). See [Writing a push task request
1712 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
1713 # and the App Engine documentation for your runtime on [How Requests are
1714 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
1715 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
1716 #
1717 # A request body is allowed only if the HTTP method is POST or PUT. It is
1718 # an error to set a body on a task with an incompatible HttpMethod.
1719 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
1720 #
1721 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
1722 # It can contain a path and query string arguments.
1723 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
1724 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001725 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001726 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001727 # This map contains the header field names and values.
1728 # Headers can be set when the
1729 # task is created.
1730 # Repeated headers are not supported but a header value can contain commas.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001731 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001732 # Cloud Tasks sets some headers to default values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001733 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001734 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -07001735 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -07001736 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -07001737 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Dan O'Mearadd494642020-05-01 07:42:23 -07001738 # modified `User-Agent`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001739 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001740 # If the task has a body, Cloud
1741 # Tasks sets the following headers:
1742 #
1743 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -07001744 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Dan O'Mearadd494642020-05-01 07:42:23 -07001745 # setting `Content-Type` to a particular media type when the
1746 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07001747 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -07001748 # * `Content-Length`: This is computed by Cloud Tasks. This value is
1749 # output only. It cannot be changed.
1750 #
1751 # The headers below cannot be set or overridden:
1752 #
1753 # * `Host`
1754 # * `X-Google-*`
1755 # * `X-AppEngine-*`
1756 #
1757 # In addition, Cloud Tasks sets some headers when the task is dispatched,
1758 # such as headers containing information about the task; see
1759 # [request
1760 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
1761 # These headers are set only when the task is dispatched, so they are not
1762 # visible when the task is returned in a Cloud Tasks response.
1763 #
1764 # Although there is no specific limit for the maximum number of headers or
1765 # the size, there is a limit on the maximum size of the Task. For more
1766 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001767 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001768 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001769 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
1770 #
1771 # If set,
1772 # app_engine_routing_override
1773 # is used for all tasks in the queue, no matter what the setting is for the
1774 # task-level app_engine_routing.
1775 #
1776 # Defines routing characteristics specific to App Engine - service, version,
1777 # and instance.
1778 #
1779 # For more information about services, versions, and instances see
1780 # [An Overview of App
1781 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1782 # [Microservices Architecture on Google App
1783 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1784 # [App Engine Standard request
1785 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1786 # and [App Engine Flex request
1787 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -07001788 &quot;service&quot;: &quot;A String&quot;, # App service.
1789 #
1790 # By default, the task is sent to the service which is the default
1791 # service when the task is attempted.
1792 #
1793 # For some queues or tasks which were created using the App Engine
1794 # Task Queue API, host is not parsable
1795 # into service,
1796 # version, and
1797 # instance. For example, some tasks
1798 # which were created using the App Engine SDK use a custom domain
1799 # name; custom domains are not parsed by Cloud Tasks. If
1800 # host is not parsable, then
1801 # service,
1802 # version, and
1803 # instance are the empty string.
1804 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1805 #
1806 # By default, the task is sent to an instance which is available when
1807 # the task is attempted.
1808 #
1809 # Requests can only be sent to a specific instance if
1810 # [manual scaling is used in App Engine
1811 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1812 # App Engine Flex does not support instances. For more information, see
1813 # [App Engine Standard request
1814 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1815 # and [App Engine Flex request
1816 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001817 &quot;version&quot;: &quot;A String&quot;, # App version.
1818 #
1819 # By default, the task is sent to the version which is the default
1820 # version when the task is attempted.
1821 #
1822 # For some queues or tasks which were created using the App Engine
1823 # Task Queue API, host is not parsable
1824 # into service,
1825 # version, and
1826 # instance. For example, some tasks
1827 # which were created using the App Engine SDK use a custom domain
1828 # name; custom domains are not parsed by Cloud Tasks. If
1829 # host is not parsable, then
1830 # service,
1831 # version, and
1832 # instance are the empty string.
1833 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1834 #
1835 # The host is constructed from the domain name of the app associated with
1836 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1837 # service, version,
1838 # and instance. Tasks which were created using
1839 # the App Engine SDK might have a custom domain name.
1840 #
1841 # For more information, see
1842 # [How Requests are
1843 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -07001844 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001845 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001846 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
1847 # been returned.
1848 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001849 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001850 # `create_time` will be truncated to the nearest second.
1851 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted.
1852 #
1853 # For App Engine queues, this is when the task will be attempted or retried.
1854 #
1855 # `schedule_time` will be truncated to the nearest microsecond.
1856 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the task&#x27;s target.
1857 #
1858 # An HTTP task is a task that has HttpRequest set.
1859 #
1860 # The task will be pushed to the worker as an HTTP request. If the worker
1861 # or the redirected worker acknowledges the task by returning a successful HTTP
1862 # response code ([`200` - `299`]), the task will be removed from the queue. If
1863 # any other HTTP response code is returned or no response is received, the
1864 # task will be retried according to the following:
1865 #
1866 # * User-specified throttling: retry configuration,
1867 # rate limits, and the queue&#x27;s state.
1868 #
1869 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
1870 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
1871 # will not be changed.
1872 #
1873 # System throttling happens because:
1874 #
1875 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
1876 # rate limits will be used. But if the worker returns
1877 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
1878 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
1879 # specified in the `Retry-After` HTTP response header is considered.
1880 #
1881 # * To prevent traffic spikes and to smooth sudden increases in traffic,
1882 # dispatches ramp up slowly when the queue is newly created or idle and
1883 # if large numbers of tasks suddenly become available to dispatch (due to
1884 # spikes in create task rates, the queue being unpaused, or many tasks
1885 # that are scheduled at the same time).
Bu Sun Kim65020912020-05-20 12:08:20 -07001886 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
1887 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
1888 # will be generated and attached as an `Authorization` header in the HTTP
1889 # request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001890 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001891 # This type of authorization should generally only be used when calling
1892 # Google APIs hosted on *.googleapis.com.
1893 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
1894 # This type of authorization should generally only be used when calling Google
1895 # APIs hosted on *.googleapis.com.
1896 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
1897 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
1898 # will be used.
1899 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1900 # to be used for generating OAuth token.
1901 # The service account must be within the same project as the queue. The
1902 # caller must have iam.serviceAccounts.actAs permission for the service
1903 # account.
Dan O'Mearadd494642020-05-01 07:42:23 -07001904 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001905 &quot;headers&quot;: { # HTTP request headers.
Dan O'Mearadd494642020-05-01 07:42:23 -07001906 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001907 # This map contains the header field names and values.
1908 # Headers can be set when the
1909 # task is created.
Dan O'Mearadd494642020-05-01 07:42:23 -07001910 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001911 # These headers represent a subset of the headers that will accompany the
1912 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
1913 #
1914 # A partial list of headers that will be ignored or replaced is:
1915 #
1916 # * Host: This will be computed by Cloud Tasks and derived from
1917 # HttpRequest.url.
1918 # * Content-Length: This will be computed by Cloud Tasks.
1919 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
1920 # * X-Google-*: Google use only.
1921 # * X-AppEngine-*: Google use only.
1922 #
1923 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
1924 # `Content-Type` to a media type when the
1925 # task is created.
1926 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
1927 # `&quot;application/json&quot;`.
1928 #
1929 # Headers which can have multiple values (according to RFC2616) can be
1930 # specified using comma-separated values.
1931 #
1932 # The size of the headers must be less than 80KB.
1933 &quot;a_key&quot;: &quot;A String&quot;,
1934 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001935 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
1936 #
1937 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
1938 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
1939 # encode some characters for safety and compatibility. The maximum allowed
1940 # URL length is 2083 characters after encoding.
1941 #
1942 # The `Location` header response from a redirect response [`300` - `399`]
1943 # may be followed. The redirect is not counted as a separate attempt.
1944 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
1945 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
1946 # token will be generated and attached as an `Authorization` header in the
1947 # HTTP request.
1948 #
1949 # This type of authorization can be used for many scenarios, including
1950 # calling Cloud Run, or endpoints where you intend to validate the token
1951 # yourself.
1952 # [OpenID Connect
1953 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
1954 # This type of authorization can be used for many scenarios, including
1955 # calling Cloud Run, or endpoints where you intend to validate the token
1956 # yourself.
1957 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
1958 # specified in target will be used.
1959 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1960 # to be used for generating OIDC token.
1961 # The service account must be within the same project as the queue. The
1962 # caller must have iam.serviceAccounts.actAs permission for the service
1963 # account.
1964 },
1965 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
1966 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
1967 #
1968 # A request body is allowed only if the
1969 # HTTP method is POST, PUT, or PATCH. It is an
1970 # error to set body on a task with an incompatible HttpMethod.
Dan O'Mearadd494642020-05-01 07:42:23 -07001971 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001972 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
Dan O'Mearadd494642020-05-01 07:42:23 -07001973 #
1974 # The task name.
1975 #
1976 # The task name must have the following format:
1977 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
1978 #
1979 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1980 # hyphens (-), colons (:), or periods (.).
1981 # For more information, see
1982 # [Identifying
1983 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -07001984 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
Dan O'Mearadd494642020-05-01 07:42:23 -07001985 # The list of available locations can be obtained by calling
1986 # ListLocations.
1987 # For more information, see https://cloud.google.com/about/locations/.
1988 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1989 # hyphens (-). The maximum length is 100 characters.
1990 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1991 # hyphens (-), or underscores (_). The maximum length is 500 characters.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001992 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
1993 # respond by this deadline then the request is cancelled and the attempt
1994 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
1995 # task according to the RetryConfig.
1996 #
1997 # Note that when the request is cancelled, Cloud Tasks will stop listing for
1998 # the response, but whether the worker stops processing depends on the
1999 # worker. For example, if the worker is stuck, it may not react to cancelled
2000 # requests.
2001 #
2002 # The default and maximum values depend on the type of request:
2003 #
2004 # * For HTTP tasks, the default is 10 minutes. The deadline
2005 # must be in the interval [15 seconds, 30 minutes].
2006 #
2007 # * For App Engine tasks, 0 indicates that the
2008 # request has the default deadline. The default deadline depends on the
2009 # [scaling
2010 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
2011 # of the service: 10 minutes for standard apps with automatic scaling, 24
2012 # hours for standard apps with manual and basic scaling, and 60 minutes for
2013 # flex apps. If the request deadline is set, it must be in the interval [15
2014 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
2015 # `dispatch_deadline`, the app handler will not run for longer than than
2016 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
2017 # at most a few seconds more than the app handler&#x27;s timeout. For more
2018 # information see
2019 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
2020 #
2021 # `dispatch_deadline` will be truncated to the nearest millisecond. The
2022 # deadline is an approximate deadline.
2023 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
2024 #
2025 # Only dispatch_time will be set.
2026 # The other Attempt information is not retained by Cloud Tasks.
2027 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
2028 #
2029 # `schedule_time` will be truncated to the nearest microsecond.
2030 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
2031 #
2032 # `dispatch_time` will be truncated to the nearest microsecond.
2033 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
2034 #
2035 # `response_time` will be truncated to the nearest microsecond.
2036 &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.
2037 #
2038 # If `response_time` is unset, then the task has not been attempted or is
2039 # currently running and the `response_status` field is meaningless.
2040 # different programming environments, including REST APIs and RPC APIs. It is
2041 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2042 # three pieces of data: error code, error message, and error details.
2043 #
2044 # You can find out more about this error model and how to work with it in the
2045 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2046 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2047 # message types for APIs to use.
2048 {
2049 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2050 },
2051 ],
2052 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2053 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2054 # user-facing error message should be localized and sent in the
2055 # google.rpc.Status.details field, or localized by the client.
2056 },
2057 },
2058 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
2059 #
2060 # This count includes attempts which have been dispatched but haven&#x27;t
2061 # received a response.
2062 &quot;lastAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s last attempt.
2063 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
2064 #
2065 # `schedule_time` will be truncated to the nearest microsecond.
2066 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
2067 #
2068 # `dispatch_time` will be truncated to the nearest microsecond.
2069 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
2070 #
2071 # `response_time` will be truncated to the nearest microsecond.
2072 &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.
2073 #
2074 # If `response_time` is unset, then the task has not been attempted or is
2075 # currently running and the `response_status` field is meaningless.
2076 # different programming environments, including REST APIs and RPC APIs. It is
2077 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2078 # three pieces of data: error code, error message, and error details.
2079 #
2080 # You can find out more about this error model and how to work with it in the
2081 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2082 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2083 # message types for APIs to use.
2084 {
2085 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2086 },
2087 ],
2088 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2089 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2090 # user-facing error message should be localized and sent in the
2091 # google.rpc.Status.details field, or localized by the client.
2092 },
2093 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002094 },
2095 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002096 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results.
2097 #
2098 # To return the next page of results, call
2099 # ListTasks with this value as the
2100 # page_token.
2101 #
2102 # If the next_page_token is empty, there are no more results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002103 }</pre>
2104</div>
2105
2106<div class="method">
2107 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2108 <pre>Retrieves the next page of results.
2109
2110Args:
2111 previous_request: The request for the previous page. (required)
2112 previous_response: The response from the request for the previous page. (required)
2113
2114Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002115 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002116 page. Returns None if there are no more items in the collection.
2117 </pre>
2118</div>
2119
2120<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002121 <code class="details" id="run">run(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002122 <pre>Forces a task to run now.
2123
2124When this method is called, Cloud Tasks will dispatch the task, even if
2125the task is already running, the queue has reached its RateLimits or
2126is PAUSED.
2127
2128This command is meant to be used for manual debugging. For
2129example, RunTask can be used to retry a failed
2130task after a fix has been made or to manually force a task to be
2131dispatched now.
2132
2133The dispatched task is returned. That is, the task that is returned
2134contains the status after the task is dispatched but
2135before the task is received by its target.
2136
Bu Sun Kim65020912020-05-20 12:08:20 -07002137If Cloud Tasks receives a successful response from the task&#x27;s
2138target, then the task will be deleted; otherwise the task&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002139schedule_time will be reset to the time that
2140RunTask was called plus the retry delay specified
Bu Sun Kim65020912020-05-20 12:08:20 -07002141in the queue&#x27;s RetryConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002142
2143RunTask returns
2144NOT_FOUND when it is called on a
2145task that has already succeeded or permanently failed.
2146
2147Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002148 name: string, Required. The task name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002149`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002150 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002151 The object takes the form of:
2152
2153{ # Request message for forcing a task to run now using
2154 # RunTask.
Bu Sun Kim65020912020-05-20 12:08:20 -07002155 &quot;responseView&quot;: &quot;A String&quot;, # The response_view specifies which subset of the Task will be
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002156 # returned.
2157 #
2158 # By default response_view is BASIC; not all
2159 # information is retrieved by default because some data, such as
2160 # payloads, might be desirable to return only when needed because
2161 # of its large size or because of the sensitivity of data that it
2162 # contains.
2163 #
2164 # Authorization for FULL requires
2165 # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
2166 # permission on the Task resource.
2167 }
2168
2169 x__xgafv: string, V1 error format.
2170 Allowed values
2171 1 - v1 error format
2172 2 - v2 error format
2173
2174Returns:
2175 An object of the form:
2176
2177 { # A unit of scheduled work.
Bu Sun Kim65020912020-05-20 12:08:20 -07002178 &quot;responseCount&quot;: 42, # Output only. The number of attempts which have received a response.
2179 &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 -07002180 #
2181 # An App Engine task is a task that has AppEngineHttpRequest set.
2182 #
2183 # The message defines the HTTP request that is sent to an App Engine app when
2184 # the task is dispatched.
2185 #
2186 # Using AppEngineHttpRequest requires
2187 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2188 # Google IAM permission for the project
2189 # and the following scope:
2190 #
2191 # `https://www.googleapis.com/auth/cloud-platform`
2192 #
2193 # The task will be delivered to the App Engine app which belongs to the same
2194 # project as the queue. For more information, see
2195 # [How Requests are
2196 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2197 # and how routing is affected by
2198 # [dispatch
2199 # files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
2200 # Traffic is encrypted during transport and never leaves Google datacenters.
2201 # Because this traffic is carried over a communication mechanism internal to
2202 # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
2203 # The request to the handler, however, will appear to have used the HTTP
2204 # protocol.
2205 #
2206 # The AppEngineRouting used to construct the URL that the task is
2207 # delivered to can be set at the queue-level or task-level:
2208 #
2209 # * If set,
Dan O'Mearadd494642020-05-01 07:42:23 -07002210 # app_engine_routing_override
2211 # is used for all tasks in the queue, no matter what the setting
2212 # is for the
2213 # task-level app_engine_routing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002214 #
2215 #
2216 # The `url` that the task will be sent to is:
2217 #
2218 # * `url =` host `+`
2219 # relative_uri
2220 #
2221 # Tasks can be dispatched to secure app handlers, unsecure app handlers, and
2222 # URIs restricted with
2223 # [`login:
2224 # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
2225 # Because tasks are not run as any user, they cannot be dispatched to URIs
2226 # restricted with
2227 # [`login:
2228 # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
2229 # Task dispatches also do not follow redirects.
2230 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002231 # The task attempt has succeeded if the app&#x27;s request handler returns an HTTP
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002232 # response code in the range [`200` - `299`]. The task attempt has failed if
Bu Sun Kim65020912020-05-20 12:08:20 -07002233 # the app&#x27;s handler returns a non-2xx response code or Cloud Tasks does
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002234 # not receive response before the deadline. Failed
2235 # tasks will be retried according to the
2236 # retry configuration. `503` (Service Unavailable) is
2237 # considered an App Engine system error instead of an application error and
Bu Sun Kim65020912020-05-20 12:08:20 -07002238 # will cause Cloud Tasks&#x27; traffic congestion control to temporarily throttle
2239 # the queue&#x27;s dispatches. Unlike other types of task targets, a `429` (Too Many
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002240 # Requests) response from an app handler does not cause traffic congestion
2241 # control to throttle the queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002242 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
2243 #
2244 # The app&#x27;s request handler for the task&#x27;s target URL must be able to handle
2245 # HTTP requests with this http_method, otherwise the task attempt fails with
2246 # error code 405 (Method Not Allowed). See [Writing a push task request
2247 # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
2248 # and the App Engine documentation for your runtime on [How Requests are
2249 # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
2250 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
2251 #
2252 # A request body is allowed only if the HTTP method is POST or PUT. It is
2253 # an error to set a body on a task with an incompatible HttpMethod.
2254 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
2255 #
2256 # The relative URI must begin with &quot;/&quot; and must be a valid HTTP relative URI.
2257 # It can contain a path and query string arguments.
2258 # If the relative URI is empty, then the root path &quot;/&quot; will be used.
2259 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07002260 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002261 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002262 # This map contains the header field names and values.
2263 # Headers can be set when the
2264 # task is created.
2265 # Repeated headers are not supported but a header value can contain commas.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002266 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002267 # Cloud Tasks sets some headers to default values:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002268 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002269 # * `User-Agent`: By default, this header is
Bu Sun Kim65020912020-05-20 12:08:20 -07002270 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -07002271 # This header can be modified, but Cloud Tasks will append
Bu Sun Kim65020912020-05-20 12:08:20 -07002272 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
Dan O'Mearadd494642020-05-01 07:42:23 -07002273 # modified `User-Agent`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002274 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002275 # If the task has a body, Cloud
2276 # Tasks sets the following headers:
2277 #
2278 # * `Content-Type`: By default, the `Content-Type` header is set to
Bu Sun Kim65020912020-05-20 12:08:20 -07002279 # `&quot;application/octet-stream&quot;`. The default can be overridden by explicitly
Dan O'Mearadd494642020-05-01 07:42:23 -07002280 # setting `Content-Type` to a particular media type when the
2281 # task is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07002282 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
Dan O'Mearadd494642020-05-01 07:42:23 -07002283 # * `Content-Length`: This is computed by Cloud Tasks. This value is
2284 # output only. It cannot be changed.
2285 #
2286 # The headers below cannot be set or overridden:
2287 #
2288 # * `Host`
2289 # * `X-Google-*`
2290 # * `X-AppEngine-*`
2291 #
2292 # In addition, Cloud Tasks sets some headers when the task is dispatched,
2293 # such as headers containing information about the task; see
2294 # [request
2295 # headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
2296 # These headers are set only when the task is dispatched, so they are not
2297 # visible when the task is returned in a Cloud Tasks response.
2298 #
2299 # Although there is no specific limit for the maximum number of headers or
2300 # the size, there is a limit on the maximum size of the Task. For more
2301 # information, see the CreateTask documentation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002302 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002303 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002304 &quot;appEngineRouting&quot;: { # App Engine Routing. # Task-level setting for App Engine routing.
2305 #
2306 # If set,
2307 # app_engine_routing_override
2308 # is used for all tasks in the queue, no matter what the setting is for the
2309 # task-level app_engine_routing.
2310 #
2311 # Defines routing characteristics specific to App Engine - service, version,
2312 # and instance.
2313 #
2314 # For more information about services, versions, and instances see
2315 # [An Overview of App
2316 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2317 # [Microservices Architecture on Google App
2318 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2319 # [App Engine Standard request
2320 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2321 # and [App Engine Flex request
2322 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -07002323 &quot;service&quot;: &quot;A String&quot;, # App service.
2324 #
2325 # By default, the task is sent to the service which is the default
2326 # service when the task is attempted.
2327 #
2328 # For some queues or tasks which were created using the App Engine
2329 # Task Queue API, host is not parsable
2330 # into service,
2331 # version, and
2332 # instance. For example, some tasks
2333 # which were created using the App Engine SDK use a custom domain
2334 # name; custom domains are not parsed by Cloud Tasks. If
2335 # host is not parsable, then
2336 # service,
2337 # version, and
2338 # instance are the empty string.
2339 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2340 #
2341 # By default, the task is sent to an instance which is available when
2342 # the task is attempted.
2343 #
2344 # Requests can only be sent to a specific instance if
2345 # [manual scaling is used in App Engine
2346 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2347 # App Engine Flex does not support instances. For more information, see
2348 # [App Engine Standard request
2349 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2350 # and [App Engine Flex request
2351 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002352 &quot;version&quot;: &quot;A String&quot;, # App version.
2353 #
2354 # By default, the task is sent to the version which is the default
2355 # version when the task is attempted.
2356 #
2357 # For some queues or tasks which were created using the App Engine
2358 # Task Queue API, host is not parsable
2359 # into service,
2360 # version, and
2361 # instance. For example, some tasks
2362 # which were created using the App Engine SDK use a custom domain
2363 # name; custom domains are not parsed by Cloud Tasks. If
2364 # host is not parsable, then
2365 # service,
2366 # version, and
2367 # instance are the empty string.
2368 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2369 #
2370 # The host is constructed from the domain name of the app associated with
2371 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2372 # service, version,
2373 # and instance. Tasks which were created using
2374 # the App Engine SDK might have a custom domain name.
2375 #
2376 # For more information, see
2377 # [How Requests are
2378 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -07002379 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002380 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002381 &quot;view&quot;: &quot;A String&quot;, # Output only. The view specifies which subset of the Task has
2382 # been returned.
2383 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time that the task was created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002384 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002385 # `create_time` will be truncated to the nearest second.
2386 &quot;scheduleTime&quot;: &quot;A String&quot;, # The time when the task is scheduled to be attempted.
2387 #
2388 # For App Engine queues, this is when the task will be attempted or retried.
2389 #
2390 # `schedule_time` will be truncated to the nearest microsecond.
2391 &quot;httpRequest&quot;: { # HTTP request. # HTTP request that is sent to the task&#x27;s target.
2392 #
2393 # An HTTP task is a task that has HttpRequest set.
2394 #
2395 # The task will be pushed to the worker as an HTTP request. If the worker
2396 # or the redirected worker acknowledges the task by returning a successful HTTP
2397 # response code ([`200` - `299`]), the task will be removed from the queue. If
2398 # any other HTTP response code is returned or no response is received, the
2399 # task will be retried according to the following:
2400 #
2401 # * User-specified throttling: retry configuration,
2402 # rate limits, and the queue&#x27;s state.
2403 #
2404 # * System throttling: To prevent the worker from overloading, Cloud Tasks may
2405 # temporarily reduce the queue&#x27;s effective rate. User-specified settings
2406 # will not be changed.
2407 #
2408 # System throttling happens because:
2409 #
2410 # * Cloud Tasks backs off on all errors. Normally the backoff specified in
2411 # rate limits will be used. But if the worker returns
2412 # `429` (Too Many Requests), `503` (Service Unavailable), or the rate of
2413 # errors is high, Cloud Tasks will use a higher backoff rate. The retry
2414 # specified in the `Retry-After` HTTP response header is considered.
2415 #
2416 # * To prevent traffic spikes and to smooth sudden increases in traffic,
2417 # dispatches ramp up slowly when the queue is newly created or idle and
2418 # if large numbers of tasks suddenly become available to dispatch (due to
2419 # spikes in create task rates, the queue being unpaused, or many tasks
2420 # that are scheduled at the same time).
Bu Sun Kim65020912020-05-20 12:08:20 -07002421 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
2422 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
2423 # will be generated and attached as an `Authorization` header in the HTTP
2424 # request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002425 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002426 # This type of authorization should generally only be used when calling
2427 # Google APIs hosted on *.googleapis.com.
2428 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
2429 # This type of authorization should generally only be used when calling Google
2430 # APIs hosted on *.googleapis.com.
2431 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
2432 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
2433 # will be used.
2434 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2435 # to be used for generating OAuth token.
2436 # The service account must be within the same project as the queue. The
2437 # caller must have iam.serviceAccounts.actAs permission for the service
2438 # account.
Dan O'Mearadd494642020-05-01 07:42:23 -07002439 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002440 &quot;headers&quot;: { # HTTP request headers.
Dan O'Mearadd494642020-05-01 07:42:23 -07002441 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002442 # This map contains the header field names and values.
2443 # Headers can be set when the
2444 # task is created.
Dan O'Mearadd494642020-05-01 07:42:23 -07002445 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002446 # These headers represent a subset of the headers that will accompany the
2447 # task&#x27;s HTTP request. Some HTTP request headers will be ignored or replaced.
2448 #
2449 # A partial list of headers that will be ignored or replaced is:
2450 #
2451 # * Host: This will be computed by Cloud Tasks and derived from
2452 # HttpRequest.url.
2453 # * Content-Length: This will be computed by Cloud Tasks.
2454 # * User-Agent: This will be set to `&quot;Google-Cloud-Tasks&quot;`.
2455 # * X-Google-*: Google use only.
2456 # * X-AppEngine-*: Google use only.
2457 #
2458 # `Content-Type` won&#x27;t be set by Cloud Tasks. You can explicitly set
2459 # `Content-Type` to a media type when the
2460 # task is created.
2461 # For example, `Content-Type` can be set to `&quot;application/octet-stream&quot;` or
2462 # `&quot;application/json&quot;`.
2463 #
2464 # Headers which can have multiple values (according to RFC2616) can be
2465 # specified using comma-separated values.
2466 #
2467 # The size of the headers must be less than 80KB.
2468 &quot;a_key&quot;: &quot;A String&quot;,
2469 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002470 &quot;url&quot;: &quot;A String&quot;, # Required. The full url path that the request will be sent to.
2471 #
2472 # This string must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples
2473 # are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will
2474 # encode some characters for safety and compatibility. The maximum allowed
2475 # URL length is 2083 characters after encoding.
2476 #
2477 # The `Location` header response from a redirect response [`300` - `399`]
2478 # may be followed. The redirect is not counted as a separate attempt.
2479 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
2480 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
2481 # token will be generated and attached as an `Authorization` header in the
2482 # HTTP request.
2483 #
2484 # This type of authorization can be used for many scenarios, including
2485 # calling Cloud Run, or endpoints where you intend to validate the token
2486 # yourself.
2487 # [OpenID Connect
2488 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
2489 # This type of authorization can be used for many scenarios, including
2490 # calling Cloud Run, or endpoints where you intend to validate the token
2491 # yourself.
2492 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
2493 # specified in target will be used.
2494 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2495 # to be used for generating OIDC token.
2496 # The service account must be within the same project as the queue. The
2497 # caller must have iam.serviceAccounts.actAs permission for the service
2498 # account.
2499 },
2500 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. The default is POST.
2501 &quot;body&quot;: &quot;A String&quot;, # HTTP request body.
2502 #
2503 # A request body is allowed only if the
2504 # HTTP method is POST, PUT, or PATCH. It is an
2505 # error to set body on a task with an incompatible HttpMethod.
Dan O'Mearadd494642020-05-01 07:42:23 -07002506 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002507 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateTask.
Dan O'Mearadd494642020-05-01 07:42:23 -07002508 #
2509 # The task name.
2510 #
2511 # The task name must have the following format:
2512 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
2513 #
2514 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2515 # hyphens (-), colons (:), or periods (.).
2516 # For more information, see
2517 # [Identifying
2518 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -07002519 # * `LOCATION_ID` is the canonical ID for the task&#x27;s location.
Dan O'Mearadd494642020-05-01 07:42:23 -07002520 # The list of available locations can be obtained by calling
2521 # ListLocations.
2522 # For more information, see https://cloud.google.com/about/locations/.
2523 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2524 # hyphens (-). The maximum length is 100 characters.
2525 # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
2526 # hyphens (-), or underscores (_). The maximum length is 500 characters.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002527 &quot;dispatchDeadline&quot;: &quot;A String&quot;, # The deadline for requests sent to the worker. If the worker does not
2528 # respond by this deadline then the request is cancelled and the attempt
2529 # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
2530 # task according to the RetryConfig.
2531 #
2532 # Note that when the request is cancelled, Cloud Tasks will stop listing for
2533 # the response, but whether the worker stops processing depends on the
2534 # worker. For example, if the worker is stuck, it may not react to cancelled
2535 # requests.
2536 #
2537 # The default and maximum values depend on the type of request:
2538 #
2539 # * For HTTP tasks, the default is 10 minutes. The deadline
2540 # must be in the interval [15 seconds, 30 minutes].
2541 #
2542 # * For App Engine tasks, 0 indicates that the
2543 # request has the default deadline. The default deadline depends on the
2544 # [scaling
2545 # type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
2546 # of the service: 10 minutes for standard apps with automatic scaling, 24
2547 # hours for standard apps with manual and basic scaling, and 60 minutes for
2548 # flex apps. If the request deadline is set, it must be in the interval [15
2549 # seconds, 24 hours 15 seconds]. Regardless of the task&#x27;s
2550 # `dispatch_deadline`, the app handler will not run for longer than than
2551 # the service&#x27;s timeout. We recommend setting the `dispatch_deadline` to
2552 # at most a few seconds more than the app handler&#x27;s timeout. For more
2553 # information see
2554 # [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
2555 #
2556 # `dispatch_deadline` will be truncated to the nearest millisecond. The
2557 # deadline is an approximate deadline.
2558 &quot;firstAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s first attempt.
2559 #
2560 # Only dispatch_time will be set.
2561 # The other Attempt information is not retained by Cloud Tasks.
2562 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
2563 #
2564 # `schedule_time` will be truncated to the nearest microsecond.
2565 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
2566 #
2567 # `dispatch_time` will be truncated to the nearest microsecond.
2568 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
2569 #
2570 # `response_time` will be truncated to the nearest microsecond.
2571 &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.
2572 #
2573 # If `response_time` is unset, then the task has not been attempted or is
2574 # currently running and the `response_status` field is meaningless.
2575 # different programming environments, including REST APIs and RPC APIs. It is
2576 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2577 # three pieces of data: error code, error message, and error details.
2578 #
2579 # You can find out more about this error model and how to work with it in the
2580 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2581 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2582 # message types for APIs to use.
2583 {
2584 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2585 },
2586 ],
2587 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2588 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2589 # user-facing error message should be localized and sent in the
2590 # google.rpc.Status.details field, or localized by the client.
2591 },
2592 },
2593 &quot;dispatchCount&quot;: 42, # Output only. The number of attempts dispatched.
2594 #
2595 # This count includes attempts which have been dispatched but haven&#x27;t
2596 # received a response.
2597 &quot;lastAttempt&quot;: { # The status of a task attempt. # Output only. The status of the task&#x27;s last attempt.
2598 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was scheduled.
2599 #
2600 # `schedule_time` will be truncated to the nearest microsecond.
2601 &quot;dispatchTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt was dispatched.
2602 #
2603 # `dispatch_time` will be truncated to the nearest microsecond.
2604 &quot;responseTime&quot;: &quot;A String&quot;, # Output only. The time that this attempt response was received.
2605 #
2606 # `response_time` will be truncated to the nearest microsecond.
2607 &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.
2608 #
2609 # If `response_time` is unset, then the task has not been attempted or is
2610 # currently running and the `response_status` field is meaningless.
2611 # different programming environments, including REST APIs and RPC APIs. It is
2612 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2613 # three pieces of data: error code, error message, and error details.
2614 #
2615 # You can find out more about this error model and how to work with it in the
2616 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2617 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2618 # message types for APIs to use.
2619 {
2620 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2621 },
2622 ],
2623 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2624 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2625 # user-facing error message should be localized and sent in the
2626 # google.rpc.Status.details field, or localized by the client.
2627 },
2628 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002629 }</pre>
2630</div>
2631
2632</body></html>