blob: f4320f4ac9dc6ba86ac0209f46ed538af6fd7147 [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_v2beta2.html">Cloud Tasks API</a> . <a href="cloudtasks_v2beta2.projects.html">projects</a> . <a href="cloudtasks_v2beta2.projects.locations.html">locations</a> . <a href="cloudtasks_v2beta2.projects.locations.queues.html">queues</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="cloudtasks_v2beta2.projects.locations.queues.tasks.html">tasks()</a></code>
79</p>
80<p class="firstline">Returns the tasks Resource.</p>
81
82<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070083 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084<p class="firstline">Creates a queue.</p>
85<p class="toc_element">
86 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
87<p class="firstline">Deletes a queue.</p>
88<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070089 <code><a href="#get">get(name, readMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090<p class="firstline">Gets a queue.</p>
91<p class="toc_element">
92 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
93<p class="firstline">Gets the access control policy for a Queue.</p>
94<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070095 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096<p class="firstline">Lists queues.</p>
97<p class="toc_element">
98 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
99<p class="firstline">Retrieves the next page of results.</p>
100<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700101 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102<p class="firstline">Updates a queue.</p>
103<p class="toc_element">
104 <code><a href="#pause">pause(name, body=None, x__xgafv=None)</a></code></p>
105<p class="firstline">Pauses the queue.</p>
106<p class="toc_element">
107 <code><a href="#purge">purge(name, body=None, x__xgafv=None)</a></code></p>
108<p class="firstline">Purges a queue by deleting all of its tasks.</p>
109<p class="toc_element">
110 <code><a href="#resume">resume(name, body=None, x__xgafv=None)</a></code></p>
111<p class="firstline">Resume a queue.</p>
112<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700113 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114<p class="firstline">Sets the access control policy for a Queue. Replaces any existing</p>
115<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700116 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117<p class="firstline">Returns permissions that a caller has on a Queue.</p>
118<h3>Method Details</h3>
119<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121 <pre>Creates a queue.
122
123Queues created with this method allow tasks to live for a maximum of 31
124days. After a task is 31 days old, the task will be deleted regardless of whether
125it was dispatched or not.
126
127WARNING: Using this method may have unintended side effects if you are
128using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
129Read
130[Overview of Queue Management and
131queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
132this method.
133
134Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 parent: string, Required. The location name in which the queue will be created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136For example: `projects/PROJECT_ID/locations/LOCATION_ID`
137
138The list of allowed locations can be obtained by calling Cloud
Bu Sun Kim65020912020-05-20 12:08:20 -0700139Tasks&#x27; implementation of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700140ListLocations. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 The object takes the form of:
143
144{ # A queue is a container of related tasks. Queues are configured to manage
145 # how those tasks are dispatched. Configurable properties include rate limits,
146 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
148 #
149 # rate_limits and
150 # retry_config are related because they both
151 # control task attempts however they control how tasks are
152 # attempted in different ways:
153 #
154 # * rate_limits controls the total rate of
155 # dispatches from a queue (i.e. all traffic dispatched from the
156 # queue, regardless of whether the dispatch is from a first
157 # attempt or a retry).
158 # * retry_config controls what happens to
159 # particular a task after its first attempt fails. That is,
160 # retry_config controls task retries (the
161 # second attempt, third attempt, etc).
162 #
163 # This message determines the maximum rate that tasks can be dispatched by a
164 # queue, regardless of whether the dispatch is a first task attempt or a retry.
165 #
166 # Note: The debugging command, RunTask, will run a task
167 # even if the queue has reached its RateLimits.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700168 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
169 # to be dispatched for this queue. After this threshold has been
170 # reached, Cloud Tasks stops dispatching tasks until the number of
171 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700172 #
173 # If unspecified when the queue is created, Cloud Tasks will pick the
174 # default.
175 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700176 #
177 # The maximum allowed value is 5,000.
178 #
179 # This field is output only for
180 # pull queues and always -1, which indicates no limit. No other
181 # queue types can have `max_concurrent_tasks` set to -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700182 #
183 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700184 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700185 # [max_concurrent_requests in
186 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -0700187 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700188 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700189 # Max burst size limits how fast tasks in queue are processed when
190 # many tasks are in the queue and the rate is high. This field
191 # allows the queue to have a high rate so processing starts shortly
192 # after a task is enqueued, but still limits resource usage when
193 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700194 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700195 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
196 # algorithm is used to control the rate of task dispatches. Each
197 # queue has a token bucket that holds tokens, up to the maximum
198 # specified by `max_burst_size`. Each time a task is dispatched, a
199 # token is removed from the bucket. Tasks will be dispatched until
200 # the queue&#x27;s bucket runs out of tokens. The bucket will be
201 # continuously refilled with new tokens based on
202 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700203 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700204 # Cloud Tasks will pick the value of `max_burst_size` based on the
205 # value of
206 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700207 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700208 # For App Engine queues that were created or updated using
209 # `queue.yaml/xml`, `max_burst_size` is equal to
210 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
211 # Since `max_burst_size` is output only, if
212 # UpdateQueue is called on a queue
213 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
214 # on the value of
215 # max_tasks_dispatched_per_second,
216 # regardless of whether
217 # max_tasks_dispatched_per_second
218 # is updated.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700219 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700220 #
221 # If unspecified when the queue is created, Cloud Tasks will pick the
222 # default.
223 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700224 # * For App Engine queues, the maximum allowed value
225 # is 500.
226 # * This field is output only for pull queues. In addition to the
227 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
228 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700229 #
230 #
231 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700232 # [rate in
233 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
Bu Sun Kim65020912020-05-20 12:08:20 -0700234 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700235 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim65020912020-05-20 12:08:20 -0700236 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700237 # * For tasks created using Cloud Tasks: the queue-level retry settings
238 # apply to all tasks in the queue that were created using Cloud Tasks.
239 # Retry settings cannot be set on individual tasks.
240 # * For tasks created using the App Engine SDK: the queue-level retry
241 # settings apply to all tasks in the queue which do not have retry settings
242 # explicitly set on the task and were created by the App Engine SDK. See
243 # [App Engine
244 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
245 #
246 # These settings determine how a failed task attempt is retried.
247 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
248 #
249 # A task&#x27;s retry interval starts at
250 # min_backoff, then doubles
251 # `max_doublings` times, then increases linearly, and finally
252 # retries at intervals of
253 # max_backoff up to
254 # max_attempts times.
255 #
256 # For example, if min_backoff is 10s,
257 # max_backoff is 300s, and
258 # `max_doublings` is 3, then the a task will first be retried in
259 # 10s. The retry interval will double three times, and then
260 # increase linearly by 2^3 * 10s. Finally, the task will retry at
261 # intervals of max_backoff until the
262 # task has been attempted max_attempts
263 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
264 # 240s, 300s, 300s, ....
265 #
266 # If unspecified when the queue is created, Cloud Tasks will pick the
267 # default.
268 #
269 # This field is output only for pull queues.
270 #
271 #
272 # This field has the same meaning as
273 # [max_doublings in
274 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
275 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
276 # min_backoff and
277 # max_backoff duration after it fails,
278 # if the queue&#x27;s RetryConfig specifies that the task should be
279 # retried.
280 #
281 # If unspecified when the queue is created, Cloud Tasks will pick the
282 # default.
283 #
284 # This field is output only for pull queues.
285 #
286 #
287 # `min_backoff` will be truncated to the nearest second.
288 #
289 # This field has the same meaning as
290 # [min_backoff_seconds in
291 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
292 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
293 # retrying a failed task, measured from when the task was first
294 # attempted. Once `max_retry_duration` time has passed *and* the
295 # task has been attempted max_attempts
296 # times, no further attempts will be made and the task will be
297 # deleted.
298 #
299 # If zero, then the task age is unlimited.
300 #
301 # If unspecified when the queue is created, Cloud Tasks will pick the
302 # default.
303 #
304 # This field is output only for pull queues.
305 #
306 #
307 # `max_retry_duration` will be truncated to the nearest second.
308 #
309 # This field has the same meaning as
310 # [task_age_limit in
311 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
312 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
313 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
314 #
315 # Cloud Tasks will attempt the task `max_attempts` times (that
316 # is, if the first attempt fails, then there will be
317 # `max_attempts - 1` retries). Must be &gt; 0.
318 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
319 # min_backoff and
320 # max_backoff duration after it fails,
321 # if the queue&#x27;s RetryConfig specifies that the task should be
322 # retried.
323 #
324 # If unspecified when the queue is created, Cloud Tasks will pick the
325 # default.
326 #
327 # This field is output only for pull queues.
328 #
329 #
330 # `max_backoff` will be truncated to the nearest second.
331 #
332 # This field has the same meaning as
333 # [max_backoff_seconds in
334 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700335 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700336 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
337 #
338 # An App Engine queue is a queue that has an AppEngineHttpTarget.
339 #
340 # The task will be delivered to the App Engine application hostname
341 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
342 # The documentation for AppEngineHttpRequest explains how the
343 # task&#x27;s host URL is constructed.
344 #
345 # Using AppEngineHttpTarget requires
346 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
347 # Google IAM permission for the project
348 # and the following scope:
349 #
350 # `https://www.googleapis.com/auth/cloud-platform`
351 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
352 # task-level app_engine_routing.
353 #
354 # If set, `app_engine_routing_override` is used for all tasks in
355 # the queue, no matter what the setting is for the
356 # task-level app_engine_routing.
357 #
358 # Defines routing characteristics specific to App Engine - service, version,
359 # and instance.
360 #
361 # For more information about services, versions, and instances see
362 # [An Overview of App
363 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
364 # [Microservices Architecture on Google App
365 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
366 # [App Engine Standard request
367 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
368 # and [App Engine Flex request
369 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700370 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700371 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700372 # By default, the task is sent to the service which is the default
373 # service when the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700374 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700375 # For some queues or tasks which were created using the App Engine
376 # Task Queue API, host is not parsable
377 # into service,
378 # version, and
379 # instance. For example, some tasks
380 # which were created using the App Engine SDK use a custom domain
381 # name; custom domains are not parsed by Cloud Tasks. If
382 # host is not parsable, then
383 # service,
384 # version, and
385 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700386 &quot;version&quot;: &quot;A String&quot;, # App version.
387 #
388 # By default, the task is sent to the version which is the default
389 # version when the task is attempted.
390 #
391 # For some queues or tasks which were created using the App Engine
392 # Task Queue API, host is not parsable
393 # into service,
394 # version, and
395 # instance. For example, some tasks
396 # which were created using the App Engine SDK use a custom domain
397 # name; custom domains are not parsed by Cloud Tasks. If
398 # host is not parsable, then
399 # service,
400 # version, and
401 # instance are the empty string.
402 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
403 #
404 # For more information, see
405 # [How Requests are
406 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
407 #
408 # The host is constructed as:
409 #
410 #
411 # * `host = [application_domain_name]`&lt;/br&gt;
412 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
413 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
414 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
415 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
416 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
417 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
418 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
419 #
420 # * `application_domain_name` = The domain name of the app, for
421 # example &lt;app-id&gt;.appspot.com, which is associated with the
422 # queue&#x27;s project ID. Some tasks which were created using the App Engine
423 # SDK use a custom domain name.
424 #
425 # * `service =` service
426 #
427 # * `version =` version
428 #
429 # * `version_dot_service =`
430 # version `+ &#x27;.&#x27; +`
431 # service
432 #
433 # * `instance =` instance
434 #
435 # * `instance_dot_service =`
436 # instance `+ &#x27;.&#x27; +`
437 # service
438 #
439 # * `instance_dot_version =`
440 # instance `+ &#x27;.&#x27; +`
441 # version
442 #
443 # * `instance_dot_version_dot_service =`
444 # instance `+ &#x27;.&#x27; +`
445 # version `+ &#x27;.&#x27; +`
446 # service
447 #
448 # If service is empty, then the task will be sent
449 # to the service which is the default service when the task is attempted.
450 #
451 # If version is empty, then the task will be sent
452 # to the version which is the default version when the task is attempted.
453 #
454 # If instance is empty, then the task
455 # will be sent to an instance which is available when the task is
456 # attempted.
457 #
458 # If service,
459 # version, or
460 # instance is invalid, then the task
461 # will be sent to the default version of the default service when
462 # the task is attempted.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700463 &quot;instance&quot;: &quot;A String&quot;, # App instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700464 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700465 # By default, the task is sent to an instance which is available when
466 # the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700467 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700468 # Requests can only be sent to a specific instance if
469 # [manual scaling is used in App Engine
470 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
471 # App Engine Flex does not support instances. For more information, see
472 # [App Engine Standard request
473 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
474 # and [App Engine Flex request
475 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700476 },
477 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700478 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
479 #
480 # All tasks that were created before this time
481 # were purged.
482 #
483 # A queue can be purged using PurgeQueue, the
484 # [App Engine Task Queue SDK, or the Cloud
485 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
486 #
487 # Purge time will be truncated to the nearest microsecond. Purge
488 # time will be unset if the queue has never been purged.
489 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
490 #
491 # `state` can only be changed by called
492 # PauseQueue,
493 # ResumeQueue, or uploading
494 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
495 # UpdateQueue cannot be used to change `state`.
496 &quot;pullTarget&quot;: { # Pull target. # Pull target.
497 #
498 # A pull queue is a queue that has a PullTarget.
499 },
500 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
501 # after which it becomes output only.
502 #
503 # The queue name.
504 #
505 # The queue name must have the following format:
506 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
507 #
508 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
509 # hyphens (-), colons (:), or periods (.).
510 # For more information, see
511 # [Identifying
512 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
513 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
514 # The list of available locations can be obtained by calling
515 # ListLocations.
516 # For more information, see https://cloud.google.com/about/locations/.
517 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
518 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700519}
520
521 x__xgafv: string, V1 error format.
522 Allowed values
523 1 - v1 error format
524 2 - v2 error format
525
526Returns:
527 An object of the form:
528
529 { # A queue is a container of related tasks. Queues are configured to manage
530 # how those tasks are dispatched. Configurable properties include rate limits,
531 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -0700532 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
533 #
534 # rate_limits and
535 # retry_config are related because they both
536 # control task attempts however they control how tasks are
537 # attempted in different ways:
538 #
539 # * rate_limits controls the total rate of
540 # dispatches from a queue (i.e. all traffic dispatched from the
541 # queue, regardless of whether the dispatch is from a first
542 # attempt or a retry).
543 # * retry_config controls what happens to
544 # particular a task after its first attempt fails. That is,
545 # retry_config controls task retries (the
546 # second attempt, third attempt, etc).
547 #
548 # This message determines the maximum rate that tasks can be dispatched by a
549 # queue, regardless of whether the dispatch is a first task attempt or a retry.
550 #
551 # Note: The debugging command, RunTask, will run a task
552 # even if the queue has reached its RateLimits.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700553 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
554 # to be dispatched for this queue. After this threshold has been
555 # reached, Cloud Tasks stops dispatching tasks until the number of
556 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700557 #
558 # If unspecified when the queue is created, Cloud Tasks will pick the
559 # default.
560 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700561 #
562 # The maximum allowed value is 5,000.
563 #
564 # This field is output only for
565 # pull queues and always -1, which indicates no limit. No other
566 # queue types can have `max_concurrent_tasks` set to -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700567 #
568 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700570 # [max_concurrent_requests in
571 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -0700572 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700573 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700574 # Max burst size limits how fast tasks in queue are processed when
575 # many tasks are in the queue and the rate is high. This field
576 # allows the queue to have a high rate so processing starts shortly
577 # after a task is enqueued, but still limits resource usage when
578 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700579 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700580 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
581 # algorithm is used to control the rate of task dispatches. Each
582 # queue has a token bucket that holds tokens, up to the maximum
583 # specified by `max_burst_size`. Each time a task is dispatched, a
584 # token is removed from the bucket. Tasks will be dispatched until
585 # the queue&#x27;s bucket runs out of tokens. The bucket will be
586 # continuously refilled with new tokens based on
587 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700588 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700589 # Cloud Tasks will pick the value of `max_burst_size` based on the
590 # value of
591 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700592 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700593 # For App Engine queues that were created or updated using
594 # `queue.yaml/xml`, `max_burst_size` is equal to
595 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
596 # Since `max_burst_size` is output only, if
597 # UpdateQueue is called on a queue
598 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
599 # on the value of
600 # max_tasks_dispatched_per_second,
601 # regardless of whether
602 # max_tasks_dispatched_per_second
603 # is updated.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700604 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700605 #
606 # If unspecified when the queue is created, Cloud Tasks will pick the
607 # default.
608 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700609 # * For App Engine queues, the maximum allowed value
610 # is 500.
611 # * This field is output only for pull queues. In addition to the
612 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
613 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700614 #
615 #
616 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700617 # [rate in
618 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
Bu Sun Kim65020912020-05-20 12:08:20 -0700619 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700620 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim65020912020-05-20 12:08:20 -0700621 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700622 # * For tasks created using Cloud Tasks: the queue-level retry settings
623 # apply to all tasks in the queue that were created using Cloud Tasks.
624 # Retry settings cannot be set on individual tasks.
625 # * For tasks created using the App Engine SDK: the queue-level retry
626 # settings apply to all tasks in the queue which do not have retry settings
627 # explicitly set on the task and were created by the App Engine SDK. See
628 # [App Engine
629 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
630 #
631 # These settings determine how a failed task attempt is retried.
632 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
633 #
634 # A task&#x27;s retry interval starts at
635 # min_backoff, then doubles
636 # `max_doublings` times, then increases linearly, and finally
637 # retries at intervals of
638 # max_backoff up to
639 # max_attempts times.
640 #
641 # For example, if min_backoff is 10s,
642 # max_backoff is 300s, and
643 # `max_doublings` is 3, then the a task will first be retried in
644 # 10s. The retry interval will double three times, and then
645 # increase linearly by 2^3 * 10s. Finally, the task will retry at
646 # intervals of max_backoff until the
647 # task has been attempted max_attempts
648 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
649 # 240s, 300s, 300s, ....
650 #
651 # If unspecified when the queue is created, Cloud Tasks will pick the
652 # default.
653 #
654 # This field is output only for pull queues.
655 #
656 #
657 # This field has the same meaning as
658 # [max_doublings in
659 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
660 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
661 # min_backoff and
662 # max_backoff duration after it fails,
663 # if the queue&#x27;s RetryConfig specifies that the task should be
664 # retried.
665 #
666 # If unspecified when the queue is created, Cloud Tasks will pick the
667 # default.
668 #
669 # This field is output only for pull queues.
670 #
671 #
672 # `min_backoff` will be truncated to the nearest second.
673 #
674 # This field has the same meaning as
675 # [min_backoff_seconds in
676 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
677 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
678 # retrying a failed task, measured from when the task was first
679 # attempted. Once `max_retry_duration` time has passed *and* the
680 # task has been attempted max_attempts
681 # times, no further attempts will be made and the task will be
682 # deleted.
683 #
684 # If zero, then the task age is unlimited.
685 #
686 # If unspecified when the queue is created, Cloud Tasks will pick the
687 # default.
688 #
689 # This field is output only for pull queues.
690 #
691 #
692 # `max_retry_duration` will be truncated to the nearest second.
693 #
694 # This field has the same meaning as
695 # [task_age_limit in
696 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
697 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
698 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
699 #
700 # Cloud Tasks will attempt the task `max_attempts` times (that
701 # is, if the first attempt fails, then there will be
702 # `max_attempts - 1` retries). Must be &gt; 0.
703 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
704 # min_backoff and
705 # max_backoff duration after it fails,
706 # if the queue&#x27;s RetryConfig specifies that the task should be
707 # retried.
708 #
709 # If unspecified when the queue is created, Cloud Tasks will pick the
710 # default.
711 #
712 # This field is output only for pull queues.
713 #
714 #
715 # `max_backoff` will be truncated to the nearest second.
716 #
717 # This field has the same meaning as
718 # [max_backoff_seconds in
719 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700720 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700721 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
722 #
723 # An App Engine queue is a queue that has an AppEngineHttpTarget.
724 #
725 # The task will be delivered to the App Engine application hostname
726 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
727 # The documentation for AppEngineHttpRequest explains how the
728 # task&#x27;s host URL is constructed.
729 #
730 # Using AppEngineHttpTarget requires
731 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
732 # Google IAM permission for the project
733 # and the following scope:
734 #
735 # `https://www.googleapis.com/auth/cloud-platform`
736 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
737 # task-level app_engine_routing.
738 #
739 # If set, `app_engine_routing_override` is used for all tasks in
740 # the queue, no matter what the setting is for the
741 # task-level app_engine_routing.
742 #
743 # Defines routing characteristics specific to App Engine - service, version,
744 # and instance.
745 #
746 # For more information about services, versions, and instances see
747 # [An Overview of App
748 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
749 # [Microservices Architecture on Google App
750 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
751 # [App Engine Standard request
752 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
753 # and [App Engine Flex request
754 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700755 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700756 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700757 # By default, the task is sent to the service which is the default
758 # service when the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700759 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700760 # For some queues or tasks which were created using the App Engine
761 # Task Queue API, host is not parsable
762 # into service,
763 # version, and
764 # instance. For example, some tasks
765 # which were created using the App Engine SDK use a custom domain
766 # name; custom domains are not parsed by Cloud Tasks. If
767 # host is not parsable, then
768 # service,
769 # version, and
770 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700771 &quot;version&quot;: &quot;A String&quot;, # App version.
772 #
773 # By default, the task is sent to the version which is the default
774 # version when the task is attempted.
775 #
776 # For some queues or tasks which were created using the App Engine
777 # Task Queue API, host is not parsable
778 # into service,
779 # version, and
780 # instance. For example, some tasks
781 # which were created using the App Engine SDK use a custom domain
782 # name; custom domains are not parsed by Cloud Tasks. If
783 # host is not parsable, then
784 # service,
785 # version, and
786 # instance are the empty string.
787 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
788 #
789 # For more information, see
790 # [How Requests are
791 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
792 #
793 # The host is constructed as:
794 #
795 #
796 # * `host = [application_domain_name]`&lt;/br&gt;
797 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
798 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
799 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
800 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
801 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
802 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
803 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
804 #
805 # * `application_domain_name` = The domain name of the app, for
806 # example &lt;app-id&gt;.appspot.com, which is associated with the
807 # queue&#x27;s project ID. Some tasks which were created using the App Engine
808 # SDK use a custom domain name.
809 #
810 # * `service =` service
811 #
812 # * `version =` version
813 #
814 # * `version_dot_service =`
815 # version `+ &#x27;.&#x27; +`
816 # service
817 #
818 # * `instance =` instance
819 #
820 # * `instance_dot_service =`
821 # instance `+ &#x27;.&#x27; +`
822 # service
823 #
824 # * `instance_dot_version =`
825 # instance `+ &#x27;.&#x27; +`
826 # version
827 #
828 # * `instance_dot_version_dot_service =`
829 # instance `+ &#x27;.&#x27; +`
830 # version `+ &#x27;.&#x27; +`
831 # service
832 #
833 # If service is empty, then the task will be sent
834 # to the service which is the default service when the task is attempted.
835 #
836 # If version is empty, then the task will be sent
837 # to the version which is the default version when the task is attempted.
838 #
839 # If instance is empty, then the task
840 # will be sent to an instance which is available when the task is
841 # attempted.
842 #
843 # If service,
844 # version, or
845 # instance is invalid, then the task
846 # will be sent to the default version of the default service when
847 # the task is attempted.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700848 &quot;instance&quot;: &quot;A String&quot;, # App instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700849 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700850 # By default, the task is sent to an instance which is available when
851 # the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700852 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700853 # Requests can only be sent to a specific instance if
854 # [manual scaling is used in App Engine
855 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
856 # App Engine Flex does not support instances. For more information, see
857 # [App Engine Standard request
858 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
859 # and [App Engine Flex request
860 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700861 },
862 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700863 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
864 #
865 # All tasks that were created before this time
866 # were purged.
867 #
868 # A queue can be purged using PurgeQueue, the
869 # [App Engine Task Queue SDK, or the Cloud
870 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
871 #
872 # Purge time will be truncated to the nearest microsecond. Purge
873 # time will be unset if the queue has never been purged.
874 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
875 #
876 # `state` can only be changed by called
877 # PauseQueue,
878 # ResumeQueue, or uploading
879 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
880 # UpdateQueue cannot be used to change `state`.
881 &quot;pullTarget&quot;: { # Pull target. # Pull target.
882 #
883 # A pull queue is a queue that has a PullTarget.
884 },
885 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
886 # after which it becomes output only.
887 #
888 # The queue name.
889 #
890 # The queue name must have the following format:
891 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
892 #
893 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
894 # hyphens (-), colons (:), or periods (.).
895 # For more information, see
896 # [Identifying
897 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
898 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
899 # The list of available locations can be obtained by calling
900 # ListLocations.
901 # For more information, see https://cloud.google.com/about/locations/.
902 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
903 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700904 }</pre>
905</div>
906
907<div class="method">
908 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
909 <pre>Deletes a queue.
910
911This command will delete the queue even if it has tasks in it.
912
Bu Sun Kim65020912020-05-20 12:08:20 -0700913Note: If you delete a queue, a queue with the same name can&#x27;t be created
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700914for 7 days.
915
916WARNING: Using this method may have unintended side effects if you are
917using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
918Read
919[Overview of Queue Management and
920queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
921this method.
922
923Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700924 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700925`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
926 x__xgafv: string, V1 error format.
927 Allowed values
928 1 - v1 error format
929 2 - v2 error format
930
931Returns:
932 An object of the form:
933
934 { # A generic empty message that you can re-use to avoid defining duplicated
935 # empty messages in your APIs. A typical example is to use it as the request
936 # or the response type of an API method. For instance:
937 #
938 # service Foo {
939 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
940 # }
941 #
942 # The JSON representation for `Empty` is empty JSON object `{}`.
943 }</pre>
944</div>
945
946<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700947 <code class="details" id="get">get(name, readMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700948 <pre>Gets a queue.
949
950Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700951 name: string, Required. The resource name of the queue. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700952`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700953 readMask: string, Optional. Read mask is used for a more granular control over what the API returns. By
954it includes all fields in Queue except for stats.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700955 x__xgafv: string, V1 error format.
956 Allowed values
957 1 - v1 error format
958 2 - v2 error format
959
960Returns:
961 An object of the form:
962
963 { # A queue is a container of related tasks. Queues are configured to manage
964 # how those tasks are dispatched. Configurable properties include rate limits,
965 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -0700966 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
967 #
968 # rate_limits and
969 # retry_config are related because they both
970 # control task attempts however they control how tasks are
971 # attempted in different ways:
972 #
973 # * rate_limits controls the total rate of
974 # dispatches from a queue (i.e. all traffic dispatched from the
975 # queue, regardless of whether the dispatch is from a first
976 # attempt or a retry).
977 # * retry_config controls what happens to
978 # particular a task after its first attempt fails. That is,
979 # retry_config controls task retries (the
980 # second attempt, third attempt, etc).
981 #
982 # This message determines the maximum rate that tasks can be dispatched by a
983 # queue, regardless of whether the dispatch is a first task attempt or a retry.
984 #
985 # Note: The debugging command, RunTask, will run a task
986 # even if the queue has reached its RateLimits.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700987 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
988 # to be dispatched for this queue. After this threshold has been
989 # reached, Cloud Tasks stops dispatching tasks until the number of
990 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700991 #
992 # If unspecified when the queue is created, Cloud Tasks will pick the
993 # default.
994 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700995 #
996 # The maximum allowed value is 5,000.
997 #
998 # This field is output only for
999 # pull queues and always -1, which indicates no limit. No other
1000 # queue types can have `max_concurrent_tasks` set to -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001001 #
1002 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001003 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001004 # [max_concurrent_requests in
1005 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -07001006 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001007 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001008 # Max burst size limits how fast tasks in queue are processed when
1009 # many tasks are in the queue and the rate is high. This field
1010 # allows the queue to have a high rate so processing starts shortly
1011 # after a task is enqueued, but still limits resource usage when
1012 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001013 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001014 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1015 # algorithm is used to control the rate of task dispatches. Each
1016 # queue has a token bucket that holds tokens, up to the maximum
1017 # specified by `max_burst_size`. Each time a task is dispatched, a
1018 # token is removed from the bucket. Tasks will be dispatched until
1019 # the queue&#x27;s bucket runs out of tokens. The bucket will be
1020 # continuously refilled with new tokens based on
1021 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001022 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001023 # Cloud Tasks will pick the value of `max_burst_size` based on the
1024 # value of
1025 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001026 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001027 # For App Engine queues that were created or updated using
1028 # `queue.yaml/xml`, `max_burst_size` is equal to
1029 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1030 # Since `max_burst_size` is output only, if
1031 # UpdateQueue is called on a queue
1032 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
1033 # on the value of
1034 # max_tasks_dispatched_per_second,
1035 # regardless of whether
1036 # max_tasks_dispatched_per_second
1037 # is updated.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001038 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001039 #
1040 # If unspecified when the queue is created, Cloud Tasks will pick the
1041 # default.
1042 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001043 # * For App Engine queues, the maximum allowed value
1044 # is 500.
1045 # * This field is output only for pull queues. In addition to the
1046 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
1047 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001048 #
1049 #
1050 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001051 # [rate in
1052 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
Bu Sun Kim65020912020-05-20 12:08:20 -07001053 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001054 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim65020912020-05-20 12:08:20 -07001055 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001056 # * For tasks created using Cloud Tasks: the queue-level retry settings
1057 # apply to all tasks in the queue that were created using Cloud Tasks.
1058 # Retry settings cannot be set on individual tasks.
1059 # * For tasks created using the App Engine SDK: the queue-level retry
1060 # settings apply to all tasks in the queue which do not have retry settings
1061 # explicitly set on the task and were created by the App Engine SDK. See
1062 # [App Engine
1063 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
1064 #
1065 # These settings determine how a failed task attempt is retried.
1066 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
1067 #
1068 # A task&#x27;s retry interval starts at
1069 # min_backoff, then doubles
1070 # `max_doublings` times, then increases linearly, and finally
1071 # retries at intervals of
1072 # max_backoff up to
1073 # max_attempts times.
1074 #
1075 # For example, if min_backoff is 10s,
1076 # max_backoff is 300s, and
1077 # `max_doublings` is 3, then the a task will first be retried in
1078 # 10s. The retry interval will double three times, and then
1079 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1080 # intervals of max_backoff until the
1081 # task has been attempted max_attempts
1082 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1083 # 240s, 300s, 300s, ....
1084 #
1085 # If unspecified when the queue is created, Cloud Tasks will pick the
1086 # default.
1087 #
1088 # This field is output only for pull queues.
1089 #
1090 #
1091 # This field has the same meaning as
1092 # [max_doublings in
1093 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1094 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1095 # min_backoff and
1096 # max_backoff duration after it fails,
1097 # if the queue&#x27;s RetryConfig specifies that the task should be
1098 # retried.
1099 #
1100 # If unspecified when the queue is created, Cloud Tasks will pick the
1101 # default.
1102 #
1103 # This field is output only for pull queues.
1104 #
1105 #
1106 # `min_backoff` will be truncated to the nearest second.
1107 #
1108 # This field has the same meaning as
1109 # [min_backoff_seconds in
1110 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1111 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
1112 # retrying a failed task, measured from when the task was first
1113 # attempted. Once `max_retry_duration` time has passed *and* the
1114 # task has been attempted max_attempts
1115 # times, no further attempts will be made and the task will be
1116 # deleted.
1117 #
1118 # If zero, then the task age is unlimited.
1119 #
1120 # If unspecified when the queue is created, Cloud Tasks will pick the
1121 # default.
1122 #
1123 # This field is output only for pull queues.
1124 #
1125 #
1126 # `max_retry_duration` will be truncated to the nearest second.
1127 #
1128 # This field has the same meaning as
1129 # [task_age_limit in
1130 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1131 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
1132 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
1133 #
1134 # Cloud Tasks will attempt the task `max_attempts` times (that
1135 # is, if the first attempt fails, then there will be
1136 # `max_attempts - 1` retries). Must be &gt; 0.
1137 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1138 # min_backoff and
1139 # max_backoff duration after it fails,
1140 # if the queue&#x27;s RetryConfig specifies that the task should be
1141 # retried.
1142 #
1143 # If unspecified when the queue is created, Cloud Tasks will pick the
1144 # default.
1145 #
1146 # This field is output only for pull queues.
1147 #
1148 #
1149 # `max_backoff` will be truncated to the nearest second.
1150 #
1151 # This field has the same meaning as
1152 # [max_backoff_seconds in
1153 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001154 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001155 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
1156 #
1157 # An App Engine queue is a queue that has an AppEngineHttpTarget.
1158 #
1159 # The task will be delivered to the App Engine application hostname
1160 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
1161 # The documentation for AppEngineHttpRequest explains how the
1162 # task&#x27;s host URL is constructed.
1163 #
1164 # Using AppEngineHttpTarget requires
1165 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1166 # Google IAM permission for the project
1167 # and the following scope:
1168 #
1169 # `https://www.googleapis.com/auth/cloud-platform`
1170 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
1171 # task-level app_engine_routing.
1172 #
1173 # If set, `app_engine_routing_override` is used for all tasks in
1174 # the queue, no matter what the setting is for the
1175 # task-level app_engine_routing.
1176 #
1177 # Defines routing characteristics specific to App Engine - service, version,
1178 # and instance.
1179 #
1180 # For more information about services, versions, and instances see
1181 # [An Overview of App
1182 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1183 # [Microservices Architecture on Google App
1184 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1185 # [App Engine Standard request
1186 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1187 # and [App Engine Flex request
1188 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001189 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001190 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001191 # By default, the task is sent to the service which is the default
1192 # service when the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001193 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001194 # For some queues or tasks which were created using the App Engine
1195 # Task Queue API, host is not parsable
1196 # into service,
1197 # version, and
1198 # instance. For example, some tasks
1199 # which were created using the App Engine SDK use a custom domain
1200 # name; custom domains are not parsed by Cloud Tasks. If
1201 # host is not parsable, then
1202 # service,
1203 # version, and
1204 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001205 &quot;version&quot;: &quot;A String&quot;, # App version.
1206 #
1207 # By default, the task is sent to the version which is the default
1208 # version when the task is attempted.
1209 #
1210 # For some queues or tasks which were created using the App Engine
1211 # Task Queue API, host is not parsable
1212 # into service,
1213 # version, and
1214 # instance. For example, some tasks
1215 # which were created using the App Engine SDK use a custom domain
1216 # name; custom domains are not parsed by Cloud Tasks. If
1217 # host is not parsable, then
1218 # service,
1219 # version, and
1220 # instance are the empty string.
1221 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1222 #
1223 # For more information, see
1224 # [How Requests are
1225 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1226 #
1227 # The host is constructed as:
1228 #
1229 #
1230 # * `host = [application_domain_name]`&lt;/br&gt;
1231 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1232 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1233 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1234 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1235 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1236 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1237 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
1238 #
1239 # * `application_domain_name` = The domain name of the app, for
1240 # example &lt;app-id&gt;.appspot.com, which is associated with the
1241 # queue&#x27;s project ID. Some tasks which were created using the App Engine
1242 # SDK use a custom domain name.
1243 #
1244 # * `service =` service
1245 #
1246 # * `version =` version
1247 #
1248 # * `version_dot_service =`
1249 # version `+ &#x27;.&#x27; +`
1250 # service
1251 #
1252 # * `instance =` instance
1253 #
1254 # * `instance_dot_service =`
1255 # instance `+ &#x27;.&#x27; +`
1256 # service
1257 #
1258 # * `instance_dot_version =`
1259 # instance `+ &#x27;.&#x27; +`
1260 # version
1261 #
1262 # * `instance_dot_version_dot_service =`
1263 # instance `+ &#x27;.&#x27; +`
1264 # version `+ &#x27;.&#x27; +`
1265 # service
1266 #
1267 # If service is empty, then the task will be sent
1268 # to the service which is the default service when the task is attempted.
1269 #
1270 # If version is empty, then the task will be sent
1271 # to the version which is the default version when the task is attempted.
1272 #
1273 # If instance is empty, then the task
1274 # will be sent to an instance which is available when the task is
1275 # attempted.
1276 #
1277 # If service,
1278 # version, or
1279 # instance is invalid, then the task
1280 # will be sent to the default version of the default service when
1281 # the task is attempted.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001282 &quot;instance&quot;: &quot;A String&quot;, # App instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001283 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001284 # By default, the task is sent to an instance which is available when
1285 # the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001286 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001287 # Requests can only be sent to a specific instance if
1288 # [manual scaling is used in App Engine
1289 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1290 # App Engine Flex does not support instances. For more information, see
1291 # [App Engine Standard request
1292 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1293 # and [App Engine Flex request
1294 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001295 },
1296 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001297 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
1298 #
1299 # All tasks that were created before this time
1300 # were purged.
1301 #
1302 # A queue can be purged using PurgeQueue, the
1303 # [App Engine Task Queue SDK, or the Cloud
1304 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
1305 #
1306 # Purge time will be truncated to the nearest microsecond. Purge
1307 # time will be unset if the queue has never been purged.
1308 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
1309 #
1310 # `state` can only be changed by called
1311 # PauseQueue,
1312 # ResumeQueue, or uploading
1313 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
1314 # UpdateQueue cannot be used to change `state`.
1315 &quot;pullTarget&quot;: { # Pull target. # Pull target.
1316 #
1317 # A pull queue is a queue that has a PullTarget.
1318 },
1319 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
1320 # after which it becomes output only.
1321 #
1322 # The queue name.
1323 #
1324 # The queue name must have the following format:
1325 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1326 #
1327 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1328 # hyphens (-), colons (:), or periods (.).
1329 # For more information, see
1330 # [Identifying
1331 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1332 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
1333 # The list of available locations can be obtained by calling
1334 # ListLocations.
1335 # For more information, see https://cloud.google.com/about/locations/.
1336 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1337 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001338 }</pre>
1339</div>
1340
1341<div class="method">
1342 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
1343 <pre>Gets the access control policy for a Queue.
1344Returns an empty policy if the resource exists and does not have a policy
1345set.
1346
1347Authorization requires the following
1348[Google IAM](https://cloud.google.com/iam) permission on the specified
1349resource parent:
1350
1351* `cloudtasks.queues.getIamPolicy`
1352
1353Args:
1354 resource: string, REQUIRED: The resource for which the policy is being requested.
1355See the operation documentation for the appropriate value for this field. (required)
1356 body: object, The request body.
1357 The object takes the form of:
1358
1359{ # Request message for `GetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001360 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
Dan O'Mearadd494642020-05-01 07:42:23 -07001361 # `GetIamPolicy`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001362 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.
Dan O'Mearadd494642020-05-01 07:42:23 -07001363 #
1364 # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
1365 # rejected.
1366 #
1367 # Requests for policies with any conditional bindings must specify version 3.
1368 # Policies without any conditional bindings may specify any valid value or
1369 # leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -07001370 #
1371 # To learn which resources support conditions in their IAM policies, see the
1372 # [IAM
1373 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001374 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001375 }
1376
1377 x__xgafv: string, V1 error format.
1378 Allowed values
1379 1 - v1 error format
1380 2 - v2 error format
1381
1382Returns:
1383 An object of the form:
1384
Dan O'Mearadd494642020-05-01 07:42:23 -07001385 { # An Identity and Access Management (IAM) policy, which specifies access
1386 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001387 #
1388 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001389 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1390 # `members` to a single `role`. Members can be user accounts, service accounts,
1391 # Google groups, and domains (such as G Suite). A `role` is a named list of
1392 # permissions; each `role` can be an IAM predefined role or a user-created
1393 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001394 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001395 # For some types of Google Cloud resources, a `binding` can also specify a
1396 # `condition`, which is a logical expression that allows access to a resource
1397 # only if the expression evaluates to `true`. A condition can add constraints
1398 # based on attributes of the request, the resource, or both. To learn which
1399 # resources support conditions in their IAM policies, see the
1400 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001401 #
1402 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001403 #
1404 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001405 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001406 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001407 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1408 # &quot;members&quot;: [
1409 # &quot;user:mike@example.com&quot;,
1410 # &quot;group:admins@example.com&quot;,
1411 # &quot;domain:google.com&quot;,
1412 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001413 # ]
1414 # },
1415 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001416 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1417 # &quot;members&quot;: [
1418 # &quot;user:eve@example.com&quot;
1419 # ],
1420 # &quot;condition&quot;: {
1421 # &quot;title&quot;: &quot;expirable access&quot;,
1422 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1423 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001424 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001425 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001426 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001427 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1428 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001429 # }
1430 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001431 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001432 #
1433 # bindings:
1434 # - members:
1435 # - user:mike@example.com
1436 # - group:admins@example.com
1437 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001438 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1439 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001440 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001441 # - user:eve@example.com
1442 # role: roles/resourcemanager.organizationViewer
1443 # condition:
1444 # title: expirable access
1445 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001446 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001447 # - etag: BwWWja0YfJA=
1448 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001449 #
1450 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001451 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001452 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1453 # prevent simultaneous updates of a policy from overwriting each other.
1454 # It is strongly suggested that systems make use of the `etag` in the
1455 # read-modify-write cycle to perform policy updates in order to avoid race
1456 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1457 # systems are expected to put that etag in the request to `setIamPolicy` to
1458 # ensure that their change will be applied to the same version of the policy.
1459 #
1460 # **Important:** If you use IAM Conditions, you must include the `etag` field
1461 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1462 # you to overwrite a version `3` policy with a version `1` policy, and all of
1463 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -07001464 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001465 # `condition` that determines how and when the `bindings` are applied. Each
1466 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001467 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001468 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1469 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001470 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001471 # `members` can have the following values:
1472 #
1473 # * `allUsers`: A special identifier that represents anyone who is
1474 # on the internet; with or without a Google account.
1475 #
1476 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1477 # who is authenticated with a Google account or a service account.
1478 #
1479 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001480 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001481 #
1482 #
1483 # * `serviceAccount:{emailid}`: An email address that represents a service
1484 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1485 #
1486 # * `group:{emailid}`: An email address that represents a Google group.
1487 # For example, `admins@example.com`.
1488 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001489 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1490 # identifier) representing a user that has been recently deleted. For
1491 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1492 # recovered, this value reverts to `user:{emailid}` and the recovered user
1493 # retains the role in the binding.
1494 #
1495 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1496 # unique identifier) representing a service account that has been recently
1497 # deleted. For example,
1498 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1499 # If the service account is undeleted, this value reverts to
1500 # `serviceAccount:{emailid}` and the undeleted service account retains the
1501 # role in the binding.
1502 #
1503 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1504 # identifier) representing a Google group that has been recently
1505 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1506 # the group is recovered, this value reverts to `group:{emailid}` and the
1507 # recovered group retains the role in the binding.
1508 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001509 #
1510 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1511 # users of that domain. For example, `google.com` or `example.com`.
1512 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001513 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001514 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001515 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1516 #
1517 # If the condition evaluates to `true`, then this binding applies to the
1518 # current request.
1519 #
1520 # If the condition evaluates to `false`, then this binding does not apply to
1521 # the current request. However, a different role binding might grant the same
1522 # role to one or more of the members in this binding.
1523 #
1524 # To learn which resources support conditions in their IAM policies, see the
1525 # [IAM
1526 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1527 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1528 # are documented at https://github.com/google/cel-spec.
1529 #
1530 # Example (Comparison):
1531 #
1532 # title: &quot;Summary size limit&quot;
1533 # description: &quot;Determines if a summary is less than 100 chars&quot;
1534 # expression: &quot;document.summary.size() &lt; 100&quot;
1535 #
1536 # Example (Equality):
1537 #
1538 # title: &quot;Requestor is owner&quot;
1539 # description: &quot;Determines if requestor is the document owner&quot;
1540 # expression: &quot;document.owner == request.auth.claims.email&quot;
1541 #
1542 # Example (Logic):
1543 #
1544 # title: &quot;Public documents&quot;
1545 # description: &quot;Determine whether the document should be publicly visible&quot;
1546 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1547 #
1548 # Example (Data Manipulation):
1549 #
1550 # title: &quot;Notification string&quot;
1551 # description: &quot;Create a notification string with a timestamp.&quot;
1552 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1553 #
1554 # The exact variables and functions that may be referenced within an expression
1555 # are determined by the service that evaluates it. See the service
1556 # documentation for additional information.
1557 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1558 # describes the expression, e.g. when hovered over it in a UI.
1559 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1560 # its purpose. This can be used e.g. in UIs which allow to enter the
1561 # expression.
1562 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1563 # reporting, e.g. a file name and a position in the file.
1564 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1565 # syntax.
1566 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001567 },
1568 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001569 &quot;version&quot;: 42, # Specifies the format of the policy.
1570 #
1571 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1572 # are rejected.
1573 #
1574 # Any operation that affects conditional role bindings must specify version
1575 # `3`. This requirement applies to the following operations:
1576 #
1577 # * Getting a policy that includes a conditional role binding
1578 # * Adding a conditional role binding to a policy
1579 # * Changing a conditional role binding in a policy
1580 # * Removing any role binding, with or without a condition, from a policy
1581 # that includes conditions
1582 #
1583 # **Important:** If you use IAM Conditions, you must include the `etag` field
1584 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1585 # you to overwrite a version `3` policy with a version `1` policy, and all of
1586 # the conditions in the version `3` policy are lost.
1587 #
1588 # If a policy does not include any conditions, operations on that policy may
1589 # specify any valid version or leave the field unset.
1590 #
1591 # To learn which resources support conditions in their IAM policies, see the
1592 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001593 }</pre>
1594</div>
1595
1596<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001597 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001598 <pre>Lists queues.
1599
1600Queues are returned in lexicographical order.
1601
1602Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001603 parent: string, Required. The location name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001604For example: `projects/PROJECT_ID/locations/LOCATION_ID` (required)
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001605 filter: string, `filter` can be used to specify a subset of queues. Any Queue
1606field can be used as a filter and several operators as supported.
1607For example: `&lt;=, &lt;, &gt;=, &gt;, !=, =, :`. The filter syntax is the same as
1608described in
1609[Stackdriver&#x27;s Advanced Logs
1610Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
1611
1612Sample filter &quot;app_engine_http_target: *&quot;.
1613
1614Note that using filters might cause fewer queues than the
1615requested_page size to be returned.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001616 pageSize: integer, Requested page size.
1617
1618The maximum page size is 9800. If unspecified, the page size will
1619be the maximum. Fewer queues than requested might be returned,
1620even if more queues exist; use the
1621next_page_token in the
1622response to determine if more queues exist.
1623 pageToken: string, A token identifying the page of results to return.
1624
1625To request the first page results, page_token must be empty. To
1626request the next page of results, page_token must be the value of
1627next_page_token returned
1628from the previous call to ListQueues
1629method. It is an error to switch the value of the
1630filter while iterating through pages.
Bu Sun Kim65020912020-05-20 12:08:20 -07001631 x__xgafv: string, V1 error format.
1632 Allowed values
1633 1 - v1 error format
1634 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001635
1636Returns:
1637 An object of the form:
1638
1639 { # Response message for ListQueues.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001640 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results.
1641 #
1642 # To return the next page of results, call
1643 # ListQueues with this value as the
1644 # page_token.
1645 #
1646 # If the next_page_token is empty, there are no more results.
1647 #
1648 # The page token is valid for only 2 hours.
Bu Sun Kim65020912020-05-20 12:08:20 -07001649 &quot;queues&quot;: [ # The list of queues.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001650 { # A queue is a container of related tasks. Queues are configured to manage
1651 # how those tasks are dispatched. Configurable properties include rate limits,
1652 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07001653 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
1654 #
1655 # rate_limits and
1656 # retry_config are related because they both
1657 # control task attempts however they control how tasks are
1658 # attempted in different ways:
1659 #
1660 # * rate_limits controls the total rate of
1661 # dispatches from a queue (i.e. all traffic dispatched from the
1662 # queue, regardless of whether the dispatch is from a first
1663 # attempt or a retry).
1664 # * retry_config controls what happens to
1665 # particular a task after its first attempt fails. That is,
1666 # retry_config controls task retries (the
1667 # second attempt, third attempt, etc).
1668 #
1669 # This message determines the maximum rate that tasks can be dispatched by a
1670 # queue, regardless of whether the dispatch is a first task attempt or a retry.
1671 #
1672 # Note: The debugging command, RunTask, will run a task
1673 # even if the queue has reached its RateLimits.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001674 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
1675 # to be dispatched for this queue. After this threshold has been
1676 # reached, Cloud Tasks stops dispatching tasks until the number of
1677 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001678 #
1679 # If unspecified when the queue is created, Cloud Tasks will pick the
1680 # default.
1681 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001682 #
1683 # The maximum allowed value is 5,000.
1684 #
1685 # This field is output only for
1686 # pull queues and always -1, which indicates no limit. No other
1687 # queue types can have `max_concurrent_tasks` set to -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001688 #
1689 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001690 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001691 # [max_concurrent_requests in
1692 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -07001693 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001694 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001695 # Max burst size limits how fast tasks in queue are processed when
1696 # many tasks are in the queue and the rate is high. This field
1697 # allows the queue to have a high rate so processing starts shortly
1698 # after a task is enqueued, but still limits resource usage when
1699 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001700 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001701 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1702 # algorithm is used to control the rate of task dispatches. Each
1703 # queue has a token bucket that holds tokens, up to the maximum
1704 # specified by `max_burst_size`. Each time a task is dispatched, a
1705 # token is removed from the bucket. Tasks will be dispatched until
1706 # the queue&#x27;s bucket runs out of tokens. The bucket will be
1707 # continuously refilled with new tokens based on
1708 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001709 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001710 # Cloud Tasks will pick the value of `max_burst_size` based on the
1711 # value of
1712 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001713 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001714 # For App Engine queues that were created or updated using
1715 # `queue.yaml/xml`, `max_burst_size` is equal to
1716 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1717 # Since `max_burst_size` is output only, if
1718 # UpdateQueue is called on a queue
1719 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
1720 # on the value of
1721 # max_tasks_dispatched_per_second,
1722 # regardless of whether
1723 # max_tasks_dispatched_per_second
1724 # is updated.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001725 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001726 #
1727 # If unspecified when the queue is created, Cloud Tasks will pick the
1728 # default.
1729 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001730 # * For App Engine queues, the maximum allowed value
1731 # is 500.
1732 # * This field is output only for pull queues. In addition to the
1733 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
1734 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001735 #
1736 #
1737 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001738 # [rate in
1739 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
Bu Sun Kim65020912020-05-20 12:08:20 -07001740 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001741 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim65020912020-05-20 12:08:20 -07001742 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001743 # * For tasks created using Cloud Tasks: the queue-level retry settings
1744 # apply to all tasks in the queue that were created using Cloud Tasks.
1745 # Retry settings cannot be set on individual tasks.
1746 # * For tasks created using the App Engine SDK: the queue-level retry
1747 # settings apply to all tasks in the queue which do not have retry settings
1748 # explicitly set on the task and were created by the App Engine SDK. See
1749 # [App Engine
1750 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
1751 #
1752 # These settings determine how a failed task attempt is retried.
1753 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
1754 #
1755 # A task&#x27;s retry interval starts at
1756 # min_backoff, then doubles
1757 # `max_doublings` times, then increases linearly, and finally
1758 # retries at intervals of
1759 # max_backoff up to
1760 # max_attempts times.
1761 #
1762 # For example, if min_backoff is 10s,
1763 # max_backoff is 300s, and
1764 # `max_doublings` is 3, then the a task will first be retried in
1765 # 10s. The retry interval will double three times, and then
1766 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1767 # intervals of max_backoff until the
1768 # task has been attempted max_attempts
1769 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1770 # 240s, 300s, 300s, ....
1771 #
1772 # If unspecified when the queue is created, Cloud Tasks will pick the
1773 # default.
1774 #
1775 # This field is output only for pull queues.
1776 #
1777 #
1778 # This field has the same meaning as
1779 # [max_doublings in
1780 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1781 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1782 # min_backoff and
1783 # max_backoff duration after it fails,
1784 # if the queue&#x27;s RetryConfig specifies that the task should be
1785 # retried.
1786 #
1787 # If unspecified when the queue is created, Cloud Tasks will pick the
1788 # default.
1789 #
1790 # This field is output only for pull queues.
1791 #
1792 #
1793 # `min_backoff` will be truncated to the nearest second.
1794 #
1795 # This field has the same meaning as
1796 # [min_backoff_seconds in
1797 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1798 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
1799 # retrying a failed task, measured from when the task was first
1800 # attempted. Once `max_retry_duration` time has passed *and* the
1801 # task has been attempted max_attempts
1802 # times, no further attempts will be made and the task will be
1803 # deleted.
1804 #
1805 # If zero, then the task age is unlimited.
1806 #
1807 # If unspecified when the queue is created, Cloud Tasks will pick the
1808 # default.
1809 #
1810 # This field is output only for pull queues.
1811 #
1812 #
1813 # `max_retry_duration` will be truncated to the nearest second.
1814 #
1815 # This field has the same meaning as
1816 # [task_age_limit in
1817 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1818 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
1819 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
1820 #
1821 # Cloud Tasks will attempt the task `max_attempts` times (that
1822 # is, if the first attempt fails, then there will be
1823 # `max_attempts - 1` retries). Must be &gt; 0.
1824 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1825 # min_backoff and
1826 # max_backoff duration after it fails,
1827 # if the queue&#x27;s RetryConfig specifies that the task should be
1828 # retried.
1829 #
1830 # If unspecified when the queue is created, Cloud Tasks will pick the
1831 # default.
1832 #
1833 # This field is output only for pull queues.
1834 #
1835 #
1836 # `max_backoff` will be truncated to the nearest second.
1837 #
1838 # This field has the same meaning as
1839 # [max_backoff_seconds in
1840 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001841 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001842 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
1843 #
1844 # An App Engine queue is a queue that has an AppEngineHttpTarget.
1845 #
1846 # The task will be delivered to the App Engine application hostname
1847 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
1848 # The documentation for AppEngineHttpRequest explains how the
1849 # task&#x27;s host URL is constructed.
1850 #
1851 # Using AppEngineHttpTarget requires
1852 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1853 # Google IAM permission for the project
1854 # and the following scope:
1855 #
1856 # `https://www.googleapis.com/auth/cloud-platform`
1857 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
1858 # task-level app_engine_routing.
1859 #
1860 # If set, `app_engine_routing_override` is used for all tasks in
1861 # the queue, no matter what the setting is for the
1862 # task-level app_engine_routing.
1863 #
1864 # Defines routing characteristics specific to App Engine - service, version,
1865 # and instance.
1866 #
1867 # For more information about services, versions, and instances see
1868 # [An Overview of App
1869 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1870 # [Microservices Architecture on Google App
1871 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1872 # [App Engine Standard request
1873 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1874 # and [App Engine Flex request
1875 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001876 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001877 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001878 # By default, the task is sent to the service which is the default
1879 # service when the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001880 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001881 # For some queues or tasks which were created using the App Engine
1882 # Task Queue API, host is not parsable
1883 # into service,
1884 # version, and
1885 # instance. For example, some tasks
1886 # which were created using the App Engine SDK use a custom domain
1887 # name; custom domains are not parsed by Cloud Tasks. If
1888 # host is not parsable, then
1889 # service,
1890 # version, and
1891 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001892 &quot;version&quot;: &quot;A String&quot;, # App version.
1893 #
1894 # By default, the task is sent to the version which is the default
1895 # version when the task is attempted.
1896 #
1897 # For some queues or tasks which were created using the App Engine
1898 # Task Queue API, host is not parsable
1899 # into service,
1900 # version, and
1901 # instance. For example, some tasks
1902 # which were created using the App Engine SDK use a custom domain
1903 # name; custom domains are not parsed by Cloud Tasks. If
1904 # host is not parsable, then
1905 # service,
1906 # version, and
1907 # instance are the empty string.
1908 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1909 #
1910 # For more information, see
1911 # [How Requests are
1912 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1913 #
1914 # The host is constructed as:
1915 #
1916 #
1917 # * `host = [application_domain_name]`&lt;/br&gt;
1918 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1919 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1920 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1921 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1922 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1923 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1924 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
1925 #
1926 # * `application_domain_name` = The domain name of the app, for
1927 # example &lt;app-id&gt;.appspot.com, which is associated with the
1928 # queue&#x27;s project ID. Some tasks which were created using the App Engine
1929 # SDK use a custom domain name.
1930 #
1931 # * `service =` service
1932 #
1933 # * `version =` version
1934 #
1935 # * `version_dot_service =`
1936 # version `+ &#x27;.&#x27; +`
1937 # service
1938 #
1939 # * `instance =` instance
1940 #
1941 # * `instance_dot_service =`
1942 # instance `+ &#x27;.&#x27; +`
1943 # service
1944 #
1945 # * `instance_dot_version =`
1946 # instance `+ &#x27;.&#x27; +`
1947 # version
1948 #
1949 # * `instance_dot_version_dot_service =`
1950 # instance `+ &#x27;.&#x27; +`
1951 # version `+ &#x27;.&#x27; +`
1952 # service
1953 #
1954 # If service is empty, then the task will be sent
1955 # to the service which is the default service when the task is attempted.
1956 #
1957 # If version is empty, then the task will be sent
1958 # to the version which is the default version when the task is attempted.
1959 #
1960 # If instance is empty, then the task
1961 # will be sent to an instance which is available when the task is
1962 # attempted.
1963 #
1964 # If service,
1965 # version, or
1966 # instance is invalid, then the task
1967 # will be sent to the default version of the default service when
1968 # the task is attempted.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001969 &quot;instance&quot;: &quot;A String&quot;, # App instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001970 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001971 # By default, the task is sent to an instance which is available when
1972 # the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001973 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001974 # Requests can only be sent to a specific instance if
1975 # [manual scaling is used in App Engine
1976 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1977 # App Engine Flex does not support instances. For more information, see
1978 # [App Engine Standard request
1979 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1980 # and [App Engine Flex request
1981 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001982 },
1983 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001984 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
1985 #
1986 # All tasks that were created before this time
1987 # were purged.
1988 #
1989 # A queue can be purged using PurgeQueue, the
1990 # [App Engine Task Queue SDK, or the Cloud
1991 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
1992 #
1993 # Purge time will be truncated to the nearest microsecond. Purge
1994 # time will be unset if the queue has never been purged.
1995 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
1996 #
1997 # `state` can only be changed by called
1998 # PauseQueue,
1999 # ResumeQueue, or uploading
2000 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2001 # UpdateQueue cannot be used to change `state`.
2002 &quot;pullTarget&quot;: { # Pull target. # Pull target.
2003 #
2004 # A pull queue is a queue that has a PullTarget.
2005 },
2006 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2007 # after which it becomes output only.
2008 #
2009 # The queue name.
2010 #
2011 # The queue name must have the following format:
2012 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2013 #
2014 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2015 # hyphens (-), colons (:), or periods (.).
2016 # For more information, see
2017 # [Identifying
2018 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2019 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2020 # The list of available locations can be obtained by calling
2021 # ListLocations.
2022 # For more information, see https://cloud.google.com/about/locations/.
2023 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2024 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002025 },
2026 ],
2027 }</pre>
2028</div>
2029
2030<div class="method">
2031 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2032 <pre>Retrieves the next page of results.
2033
2034Args:
2035 previous_request: The request for the previous page. (required)
2036 previous_response: The response from the request for the previous page. (required)
2037
2038Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002039 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002040 page. Returns None if there are no more items in the collection.
2041 </pre>
2042</div>
2043
2044<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002045 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002046 <pre>Updates a queue.
2047
2048This method creates the queue if it does not exist and updates
2049the queue if it does exist.
2050
2051Queues created with this method allow tasks to live for a maximum of 31
2052days. After a task is 31 days old, the task will be deleted regardless of whether
2053it was dispatched or not.
2054
2055WARNING: Using this method may have unintended side effects if you are
2056using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
2057Read
2058[Overview of Queue Management and
2059queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
2060this method.
2061
2062Args:
2063 name: string, Caller-specified and required in CreateQueue,
2064after which it becomes output only.
2065
2066The queue name.
2067
2068The queue name must have the following format:
2069`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2070
2071* `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2072 hyphens (-), colons (:), or periods (.).
2073 For more information, see
2074 [Identifying
2075 projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -07002076* `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002077 The list of available locations can be obtained by calling
2078 ListLocations.
2079 For more information, see https://cloud.google.com/about/locations/.
2080* `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2081 hyphens (-). The maximum length is 100 characters. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002082 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002083 The object takes the form of:
2084
2085{ # A queue is a container of related tasks. Queues are configured to manage
2086 # how those tasks are dispatched. Configurable properties include rate limits,
2087 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07002088 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2089 #
2090 # rate_limits and
2091 # retry_config are related because they both
2092 # control task attempts however they control how tasks are
2093 # attempted in different ways:
2094 #
2095 # * rate_limits controls the total rate of
2096 # dispatches from a queue (i.e. all traffic dispatched from the
2097 # queue, regardless of whether the dispatch is from a first
2098 # attempt or a retry).
2099 # * retry_config controls what happens to
2100 # particular a task after its first attempt fails. That is,
2101 # retry_config controls task retries (the
2102 # second attempt, third attempt, etc).
2103 #
2104 # This message determines the maximum rate that tasks can be dispatched by a
2105 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2106 #
2107 # Note: The debugging command, RunTask, will run a task
2108 # even if the queue has reached its RateLimits.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002109 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2110 # to be dispatched for this queue. After this threshold has been
2111 # reached, Cloud Tasks stops dispatching tasks until the number of
2112 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002113 #
2114 # If unspecified when the queue is created, Cloud Tasks will pick the
2115 # default.
2116 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002117 #
2118 # The maximum allowed value is 5,000.
2119 #
2120 # This field is output only for
2121 # pull queues and always -1, which indicates no limit. No other
2122 # queue types can have `max_concurrent_tasks` set to -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002123 #
2124 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002125 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002126 # [max_concurrent_requests in
2127 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -07002128 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002129 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002130 # Max burst size limits how fast tasks in queue are processed when
2131 # many tasks are in the queue and the rate is high. This field
2132 # allows the queue to have a high rate so processing starts shortly
2133 # after a task is enqueued, but still limits resource usage when
2134 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002135 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002136 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2137 # algorithm is used to control the rate of task dispatches. Each
2138 # queue has a token bucket that holds tokens, up to the maximum
2139 # specified by `max_burst_size`. Each time a task is dispatched, a
2140 # token is removed from the bucket. Tasks will be dispatched until
2141 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2142 # continuously refilled with new tokens based on
2143 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002144 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002145 # Cloud Tasks will pick the value of `max_burst_size` based on the
2146 # value of
2147 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002148 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002149 # For App Engine queues that were created or updated using
2150 # `queue.yaml/xml`, `max_burst_size` is equal to
2151 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2152 # Since `max_burst_size` is output only, if
2153 # UpdateQueue is called on a queue
2154 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2155 # on the value of
2156 # max_tasks_dispatched_per_second,
2157 # regardless of whether
2158 # max_tasks_dispatched_per_second
2159 # is updated.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002160 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002161 #
2162 # If unspecified when the queue is created, Cloud Tasks will pick the
2163 # default.
2164 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002165 # * For App Engine queues, the maximum allowed value
2166 # is 500.
2167 # * This field is output only for pull queues. In addition to the
2168 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
2169 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002170 #
2171 #
2172 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002173 # [rate in
2174 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
Bu Sun Kim65020912020-05-20 12:08:20 -07002175 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002176 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim65020912020-05-20 12:08:20 -07002177 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002178 # * For tasks created using Cloud Tasks: the queue-level retry settings
2179 # apply to all tasks in the queue that were created using Cloud Tasks.
2180 # Retry settings cannot be set on individual tasks.
2181 # * For tasks created using the App Engine SDK: the queue-level retry
2182 # settings apply to all tasks in the queue which do not have retry settings
2183 # explicitly set on the task and were created by the App Engine SDK. See
2184 # [App Engine
2185 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2186 #
2187 # These settings determine how a failed task attempt is retried.
2188 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2189 #
2190 # A task&#x27;s retry interval starts at
2191 # min_backoff, then doubles
2192 # `max_doublings` times, then increases linearly, and finally
2193 # retries at intervals of
2194 # max_backoff up to
2195 # max_attempts times.
2196 #
2197 # For example, if min_backoff is 10s,
2198 # max_backoff is 300s, and
2199 # `max_doublings` is 3, then the a task will first be retried in
2200 # 10s. The retry interval will double three times, and then
2201 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2202 # intervals of max_backoff until the
2203 # task has been attempted max_attempts
2204 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2205 # 240s, 300s, 300s, ....
2206 #
2207 # If unspecified when the queue is created, Cloud Tasks will pick the
2208 # default.
2209 #
2210 # This field is output only for pull queues.
2211 #
2212 #
2213 # This field has the same meaning as
2214 # [max_doublings in
2215 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2216 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2217 # min_backoff and
2218 # max_backoff duration after it fails,
2219 # if the queue&#x27;s RetryConfig specifies that the task should be
2220 # retried.
2221 #
2222 # If unspecified when the queue is created, Cloud Tasks will pick the
2223 # default.
2224 #
2225 # This field is output only for pull queues.
2226 #
2227 #
2228 # `min_backoff` will be truncated to the nearest second.
2229 #
2230 # This field has the same meaning as
2231 # [min_backoff_seconds in
2232 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2233 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2234 # retrying a failed task, measured from when the task was first
2235 # attempted. Once `max_retry_duration` time has passed *and* the
2236 # task has been attempted max_attempts
2237 # times, no further attempts will be made and the task will be
2238 # deleted.
2239 #
2240 # If zero, then the task age is unlimited.
2241 #
2242 # If unspecified when the queue is created, Cloud Tasks will pick the
2243 # default.
2244 #
2245 # This field is output only for pull queues.
2246 #
2247 #
2248 # `max_retry_duration` will be truncated to the nearest second.
2249 #
2250 # This field has the same meaning as
2251 # [task_age_limit in
2252 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2253 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
2254 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
2255 #
2256 # Cloud Tasks will attempt the task `max_attempts` times (that
2257 # is, if the first attempt fails, then there will be
2258 # `max_attempts - 1` retries). Must be &gt; 0.
2259 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2260 # min_backoff and
2261 # max_backoff duration after it fails,
2262 # if the queue&#x27;s RetryConfig specifies that the task should be
2263 # retried.
2264 #
2265 # If unspecified when the queue is created, Cloud Tasks will pick the
2266 # default.
2267 #
2268 # This field is output only for pull queues.
2269 #
2270 #
2271 # `max_backoff` will be truncated to the nearest second.
2272 #
2273 # This field has the same meaning as
2274 # [max_backoff_seconds in
2275 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002276 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002277 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
2278 #
2279 # An App Engine queue is a queue that has an AppEngineHttpTarget.
2280 #
2281 # The task will be delivered to the App Engine application hostname
2282 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
2283 # The documentation for AppEngineHttpRequest explains how the
2284 # task&#x27;s host URL is constructed.
2285 #
2286 # Using AppEngineHttpTarget requires
2287 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2288 # Google IAM permission for the project
2289 # and the following scope:
2290 #
2291 # `https://www.googleapis.com/auth/cloud-platform`
2292 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
2293 # task-level app_engine_routing.
2294 #
2295 # If set, `app_engine_routing_override` is used for all tasks in
2296 # the queue, no matter what the setting is for the
2297 # task-level app_engine_routing.
2298 #
2299 # Defines routing characteristics specific to App Engine - service, version,
2300 # and instance.
2301 #
2302 # For more information about services, versions, and instances see
2303 # [An Overview of App
2304 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2305 # [Microservices Architecture on Google App
2306 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2307 # [App Engine Standard request
2308 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2309 # and [App Engine Flex request
2310 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002311 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002312 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002313 # By default, the task is sent to the service which is the default
2314 # service when the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002315 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002316 # For some queues or tasks which were created using the App Engine
2317 # Task Queue API, host is not parsable
2318 # into service,
2319 # version, and
2320 # instance. For example, some tasks
2321 # which were created using the App Engine SDK use a custom domain
2322 # name; custom domains are not parsed by Cloud Tasks. If
2323 # host is not parsable, then
2324 # service,
2325 # version, and
2326 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002327 &quot;version&quot;: &quot;A String&quot;, # App version.
2328 #
2329 # By default, the task is sent to the version which is the default
2330 # version when the task is attempted.
2331 #
2332 # For some queues or tasks which were created using the App Engine
2333 # Task Queue API, host is not parsable
2334 # into service,
2335 # version, and
2336 # instance. For example, some tasks
2337 # which were created using the App Engine SDK use a custom domain
2338 # name; custom domains are not parsed by Cloud Tasks. If
2339 # host is not parsable, then
2340 # service,
2341 # version, and
2342 # instance are the empty string.
2343 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2344 #
2345 # For more information, see
2346 # [How Requests are
2347 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2348 #
2349 # The host is constructed as:
2350 #
2351 #
2352 # * `host = [application_domain_name]`&lt;/br&gt;
2353 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2354 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2355 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2356 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2357 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2358 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2359 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
2360 #
2361 # * `application_domain_name` = The domain name of the app, for
2362 # example &lt;app-id&gt;.appspot.com, which is associated with the
2363 # queue&#x27;s project ID. Some tasks which were created using the App Engine
2364 # SDK use a custom domain name.
2365 #
2366 # * `service =` service
2367 #
2368 # * `version =` version
2369 #
2370 # * `version_dot_service =`
2371 # version `+ &#x27;.&#x27; +`
2372 # service
2373 #
2374 # * `instance =` instance
2375 #
2376 # * `instance_dot_service =`
2377 # instance `+ &#x27;.&#x27; +`
2378 # service
2379 #
2380 # * `instance_dot_version =`
2381 # instance `+ &#x27;.&#x27; +`
2382 # version
2383 #
2384 # * `instance_dot_version_dot_service =`
2385 # instance `+ &#x27;.&#x27; +`
2386 # version `+ &#x27;.&#x27; +`
2387 # service
2388 #
2389 # If service is empty, then the task will be sent
2390 # to the service which is the default service when the task is attempted.
2391 #
2392 # If version is empty, then the task will be sent
2393 # to the version which is the default version when the task is attempted.
2394 #
2395 # If instance is empty, then the task
2396 # will be sent to an instance which is available when the task is
2397 # attempted.
2398 #
2399 # If service,
2400 # version, or
2401 # instance is invalid, then the task
2402 # will be sent to the default version of the default service when
2403 # the task is attempted.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002404 &quot;instance&quot;: &quot;A String&quot;, # App instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002405 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002406 # By default, the task is sent to an instance which is available when
2407 # the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002408 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002409 # Requests can only be sent to a specific instance if
2410 # [manual scaling is used in App Engine
2411 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2412 # App Engine Flex does not support instances. For more information, see
2413 # [App Engine Standard request
2414 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2415 # and [App Engine Flex request
2416 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002417 },
2418 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002419 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
2420 #
2421 # All tasks that were created before this time
2422 # were purged.
2423 #
2424 # A queue can be purged using PurgeQueue, the
2425 # [App Engine Task Queue SDK, or the Cloud
2426 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2427 #
2428 # Purge time will be truncated to the nearest microsecond. Purge
2429 # time will be unset if the queue has never been purged.
2430 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2431 #
2432 # `state` can only be changed by called
2433 # PauseQueue,
2434 # ResumeQueue, or uploading
2435 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2436 # UpdateQueue cannot be used to change `state`.
2437 &quot;pullTarget&quot;: { # Pull target. # Pull target.
2438 #
2439 # A pull queue is a queue that has a PullTarget.
2440 },
2441 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2442 # after which it becomes output only.
2443 #
2444 # The queue name.
2445 #
2446 # The queue name must have the following format:
2447 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2448 #
2449 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2450 # hyphens (-), colons (:), or periods (.).
2451 # For more information, see
2452 # [Identifying
2453 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2454 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2455 # The list of available locations can be obtained by calling
2456 # ListLocations.
2457 # For more information, see https://cloud.google.com/about/locations/.
2458 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2459 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002460}
2461
2462 updateMask: string, A mask used to specify which fields of the queue are being updated.
2463
2464If empty, then all fields will be updated.
2465 x__xgafv: string, V1 error format.
2466 Allowed values
2467 1 - v1 error format
2468 2 - v2 error format
2469
2470Returns:
2471 An object of the form:
2472
2473 { # A queue is a container of related tasks. Queues are configured to manage
2474 # how those tasks are dispatched. Configurable properties include rate limits,
2475 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07002476 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2477 #
2478 # rate_limits and
2479 # retry_config are related because they both
2480 # control task attempts however they control how tasks are
2481 # attempted in different ways:
2482 #
2483 # * rate_limits controls the total rate of
2484 # dispatches from a queue (i.e. all traffic dispatched from the
2485 # queue, regardless of whether the dispatch is from a first
2486 # attempt or a retry).
2487 # * retry_config controls what happens to
2488 # particular a task after its first attempt fails. That is,
2489 # retry_config controls task retries (the
2490 # second attempt, third attempt, etc).
2491 #
2492 # This message determines the maximum rate that tasks can be dispatched by a
2493 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2494 #
2495 # Note: The debugging command, RunTask, will run a task
2496 # even if the queue has reached its RateLimits.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002497 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2498 # to be dispatched for this queue. After this threshold has been
2499 # reached, Cloud Tasks stops dispatching tasks until the number of
2500 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002501 #
2502 # If unspecified when the queue is created, Cloud Tasks will pick the
2503 # default.
2504 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002505 #
2506 # The maximum allowed value is 5,000.
2507 #
2508 # This field is output only for
2509 # pull queues and always -1, which indicates no limit. No other
2510 # queue types can have `max_concurrent_tasks` set to -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002511 #
2512 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002513 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002514 # [max_concurrent_requests in
2515 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -07002516 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002517 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002518 # Max burst size limits how fast tasks in queue are processed when
2519 # many tasks are in the queue and the rate is high. This field
2520 # allows the queue to have a high rate so processing starts shortly
2521 # after a task is enqueued, but still limits resource usage when
2522 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002523 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002524 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2525 # algorithm is used to control the rate of task dispatches. Each
2526 # queue has a token bucket that holds tokens, up to the maximum
2527 # specified by `max_burst_size`. Each time a task is dispatched, a
2528 # token is removed from the bucket. Tasks will be dispatched until
2529 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2530 # continuously refilled with new tokens based on
2531 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002532 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002533 # Cloud Tasks will pick the value of `max_burst_size` based on the
2534 # value of
2535 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002536 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002537 # For App Engine queues that were created or updated using
2538 # `queue.yaml/xml`, `max_burst_size` is equal to
2539 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2540 # Since `max_burst_size` is output only, if
2541 # UpdateQueue is called on a queue
2542 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2543 # on the value of
2544 # max_tasks_dispatched_per_second,
2545 # regardless of whether
2546 # max_tasks_dispatched_per_second
2547 # is updated.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002548 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002549 #
2550 # If unspecified when the queue is created, Cloud Tasks will pick the
2551 # default.
2552 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002553 # * For App Engine queues, the maximum allowed value
2554 # is 500.
2555 # * This field is output only for pull queues. In addition to the
2556 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
2557 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002558 #
2559 #
2560 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002561 # [rate in
2562 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
Bu Sun Kim65020912020-05-20 12:08:20 -07002563 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002564 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim65020912020-05-20 12:08:20 -07002565 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002566 # * For tasks created using Cloud Tasks: the queue-level retry settings
2567 # apply to all tasks in the queue that were created using Cloud Tasks.
2568 # Retry settings cannot be set on individual tasks.
2569 # * For tasks created using the App Engine SDK: the queue-level retry
2570 # settings apply to all tasks in the queue which do not have retry settings
2571 # explicitly set on the task and were created by the App Engine SDK. See
2572 # [App Engine
2573 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2574 #
2575 # These settings determine how a failed task attempt is retried.
2576 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2577 #
2578 # A task&#x27;s retry interval starts at
2579 # min_backoff, then doubles
2580 # `max_doublings` times, then increases linearly, and finally
2581 # retries at intervals of
2582 # max_backoff up to
2583 # max_attempts times.
2584 #
2585 # For example, if min_backoff is 10s,
2586 # max_backoff is 300s, and
2587 # `max_doublings` is 3, then the a task will first be retried in
2588 # 10s. The retry interval will double three times, and then
2589 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2590 # intervals of max_backoff until the
2591 # task has been attempted max_attempts
2592 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2593 # 240s, 300s, 300s, ....
2594 #
2595 # If unspecified when the queue is created, Cloud Tasks will pick the
2596 # default.
2597 #
2598 # This field is output only for pull queues.
2599 #
2600 #
2601 # This field has the same meaning as
2602 # [max_doublings in
2603 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2604 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2605 # min_backoff and
2606 # max_backoff duration after it fails,
2607 # if the queue&#x27;s RetryConfig specifies that the task should be
2608 # retried.
2609 #
2610 # If unspecified when the queue is created, Cloud Tasks will pick the
2611 # default.
2612 #
2613 # This field is output only for pull queues.
2614 #
2615 #
2616 # `min_backoff` will be truncated to the nearest second.
2617 #
2618 # This field has the same meaning as
2619 # [min_backoff_seconds in
2620 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2621 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2622 # retrying a failed task, measured from when the task was first
2623 # attempted. Once `max_retry_duration` time has passed *and* the
2624 # task has been attempted max_attempts
2625 # times, no further attempts will be made and the task will be
2626 # deleted.
2627 #
2628 # If zero, then the task age is unlimited.
2629 #
2630 # If unspecified when the queue is created, Cloud Tasks will pick the
2631 # default.
2632 #
2633 # This field is output only for pull queues.
2634 #
2635 #
2636 # `max_retry_duration` will be truncated to the nearest second.
2637 #
2638 # This field has the same meaning as
2639 # [task_age_limit in
2640 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2641 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
2642 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
2643 #
2644 # Cloud Tasks will attempt the task `max_attempts` times (that
2645 # is, if the first attempt fails, then there will be
2646 # `max_attempts - 1` retries). Must be &gt; 0.
2647 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2648 # min_backoff and
2649 # max_backoff duration after it fails,
2650 # if the queue&#x27;s RetryConfig specifies that the task should be
2651 # retried.
2652 #
2653 # If unspecified when the queue is created, Cloud Tasks will pick the
2654 # default.
2655 #
2656 # This field is output only for pull queues.
2657 #
2658 #
2659 # `max_backoff` will be truncated to the nearest second.
2660 #
2661 # This field has the same meaning as
2662 # [max_backoff_seconds in
2663 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002664 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002665 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
2666 #
2667 # An App Engine queue is a queue that has an AppEngineHttpTarget.
2668 #
2669 # The task will be delivered to the App Engine application hostname
2670 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
2671 # The documentation for AppEngineHttpRequest explains how the
2672 # task&#x27;s host URL is constructed.
2673 #
2674 # Using AppEngineHttpTarget requires
2675 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2676 # Google IAM permission for the project
2677 # and the following scope:
2678 #
2679 # `https://www.googleapis.com/auth/cloud-platform`
2680 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
2681 # task-level app_engine_routing.
2682 #
2683 # If set, `app_engine_routing_override` is used for all tasks in
2684 # the queue, no matter what the setting is for the
2685 # task-level app_engine_routing.
2686 #
2687 # Defines routing characteristics specific to App Engine - service, version,
2688 # and instance.
2689 #
2690 # For more information about services, versions, and instances see
2691 # [An Overview of App
2692 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2693 # [Microservices Architecture on Google App
2694 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2695 # [App Engine Standard request
2696 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2697 # and [App Engine Flex request
2698 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002699 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002700 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002701 # By default, the task is sent to the service which is the default
2702 # service when the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002703 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002704 # For some queues or tasks which were created using the App Engine
2705 # Task Queue API, host is not parsable
2706 # into service,
2707 # version, and
2708 # instance. For example, some tasks
2709 # which were created using the App Engine SDK use a custom domain
2710 # name; custom domains are not parsed by Cloud Tasks. If
2711 # host is not parsable, then
2712 # service,
2713 # version, and
2714 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002715 &quot;version&quot;: &quot;A String&quot;, # App version.
2716 #
2717 # By default, the task is sent to the version which is the default
2718 # version when the task is attempted.
2719 #
2720 # For some queues or tasks which were created using the App Engine
2721 # Task Queue API, host is not parsable
2722 # into service,
2723 # version, and
2724 # instance. For example, some tasks
2725 # which were created using the App Engine SDK use a custom domain
2726 # name; custom domains are not parsed by Cloud Tasks. If
2727 # host is not parsable, then
2728 # service,
2729 # version, and
2730 # instance are the empty string.
2731 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2732 #
2733 # For more information, see
2734 # [How Requests are
2735 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2736 #
2737 # The host is constructed as:
2738 #
2739 #
2740 # * `host = [application_domain_name]`&lt;/br&gt;
2741 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2742 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2743 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2744 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2745 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2746 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2747 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
2748 #
2749 # * `application_domain_name` = The domain name of the app, for
2750 # example &lt;app-id&gt;.appspot.com, which is associated with the
2751 # queue&#x27;s project ID. Some tasks which were created using the App Engine
2752 # SDK use a custom domain name.
2753 #
2754 # * `service =` service
2755 #
2756 # * `version =` version
2757 #
2758 # * `version_dot_service =`
2759 # version `+ &#x27;.&#x27; +`
2760 # service
2761 #
2762 # * `instance =` instance
2763 #
2764 # * `instance_dot_service =`
2765 # instance `+ &#x27;.&#x27; +`
2766 # service
2767 #
2768 # * `instance_dot_version =`
2769 # instance `+ &#x27;.&#x27; +`
2770 # version
2771 #
2772 # * `instance_dot_version_dot_service =`
2773 # instance `+ &#x27;.&#x27; +`
2774 # version `+ &#x27;.&#x27; +`
2775 # service
2776 #
2777 # If service is empty, then the task will be sent
2778 # to the service which is the default service when the task is attempted.
2779 #
2780 # If version is empty, then the task will be sent
2781 # to the version which is the default version when the task is attempted.
2782 #
2783 # If instance is empty, then the task
2784 # will be sent to an instance which is available when the task is
2785 # attempted.
2786 #
2787 # If service,
2788 # version, or
2789 # instance is invalid, then the task
2790 # will be sent to the default version of the default service when
2791 # the task is attempted.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002792 &quot;instance&quot;: &quot;A String&quot;, # App instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002793 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002794 # By default, the task is sent to an instance which is available when
2795 # the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002796 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002797 # Requests can only be sent to a specific instance if
2798 # [manual scaling is used in App Engine
2799 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2800 # App Engine Flex does not support instances. For more information, see
2801 # [App Engine Standard request
2802 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2803 # and [App Engine Flex request
2804 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002805 },
2806 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002807 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
2808 #
2809 # All tasks that were created before this time
2810 # were purged.
2811 #
2812 # A queue can be purged using PurgeQueue, the
2813 # [App Engine Task Queue SDK, or the Cloud
2814 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2815 #
2816 # Purge time will be truncated to the nearest microsecond. Purge
2817 # time will be unset if the queue has never been purged.
2818 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2819 #
2820 # `state` can only be changed by called
2821 # PauseQueue,
2822 # ResumeQueue, or uploading
2823 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2824 # UpdateQueue cannot be used to change `state`.
2825 &quot;pullTarget&quot;: { # Pull target. # Pull target.
2826 #
2827 # A pull queue is a queue that has a PullTarget.
2828 },
2829 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2830 # after which it becomes output only.
2831 #
2832 # The queue name.
2833 #
2834 # The queue name must have the following format:
2835 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2836 #
2837 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2838 # hyphens (-), colons (:), or periods (.).
2839 # For more information, see
2840 # [Identifying
2841 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2842 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2843 # The list of available locations can be obtained by calling
2844 # ListLocations.
2845 # For more information, see https://cloud.google.com/about/locations/.
2846 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2847 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002848 }</pre>
2849</div>
2850
2851<div class="method">
2852 <code class="details" id="pause">pause(name, body=None, x__xgafv=None)</code>
2853 <pre>Pauses the queue.
2854
2855If a queue is paused then the system will stop dispatching tasks
2856until the queue is resumed via
2857ResumeQueue. Tasks can still be added
2858when the queue is paused. A queue is paused if its
2859state is PAUSED.
2860
2861Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002862 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002863`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
2864 body: object, The request body.
2865 The object takes the form of:
2866
2867{ # Request message for PauseQueue.
2868 }
2869
2870 x__xgafv: string, V1 error format.
2871 Allowed values
2872 1 - v1 error format
2873 2 - v2 error format
2874
2875Returns:
2876 An object of the form:
2877
2878 { # A queue is a container of related tasks. Queues are configured to manage
2879 # how those tasks are dispatched. Configurable properties include rate limits,
2880 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07002881 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2882 #
2883 # rate_limits and
2884 # retry_config are related because they both
2885 # control task attempts however they control how tasks are
2886 # attempted in different ways:
2887 #
2888 # * rate_limits controls the total rate of
2889 # dispatches from a queue (i.e. all traffic dispatched from the
2890 # queue, regardless of whether the dispatch is from a first
2891 # attempt or a retry).
2892 # * retry_config controls what happens to
2893 # particular a task after its first attempt fails. That is,
2894 # retry_config controls task retries (the
2895 # second attempt, third attempt, etc).
2896 #
2897 # This message determines the maximum rate that tasks can be dispatched by a
2898 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2899 #
2900 # Note: The debugging command, RunTask, will run a task
2901 # even if the queue has reached its RateLimits.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002902 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2903 # to be dispatched for this queue. After this threshold has been
2904 # reached, Cloud Tasks stops dispatching tasks until the number of
2905 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002906 #
2907 # If unspecified when the queue is created, Cloud Tasks will pick the
2908 # default.
2909 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002910 #
2911 # The maximum allowed value is 5,000.
2912 #
2913 # This field is output only for
2914 # pull queues and always -1, which indicates no limit. No other
2915 # queue types can have `max_concurrent_tasks` set to -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002916 #
2917 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002918 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002919 # [max_concurrent_requests in
2920 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -07002921 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002922 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002923 # Max burst size limits how fast tasks in queue are processed when
2924 # many tasks are in the queue and the rate is high. This field
2925 # allows the queue to have a high rate so processing starts shortly
2926 # after a task is enqueued, but still limits resource usage when
2927 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002928 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002929 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2930 # algorithm is used to control the rate of task dispatches. Each
2931 # queue has a token bucket that holds tokens, up to the maximum
2932 # specified by `max_burst_size`. Each time a task is dispatched, a
2933 # token is removed from the bucket. Tasks will be dispatched until
2934 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2935 # continuously refilled with new tokens based on
2936 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002937 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002938 # Cloud Tasks will pick the value of `max_burst_size` based on the
2939 # value of
2940 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002941 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002942 # For App Engine queues that were created or updated using
2943 # `queue.yaml/xml`, `max_burst_size` is equal to
2944 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2945 # Since `max_burst_size` is output only, if
2946 # UpdateQueue is called on a queue
2947 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2948 # on the value of
2949 # max_tasks_dispatched_per_second,
2950 # regardless of whether
2951 # max_tasks_dispatched_per_second
2952 # is updated.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002953 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002954 #
2955 # If unspecified when the queue is created, Cloud Tasks will pick the
2956 # default.
2957 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002958 # * For App Engine queues, the maximum allowed value
2959 # is 500.
2960 # * This field is output only for pull queues. In addition to the
2961 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
2962 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002963 #
2964 #
2965 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002966 # [rate in
2967 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
Bu Sun Kim65020912020-05-20 12:08:20 -07002968 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002969 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim65020912020-05-20 12:08:20 -07002970 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002971 # * For tasks created using Cloud Tasks: the queue-level retry settings
2972 # apply to all tasks in the queue that were created using Cloud Tasks.
2973 # Retry settings cannot be set on individual tasks.
2974 # * For tasks created using the App Engine SDK: the queue-level retry
2975 # settings apply to all tasks in the queue which do not have retry settings
2976 # explicitly set on the task and were created by the App Engine SDK. See
2977 # [App Engine
2978 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2979 #
2980 # These settings determine how a failed task attempt is retried.
2981 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2982 #
2983 # A task&#x27;s retry interval starts at
2984 # min_backoff, then doubles
2985 # `max_doublings` times, then increases linearly, and finally
2986 # retries at intervals of
2987 # max_backoff up to
2988 # max_attempts times.
2989 #
2990 # For example, if min_backoff is 10s,
2991 # max_backoff is 300s, and
2992 # `max_doublings` is 3, then the a task will first be retried in
2993 # 10s. The retry interval will double three times, and then
2994 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2995 # intervals of max_backoff until the
2996 # task has been attempted max_attempts
2997 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2998 # 240s, 300s, 300s, ....
2999 #
3000 # If unspecified when the queue is created, Cloud Tasks will pick the
3001 # default.
3002 #
3003 # This field is output only for pull queues.
3004 #
3005 #
3006 # This field has the same meaning as
3007 # [max_doublings in
3008 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3009 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3010 # min_backoff and
3011 # max_backoff duration after it fails,
3012 # if the queue&#x27;s RetryConfig specifies that the task should be
3013 # retried.
3014 #
3015 # If unspecified when the queue is created, Cloud Tasks will pick the
3016 # default.
3017 #
3018 # This field is output only for pull queues.
3019 #
3020 #
3021 # `min_backoff` will be truncated to the nearest second.
3022 #
3023 # This field has the same meaning as
3024 # [min_backoff_seconds in
3025 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3026 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
3027 # retrying a failed task, measured from when the task was first
3028 # attempted. Once `max_retry_duration` time has passed *and* the
3029 # task has been attempted max_attempts
3030 # times, no further attempts will be made and the task will be
3031 # deleted.
3032 #
3033 # If zero, then the task age is unlimited.
3034 #
3035 # If unspecified when the queue is created, Cloud Tasks will pick the
3036 # default.
3037 #
3038 # This field is output only for pull queues.
3039 #
3040 #
3041 # `max_retry_duration` will be truncated to the nearest second.
3042 #
3043 # This field has the same meaning as
3044 # [task_age_limit in
3045 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3046 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
3047 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
3048 #
3049 # Cloud Tasks will attempt the task `max_attempts` times (that
3050 # is, if the first attempt fails, then there will be
3051 # `max_attempts - 1` retries). Must be &gt; 0.
3052 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3053 # min_backoff and
3054 # max_backoff duration after it fails,
3055 # if the queue&#x27;s RetryConfig specifies that the task should be
3056 # retried.
3057 #
3058 # If unspecified when the queue is created, Cloud Tasks will pick the
3059 # default.
3060 #
3061 # This field is output only for pull queues.
3062 #
3063 #
3064 # `max_backoff` will be truncated to the nearest second.
3065 #
3066 # This field has the same meaning as
3067 # [max_backoff_seconds in
3068 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003069 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003070 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
3071 #
3072 # An App Engine queue is a queue that has an AppEngineHttpTarget.
3073 #
3074 # The task will be delivered to the App Engine application hostname
3075 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
3076 # The documentation for AppEngineHttpRequest explains how the
3077 # task&#x27;s host URL is constructed.
3078 #
3079 # Using AppEngineHttpTarget requires
3080 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3081 # Google IAM permission for the project
3082 # and the following scope:
3083 #
3084 # `https://www.googleapis.com/auth/cloud-platform`
3085 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
3086 # task-level app_engine_routing.
3087 #
3088 # If set, `app_engine_routing_override` is used for all tasks in
3089 # the queue, no matter what the setting is for the
3090 # task-level app_engine_routing.
3091 #
3092 # Defines routing characteristics specific to App Engine - service, version,
3093 # and instance.
3094 #
3095 # For more information about services, versions, and instances see
3096 # [An Overview of App
3097 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3098 # [Microservices Architecture on Google App
3099 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3100 # [App Engine Standard request
3101 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3102 # and [App Engine Flex request
3103 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003104 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003105 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003106 # By default, the task is sent to the service which is the default
3107 # service when the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003108 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003109 # For some queues or tasks which were created using the App Engine
3110 # Task Queue API, host is not parsable
3111 # into service,
3112 # version, and
3113 # instance. For example, some tasks
3114 # which were created using the App Engine SDK use a custom domain
3115 # name; custom domains are not parsed by Cloud Tasks. If
3116 # host is not parsable, then
3117 # service,
3118 # version, and
3119 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003120 &quot;version&quot;: &quot;A String&quot;, # App version.
3121 #
3122 # By default, the task is sent to the version which is the default
3123 # version when the task is attempted.
3124 #
3125 # For some queues or tasks which were created using the App Engine
3126 # Task Queue API, host is not parsable
3127 # into service,
3128 # version, and
3129 # instance. For example, some tasks
3130 # which were created using the App Engine SDK use a custom domain
3131 # name; custom domains are not parsed by Cloud Tasks. If
3132 # host is not parsable, then
3133 # service,
3134 # version, and
3135 # instance are the empty string.
3136 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
3137 #
3138 # For more information, see
3139 # [How Requests are
3140 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3141 #
3142 # The host is constructed as:
3143 #
3144 #
3145 # * `host = [application_domain_name]`&lt;/br&gt;
3146 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3147 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3148 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3149 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3150 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3151 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3152 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
3153 #
3154 # * `application_domain_name` = The domain name of the app, for
3155 # example &lt;app-id&gt;.appspot.com, which is associated with the
3156 # queue&#x27;s project ID. Some tasks which were created using the App Engine
3157 # SDK use a custom domain name.
3158 #
3159 # * `service =` service
3160 #
3161 # * `version =` version
3162 #
3163 # * `version_dot_service =`
3164 # version `+ &#x27;.&#x27; +`
3165 # service
3166 #
3167 # * `instance =` instance
3168 #
3169 # * `instance_dot_service =`
3170 # instance `+ &#x27;.&#x27; +`
3171 # service
3172 #
3173 # * `instance_dot_version =`
3174 # instance `+ &#x27;.&#x27; +`
3175 # version
3176 #
3177 # * `instance_dot_version_dot_service =`
3178 # instance `+ &#x27;.&#x27; +`
3179 # version `+ &#x27;.&#x27; +`
3180 # service
3181 #
3182 # If service is empty, then the task will be sent
3183 # to the service which is the default service when the task is attempted.
3184 #
3185 # If version is empty, then the task will be sent
3186 # to the version which is the default version when the task is attempted.
3187 #
3188 # If instance is empty, then the task
3189 # will be sent to an instance which is available when the task is
3190 # attempted.
3191 #
3192 # If service,
3193 # version, or
3194 # instance is invalid, then the task
3195 # will be sent to the default version of the default service when
3196 # the task is attempted.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003197 &quot;instance&quot;: &quot;A String&quot;, # App instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003198 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003199 # By default, the task is sent to an instance which is available when
3200 # the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003201 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003202 # Requests can only be sent to a specific instance if
3203 # [manual scaling is used in App Engine
3204 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3205 # App Engine Flex does not support instances. For more information, see
3206 # [App Engine Standard request
3207 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3208 # and [App Engine Flex request
3209 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003210 },
3211 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003212 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
3213 #
3214 # All tasks that were created before this time
3215 # were purged.
3216 #
3217 # A queue can be purged using PurgeQueue, the
3218 # [App Engine Task Queue SDK, or the Cloud
3219 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
3220 #
3221 # Purge time will be truncated to the nearest microsecond. Purge
3222 # time will be unset if the queue has never been purged.
3223 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
3224 #
3225 # `state` can only be changed by called
3226 # PauseQueue,
3227 # ResumeQueue, or uploading
3228 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3229 # UpdateQueue cannot be used to change `state`.
3230 &quot;pullTarget&quot;: { # Pull target. # Pull target.
3231 #
3232 # A pull queue is a queue that has a PullTarget.
3233 },
3234 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
3235 # after which it becomes output only.
3236 #
3237 # The queue name.
3238 #
3239 # The queue name must have the following format:
3240 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
3241 #
3242 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3243 # hyphens (-), colons (:), or periods (.).
3244 # For more information, see
3245 # [Identifying
3246 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3247 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
3248 # The list of available locations can be obtained by calling
3249 # ListLocations.
3250 # For more information, see https://cloud.google.com/about/locations/.
3251 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3252 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003253 }</pre>
3254</div>
3255
3256<div class="method">
3257 <code class="details" id="purge">purge(name, body=None, x__xgafv=None)</code>
3258 <pre>Purges a queue by deleting all of its tasks.
3259
3260All tasks created before this method is called are permanently deleted.
3261
3262Purge operations can take up to one minute to take effect. Tasks
3263might be dispatched before the purge takes effect. A purge is irreversible.
3264
3265Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07003266 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003267`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
3268 body: object, The request body.
3269 The object takes the form of:
3270
3271{ # Request message for PurgeQueue.
3272 }
3273
3274 x__xgafv: string, V1 error format.
3275 Allowed values
3276 1 - v1 error format
3277 2 - v2 error format
3278
3279Returns:
3280 An object of the form:
3281
3282 { # A queue is a container of related tasks. Queues are configured to manage
3283 # how those tasks are dispatched. Configurable properties include rate limits,
3284 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07003285 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
3286 #
3287 # rate_limits and
3288 # retry_config are related because they both
3289 # control task attempts however they control how tasks are
3290 # attempted in different ways:
3291 #
3292 # * rate_limits controls the total rate of
3293 # dispatches from a queue (i.e. all traffic dispatched from the
3294 # queue, regardless of whether the dispatch is from a first
3295 # attempt or a retry).
3296 # * retry_config controls what happens to
3297 # particular a task after its first attempt fails. That is,
3298 # retry_config controls task retries (the
3299 # second attempt, third attempt, etc).
3300 #
3301 # This message determines the maximum rate that tasks can be dispatched by a
3302 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3303 #
3304 # Note: The debugging command, RunTask, will run a task
3305 # even if the queue has reached its RateLimits.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003306 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3307 # to be dispatched for this queue. After this threshold has been
3308 # reached, Cloud Tasks stops dispatching tasks until the number of
3309 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003310 #
3311 # If unspecified when the queue is created, Cloud Tasks will pick the
3312 # default.
3313 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003314 #
3315 # The maximum allowed value is 5,000.
3316 #
3317 # This field is output only for
3318 # pull queues and always -1, which indicates no limit. No other
3319 # queue types can have `max_concurrent_tasks` set to -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003320 #
3321 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003322 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003323 # [max_concurrent_requests in
3324 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -07003325 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003326 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003327 # Max burst size limits how fast tasks in queue are processed when
3328 # many tasks are in the queue and the rate is high. This field
3329 # allows the queue to have a high rate so processing starts shortly
3330 # after a task is enqueued, but still limits resource usage when
3331 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003332 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003333 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3334 # algorithm is used to control the rate of task dispatches. Each
3335 # queue has a token bucket that holds tokens, up to the maximum
3336 # specified by `max_burst_size`. Each time a task is dispatched, a
3337 # token is removed from the bucket. Tasks will be dispatched until
3338 # the queue&#x27;s bucket runs out of tokens. The bucket will be
3339 # continuously refilled with new tokens based on
3340 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003341 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003342 # Cloud Tasks will pick the value of `max_burst_size` based on the
3343 # value of
3344 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003345 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003346 # For App Engine queues that were created or updated using
3347 # `queue.yaml/xml`, `max_burst_size` is equal to
3348 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3349 # Since `max_burst_size` is output only, if
3350 # UpdateQueue is called on a queue
3351 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3352 # on the value of
3353 # max_tasks_dispatched_per_second,
3354 # regardless of whether
3355 # max_tasks_dispatched_per_second
3356 # is updated.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003357 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003358 #
3359 # If unspecified when the queue is created, Cloud Tasks will pick the
3360 # default.
3361 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003362 # * For App Engine queues, the maximum allowed value
3363 # is 500.
3364 # * This field is output only for pull queues. In addition to the
3365 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
3366 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003367 #
3368 #
3369 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003370 # [rate in
3371 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
Bu Sun Kim65020912020-05-20 12:08:20 -07003372 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003373 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim65020912020-05-20 12:08:20 -07003374 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003375 # * For tasks created using Cloud Tasks: the queue-level retry settings
3376 # apply to all tasks in the queue that were created using Cloud Tasks.
3377 # Retry settings cannot be set on individual tasks.
3378 # * For tasks created using the App Engine SDK: the queue-level retry
3379 # settings apply to all tasks in the queue which do not have retry settings
3380 # explicitly set on the task and were created by the App Engine SDK. See
3381 # [App Engine
3382 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3383 #
3384 # These settings determine how a failed task attempt is retried.
3385 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
3386 #
3387 # A task&#x27;s retry interval starts at
3388 # min_backoff, then doubles
3389 # `max_doublings` times, then increases linearly, and finally
3390 # retries at intervals of
3391 # max_backoff up to
3392 # max_attempts times.
3393 #
3394 # For example, if min_backoff is 10s,
3395 # max_backoff is 300s, and
3396 # `max_doublings` is 3, then the a task will first be retried in
3397 # 10s. The retry interval will double three times, and then
3398 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3399 # intervals of max_backoff until the
3400 # task has been attempted max_attempts
3401 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3402 # 240s, 300s, 300s, ....
3403 #
3404 # If unspecified when the queue is created, Cloud Tasks will pick the
3405 # default.
3406 #
3407 # This field is output only for pull queues.
3408 #
3409 #
3410 # This field has the same meaning as
3411 # [max_doublings in
3412 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3413 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3414 # min_backoff and
3415 # max_backoff duration after it fails,
3416 # if the queue&#x27;s RetryConfig specifies that the task should be
3417 # retried.
3418 #
3419 # If unspecified when the queue is created, Cloud Tasks will pick the
3420 # default.
3421 #
3422 # This field is output only for pull queues.
3423 #
3424 #
3425 # `min_backoff` will be truncated to the nearest second.
3426 #
3427 # This field has the same meaning as
3428 # [min_backoff_seconds in
3429 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3430 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
3431 # retrying a failed task, measured from when the task was first
3432 # attempted. Once `max_retry_duration` time has passed *and* the
3433 # task has been attempted max_attempts
3434 # times, no further attempts will be made and the task will be
3435 # deleted.
3436 #
3437 # If zero, then the task age is unlimited.
3438 #
3439 # If unspecified when the queue is created, Cloud Tasks will pick the
3440 # default.
3441 #
3442 # This field is output only for pull queues.
3443 #
3444 #
3445 # `max_retry_duration` will be truncated to the nearest second.
3446 #
3447 # This field has the same meaning as
3448 # [task_age_limit in
3449 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3450 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
3451 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
3452 #
3453 # Cloud Tasks will attempt the task `max_attempts` times (that
3454 # is, if the first attempt fails, then there will be
3455 # `max_attempts - 1` retries). Must be &gt; 0.
3456 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3457 # min_backoff and
3458 # max_backoff duration after it fails,
3459 # if the queue&#x27;s RetryConfig specifies that the task should be
3460 # retried.
3461 #
3462 # If unspecified when the queue is created, Cloud Tasks will pick the
3463 # default.
3464 #
3465 # This field is output only for pull queues.
3466 #
3467 #
3468 # `max_backoff` will be truncated to the nearest second.
3469 #
3470 # This field has the same meaning as
3471 # [max_backoff_seconds in
3472 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003473 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003474 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
3475 #
3476 # An App Engine queue is a queue that has an AppEngineHttpTarget.
3477 #
3478 # The task will be delivered to the App Engine application hostname
3479 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
3480 # The documentation for AppEngineHttpRequest explains how the
3481 # task&#x27;s host URL is constructed.
3482 #
3483 # Using AppEngineHttpTarget requires
3484 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3485 # Google IAM permission for the project
3486 # and the following scope:
3487 #
3488 # `https://www.googleapis.com/auth/cloud-platform`
3489 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
3490 # task-level app_engine_routing.
3491 #
3492 # If set, `app_engine_routing_override` is used for all tasks in
3493 # the queue, no matter what the setting is for the
3494 # task-level app_engine_routing.
3495 #
3496 # Defines routing characteristics specific to App Engine - service, version,
3497 # and instance.
3498 #
3499 # For more information about services, versions, and instances see
3500 # [An Overview of App
3501 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3502 # [Microservices Architecture on Google App
3503 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3504 # [App Engine Standard request
3505 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3506 # and [App Engine Flex request
3507 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003508 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003509 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003510 # By default, the task is sent to the service which is the default
3511 # service when the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003512 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003513 # For some queues or tasks which were created using the App Engine
3514 # Task Queue API, host is not parsable
3515 # into service,
3516 # version, and
3517 # instance. For example, some tasks
3518 # which were created using the App Engine SDK use a custom domain
3519 # name; custom domains are not parsed by Cloud Tasks. If
3520 # host is not parsable, then
3521 # service,
3522 # version, and
3523 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003524 &quot;version&quot;: &quot;A String&quot;, # App version.
3525 #
3526 # By default, the task is sent to the version which is the default
3527 # version when the task is attempted.
3528 #
3529 # For some queues or tasks which were created using the App Engine
3530 # Task Queue API, host is not parsable
3531 # into service,
3532 # version, and
3533 # instance. For example, some tasks
3534 # which were created using the App Engine SDK use a custom domain
3535 # name; custom domains are not parsed by Cloud Tasks. If
3536 # host is not parsable, then
3537 # service,
3538 # version, and
3539 # instance are the empty string.
3540 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
3541 #
3542 # For more information, see
3543 # [How Requests are
3544 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3545 #
3546 # The host is constructed as:
3547 #
3548 #
3549 # * `host = [application_domain_name]`&lt;/br&gt;
3550 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3551 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3552 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3553 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3554 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3555 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3556 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
3557 #
3558 # * `application_domain_name` = The domain name of the app, for
3559 # example &lt;app-id&gt;.appspot.com, which is associated with the
3560 # queue&#x27;s project ID. Some tasks which were created using the App Engine
3561 # SDK use a custom domain name.
3562 #
3563 # * `service =` service
3564 #
3565 # * `version =` version
3566 #
3567 # * `version_dot_service =`
3568 # version `+ &#x27;.&#x27; +`
3569 # service
3570 #
3571 # * `instance =` instance
3572 #
3573 # * `instance_dot_service =`
3574 # instance `+ &#x27;.&#x27; +`
3575 # service
3576 #
3577 # * `instance_dot_version =`
3578 # instance `+ &#x27;.&#x27; +`
3579 # version
3580 #
3581 # * `instance_dot_version_dot_service =`
3582 # instance `+ &#x27;.&#x27; +`
3583 # version `+ &#x27;.&#x27; +`
3584 # service
3585 #
3586 # If service is empty, then the task will be sent
3587 # to the service which is the default service when the task is attempted.
3588 #
3589 # If version is empty, then the task will be sent
3590 # to the version which is the default version when the task is attempted.
3591 #
3592 # If instance is empty, then the task
3593 # will be sent to an instance which is available when the task is
3594 # attempted.
3595 #
3596 # If service,
3597 # version, or
3598 # instance is invalid, then the task
3599 # will be sent to the default version of the default service when
3600 # the task is attempted.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003601 &quot;instance&quot;: &quot;A String&quot;, # App instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003602 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003603 # By default, the task is sent to an instance which is available when
3604 # the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003605 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003606 # Requests can only be sent to a specific instance if
3607 # [manual scaling is used in App Engine
3608 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3609 # App Engine Flex does not support instances. For more information, see
3610 # [App Engine Standard request
3611 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3612 # and [App Engine Flex request
3613 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003614 },
3615 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003616 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
3617 #
3618 # All tasks that were created before this time
3619 # were purged.
3620 #
3621 # A queue can be purged using PurgeQueue, the
3622 # [App Engine Task Queue SDK, or the Cloud
3623 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
3624 #
3625 # Purge time will be truncated to the nearest microsecond. Purge
3626 # time will be unset if the queue has never been purged.
3627 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
3628 #
3629 # `state` can only be changed by called
3630 # PauseQueue,
3631 # ResumeQueue, or uploading
3632 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3633 # UpdateQueue cannot be used to change `state`.
3634 &quot;pullTarget&quot;: { # Pull target. # Pull target.
3635 #
3636 # A pull queue is a queue that has a PullTarget.
3637 },
3638 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
3639 # after which it becomes output only.
3640 #
3641 # The queue name.
3642 #
3643 # The queue name must have the following format:
3644 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
3645 #
3646 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3647 # hyphens (-), colons (:), or periods (.).
3648 # For more information, see
3649 # [Identifying
3650 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3651 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
3652 # The list of available locations can be obtained by calling
3653 # ListLocations.
3654 # For more information, see https://cloud.google.com/about/locations/.
3655 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3656 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003657 }</pre>
3658</div>
3659
3660<div class="method">
3661 <code class="details" id="resume">resume(name, body=None, x__xgafv=None)</code>
3662 <pre>Resume a queue.
3663
3664This method resumes a queue after it has been
3665PAUSED or
3666DISABLED. The state of a queue is stored
Bu Sun Kim65020912020-05-20 12:08:20 -07003667in the queue&#x27;s state; after calling this method it
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003668will be set to RUNNING.
3669
3670WARNING: Resuming many high-QPS queues at the same time can
3671lead to target overloading. If you are resuming high-QPS
3672queues, follow the 500/50/5 pattern described in
3673[Managing Cloud Tasks Scaling
3674Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
3675
3676Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07003677 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003678`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
3679 body: object, The request body.
3680 The object takes the form of:
3681
3682{ # Request message for ResumeQueue.
3683 }
3684
3685 x__xgafv: string, V1 error format.
3686 Allowed values
3687 1 - v1 error format
3688 2 - v2 error format
3689
3690Returns:
3691 An object of the form:
3692
3693 { # A queue is a container of related tasks. Queues are configured to manage
3694 # how those tasks are dispatched. Configurable properties include rate limits,
3695 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07003696 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
3697 #
3698 # rate_limits and
3699 # retry_config are related because they both
3700 # control task attempts however they control how tasks are
3701 # attempted in different ways:
3702 #
3703 # * rate_limits controls the total rate of
3704 # dispatches from a queue (i.e. all traffic dispatched from the
3705 # queue, regardless of whether the dispatch is from a first
3706 # attempt or a retry).
3707 # * retry_config controls what happens to
3708 # particular a task after its first attempt fails. That is,
3709 # retry_config controls task retries (the
3710 # second attempt, third attempt, etc).
3711 #
3712 # This message determines the maximum rate that tasks can be dispatched by a
3713 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3714 #
3715 # Note: The debugging command, RunTask, will run a task
3716 # even if the queue has reached its RateLimits.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003717 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3718 # to be dispatched for this queue. After this threshold has been
3719 # reached, Cloud Tasks stops dispatching tasks until the number of
3720 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003721 #
3722 # If unspecified when the queue is created, Cloud Tasks will pick the
3723 # default.
3724 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003725 #
3726 # The maximum allowed value is 5,000.
3727 #
3728 # This field is output only for
3729 # pull queues and always -1, which indicates no limit. No other
3730 # queue types can have `max_concurrent_tasks` set to -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003731 #
3732 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003733 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003734 # [max_concurrent_requests in
3735 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -07003736 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003737 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003738 # Max burst size limits how fast tasks in queue are processed when
3739 # many tasks are in the queue and the rate is high. This field
3740 # allows the queue to have a high rate so processing starts shortly
3741 # after a task is enqueued, but still limits resource usage when
3742 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003743 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003744 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3745 # algorithm is used to control the rate of task dispatches. Each
3746 # queue has a token bucket that holds tokens, up to the maximum
3747 # specified by `max_burst_size`. Each time a task is dispatched, a
3748 # token is removed from the bucket. Tasks will be dispatched until
3749 # the queue&#x27;s bucket runs out of tokens. The bucket will be
3750 # continuously refilled with new tokens based on
3751 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003752 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003753 # Cloud Tasks will pick the value of `max_burst_size` based on the
3754 # value of
3755 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003756 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003757 # For App Engine queues that were created or updated using
3758 # `queue.yaml/xml`, `max_burst_size` is equal to
3759 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3760 # Since `max_burst_size` is output only, if
3761 # UpdateQueue is called on a queue
3762 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3763 # on the value of
3764 # max_tasks_dispatched_per_second,
3765 # regardless of whether
3766 # max_tasks_dispatched_per_second
3767 # is updated.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003768 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003769 #
3770 # If unspecified when the queue is created, Cloud Tasks will pick the
3771 # default.
3772 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003773 # * For App Engine queues, the maximum allowed value
3774 # is 500.
3775 # * This field is output only for pull queues. In addition to the
3776 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
3777 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003778 #
3779 #
3780 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003781 # [rate in
3782 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
Bu Sun Kim65020912020-05-20 12:08:20 -07003783 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003784 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim65020912020-05-20 12:08:20 -07003785 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003786 # * For tasks created using Cloud Tasks: the queue-level retry settings
3787 # apply to all tasks in the queue that were created using Cloud Tasks.
3788 # Retry settings cannot be set on individual tasks.
3789 # * For tasks created using the App Engine SDK: the queue-level retry
3790 # settings apply to all tasks in the queue which do not have retry settings
3791 # explicitly set on the task and were created by the App Engine SDK. See
3792 # [App Engine
3793 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3794 #
3795 # These settings determine how a failed task attempt is retried.
3796 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
3797 #
3798 # A task&#x27;s retry interval starts at
3799 # min_backoff, then doubles
3800 # `max_doublings` times, then increases linearly, and finally
3801 # retries at intervals of
3802 # max_backoff up to
3803 # max_attempts times.
3804 #
3805 # For example, if min_backoff is 10s,
3806 # max_backoff is 300s, and
3807 # `max_doublings` is 3, then the a task will first be retried in
3808 # 10s. The retry interval will double three times, and then
3809 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3810 # intervals of max_backoff until the
3811 # task has been attempted max_attempts
3812 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3813 # 240s, 300s, 300s, ....
3814 #
3815 # If unspecified when the queue is created, Cloud Tasks will pick the
3816 # default.
3817 #
3818 # This field is output only for pull queues.
3819 #
3820 #
3821 # This field has the same meaning as
3822 # [max_doublings in
3823 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3824 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3825 # min_backoff and
3826 # max_backoff duration after it fails,
3827 # if the queue&#x27;s RetryConfig specifies that the task should be
3828 # retried.
3829 #
3830 # If unspecified when the queue is created, Cloud Tasks will pick the
3831 # default.
3832 #
3833 # This field is output only for pull queues.
3834 #
3835 #
3836 # `min_backoff` will be truncated to the nearest second.
3837 #
3838 # This field has the same meaning as
3839 # [min_backoff_seconds in
3840 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3841 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
3842 # retrying a failed task, measured from when the task was first
3843 # attempted. Once `max_retry_duration` time has passed *and* the
3844 # task has been attempted max_attempts
3845 # times, no further attempts will be made and the task will be
3846 # deleted.
3847 #
3848 # If zero, then the task age is unlimited.
3849 #
3850 # If unspecified when the queue is created, Cloud Tasks will pick the
3851 # default.
3852 #
3853 # This field is output only for pull queues.
3854 #
3855 #
3856 # `max_retry_duration` will be truncated to the nearest second.
3857 #
3858 # This field has the same meaning as
3859 # [task_age_limit in
3860 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3861 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
3862 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
3863 #
3864 # Cloud Tasks will attempt the task `max_attempts` times (that
3865 # is, if the first attempt fails, then there will be
3866 # `max_attempts - 1` retries). Must be &gt; 0.
3867 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3868 # min_backoff and
3869 # max_backoff duration after it fails,
3870 # if the queue&#x27;s RetryConfig specifies that the task should be
3871 # retried.
3872 #
3873 # If unspecified when the queue is created, Cloud Tasks will pick the
3874 # default.
3875 #
3876 # This field is output only for pull queues.
3877 #
3878 #
3879 # `max_backoff` will be truncated to the nearest second.
3880 #
3881 # This field has the same meaning as
3882 # [max_backoff_seconds in
3883 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003884 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003885 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
3886 #
3887 # An App Engine queue is a queue that has an AppEngineHttpTarget.
3888 #
3889 # The task will be delivered to the App Engine application hostname
3890 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
3891 # The documentation for AppEngineHttpRequest explains how the
3892 # task&#x27;s host URL is constructed.
3893 #
3894 # Using AppEngineHttpTarget requires
3895 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3896 # Google IAM permission for the project
3897 # and the following scope:
3898 #
3899 # `https://www.googleapis.com/auth/cloud-platform`
3900 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
3901 # task-level app_engine_routing.
3902 #
3903 # If set, `app_engine_routing_override` is used for all tasks in
3904 # the queue, no matter what the setting is for the
3905 # task-level app_engine_routing.
3906 #
3907 # Defines routing characteristics specific to App Engine - service, version,
3908 # and instance.
3909 #
3910 # For more information about services, versions, and instances see
3911 # [An Overview of App
3912 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3913 # [Microservices Architecture on Google App
3914 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3915 # [App Engine Standard request
3916 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3917 # and [App Engine Flex request
3918 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003919 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003920 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003921 # By default, the task is sent to the service which is the default
3922 # service when the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003923 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003924 # For some queues or tasks which were created using the App Engine
3925 # Task Queue API, host is not parsable
3926 # into service,
3927 # version, and
3928 # instance. For example, some tasks
3929 # which were created using the App Engine SDK use a custom domain
3930 # name; custom domains are not parsed by Cloud Tasks. If
3931 # host is not parsable, then
3932 # service,
3933 # version, and
3934 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003935 &quot;version&quot;: &quot;A String&quot;, # App version.
3936 #
3937 # By default, the task is sent to the version which is the default
3938 # version when the task is attempted.
3939 #
3940 # For some queues or tasks which were created using the App Engine
3941 # Task Queue API, host is not parsable
3942 # into service,
3943 # version, and
3944 # instance. For example, some tasks
3945 # which were created using the App Engine SDK use a custom domain
3946 # name; custom domains are not parsed by Cloud Tasks. If
3947 # host is not parsable, then
3948 # service,
3949 # version, and
3950 # instance are the empty string.
3951 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
3952 #
3953 # For more information, see
3954 # [How Requests are
3955 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3956 #
3957 # The host is constructed as:
3958 #
3959 #
3960 # * `host = [application_domain_name]`&lt;/br&gt;
3961 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3962 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3963 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3964 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3965 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3966 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3967 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
3968 #
3969 # * `application_domain_name` = The domain name of the app, for
3970 # example &lt;app-id&gt;.appspot.com, which is associated with the
3971 # queue&#x27;s project ID. Some tasks which were created using the App Engine
3972 # SDK use a custom domain name.
3973 #
3974 # * `service =` service
3975 #
3976 # * `version =` version
3977 #
3978 # * `version_dot_service =`
3979 # version `+ &#x27;.&#x27; +`
3980 # service
3981 #
3982 # * `instance =` instance
3983 #
3984 # * `instance_dot_service =`
3985 # instance `+ &#x27;.&#x27; +`
3986 # service
3987 #
3988 # * `instance_dot_version =`
3989 # instance `+ &#x27;.&#x27; +`
3990 # version
3991 #
3992 # * `instance_dot_version_dot_service =`
3993 # instance `+ &#x27;.&#x27; +`
3994 # version `+ &#x27;.&#x27; +`
3995 # service
3996 #
3997 # If service is empty, then the task will be sent
3998 # to the service which is the default service when the task is attempted.
3999 #
4000 # If version is empty, then the task will be sent
4001 # to the version which is the default version when the task is attempted.
4002 #
4003 # If instance is empty, then the task
4004 # will be sent to an instance which is available when the task is
4005 # attempted.
4006 #
4007 # If service,
4008 # version, or
4009 # instance is invalid, then the task
4010 # will be sent to the default version of the default service when
4011 # the task is attempted.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004012 &quot;instance&quot;: &quot;A String&quot;, # App instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004013 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004014 # By default, the task is sent to an instance which is available when
4015 # the task is attempted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004016 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004017 # Requests can only be sent to a specific instance if
4018 # [manual scaling is used in App Engine
4019 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
4020 # App Engine Flex does not support instances. For more information, see
4021 # [App Engine Standard request
4022 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
4023 # and [App Engine Flex request
4024 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004025 },
4026 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004027 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
4028 #
4029 # All tasks that were created before this time
4030 # were purged.
4031 #
4032 # A queue can be purged using PurgeQueue, the
4033 # [App Engine Task Queue SDK, or the Cloud
4034 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
4035 #
4036 # Purge time will be truncated to the nearest microsecond. Purge
4037 # time will be unset if the queue has never been purged.
4038 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
4039 #
4040 # `state` can only be changed by called
4041 # PauseQueue,
4042 # ResumeQueue, or uploading
4043 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
4044 # UpdateQueue cannot be used to change `state`.
4045 &quot;pullTarget&quot;: { # Pull target. # Pull target.
4046 #
4047 # A pull queue is a queue that has a PullTarget.
4048 },
4049 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
4050 # after which it becomes output only.
4051 #
4052 # The queue name.
4053 #
4054 # The queue name must have the following format:
4055 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
4056 #
4057 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
4058 # hyphens (-), colons (:), or periods (.).
4059 # For more information, see
4060 # [Identifying
4061 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
4062 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
4063 # The list of available locations can be obtained by calling
4064 # ListLocations.
4065 # For more information, see https://cloud.google.com/about/locations/.
4066 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
4067 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004068 }</pre>
4069</div>
4070
4071<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004072 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004073 <pre>Sets the access control policy for a Queue. Replaces any existing
4074policy.
4075
4076Note: The Cloud Console does not check queue-level IAM permissions yet.
4077Project-level permissions are required to use the Cloud Console.
4078
4079Authorization requires the following
4080[Google IAM](https://cloud.google.com/iam) permission on the specified
4081resource parent:
4082
4083* `cloudtasks.queues.setIamPolicy`
4084
4085Args:
4086 resource: string, REQUIRED: The resource for which the policy is being specified.
4087See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004088 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004089 The object takes the form of:
4090
4091{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07004092 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004093 # the policy is limited to a few 10s of KB. An empty policy is a
4094 # valid policy but certain Cloud Platform services (such as Projects)
4095 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -07004096 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004097 #
4098 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004099 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
4100 # `members` to a single `role`. Members can be user accounts, service accounts,
4101 # Google groups, and domains (such as G Suite). A `role` is a named list of
4102 # permissions; each `role` can be an IAM predefined role or a user-created
4103 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004104 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004105 # For some types of Google Cloud resources, a `binding` can also specify a
4106 # `condition`, which is a logical expression that allows access to a resource
4107 # only if the expression evaluates to `true`. A condition can add constraints
4108 # based on attributes of the request, the resource, or both. To learn which
4109 # resources support conditions in their IAM policies, see the
4110 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07004111 #
4112 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004113 #
4114 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07004115 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004116 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07004117 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
4118 # &quot;members&quot;: [
4119 # &quot;user:mike@example.com&quot;,
4120 # &quot;group:admins@example.com&quot;,
4121 # &quot;domain:google.com&quot;,
4122 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004123 # ]
4124 # },
4125 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07004126 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
4127 # &quot;members&quot;: [
4128 # &quot;user:eve@example.com&quot;
4129 # ],
4130 # &quot;condition&quot;: {
4131 # &quot;title&quot;: &quot;expirable access&quot;,
4132 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
4133 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07004134 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004135 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07004136 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004137 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
4138 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004139 # }
4140 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004141 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004142 #
4143 # bindings:
4144 # - members:
4145 # - user:mike@example.com
4146 # - group:admins@example.com
4147 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07004148 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
4149 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004150 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07004151 # - user:eve@example.com
4152 # role: roles/resourcemanager.organizationViewer
4153 # condition:
4154 # title: expirable access
4155 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07004156 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07004157 # - etag: BwWWja0YfJA=
4158 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004159 #
4160 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07004161 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07004162 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
4163 # prevent simultaneous updates of a policy from overwriting each other.
4164 # It is strongly suggested that systems make use of the `etag` in the
4165 # read-modify-write cycle to perform policy updates in order to avoid race
4166 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
4167 # systems are expected to put that etag in the request to `setIamPolicy` to
4168 # ensure that their change will be applied to the same version of the policy.
4169 #
4170 # **Important:** If you use IAM Conditions, you must include the `etag` field
4171 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4172 # you to overwrite a version `3` policy with a version `1` policy, and all of
4173 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -07004174 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07004175 # `condition` that determines how and when the `bindings` are applied. Each
4176 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004177 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004178 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
4179 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07004180 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004181 # `members` can have the following values:
4182 #
4183 # * `allUsers`: A special identifier that represents anyone who is
4184 # on the internet; with or without a Google account.
4185 #
4186 # * `allAuthenticatedUsers`: A special identifier that represents anyone
4187 # who is authenticated with a Google account or a service account.
4188 #
4189 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07004190 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004191 #
4192 #
4193 # * `serviceAccount:{emailid}`: An email address that represents a service
4194 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
4195 #
4196 # * `group:{emailid}`: An email address that represents a Google group.
4197 # For example, `admins@example.com`.
4198 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004199 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
4200 # identifier) representing a user that has been recently deleted. For
4201 # example, `alice@example.com?uid=123456789012345678901`. If the user is
4202 # recovered, this value reverts to `user:{emailid}` and the recovered user
4203 # retains the role in the binding.
4204 #
4205 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
4206 # unique identifier) representing a service account that has been recently
4207 # deleted. For example,
4208 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
4209 # If the service account is undeleted, this value reverts to
4210 # `serviceAccount:{emailid}` and the undeleted service account retains the
4211 # role in the binding.
4212 #
4213 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
4214 # identifier) representing a Google group that has been recently
4215 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
4216 # the group is recovered, this value reverts to `group:{emailid}` and the
4217 # recovered group retains the role in the binding.
4218 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004219 #
4220 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
4221 # users of that domain. For example, `google.com` or `example.com`.
4222 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004223 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004224 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004225 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
4226 #
4227 # If the condition evaluates to `true`, then this binding applies to the
4228 # current request.
4229 #
4230 # If the condition evaluates to `false`, then this binding does not apply to
4231 # the current request. However, a different role binding might grant the same
4232 # role to one or more of the members in this binding.
4233 #
4234 # To learn which resources support conditions in their IAM policies, see the
4235 # [IAM
4236 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4237 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
4238 # are documented at https://github.com/google/cel-spec.
4239 #
4240 # Example (Comparison):
4241 #
4242 # title: &quot;Summary size limit&quot;
4243 # description: &quot;Determines if a summary is less than 100 chars&quot;
4244 # expression: &quot;document.summary.size() &lt; 100&quot;
4245 #
4246 # Example (Equality):
4247 #
4248 # title: &quot;Requestor is owner&quot;
4249 # description: &quot;Determines if requestor is the document owner&quot;
4250 # expression: &quot;document.owner == request.auth.claims.email&quot;
4251 #
4252 # Example (Logic):
4253 #
4254 # title: &quot;Public documents&quot;
4255 # description: &quot;Determine whether the document should be publicly visible&quot;
4256 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
4257 #
4258 # Example (Data Manipulation):
4259 #
4260 # title: &quot;Notification string&quot;
4261 # description: &quot;Create a notification string with a timestamp.&quot;
4262 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
4263 #
4264 # The exact variables and functions that may be referenced within an expression
4265 # are determined by the service that evaluates it. See the service
4266 # documentation for additional information.
4267 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
4268 # describes the expression, e.g. when hovered over it in a UI.
4269 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
4270 # its purpose. This can be used e.g. in UIs which allow to enter the
4271 # expression.
4272 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
4273 # reporting, e.g. a file name and a position in the file.
4274 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
4275 # syntax.
4276 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004277 },
4278 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004279 &quot;version&quot;: 42, # Specifies the format of the policy.
4280 #
4281 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
4282 # are rejected.
4283 #
4284 # Any operation that affects conditional role bindings must specify version
4285 # `3`. This requirement applies to the following operations:
4286 #
4287 # * Getting a policy that includes a conditional role binding
4288 # * Adding a conditional role binding to a policy
4289 # * Changing a conditional role binding in a policy
4290 # * Removing any role binding, with or without a condition, from a policy
4291 # that includes conditions
4292 #
4293 # **Important:** If you use IAM Conditions, you must include the `etag` field
4294 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4295 # you to overwrite a version `3` policy with a version `1` policy, and all of
4296 # the conditions in the version `3` policy are lost.
4297 #
4298 # If a policy does not include any conditions, operations on that policy may
4299 # specify any valid version or leave the field unset.
4300 #
4301 # To learn which resources support conditions in their IAM policies, see the
4302 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004303 },
4304 }
4305
4306 x__xgafv: string, V1 error format.
4307 Allowed values
4308 1 - v1 error format
4309 2 - v2 error format
4310
4311Returns:
4312 An object of the form:
4313
Dan O'Mearadd494642020-05-01 07:42:23 -07004314 { # An Identity and Access Management (IAM) policy, which specifies access
4315 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004316 #
4317 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004318 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
4319 # `members` to a single `role`. Members can be user accounts, service accounts,
4320 # Google groups, and domains (such as G Suite). A `role` is a named list of
4321 # permissions; each `role` can be an IAM predefined role or a user-created
4322 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004323 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004324 # For some types of Google Cloud resources, a `binding` can also specify a
4325 # `condition`, which is a logical expression that allows access to a resource
4326 # only if the expression evaluates to `true`. A condition can add constraints
4327 # based on attributes of the request, the resource, or both. To learn which
4328 # resources support conditions in their IAM policies, see the
4329 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07004330 #
4331 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004332 #
4333 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07004334 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004335 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07004336 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
4337 # &quot;members&quot;: [
4338 # &quot;user:mike@example.com&quot;,
4339 # &quot;group:admins@example.com&quot;,
4340 # &quot;domain:google.com&quot;,
4341 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004342 # ]
4343 # },
4344 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07004345 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
4346 # &quot;members&quot;: [
4347 # &quot;user:eve@example.com&quot;
4348 # ],
4349 # &quot;condition&quot;: {
4350 # &quot;title&quot;: &quot;expirable access&quot;,
4351 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
4352 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07004353 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004354 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07004355 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004356 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
4357 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004358 # }
4359 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004360 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004361 #
4362 # bindings:
4363 # - members:
4364 # - user:mike@example.com
4365 # - group:admins@example.com
4366 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07004367 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
4368 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004369 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07004370 # - user:eve@example.com
4371 # role: roles/resourcemanager.organizationViewer
4372 # condition:
4373 # title: expirable access
4374 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07004375 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07004376 # - etag: BwWWja0YfJA=
4377 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004378 #
4379 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07004380 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07004381 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
4382 # prevent simultaneous updates of a policy from overwriting each other.
4383 # It is strongly suggested that systems make use of the `etag` in the
4384 # read-modify-write cycle to perform policy updates in order to avoid race
4385 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
4386 # systems are expected to put that etag in the request to `setIamPolicy` to
4387 # ensure that their change will be applied to the same version of the policy.
4388 #
4389 # **Important:** If you use IAM Conditions, you must include the `etag` field
4390 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4391 # you to overwrite a version `3` policy with a version `1` policy, and all of
4392 # the conditions in the version `3` policy are lost.
Bu Sun Kim65020912020-05-20 12:08:20 -07004393 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07004394 # `condition` that determines how and when the `bindings` are applied. Each
4395 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004396 { # Associates `members` with a `role`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004397 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
4398 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07004399 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004400 # `members` can have the following values:
4401 #
4402 # * `allUsers`: A special identifier that represents anyone who is
4403 # on the internet; with or without a Google account.
4404 #
4405 # * `allAuthenticatedUsers`: A special identifier that represents anyone
4406 # who is authenticated with a Google account or a service account.
4407 #
4408 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07004409 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004410 #
4411 #
4412 # * `serviceAccount:{emailid}`: An email address that represents a service
4413 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
4414 #
4415 # * `group:{emailid}`: An email address that represents a Google group.
4416 # For example, `admins@example.com`.
4417 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004418 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
4419 # identifier) representing a user that has been recently deleted. For
4420 # example, `alice@example.com?uid=123456789012345678901`. If the user is
4421 # recovered, this value reverts to `user:{emailid}` and the recovered user
4422 # retains the role in the binding.
4423 #
4424 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
4425 # unique identifier) representing a service account that has been recently
4426 # deleted. For example,
4427 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
4428 # If the service account is undeleted, this value reverts to
4429 # `serviceAccount:{emailid}` and the undeleted service account retains the
4430 # role in the binding.
4431 #
4432 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
4433 # identifier) representing a Google group that has been recently
4434 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
4435 # the group is recovered, this value reverts to `group:{emailid}` and the
4436 # recovered group retains the role in the binding.
4437 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004438 #
4439 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
4440 # users of that domain. For example, `google.com` or `example.com`.
4441 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004442 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004443 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004444 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
4445 #
4446 # If the condition evaluates to `true`, then this binding applies to the
4447 # current request.
4448 #
4449 # If the condition evaluates to `false`, then this binding does not apply to
4450 # the current request. However, a different role binding might grant the same
4451 # role to one or more of the members in this binding.
4452 #
4453 # To learn which resources support conditions in their IAM policies, see the
4454 # [IAM
4455 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4456 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
4457 # are documented at https://github.com/google/cel-spec.
4458 #
4459 # Example (Comparison):
4460 #
4461 # title: &quot;Summary size limit&quot;
4462 # description: &quot;Determines if a summary is less than 100 chars&quot;
4463 # expression: &quot;document.summary.size() &lt; 100&quot;
4464 #
4465 # Example (Equality):
4466 #
4467 # title: &quot;Requestor is owner&quot;
4468 # description: &quot;Determines if requestor is the document owner&quot;
4469 # expression: &quot;document.owner == request.auth.claims.email&quot;
4470 #
4471 # Example (Logic):
4472 #
4473 # title: &quot;Public documents&quot;
4474 # description: &quot;Determine whether the document should be publicly visible&quot;
4475 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
4476 #
4477 # Example (Data Manipulation):
4478 #
4479 # title: &quot;Notification string&quot;
4480 # description: &quot;Create a notification string with a timestamp.&quot;
4481 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
4482 #
4483 # The exact variables and functions that may be referenced within an expression
4484 # are determined by the service that evaluates it. See the service
4485 # documentation for additional information.
4486 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
4487 # describes the expression, e.g. when hovered over it in a UI.
4488 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
4489 # its purpose. This can be used e.g. in UIs which allow to enter the
4490 # expression.
4491 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
4492 # reporting, e.g. a file name and a position in the file.
4493 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
4494 # syntax.
4495 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004496 },
4497 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004498 &quot;version&quot;: 42, # Specifies the format of the policy.
4499 #
4500 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
4501 # are rejected.
4502 #
4503 # Any operation that affects conditional role bindings must specify version
4504 # `3`. This requirement applies to the following operations:
4505 #
4506 # * Getting a policy that includes a conditional role binding
4507 # * Adding a conditional role binding to a policy
4508 # * Changing a conditional role binding in a policy
4509 # * Removing any role binding, with or without a condition, from a policy
4510 # that includes conditions
4511 #
4512 # **Important:** If you use IAM Conditions, you must include the `etag` field
4513 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4514 # you to overwrite a version `3` policy with a version `1` policy, and all of
4515 # the conditions in the version `3` policy are lost.
4516 #
4517 # If a policy does not include any conditions, operations on that policy may
4518 # specify any valid version or leave the field unset.
4519 #
4520 # To learn which resources support conditions in their IAM policies, see the
4521 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004522 }</pre>
4523</div>
4524
4525<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004526 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004527 <pre>Returns permissions that a caller has on a Queue.
4528If the resource does not exist, this will return an empty set of
4529permissions, not a NOT_FOUND error.
4530
4531Note: This operation is designed to be used for building permission-aware
4532UIs and command-line tools, not for authorization checking. This operation
Bu Sun Kim65020912020-05-20 12:08:20 -07004533may &quot;fail open&quot; without warning.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004534
4535Args:
4536 resource: string, REQUIRED: The resource for which the policy detail is being requested.
4537See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004538 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004539 The object takes the form of:
4540
4541{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07004542 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
4543 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004544 # information see
4545 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07004546 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004547 ],
4548 }
4549
4550 x__xgafv: string, V1 error format.
4551 Allowed values
4552 1 - v1 error format
4553 2 - v2 error format
4554
4555Returns:
4556 An object of the form:
4557
4558 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07004559 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004560 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07004561 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004562 ],
4563 }</pre>
4564</div>
4565
4566</body></html>