blob: 62db157e6a8815a1192bc47822b0104ce6ecd098 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="cloudtasks_v2.html">Cloud Tasks API</a> . <a href="cloudtasks_v2.projects.html">projects</a> . <a href="cloudtasks_v2.projects.locations.html">locations</a> . <a href="cloudtasks_v2.projects.locations.queues.html">queues</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="cloudtasks_v2.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">
89 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
90<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, pageToken=None, filter=None, pageSize=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
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700145 # how those tasks are dispatched. Configurable properties include rate limits,
146 # retry options, queue types, and others.
147 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
148 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
149 # field is unset, then no logs are written.
150 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
151 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
152 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
153 # This field may contain any value between 0.0 and 1.0, inclusive.
154 # 0.0 is the default and means that no operations are logged.
155 },
156 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
157 #
158 # All tasks that were created before this time
159 # were purged.
160 #
161 # A queue can be purged using PurgeQueue, the
162 # [App Engine Task Queue SDK, or the Cloud
163 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
164 #
165 # Purge time will be truncated to the nearest microsecond. Purge
166 # time will be unset if the queue has never been purged.
167 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
168 #
169 # rate_limits and retry_config are
170 # related because they both control task attempts. However they control task
171 # attempts in different ways:
172 #
173 # * rate_limits controls the total rate of
174 # dispatches from a queue (i.e. all traffic dispatched from the
175 # queue, regardless of whether the dispatch is from a first
176 # attempt or a retry).
177 # * retry_config controls what happens to
178 # particular a task after its first attempt fails. That is,
179 # retry_config controls task retries (the
180 # second attempt, third attempt, etc).
181 #
182 # The queue&#x27;s actual dispatch rate is the result of:
183 #
184 # * Number of tasks in the queue
185 # * User-specified throttling: rate_limits,
186 # retry_config, and the
187 # queue&#x27;s state.
188 # * System throttling due to `429` (Too Many Requests) or `503` (Service
189 # Unavailable) responses from the worker, high error rates, or to smooth
190 # sudden large traffic spikes.
191 #
192 # This message determines the maximum rate that tasks can be dispatched by a
193 # queue, regardless of whether the dispatch is a first task attempt or a retry.
194 #
195 # Note: The debugging command, RunTask, will run a task
196 # even if the queue has reached its RateLimits.
197 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700198 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700199 # Max burst size limits how fast tasks in queue are processed when
200 # many tasks are in the queue and the rate is high. This field
201 # allows the queue to have a high rate so processing starts shortly
202 # after a task is enqueued, but still limits resource usage when
203 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700204 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700205 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
206 # algorithm is used to control the rate of task dispatches. Each
207 # queue has a token bucket that holds tokens, up to the maximum
208 # specified by `max_burst_size`. Each time a task is dispatched, a
209 # token is removed from the bucket. Tasks will be dispatched until
210 # the queue&#x27;s bucket runs out of tokens. The bucket will be
211 # continuously refilled with new tokens based on
212 # max_dispatches_per_second.
213 #
214 # Cloud Tasks will pick the value of `max_burst_size` based on the
215 # value of
216 # max_dispatches_per_second.
217 #
218 # For queues that were created or updated using
219 # `queue.yaml/xml`, `max_burst_size` is equal to
220 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
221 # Since `max_burst_size` is output only, if
222 # UpdateQueue is called on a queue
223 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
224 # on the value of
225 # max_dispatches_per_second,
226 # regardless of whether
227 # max_dispatches_per_second
228 # is updated.
229 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
230 #
231 # If unspecified when the queue is created, Cloud Tasks will pick the
232 # default.
233 #
234 # * The maximum allowed value is 500.
235 #
236 #
237 # This field has the same meaning as
238 # [rate in
239 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
240 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
241 # to be dispatched for this queue. After this threshold has been
242 # reached, Cloud Tasks stops dispatching tasks until the number of
243 # concurrent requests decreases.
244 #
245 # If unspecified when the queue is created, Cloud Tasks will pick the
246 # default.
247 #
248 #
249 # The maximum allowed value is 5,000.
250 #
251 #
252 # This field has the same meaning as
253 # [max_concurrent_requests in
254 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
255 },
256 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
257 # task-level app_engine_routing.
258 # These settings apply only to
259 # App Engine tasks in this queue.
260 # Http tasks are not affected.
261 #
262 # If set, `app_engine_routing_override` is used for all
263 # App Engine tasks in the queue, no matter what the
264 # setting is for the
265 # task-level app_engine_routing.
266 #
267 # Defines routing characteristics specific to App Engine - service, version,
268 # and instance.
269 #
270 # For more information about services, versions, and instances see
271 # [An Overview of App
272 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
273 # [Microservices Architecture on Google App
274 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
275 # [App Engine Standard request
276 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
277 # and [App Engine Flex request
278 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
279 #
280 # Using AppEngineRouting requires
281 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
282 # Google IAM permission for the project
283 # and the following scope:
284 #
285 # `https://www.googleapis.com/auth/cloud-platform`
286 &quot;instance&quot;: &quot;A String&quot;, # App instance.
287 #
288 # By default, the task is sent to an instance which is available when
289 # the task is attempted.
290 #
291 # Requests can only be sent to a specific instance if
292 # [manual scaling is used in App Engine
293 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
294 # App Engine Flex does not support instances. For more information, see
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700295 # [App Engine Standard request
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700296 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700297 # and [App Engine Flex request
298 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700299 &quot;version&quot;: &quot;A String&quot;, # App version.
Dan O'Mearadd494642020-05-01 07:42:23 -0700300 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700301 # By default, the task is sent to the version which is the default
302 # version when the task is attempted.
Dan O'Mearadd494642020-05-01 07:42:23 -0700303 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700304 # For some queues or tasks which were created using the App Engine
305 # Task Queue API, host is not parsable
306 # into service,
307 # version, and
308 # instance. For example, some tasks
309 # which were created using the App Engine SDK use a custom domain
310 # name; custom domains are not parsed by Cloud Tasks. If
311 # host is not parsable, then
312 # service,
313 # version, and
314 # instance are the empty string.
315 &quot;service&quot;: &quot;A String&quot;, # App service.
316 #
317 # By default, the task is sent to the service which is the default
318 # service when the task is attempted.
319 #
320 # For some queues or tasks which were created using the App Engine
321 # Task Queue API, host is not parsable
322 # into service,
323 # version, and
324 # instance. For example, some tasks
325 # which were created using the App Engine SDK use a custom domain
326 # name; custom domains are not parsed by Cloud Tasks. If
327 # host is not parsable, then
328 # service,
329 # version, and
330 # instance are the empty string.
331 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
332 #
333 # The host is constructed from the domain name of the app associated with
334 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
335 # service, version,
336 # and instance. Tasks which were created using
337 # the App Engine SDK might have a custom domain name.
338 #
339 # For more information, see
340 # [How Requests are
341 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
342 },
343 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
344 # after which it becomes output only.
345 #
346 # The queue name.
347 #
348 # The queue name must have the following format:
349 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
350 #
351 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
352 # hyphens (-), colons (:), or periods (.).
353 # For more information, see
354 # [Identifying
355 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
356 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
357 # The list of available locations can be obtained by calling
358 # ListLocations.
359 # For more information, see https://cloud.google.com/about/locations/.
360 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
361 # hyphens (-). The maximum length is 100 characters.
362 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
363 #
364 # `state` can only be changed by called
365 # PauseQueue,
366 # ResumeQueue, or uploading
367 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
368 # UpdateQueue cannot be used to change `state`.
369 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
370 #
371 # * For tasks created using Cloud Tasks: the queue-level retry settings
372 # apply to all tasks in the queue that were created using Cloud Tasks.
373 # Retry settings cannot be set on individual tasks.
374 # * For tasks created using the App Engine SDK: the queue-level retry
375 # settings apply to all tasks in the queue which do not have retry settings
376 # explicitly set on the task and were created by the App Engine SDK. See
377 # [App Engine
378 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
379 #
380 # These settings determine when a failed task attempt is retried.
381 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
382 # min_backoff and
383 # max_backoff duration after it fails,
384 # if the queue&#x27;s RetryConfig specifies that the task should be
385 # retried.
386 #
387 # If unspecified when the queue is created, Cloud Tasks will pick the
388 # default.
389 #
390 #
391 # `max_backoff` will be truncated to the nearest second.
392 #
393 # This field has the same meaning as
394 # [max_backoff_seconds in
395 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
396 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
397 #
398 # A task&#x27;s retry interval starts at
399 # min_backoff, then doubles
400 # `max_doublings` times, then increases linearly, and finally
401 # retries at intervals of
402 # max_backoff up to
403 # max_attempts times.
404 #
405 # For example, if min_backoff is 10s,
406 # max_backoff is 300s, and
407 # `max_doublings` is 3, then the a task will first be retried in
408 # 10s. The retry interval will double three times, and then
409 # increase linearly by 2^3 * 10s. Finally, the task will retry at
410 # intervals of max_backoff until the
411 # task has been attempted max_attempts
412 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
413 # 240s, 300s, 300s, ....
414 #
415 # If unspecified when the queue is created, Cloud Tasks will pick the
416 # default.
417 #
418 #
419 # This field has the same meaning as
420 # [max_doublings in
421 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
422 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
423 # retrying a failed task, measured from when the task was first
424 # attempted. Once `max_retry_duration` time has passed *and* the
425 # task has been attempted max_attempts
426 # times, no further attempts will be made and the task will be
427 # deleted.
428 #
429 # If zero, then the task age is unlimited.
430 #
431 # If unspecified when the queue is created, Cloud Tasks will pick the
432 # default.
433 #
434 #
435 # `max_retry_duration` will be truncated to the nearest second.
436 #
437 # This field has the same meaning as
438 # [task_age_limit in
439 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
440 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
441 #
442 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
443 # first attempt fails, then there will be `max_attempts - 1` retries). Must
444 # be &gt;= -1.
445 #
446 # If unspecified when the queue is created, Cloud Tasks will pick the
447 # default.
448 #
449 # -1 indicates unlimited attempts.
450 #
451 # This field has the same meaning as
452 # [task_retry_limit in
453 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
454 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
455 # min_backoff and
456 # max_backoff duration after it fails,
457 # if the queue&#x27;s RetryConfig specifies that the task should be
458 # retried.
459 #
460 # If unspecified when the queue is created, Cloud Tasks will pick the
461 # default.
462 #
463 #
464 # `min_backoff` will be truncated to the nearest second.
465 #
466 # This field has the same meaning as
467 # [min_backoff_seconds in
468 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
469 },
470}
471
472 x__xgafv: string, V1 error format.
473 Allowed values
474 1 - v1 error format
475 2 - v2 error format
476
477Returns:
478 An object of the form:
479
480 { # A queue is a container of related tasks. Queues are configured to manage
481 # how those tasks are dispatched. Configurable properties include rate limits,
482 # retry options, queue types, and others.
483 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
484 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
485 # field is unset, then no logs are written.
486 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
487 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
488 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
489 # This field may contain any value between 0.0 and 1.0, inclusive.
490 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700491 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700492 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700493 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700494 # All tasks that were created before this time
495 # were purged.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700496 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700497 # A queue can be purged using PurgeQueue, the
498 # [App Engine Task Queue SDK, or the Cloud
499 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700500 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700501 # Purge time will be truncated to the nearest microsecond. Purge
502 # time will be unset if the queue has never been purged.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700503 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700504 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700505 # rate_limits and retry_config are
506 # related because they both control task attempts. However they control task
507 # attempts in different ways:
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700508 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700509 # * rate_limits controls the total rate of
510 # dispatches from a queue (i.e. all traffic dispatched from the
511 # queue, regardless of whether the dispatch is from a first
512 # attempt or a retry).
513 # * retry_config controls what happens to
514 # particular a task after its first attempt fails. That is,
515 # retry_config controls task retries (the
516 # second attempt, third attempt, etc).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700517 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700518 # The queue&#x27;s actual dispatch rate is the result of:
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700519 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700520 # * Number of tasks in the queue
521 # * User-specified throttling: rate_limits,
522 # retry_config, and the
523 # queue&#x27;s state.
524 # * System throttling due to `429` (Too Many Requests) or `503` (Service
525 # Unavailable) responses from the worker, high error rates, or to smooth
526 # sudden large traffic spikes.
527 #
528 # This message determines the maximum rate that tasks can be dispatched by a
529 # queue, regardless of whether the dispatch is a first task attempt or a retry.
530 #
531 # Note: The debugging command, RunTask, will run a task
532 # even if the queue has reached its RateLimits.
533 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
534 #
535 # Max burst size limits how fast tasks in queue are processed when
536 # many tasks are in the queue and the rate is high. This field
537 # allows the queue to have a high rate so processing starts shortly
538 # after a task is enqueued, but still limits resource usage when
539 # many tasks are enqueued in a short period of time.
540 #
541 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
542 # algorithm is used to control the rate of task dispatches. Each
543 # queue has a token bucket that holds tokens, up to the maximum
544 # specified by `max_burst_size`. Each time a task is dispatched, a
545 # token is removed from the bucket. Tasks will be dispatched until
546 # the queue&#x27;s bucket runs out of tokens. The bucket will be
547 # continuously refilled with new tokens based on
548 # max_dispatches_per_second.
549 #
550 # Cloud Tasks will pick the value of `max_burst_size` based on the
551 # value of
552 # max_dispatches_per_second.
553 #
554 # For queues that were created or updated using
555 # `queue.yaml/xml`, `max_burst_size` is equal to
556 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
557 # Since `max_burst_size` is output only, if
558 # UpdateQueue is called on a queue
559 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
560 # on the value of
561 # max_dispatches_per_second,
562 # regardless of whether
563 # max_dispatches_per_second
564 # is updated.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700565 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
566 #
567 # If unspecified when the queue is created, Cloud Tasks will pick the
568 # default.
569 #
570 # * The maximum allowed value is 500.
571 #
572 #
573 # This field has the same meaning as
574 # [rate in
575 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700576 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
577 # to be dispatched for this queue. After this threshold has been
578 # reached, Cloud Tasks stops dispatching tasks until the number of
579 # concurrent requests decreases.
580 #
581 # If unspecified when the queue is created, Cloud Tasks will pick the
582 # default.
583 #
584 #
585 # The maximum allowed value is 5,000.
586 #
587 #
588 # This field has the same meaning as
589 # [max_concurrent_requests in
590 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700591 },
592 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
593 # task-level app_engine_routing.
594 # These settings apply only to
595 # App Engine tasks in this queue.
596 # Http tasks are not affected.
597 #
598 # If set, `app_engine_routing_override` is used for all
599 # App Engine tasks in the queue, no matter what the
600 # setting is for the
601 # task-level app_engine_routing.
602 #
603 # Defines routing characteristics specific to App Engine - service, version,
604 # and instance.
605 #
606 # For more information about services, versions, and instances see
607 # [An Overview of App
608 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
609 # [Microservices Architecture on Google App
610 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
611 # [App Engine Standard request
612 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
613 # and [App Engine Flex request
614 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
615 #
616 # Using AppEngineRouting requires
617 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
618 # Google IAM permission for the project
619 # and the following scope:
620 #
621 # `https://www.googleapis.com/auth/cloud-platform`
622 &quot;instance&quot;: &quot;A String&quot;, # App instance.
623 #
624 # By default, the task is sent to an instance which is available when
625 # the task is attempted.
626 #
627 # Requests can only be sent to a specific instance if
628 # [manual scaling is used in App Engine
629 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
630 # App Engine Flex does not support instances. For more information, see
631 # [App Engine Standard request
632 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
633 # and [App Engine Flex request
634 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
635 &quot;version&quot;: &quot;A String&quot;, # App version.
636 #
637 # By default, the task is sent to the version which is the default
638 # version when the task is attempted.
639 #
640 # For some queues or tasks which were created using the App Engine
641 # Task Queue API, host is not parsable
642 # into service,
643 # version, and
644 # instance. For example, some tasks
645 # which were created using the App Engine SDK use a custom domain
646 # name; custom domains are not parsed by Cloud Tasks. If
647 # host is not parsable, then
648 # service,
649 # version, and
650 # instance are the empty string.
651 &quot;service&quot;: &quot;A String&quot;, # App service.
652 #
653 # By default, the task is sent to the service which is the default
654 # service when the task is attempted.
655 #
656 # For some queues or tasks which were created using the App Engine
657 # Task Queue API, host is not parsable
658 # into service,
659 # version, and
660 # instance. For example, some tasks
661 # which were created using the App Engine SDK use a custom domain
662 # name; custom domains are not parsed by Cloud Tasks. If
663 # host is not parsable, then
664 # service,
665 # version, and
666 # instance are the empty string.
667 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
668 #
669 # The host is constructed from the domain name of the app associated with
670 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
671 # service, version,
672 # and instance. Tasks which were created using
673 # the App Engine SDK might have a custom domain name.
674 #
675 # For more information, see
676 # [How Requests are
677 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
678 },
679 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
680 # after which it becomes output only.
681 #
682 # The queue name.
683 #
684 # The queue name must have the following format:
685 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
686 #
687 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
688 # hyphens (-), colons (:), or periods (.).
689 # For more information, see
690 # [Identifying
691 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
692 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
693 # The list of available locations can be obtained by calling
694 # ListLocations.
695 # For more information, see https://cloud.google.com/about/locations/.
696 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
697 # hyphens (-). The maximum length is 100 characters.
698 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
699 #
700 # `state` can only be changed by called
701 # PauseQueue,
702 # ResumeQueue, or uploading
703 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
704 # UpdateQueue cannot be used to change `state`.
705 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
706 #
707 # * For tasks created using Cloud Tasks: the queue-level retry settings
708 # apply to all tasks in the queue that were created using Cloud Tasks.
709 # Retry settings cannot be set on individual tasks.
710 # * For tasks created using the App Engine SDK: the queue-level retry
711 # settings apply to all tasks in the queue which do not have retry settings
712 # explicitly set on the task and were created by the App Engine SDK. See
713 # [App Engine
714 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
715 #
716 # These settings determine when a failed task attempt is retried.
717 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
718 # min_backoff and
719 # max_backoff duration after it fails,
720 # if the queue&#x27;s RetryConfig specifies that the task should be
721 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700722 #
723 # If unspecified when the queue is created, Cloud Tasks will pick the
724 # default.
725 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700726 #
727 # `max_backoff` will be truncated to the nearest second.
728 #
729 # This field has the same meaning as
730 # [max_backoff_seconds in
731 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
732 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
733 #
734 # A task&#x27;s retry interval starts at
735 # min_backoff, then doubles
736 # `max_doublings` times, then increases linearly, and finally
737 # retries at intervals of
738 # max_backoff up to
739 # max_attempts times.
740 #
741 # For example, if min_backoff is 10s,
742 # max_backoff is 300s, and
743 # `max_doublings` is 3, then the a task will first be retried in
744 # 10s. The retry interval will double three times, and then
745 # increase linearly by 2^3 * 10s. Finally, the task will retry at
746 # intervals of max_backoff until the
747 # task has been attempted max_attempts
748 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
749 # 240s, 300s, 300s, ....
750 #
751 # If unspecified when the queue is created, Cloud Tasks will pick the
752 # default.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700753 #
754 #
755 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700756 # [max_doublings in
757 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
758 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
759 # retrying a failed task, measured from when the task was first
760 # attempted. Once `max_retry_duration` time has passed *and* the
761 # task has been attempted max_attempts
762 # times, no further attempts will be made and the task will be
763 # deleted.
764 #
765 # If zero, then the task age is unlimited.
766 #
767 # If unspecified when the queue is created, Cloud Tasks will pick the
768 # default.
769 #
770 #
771 # `max_retry_duration` will be truncated to the nearest second.
772 #
773 # This field has the same meaning as
774 # [task_age_limit in
775 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
776 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
777 #
778 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
779 # first attempt fails, then there will be `max_attempts - 1` retries). Must
780 # be &gt;= -1.
781 #
782 # If unspecified when the queue is created, Cloud Tasks will pick the
783 # default.
784 #
785 # -1 indicates unlimited attempts.
786 #
787 # This field has the same meaning as
788 # [task_retry_limit in
789 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
790 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
791 # min_backoff and
792 # max_backoff duration after it fails,
793 # if the queue&#x27;s RetryConfig specifies that the task should be
794 # retried.
795 #
796 # If unspecified when the queue is created, Cloud Tasks will pick the
797 # default.
798 #
799 #
800 # `min_backoff` will be truncated to the nearest second.
801 #
802 # This field has the same meaning as
803 # [min_backoff_seconds in
804 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700805 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700806 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700807</div>
808
809<div class="method">
810 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
811 <pre>Deletes a queue.
812
813This command will delete the queue even if it has tasks in it.
814
Bu Sun Kim65020912020-05-20 12:08:20 -0700815Note: If you delete a queue, a queue with the same name can&#x27;t be created
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700816for 7 days.
817
818WARNING: Using this method may have unintended side effects if you are
819using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
820Read
821[Overview of Queue Management and
822queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
823this method.
824
825Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700826 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700827`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
828 x__xgafv: string, V1 error format.
829 Allowed values
830 1 - v1 error format
831 2 - v2 error format
832
833Returns:
834 An object of the form:
835
836 { # A generic empty message that you can re-use to avoid defining duplicated
837 # empty messages in your APIs. A typical example is to use it as the request
838 # or the response type of an API method. For instance:
839 #
840 # service Foo {
841 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
842 # }
843 #
844 # The JSON representation for `Empty` is empty JSON object `{}`.
845 }</pre>
846</div>
847
848<div class="method">
849 <code class="details" id="get">get(name, x__xgafv=None)</code>
850 <pre>Gets a queue.
851
852Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700853 name: string, Required. The resource name of the queue. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700854`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
855 x__xgafv: string, V1 error format.
856 Allowed values
857 1 - v1 error format
858 2 - v2 error format
859
860Returns:
861 An object of the form:
862
863 { # A queue is a container of related tasks. Queues are configured to manage
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700864 # how those tasks are dispatched. Configurable properties include rate limits,
865 # retry options, queue types, and others.
866 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
867 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
868 # field is unset, then no logs are written.
869 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
870 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
871 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
872 # This field may contain any value between 0.0 and 1.0, inclusive.
873 # 0.0 is the default and means that no operations are logged.
874 },
875 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
876 #
877 # All tasks that were created before this time
878 # were purged.
879 #
880 # A queue can be purged using PurgeQueue, the
881 # [App Engine Task Queue SDK, or the Cloud
882 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
883 #
884 # Purge time will be truncated to the nearest microsecond. Purge
885 # time will be unset if the queue has never been purged.
886 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
887 #
888 # rate_limits and retry_config are
889 # related because they both control task attempts. However they control task
890 # attempts in different ways:
891 #
892 # * rate_limits controls the total rate of
893 # dispatches from a queue (i.e. all traffic dispatched from the
894 # queue, regardless of whether the dispatch is from a first
895 # attempt or a retry).
896 # * retry_config controls what happens to
897 # particular a task after its first attempt fails. That is,
898 # retry_config controls task retries (the
899 # second attempt, third attempt, etc).
900 #
901 # The queue&#x27;s actual dispatch rate is the result of:
902 #
903 # * Number of tasks in the queue
904 # * User-specified throttling: rate_limits,
905 # retry_config, and the
906 # queue&#x27;s state.
907 # * System throttling due to `429` (Too Many Requests) or `503` (Service
908 # Unavailable) responses from the worker, high error rates, or to smooth
909 # sudden large traffic spikes.
910 #
911 # This message determines the maximum rate that tasks can be dispatched by a
912 # queue, regardless of whether the dispatch is a first task attempt or a retry.
913 #
914 # Note: The debugging command, RunTask, will run a task
915 # even if the queue has reached its RateLimits.
916 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim65020912020-05-20 12:08:20 -0700917 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700918 # Max burst size limits how fast tasks in queue are processed when
919 # many tasks are in the queue and the rate is high. This field
920 # allows the queue to have a high rate so processing starts shortly
921 # after a task is enqueued, but still limits resource usage when
922 # many tasks are enqueued in a short period of time.
Bu Sun Kim65020912020-05-20 12:08:20 -0700923 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700924 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
925 # algorithm is used to control the rate of task dispatches. Each
926 # queue has a token bucket that holds tokens, up to the maximum
927 # specified by `max_burst_size`. Each time a task is dispatched, a
928 # token is removed from the bucket. Tasks will be dispatched until
929 # the queue&#x27;s bucket runs out of tokens. The bucket will be
930 # continuously refilled with new tokens based on
931 # max_dispatches_per_second.
Bu Sun Kim65020912020-05-20 12:08:20 -0700932 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700933 # Cloud Tasks will pick the value of `max_burst_size` based on the
934 # value of
935 # max_dispatches_per_second.
936 #
937 # For queues that were created or updated using
938 # `queue.yaml/xml`, `max_burst_size` is equal to
939 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
940 # Since `max_burst_size` is output only, if
941 # UpdateQueue is called on a queue
942 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
943 # on the value of
944 # max_dispatches_per_second,
945 # regardless of whether
946 # max_dispatches_per_second
947 # is updated.
948 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
949 #
950 # If unspecified when the queue is created, Cloud Tasks will pick the
951 # default.
952 #
953 # * The maximum allowed value is 500.
954 #
955 #
956 # This field has the same meaning as
957 # [rate in
958 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
959 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
960 # to be dispatched for this queue. After this threshold has been
961 # reached, Cloud Tasks stops dispatching tasks until the number of
962 # concurrent requests decreases.
963 #
964 # If unspecified when the queue is created, Cloud Tasks will pick the
965 # default.
966 #
967 #
968 # The maximum allowed value is 5,000.
969 #
970 #
971 # This field has the same meaning as
972 # [max_concurrent_requests in
973 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
974 },
975 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
976 # task-level app_engine_routing.
977 # These settings apply only to
978 # App Engine tasks in this queue.
979 # Http tasks are not affected.
980 #
981 # If set, `app_engine_routing_override` is used for all
982 # App Engine tasks in the queue, no matter what the
983 # setting is for the
984 # task-level app_engine_routing.
985 #
986 # Defines routing characteristics specific to App Engine - service, version,
987 # and instance.
988 #
989 # For more information about services, versions, and instances see
990 # [An Overview of App
991 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
992 # [Microservices Architecture on Google App
993 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
994 # [App Engine Standard request
995 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
996 # and [App Engine Flex request
997 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
998 #
999 # Using AppEngineRouting requires
1000 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1001 # Google IAM permission for the project
1002 # and the following scope:
1003 #
1004 # `https://www.googleapis.com/auth/cloud-platform`
1005 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1006 #
1007 # By default, the task is sent to an instance which is available when
1008 # the task is attempted.
1009 #
1010 # Requests can only be sent to a specific instance if
1011 # [manual scaling is used in App Engine
1012 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1013 # App Engine Flex does not support instances. For more information, see
Bu Sun Kim65020912020-05-20 12:08:20 -07001014 # [App Engine Standard request
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001015 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
Bu Sun Kim65020912020-05-20 12:08:20 -07001016 # and [App Engine Flex request
1017 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001018 &quot;version&quot;: &quot;A String&quot;, # App version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001019 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001020 # By default, the task is sent to the version which is the default
1021 # version when the task is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001022 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001023 # For some queues or tasks which were created using the App Engine
1024 # Task Queue API, host is not parsable
1025 # into service,
1026 # version, and
1027 # instance. For example, some tasks
1028 # which were created using the App Engine SDK use a custom domain
1029 # name; custom domains are not parsed by Cloud Tasks. If
1030 # host is not parsable, then
1031 # service,
1032 # version, and
1033 # instance are the empty string.
1034 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001035 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001036 # By default, the task is sent to the service which is the default
1037 # service when the task is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001038 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001039 # For some queues or tasks which were created using the App Engine
1040 # Task Queue API, host is not parsable
1041 # into service,
1042 # version, and
1043 # instance. For example, some tasks
1044 # which were created using the App Engine SDK use a custom domain
1045 # name; custom domains are not parsed by Cloud Tasks. If
1046 # host is not parsable, then
1047 # service,
1048 # version, and
1049 # instance are the empty string.
1050 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001051 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001052 # The host is constructed from the domain name of the app associated with
1053 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1054 # service, version,
1055 # and instance. Tasks which were created using
1056 # the App Engine SDK might have a custom domain name.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001057 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001058 # For more information, see
1059 # [How Requests are
1060 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1061 },
1062 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
1063 # after which it becomes output only.
1064 #
1065 # The queue name.
1066 #
1067 # The queue name must have the following format:
1068 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1069 #
1070 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1071 # hyphens (-), colons (:), or periods (.).
1072 # For more information, see
1073 # [Identifying
1074 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1075 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
1076 # The list of available locations can be obtained by calling
1077 # ListLocations.
1078 # For more information, see https://cloud.google.com/about/locations/.
1079 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1080 # hyphens (-). The maximum length is 100 characters.
1081 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
1082 #
1083 # `state` can only be changed by called
1084 # PauseQueue,
1085 # ResumeQueue, or uploading
1086 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
1087 # UpdateQueue cannot be used to change `state`.
1088 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
1089 #
1090 # * For tasks created using Cloud Tasks: the queue-level retry settings
1091 # apply to all tasks in the queue that were created using Cloud Tasks.
1092 # Retry settings cannot be set on individual tasks.
1093 # * For tasks created using the App Engine SDK: the queue-level retry
1094 # settings apply to all tasks in the queue which do not have retry settings
1095 # explicitly set on the task and were created by the App Engine SDK. See
1096 # [App Engine
1097 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
1098 #
1099 # These settings determine when a failed task attempt is retried.
1100 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1101 # min_backoff and
1102 # max_backoff duration after it fails,
1103 # if the queue&#x27;s RetryConfig specifies that the task should be
1104 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001105 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001106 # If unspecified when the queue is created, Cloud Tasks will pick the
1107 # default.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001108 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001109 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001110 # `max_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001111 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001112 # This field has the same meaning as
1113 # [max_backoff_seconds in
1114 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1115 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001116 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001117 # A task&#x27;s retry interval starts at
1118 # min_backoff, then doubles
1119 # `max_doublings` times, then increases linearly, and finally
1120 # retries at intervals of
1121 # max_backoff up to
1122 # max_attempts times.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001123 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001124 # For example, if min_backoff is 10s,
1125 # max_backoff is 300s, and
1126 # `max_doublings` is 3, then the a task will first be retried in
1127 # 10s. The retry interval will double three times, and then
1128 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1129 # intervals of max_backoff until the
1130 # task has been attempted max_attempts
1131 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1132 # 240s, 300s, 300s, ....
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001133 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001134 # If unspecified when the queue is created, Cloud Tasks will pick the
1135 # default.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001136 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001137 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001138 # This field has the same meaning as
1139 # [max_doublings in
1140 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1141 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
1142 # retrying a failed task, measured from when the task was first
1143 # attempted. Once `max_retry_duration` time has passed *and* the
1144 # task has been attempted max_attempts
1145 # times, no further attempts will be made and the task will be
1146 # deleted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001147 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001148 # If zero, then the task age is unlimited.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001149 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001150 # If unspecified when the queue is created, Cloud Tasks will pick the
1151 # default.
1152 #
1153 #
1154 # `max_retry_duration` will be truncated to the nearest second.
1155 #
1156 # This field has the same meaning as
1157 # [task_age_limit in
1158 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1159 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
1160 #
1161 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
1162 # first attempt fails, then there will be `max_attempts - 1` retries). Must
1163 # be &gt;= -1.
1164 #
1165 # If unspecified when the queue is created, Cloud Tasks will pick the
1166 # default.
1167 #
1168 # -1 indicates unlimited attempts.
1169 #
1170 # This field has the same meaning as
1171 # [task_retry_limit in
1172 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1173 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1174 # min_backoff and
1175 # max_backoff duration after it fails,
1176 # if the queue&#x27;s RetryConfig specifies that the task should be
1177 # retried.
1178 #
1179 # If unspecified when the queue is created, Cloud Tasks will pick the
1180 # default.
1181 #
1182 #
1183 # `min_backoff` will be truncated to the nearest second.
1184 #
1185 # This field has the same meaning as
1186 # [min_backoff_seconds in
1187 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1188 },
1189 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001190</div>
1191
1192<div class="method">
1193 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
1194 <pre>Gets the access control policy for a Queue.
1195Returns an empty policy if the resource exists and does not have a policy
1196set.
1197
1198Authorization requires the following
1199[Google IAM](https://cloud.google.com/iam) permission on the specified
1200resource parent:
1201
1202* `cloudtasks.queues.getIamPolicy`
1203
1204Args:
1205 resource: string, REQUIRED: The resource for which the policy is being requested.
1206See the operation documentation for the appropriate value for this field. (required)
1207 body: object, The request body.
1208 The object takes the form of:
1209
1210{ # Request message for `GetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001211 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
Dan O'Mearadd494642020-05-01 07:42:23 -07001212 # `GetIamPolicy`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001213 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.
Dan O'Mearadd494642020-05-01 07:42:23 -07001214 #
1215 # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
1216 # rejected.
1217 #
1218 # Requests for policies with any conditional bindings must specify version 3.
1219 # Policies without any conditional bindings may specify any valid value or
1220 # leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -07001221 #
1222 # To learn which resources support conditions in their IAM policies, see the
1223 # [IAM
1224 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001225 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001226 }
1227
1228 x__xgafv: string, V1 error format.
1229 Allowed values
1230 1 - v1 error format
1231 2 - v2 error format
1232
1233Returns:
1234 An object of the form:
1235
Dan O'Mearadd494642020-05-01 07:42:23 -07001236 { # An Identity and Access Management (IAM) policy, which specifies access
1237 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001238 #
1239 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001240 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1241 # `members` to a single `role`. Members can be user accounts, service accounts,
1242 # Google groups, and domains (such as G Suite). A `role` is a named list of
1243 # permissions; each `role` can be an IAM predefined role or a user-created
1244 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001245 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001246 # For some types of Google Cloud resources, a `binding` can also specify a
1247 # `condition`, which is a logical expression that allows access to a resource
1248 # only if the expression evaluates to `true`. A condition can add constraints
1249 # based on attributes of the request, the resource, or both. To learn which
1250 # resources support conditions in their IAM policies, see the
1251 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001252 #
1253 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001254 #
1255 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001256 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001257 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001258 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1259 # &quot;members&quot;: [
1260 # &quot;user:mike@example.com&quot;,
1261 # &quot;group:admins@example.com&quot;,
1262 # &quot;domain:google.com&quot;,
1263 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001264 # ]
1265 # },
1266 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001267 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1268 # &quot;members&quot;: [
1269 # &quot;user:eve@example.com&quot;
1270 # ],
1271 # &quot;condition&quot;: {
1272 # &quot;title&quot;: &quot;expirable access&quot;,
1273 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1274 # &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 -07001275 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001276 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001277 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001278 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1279 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001280 # }
1281 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001282 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001283 #
1284 # bindings:
1285 # - members:
1286 # - user:mike@example.com
1287 # - group:admins@example.com
1288 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001289 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1290 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001291 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001292 # - user:eve@example.com
1293 # role: roles/resourcemanager.organizationViewer
1294 # condition:
1295 # title: expirable access
1296 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001297 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001298 # - etag: BwWWja0YfJA=
1299 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001300 #
1301 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001302 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001303 &quot;version&quot;: 42, # Specifies the format of the policy.
1304 #
1305 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1306 # are rejected.
1307 #
1308 # Any operation that affects conditional role bindings must specify version
1309 # `3`. This requirement applies to the following operations:
1310 #
1311 # * Getting a policy that includes a conditional role binding
1312 # * Adding a conditional role binding to a policy
1313 # * Changing a conditional role binding in a policy
1314 # * Removing any role binding, with or without a condition, from a policy
1315 # that includes conditions
1316 #
1317 # **Important:** If you use IAM Conditions, you must include the `etag` field
1318 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1319 # you to overwrite a version `3` policy with a version `1` policy, and all of
1320 # the conditions in the version `3` policy are lost.
1321 #
1322 # If a policy does not include any conditions, operations on that policy may
1323 # specify any valid version or leave the field unset.
1324 #
1325 # To learn which resources support conditions in their IAM policies, see the
1326 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1327 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001328 # `condition` that determines how and when the `bindings` are applied. Each
1329 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001330 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001331 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1332 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001333 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001334 # `members` can have the following values:
1335 #
1336 # * `allUsers`: A special identifier that represents anyone who is
1337 # on the internet; with or without a Google account.
1338 #
1339 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1340 # who is authenticated with a Google account or a service account.
1341 #
1342 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001343 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001344 #
1345 #
1346 # * `serviceAccount:{emailid}`: An email address that represents a service
1347 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1348 #
1349 # * `group:{emailid}`: An email address that represents a Google group.
1350 # For example, `admins@example.com`.
1351 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001352 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1353 # identifier) representing a user that has been recently deleted. For
1354 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1355 # recovered, this value reverts to `user:{emailid}` and the recovered user
1356 # retains the role in the binding.
1357 #
1358 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1359 # unique identifier) representing a service account that has been recently
1360 # deleted. For example,
1361 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1362 # If the service account is undeleted, this value reverts to
1363 # `serviceAccount:{emailid}` and the undeleted service account retains the
1364 # role in the binding.
1365 #
1366 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1367 # identifier) representing a Google group that has been recently
1368 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1369 # the group is recovered, this value reverts to `group:{emailid}` and the
1370 # recovered group retains the role in the binding.
1371 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001372 #
1373 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1374 # users of that domain. For example, `google.com` or `example.com`.
1375 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001376 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001377 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001378 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1379 #
1380 # If the condition evaluates to `true`, then this binding applies to the
1381 # current request.
1382 #
1383 # If the condition evaluates to `false`, then this binding does not apply to
1384 # the current request. However, a different role binding might grant the same
1385 # role to one or more of the members in this binding.
1386 #
1387 # To learn which resources support conditions in their IAM policies, see the
1388 # [IAM
1389 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1390 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1391 # are documented at https://github.com/google/cel-spec.
1392 #
1393 # Example (Comparison):
1394 #
1395 # title: &quot;Summary size limit&quot;
1396 # description: &quot;Determines if a summary is less than 100 chars&quot;
1397 # expression: &quot;document.summary.size() &lt; 100&quot;
1398 #
1399 # Example (Equality):
1400 #
1401 # title: &quot;Requestor is owner&quot;
1402 # description: &quot;Determines if requestor is the document owner&quot;
1403 # expression: &quot;document.owner == request.auth.claims.email&quot;
1404 #
1405 # Example (Logic):
1406 #
1407 # title: &quot;Public documents&quot;
1408 # description: &quot;Determine whether the document should be publicly visible&quot;
1409 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1410 #
1411 # Example (Data Manipulation):
1412 #
1413 # title: &quot;Notification string&quot;
1414 # description: &quot;Create a notification string with a timestamp.&quot;
1415 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1416 #
1417 # The exact variables and functions that may be referenced within an expression
1418 # are determined by the service that evaluates it. See the service
1419 # documentation for additional information.
1420 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1421 # describes the expression, e.g. when hovered over it in a UI.
1422 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1423 # syntax.
1424 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1425 # reporting, e.g. a file name and a position in the file.
1426 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1427 # its purpose. This can be used e.g. in UIs which allow to enter the
1428 # expression.
1429 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001430 },
1431 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001432 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1433 # prevent simultaneous updates of a policy from overwriting each other.
1434 # It is strongly suggested that systems make use of the `etag` in the
1435 # read-modify-write cycle to perform policy updates in order to avoid race
1436 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1437 # systems are expected to put that etag in the request to `setIamPolicy` to
1438 # ensure that their change will be applied to the same version of the policy.
1439 #
1440 # **Important:** If you use IAM Conditions, you must include the `etag` field
1441 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1442 # you to overwrite a version `3` policy with a version `1` policy, and all of
1443 # the conditions in the version `3` policy are lost.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001444 }</pre>
1445</div>
1446
1447<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001448 <code class="details" id="list">list(parent, pageToken=None, filter=None, pageSize=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001449 <pre>Lists queues.
1450
1451Queues are returned in lexicographical order.
1452
1453Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001454 parent: string, Required. The location name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001455For example: `projects/PROJECT_ID/locations/LOCATION_ID` (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001456 pageToken: string, A token identifying the page of results to return.
1457
1458To request the first page results, page_token must be empty. To
1459request the next page of results, page_token must be the value of
1460next_page_token returned
1461from the previous call to ListQueues
1462method. It is an error to switch the value of the
1463filter while iterating through pages.
Bu Sun Kim65020912020-05-20 12:08:20 -07001464 filter: string, `filter` can be used to specify a subset of queues. Any Queue
1465field can be used as a filter and several operators as supported.
1466For example: `&lt;=, &lt;, &gt;=, &gt;, !=, =, :`. The filter syntax is the same as
1467described in
1468[Stackdriver&#x27;s Advanced Logs
1469Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
1470
1471Sample filter &quot;state: PAUSED&quot;.
1472
1473Note that using filters might cause fewer queues than the
1474requested page_size to be returned.
Dan O'Mearadd494642020-05-01 07:42:23 -07001475 pageSize: integer, Requested page size.
1476
1477The maximum page size is 9800. If unspecified, the page size will
1478be the maximum. Fewer queues than requested might be returned,
1479even if more queues exist; use the
1480next_page_token in the
1481response to determine if more queues exist.
Bu Sun Kim65020912020-05-20 12:08:20 -07001482 x__xgafv: string, V1 error format.
1483 Allowed values
1484 1 - v1 error format
1485 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001486
1487Returns:
1488 An object of the form:
1489
1490 { # Response message for ListQueues.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001491 &quot;queues&quot;: [ # The list of queues.
1492 { # A queue is a container of related tasks. Queues are configured to manage
1493 # how those tasks are dispatched. Configurable properties include rate limits,
1494 # retry options, queue types, and others.
1495 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
1496 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
1497 # field is unset, then no logs are written.
1498 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1499 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
1500 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1501 # This field may contain any value between 0.0 and 1.0, inclusive.
1502 # 0.0 is the default and means that no operations are logged.
1503 },
1504 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
1505 #
1506 # All tasks that were created before this time
1507 # were purged.
1508 #
1509 # A queue can be purged using PurgeQueue, the
1510 # [App Engine Task Queue SDK, or the Cloud
1511 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
1512 #
1513 # Purge time will be truncated to the nearest microsecond. Purge
1514 # time will be unset if the queue has never been purged.
1515 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
1516 #
1517 # rate_limits and retry_config are
1518 # related because they both control task attempts. However they control task
1519 # attempts in different ways:
1520 #
1521 # * rate_limits controls the total rate of
1522 # dispatches from a queue (i.e. all traffic dispatched from the
1523 # queue, regardless of whether the dispatch is from a first
1524 # attempt or a retry).
1525 # * retry_config controls what happens to
1526 # particular a task after its first attempt fails. That is,
1527 # retry_config controls task retries (the
1528 # second attempt, third attempt, etc).
1529 #
1530 # The queue&#x27;s actual dispatch rate is the result of:
1531 #
1532 # * Number of tasks in the queue
1533 # * User-specified throttling: rate_limits,
1534 # retry_config, and the
1535 # queue&#x27;s state.
1536 # * System throttling due to `429` (Too Many Requests) or `503` (Service
1537 # Unavailable) responses from the worker, high error rates, or to smooth
1538 # sudden large traffic spikes.
1539 #
1540 # This message determines the maximum rate that tasks can be dispatched by a
1541 # queue, regardless of whether the dispatch is a first task attempt or a retry.
1542 #
1543 # Note: The debugging command, RunTask, will run a task
1544 # even if the queue has reached its RateLimits.
1545 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
1546 #
1547 # Max burst size limits how fast tasks in queue are processed when
1548 # many tasks are in the queue and the rate is high. This field
1549 # allows the queue to have a high rate so processing starts shortly
1550 # after a task is enqueued, but still limits resource usage when
1551 # many tasks are enqueued in a short period of time.
1552 #
1553 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1554 # algorithm is used to control the rate of task dispatches. Each
1555 # queue has a token bucket that holds tokens, up to the maximum
1556 # specified by `max_burst_size`. Each time a task is dispatched, a
1557 # token is removed from the bucket. Tasks will be dispatched until
1558 # the queue&#x27;s bucket runs out of tokens. The bucket will be
1559 # continuously refilled with new tokens based on
1560 # max_dispatches_per_second.
1561 #
1562 # Cloud Tasks will pick the value of `max_burst_size` based on the
1563 # value of
1564 # max_dispatches_per_second.
1565 #
1566 # For queues that were created or updated using
1567 # `queue.yaml/xml`, `max_burst_size` is equal to
1568 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1569 # Since `max_burst_size` is output only, if
1570 # UpdateQueue is called on a queue
1571 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
1572 # on the value of
1573 # max_dispatches_per_second,
1574 # regardless of whether
1575 # max_dispatches_per_second
1576 # is updated.
1577 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
1578 #
1579 # If unspecified when the queue is created, Cloud Tasks will pick the
1580 # default.
1581 #
1582 # * The maximum allowed value is 500.
1583 #
1584 #
1585 # This field has the same meaning as
1586 # [rate in
1587 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
1588 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
1589 # to be dispatched for this queue. After this threshold has been
1590 # reached, Cloud Tasks stops dispatching tasks until the number of
1591 # concurrent requests decreases.
1592 #
1593 # If unspecified when the queue is created, Cloud Tasks will pick the
1594 # default.
1595 #
1596 #
1597 # The maximum allowed value is 5,000.
1598 #
1599 #
1600 # This field has the same meaning as
1601 # [max_concurrent_requests in
1602 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
1603 },
1604 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
1605 # task-level app_engine_routing.
1606 # These settings apply only to
1607 # App Engine tasks in this queue.
1608 # Http tasks are not affected.
1609 #
1610 # If set, `app_engine_routing_override` is used for all
1611 # App Engine tasks in the queue, no matter what the
1612 # setting is for the
1613 # task-level app_engine_routing.
1614 #
1615 # Defines routing characteristics specific to App Engine - service, version,
1616 # and instance.
1617 #
1618 # For more information about services, versions, and instances see
1619 # [An Overview of App
1620 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1621 # [Microservices Architecture on Google App
1622 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1623 # [App Engine Standard request
1624 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1625 # and [App Engine Flex request
1626 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1627 #
1628 # Using AppEngineRouting requires
1629 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1630 # Google IAM permission for the project
1631 # and the following scope:
1632 #
1633 # `https://www.googleapis.com/auth/cloud-platform`
1634 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1635 #
1636 # By default, the task is sent to an instance which is available when
1637 # the task is attempted.
1638 #
1639 # Requests can only be sent to a specific instance if
1640 # [manual scaling is used in App Engine
1641 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1642 # App Engine Flex does not support instances. For more information, see
1643 # [App Engine Standard request
1644 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1645 # and [App Engine Flex request
1646 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1647 &quot;version&quot;: &quot;A String&quot;, # App version.
1648 #
1649 # By default, the task is sent to the version which is the default
1650 # version when the task is attempted.
1651 #
1652 # For some queues or tasks which were created using the App Engine
1653 # Task Queue API, host is not parsable
1654 # into service,
1655 # version, and
1656 # instance. For example, some tasks
1657 # which were created using the App Engine SDK use a custom domain
1658 # name; custom domains are not parsed by Cloud Tasks. If
1659 # host is not parsable, then
1660 # service,
1661 # version, and
1662 # instance are the empty string.
1663 &quot;service&quot;: &quot;A String&quot;, # App service.
1664 #
1665 # By default, the task is sent to the service which is the default
1666 # service when the task is attempted.
1667 #
1668 # For some queues or tasks which were created using the App Engine
1669 # Task Queue API, host is not parsable
1670 # into service,
1671 # version, and
1672 # instance. For example, some tasks
1673 # which were created using the App Engine SDK use a custom domain
1674 # name; custom domains are not parsed by Cloud Tasks. If
1675 # host is not parsable, then
1676 # service,
1677 # version, and
1678 # instance are the empty string.
1679 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1680 #
1681 # The host is constructed from the domain name of the app associated with
1682 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1683 # service, version,
1684 # and instance. Tasks which were created using
1685 # the App Engine SDK might have a custom domain name.
1686 #
1687 # For more information, see
1688 # [How Requests are
1689 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1690 },
1691 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
1692 # after which it becomes output only.
1693 #
1694 # The queue name.
1695 #
1696 # The queue name must have the following format:
1697 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1698 #
1699 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1700 # hyphens (-), colons (:), or periods (.).
1701 # For more information, see
1702 # [Identifying
1703 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1704 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
1705 # The list of available locations can be obtained by calling
1706 # ListLocations.
1707 # For more information, see https://cloud.google.com/about/locations/.
1708 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1709 # hyphens (-). The maximum length is 100 characters.
1710 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
1711 #
1712 # `state` can only be changed by called
1713 # PauseQueue,
1714 # ResumeQueue, or uploading
1715 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
1716 # UpdateQueue cannot be used to change `state`.
1717 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
1718 #
1719 # * For tasks created using Cloud Tasks: the queue-level retry settings
1720 # apply to all tasks in the queue that were created using Cloud Tasks.
1721 # Retry settings cannot be set on individual tasks.
1722 # * For tasks created using the App Engine SDK: the queue-level retry
1723 # settings apply to all tasks in the queue which do not have retry settings
1724 # explicitly set on the task and were created by the App Engine SDK. See
1725 # [App Engine
1726 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
1727 #
1728 # These settings determine when a failed task attempt is retried.
1729 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1730 # min_backoff and
1731 # max_backoff duration after it fails,
1732 # if the queue&#x27;s RetryConfig specifies that the task should be
1733 # retried.
1734 #
1735 # If unspecified when the queue is created, Cloud Tasks will pick the
1736 # default.
1737 #
1738 #
1739 # `max_backoff` will be truncated to the nearest second.
1740 #
1741 # This field has the same meaning as
1742 # [max_backoff_seconds in
1743 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1744 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
1745 #
1746 # A task&#x27;s retry interval starts at
1747 # min_backoff, then doubles
1748 # `max_doublings` times, then increases linearly, and finally
1749 # retries at intervals of
1750 # max_backoff up to
1751 # max_attempts times.
1752 #
1753 # For example, if min_backoff is 10s,
1754 # max_backoff is 300s, and
1755 # `max_doublings` is 3, then the a task will first be retried in
1756 # 10s. The retry interval will double three times, and then
1757 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1758 # intervals of max_backoff until the
1759 # task has been attempted max_attempts
1760 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1761 # 240s, 300s, 300s, ....
1762 #
1763 # If unspecified when the queue is created, Cloud Tasks will pick the
1764 # default.
1765 #
1766 #
1767 # This field has the same meaning as
1768 # [max_doublings in
1769 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1770 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
1771 # retrying a failed task, measured from when the task was first
1772 # attempted. Once `max_retry_duration` time has passed *and* the
1773 # task has been attempted max_attempts
1774 # times, no further attempts will be made and the task will be
1775 # deleted.
1776 #
1777 # If zero, then the task age is unlimited.
1778 #
1779 # If unspecified when the queue is created, Cloud Tasks will pick the
1780 # default.
1781 #
1782 #
1783 # `max_retry_duration` will be truncated to the nearest second.
1784 #
1785 # This field has the same meaning as
1786 # [task_age_limit in
1787 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1788 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
1789 #
1790 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
1791 # first attempt fails, then there will be `max_attempts - 1` retries). Must
1792 # be &gt;= -1.
1793 #
1794 # If unspecified when the queue is created, Cloud Tasks will pick the
1795 # default.
1796 #
1797 # -1 indicates unlimited attempts.
1798 #
1799 # This field has the same meaning as
1800 # [task_retry_limit in
1801 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1802 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1803 # min_backoff and
1804 # max_backoff duration after it fails,
1805 # if the queue&#x27;s RetryConfig specifies that the task should be
1806 # retried.
1807 #
1808 # If unspecified when the queue is created, Cloud Tasks will pick the
1809 # default.
1810 #
1811 #
1812 # `min_backoff` will be truncated to the nearest second.
1813 #
1814 # This field has the same meaning as
1815 # [min_backoff_seconds in
1816 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1817 },
1818 },
1819 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001820 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results.
1821 #
1822 # To return the next page of results, call
1823 # ListQueues with this value as the
1824 # page_token.
1825 #
1826 # If the next_page_token is empty, there are no more results.
1827 #
1828 # The page token is valid for only 2 hours.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001829 }</pre>
1830</div>
1831
1832<div class="method">
1833 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1834 <pre>Retrieves the next page of results.
1835
1836Args:
1837 previous_request: The request for the previous page. (required)
1838 previous_response: The response from the request for the previous page. (required)
1839
1840Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001841 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001842 page. Returns None if there are no more items in the collection.
1843 </pre>
1844</div>
1845
1846<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001847 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001848 <pre>Updates a queue.
1849
1850This method creates the queue if it does not exist and updates
1851the queue if it does exist.
1852
1853Queues created with this method allow tasks to live for a maximum of 31
1854days. After a task is 31 days old, the task will be deleted regardless of whether
1855it was dispatched or not.
1856
1857WARNING: Using this method may have unintended side effects if you are
1858using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
1859Read
1860[Overview of Queue Management and
1861queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
1862this method.
1863
1864Args:
1865 name: string, Caller-specified and required in CreateQueue,
1866after which it becomes output only.
1867
1868The queue name.
1869
1870The queue name must have the following format:
1871`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1872
1873* `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1874 hyphens (-), colons (:), or periods (.).
1875 For more information, see
1876 [Identifying
1877 projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -07001878* `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001879 The list of available locations can be obtained by calling
1880 ListLocations.
1881 For more information, see https://cloud.google.com/about/locations/.
1882* `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1883 hyphens (-). The maximum length is 100 characters. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001884 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001885 The object takes the form of:
1886
1887{ # A queue is a container of related tasks. Queues are configured to manage
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001888 # how those tasks are dispatched. Configurable properties include rate limits,
1889 # retry options, queue types, and others.
1890 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
1891 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
1892 # field is unset, then no logs are written.
1893 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1894 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
1895 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1896 # This field may contain any value between 0.0 and 1.0, inclusive.
1897 # 0.0 is the default and means that no operations are logged.
1898 },
1899 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
1900 #
1901 # All tasks that were created before this time
1902 # were purged.
1903 #
1904 # A queue can be purged using PurgeQueue, the
1905 # [App Engine Task Queue SDK, or the Cloud
1906 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
1907 #
1908 # Purge time will be truncated to the nearest microsecond. Purge
1909 # time will be unset if the queue has never been purged.
1910 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
1911 #
1912 # rate_limits and retry_config are
1913 # related because they both control task attempts. However they control task
1914 # attempts in different ways:
1915 #
1916 # * rate_limits controls the total rate of
1917 # dispatches from a queue (i.e. all traffic dispatched from the
1918 # queue, regardless of whether the dispatch is from a first
1919 # attempt or a retry).
1920 # * retry_config controls what happens to
1921 # particular a task after its first attempt fails. That is,
1922 # retry_config controls task retries (the
1923 # second attempt, third attempt, etc).
1924 #
1925 # The queue&#x27;s actual dispatch rate is the result of:
1926 #
1927 # * Number of tasks in the queue
1928 # * User-specified throttling: rate_limits,
1929 # retry_config, and the
1930 # queue&#x27;s state.
1931 # * System throttling due to `429` (Too Many Requests) or `503` (Service
1932 # Unavailable) responses from the worker, high error rates, or to smooth
1933 # sudden large traffic spikes.
1934 #
1935 # This message determines the maximum rate that tasks can be dispatched by a
1936 # queue, regardless of whether the dispatch is a first task attempt or a retry.
1937 #
1938 # Note: The debugging command, RunTask, will run a task
1939 # even if the queue has reached its RateLimits.
1940 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001941 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001942 # Max burst size limits how fast tasks in queue are processed when
1943 # many tasks are in the queue and the rate is high. This field
1944 # allows the queue to have a high rate so processing starts shortly
1945 # after a task is enqueued, but still limits resource usage when
1946 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001947 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001948 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1949 # algorithm is used to control the rate of task dispatches. Each
1950 # queue has a token bucket that holds tokens, up to the maximum
1951 # specified by `max_burst_size`. Each time a task is dispatched, a
1952 # token is removed from the bucket. Tasks will be dispatched until
1953 # the queue&#x27;s bucket runs out of tokens. The bucket will be
1954 # continuously refilled with new tokens based on
1955 # max_dispatches_per_second.
1956 #
1957 # Cloud Tasks will pick the value of `max_burst_size` based on the
1958 # value of
1959 # max_dispatches_per_second.
1960 #
1961 # For queues that were created or updated using
1962 # `queue.yaml/xml`, `max_burst_size` is equal to
1963 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1964 # Since `max_burst_size` is output only, if
1965 # UpdateQueue is called on a queue
1966 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
1967 # on the value of
1968 # max_dispatches_per_second,
1969 # regardless of whether
1970 # max_dispatches_per_second
1971 # is updated.
1972 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
1973 #
1974 # If unspecified when the queue is created, Cloud Tasks will pick the
1975 # default.
1976 #
1977 # * The maximum allowed value is 500.
1978 #
1979 #
1980 # This field has the same meaning as
1981 # [rate in
1982 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
1983 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
1984 # to be dispatched for this queue. After this threshold has been
1985 # reached, Cloud Tasks stops dispatching tasks until the number of
1986 # concurrent requests decreases.
1987 #
1988 # If unspecified when the queue is created, Cloud Tasks will pick the
1989 # default.
1990 #
1991 #
1992 # The maximum allowed value is 5,000.
1993 #
1994 #
1995 # This field has the same meaning as
1996 # [max_concurrent_requests in
1997 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
1998 },
1999 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
2000 # task-level app_engine_routing.
2001 # These settings apply only to
2002 # App Engine tasks in this queue.
2003 # Http tasks are not affected.
2004 #
2005 # If set, `app_engine_routing_override` is used for all
2006 # App Engine tasks in the queue, no matter what the
2007 # setting is for the
2008 # task-level app_engine_routing.
2009 #
2010 # Defines routing characteristics specific to App Engine - service, version,
2011 # and instance.
2012 #
2013 # For more information about services, versions, and instances see
2014 # [An Overview of App
2015 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2016 # [Microservices Architecture on Google App
2017 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2018 # [App Engine Standard request
2019 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2020 # and [App Engine Flex request
2021 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2022 #
2023 # Using AppEngineRouting requires
2024 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2025 # Google IAM permission for the project
2026 # and the following scope:
2027 #
2028 # `https://www.googleapis.com/auth/cloud-platform`
2029 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2030 #
2031 # By default, the task is sent to an instance which is available when
2032 # the task is attempted.
2033 #
2034 # Requests can only be sent to a specific instance if
2035 # [manual scaling is used in App Engine
2036 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2037 # App Engine Flex does not support instances. For more information, see
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002038 # [App Engine Standard request
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002039 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002040 # and [App Engine Flex request
2041 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002042 &quot;version&quot;: &quot;A String&quot;, # App version.
Dan O'Mearadd494642020-05-01 07:42:23 -07002043 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002044 # By default, the task is sent to the version which is the default
2045 # version when the task is attempted.
Dan O'Mearadd494642020-05-01 07:42:23 -07002046 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002047 # For some queues or tasks which were created using the App Engine
2048 # Task Queue API, host is not parsable
2049 # into service,
2050 # version, and
2051 # instance. For example, some tasks
2052 # which were created using the App Engine SDK use a custom domain
2053 # name; custom domains are not parsed by Cloud Tasks. If
2054 # host is not parsable, then
2055 # service,
2056 # version, and
2057 # instance are the empty string.
2058 &quot;service&quot;: &quot;A String&quot;, # App service.
2059 #
2060 # By default, the task is sent to the service which is the default
2061 # service when the task is attempted.
2062 #
2063 # For some queues or tasks which were created using the App Engine
2064 # Task Queue API, host is not parsable
2065 # into service,
2066 # version, and
2067 # instance. For example, some tasks
2068 # which were created using the App Engine SDK use a custom domain
2069 # name; custom domains are not parsed by Cloud Tasks. If
2070 # host is not parsable, then
2071 # service,
2072 # version, and
2073 # instance are the empty string.
2074 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2075 #
2076 # The host is constructed from the domain name of the app associated with
2077 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2078 # service, version,
2079 # and instance. Tasks which were created using
2080 # the App Engine SDK might have a custom domain name.
2081 #
2082 # For more information, see
2083 # [How Requests are
2084 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2085 },
2086 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2087 # after which it becomes output only.
2088 #
2089 # The queue name.
2090 #
2091 # The queue name must have the following format:
2092 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2093 #
2094 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2095 # hyphens (-), colons (:), or periods (.).
2096 # For more information, see
2097 # [Identifying
2098 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2099 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2100 # The list of available locations can be obtained by calling
2101 # ListLocations.
2102 # For more information, see https://cloud.google.com/about/locations/.
2103 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2104 # hyphens (-). The maximum length is 100 characters.
2105 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2106 #
2107 # `state` can only be changed by called
2108 # PauseQueue,
2109 # ResumeQueue, or uploading
2110 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2111 # UpdateQueue cannot be used to change `state`.
2112 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
2113 #
2114 # * For tasks created using Cloud Tasks: the queue-level retry settings
2115 # apply to all tasks in the queue that were created using Cloud Tasks.
2116 # Retry settings cannot be set on individual tasks.
2117 # * For tasks created using the App Engine SDK: the queue-level retry
2118 # settings apply to all tasks in the queue which do not have retry settings
2119 # explicitly set on the task and were created by the App Engine SDK. See
2120 # [App Engine
2121 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2122 #
2123 # These settings determine when a failed task attempt is retried.
2124 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2125 # min_backoff and
2126 # max_backoff duration after it fails,
2127 # if the queue&#x27;s RetryConfig specifies that the task should be
2128 # retried.
2129 #
2130 # If unspecified when the queue is created, Cloud Tasks will pick the
2131 # default.
2132 #
2133 #
2134 # `max_backoff` will be truncated to the nearest second.
2135 #
2136 # This field has the same meaning as
2137 # [max_backoff_seconds in
2138 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2139 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2140 #
2141 # A task&#x27;s retry interval starts at
2142 # min_backoff, then doubles
2143 # `max_doublings` times, then increases linearly, and finally
2144 # retries at intervals of
2145 # max_backoff up to
2146 # max_attempts times.
2147 #
2148 # For example, if min_backoff is 10s,
2149 # max_backoff is 300s, and
2150 # `max_doublings` is 3, then the a task will first be retried in
2151 # 10s. The retry interval will double three times, and then
2152 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2153 # intervals of max_backoff until the
2154 # task has been attempted max_attempts
2155 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2156 # 240s, 300s, 300s, ....
2157 #
2158 # If unspecified when the queue is created, Cloud Tasks will pick the
2159 # default.
2160 #
2161 #
2162 # This field has the same meaning as
2163 # [max_doublings in
2164 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2165 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2166 # retrying a failed task, measured from when the task was first
2167 # attempted. Once `max_retry_duration` time has passed *and* the
2168 # task has been attempted max_attempts
2169 # times, no further attempts will be made and the task will be
2170 # deleted.
2171 #
2172 # If zero, then the task age is unlimited.
2173 #
2174 # If unspecified when the queue is created, Cloud Tasks will pick the
2175 # default.
2176 #
2177 #
2178 # `max_retry_duration` will be truncated to the nearest second.
2179 #
2180 # This field has the same meaning as
2181 # [task_age_limit in
2182 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2183 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
2184 #
2185 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2186 # first attempt fails, then there will be `max_attempts - 1` retries). Must
2187 # be &gt;= -1.
2188 #
2189 # If unspecified when the queue is created, Cloud Tasks will pick the
2190 # default.
2191 #
2192 # -1 indicates unlimited attempts.
2193 #
2194 # This field has the same meaning as
2195 # [task_retry_limit in
2196 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2197 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2198 # min_backoff and
2199 # max_backoff duration after it fails,
2200 # if the queue&#x27;s RetryConfig specifies that the task should be
2201 # retried.
2202 #
2203 # If unspecified when the queue is created, Cloud Tasks will pick the
2204 # default.
2205 #
2206 #
2207 # `min_backoff` will be truncated to the nearest second.
2208 #
2209 # This field has the same meaning as
2210 # [min_backoff_seconds in
2211 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2212 },
2213}
2214
2215 updateMask: string, A mask used to specify which fields of the queue are being updated.
2216
2217If empty, then all fields will be updated.
2218 x__xgafv: string, V1 error format.
2219 Allowed values
2220 1 - v1 error format
2221 2 - v2 error format
2222
2223Returns:
2224 An object of the form:
2225
2226 { # A queue is a container of related tasks. Queues are configured to manage
2227 # how those tasks are dispatched. Configurable properties include rate limits,
2228 # retry options, queue types, and others.
2229 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
2230 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2231 # field is unset, then no logs are written.
2232 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2233 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
2234 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2235 # This field may contain any value between 0.0 and 1.0, inclusive.
2236 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002237 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002238 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002239 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002240 # All tasks that were created before this time
2241 # were purged.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002242 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002243 # A queue can be purged using PurgeQueue, the
2244 # [App Engine Task Queue SDK, or the Cloud
2245 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002246 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002247 # Purge time will be truncated to the nearest microsecond. Purge
2248 # time will be unset if the queue has never been purged.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002249 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002250 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002251 # rate_limits and retry_config are
2252 # related because they both control task attempts. However they control task
2253 # attempts in different ways:
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002254 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002255 # * rate_limits controls the total rate of
2256 # dispatches from a queue (i.e. all traffic dispatched from the
2257 # queue, regardless of whether the dispatch is from a first
2258 # attempt or a retry).
2259 # * retry_config controls what happens to
2260 # particular a task after its first attempt fails. That is,
2261 # retry_config controls task retries (the
2262 # second attempt, third attempt, etc).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002263 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002264 # The queue&#x27;s actual dispatch rate is the result of:
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002265 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002266 # * Number of tasks in the queue
2267 # * User-specified throttling: rate_limits,
2268 # retry_config, and the
2269 # queue&#x27;s state.
2270 # * System throttling due to `429` (Too Many Requests) or `503` (Service
2271 # Unavailable) responses from the worker, high error rates, or to smooth
2272 # sudden large traffic spikes.
2273 #
2274 # This message determines the maximum rate that tasks can be dispatched by a
2275 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2276 #
2277 # Note: The debugging command, RunTask, will run a task
2278 # even if the queue has reached its RateLimits.
2279 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
2280 #
2281 # Max burst size limits how fast tasks in queue are processed when
2282 # many tasks are in the queue and the rate is high. This field
2283 # allows the queue to have a high rate so processing starts shortly
2284 # after a task is enqueued, but still limits resource usage when
2285 # many tasks are enqueued in a short period of time.
2286 #
2287 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2288 # algorithm is used to control the rate of task dispatches. Each
2289 # queue has a token bucket that holds tokens, up to the maximum
2290 # specified by `max_burst_size`. Each time a task is dispatched, a
2291 # token is removed from the bucket. Tasks will be dispatched until
2292 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2293 # continuously refilled with new tokens based on
2294 # max_dispatches_per_second.
2295 #
2296 # Cloud Tasks will pick the value of `max_burst_size` based on the
2297 # value of
2298 # max_dispatches_per_second.
2299 #
2300 # For queues that were created or updated using
2301 # `queue.yaml/xml`, `max_burst_size` is equal to
2302 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2303 # Since `max_burst_size` is output only, if
2304 # UpdateQueue is called on a queue
2305 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2306 # on the value of
2307 # max_dispatches_per_second,
2308 # regardless of whether
2309 # max_dispatches_per_second
2310 # is updated.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002311 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
2312 #
2313 # If unspecified when the queue is created, Cloud Tasks will pick the
2314 # default.
2315 #
2316 # * The maximum allowed value is 500.
2317 #
2318 #
2319 # This field has the same meaning as
2320 # [rate in
2321 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002322 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2323 # to be dispatched for this queue. After this threshold has been
2324 # reached, Cloud Tasks stops dispatching tasks until the number of
2325 # concurrent requests decreases.
2326 #
2327 # If unspecified when the queue is created, Cloud Tasks will pick the
2328 # default.
2329 #
2330 #
2331 # The maximum allowed value is 5,000.
2332 #
2333 #
2334 # This field has the same meaning as
2335 # [max_concurrent_requests in
2336 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002337 },
2338 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
2339 # task-level app_engine_routing.
2340 # These settings apply only to
2341 # App Engine tasks in this queue.
2342 # Http tasks are not affected.
2343 #
2344 # If set, `app_engine_routing_override` is used for all
2345 # App Engine tasks in the queue, no matter what the
2346 # setting is for the
2347 # task-level app_engine_routing.
2348 #
2349 # Defines routing characteristics specific to App Engine - service, version,
2350 # and instance.
2351 #
2352 # For more information about services, versions, and instances see
2353 # [An Overview of App
2354 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2355 # [Microservices Architecture on Google App
2356 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2357 # [App Engine Standard request
2358 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2359 # and [App Engine Flex request
2360 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2361 #
2362 # Using AppEngineRouting requires
2363 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2364 # Google IAM permission for the project
2365 # and the following scope:
2366 #
2367 # `https://www.googleapis.com/auth/cloud-platform`
2368 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2369 #
2370 # By default, the task is sent to an instance which is available when
2371 # the task is attempted.
2372 #
2373 # Requests can only be sent to a specific instance if
2374 # [manual scaling is used in App Engine
2375 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2376 # App Engine Flex does not support instances. For more information, see
2377 # [App Engine Standard request
2378 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2379 # and [App Engine Flex request
2380 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2381 &quot;version&quot;: &quot;A String&quot;, # App version.
2382 #
2383 # By default, the task is sent to the version which is the default
2384 # version when the task is attempted.
2385 #
2386 # For some queues or tasks which were created using the App Engine
2387 # Task Queue API, host is not parsable
2388 # into service,
2389 # version, and
2390 # instance. For example, some tasks
2391 # which were created using the App Engine SDK use a custom domain
2392 # name; custom domains are not parsed by Cloud Tasks. If
2393 # host is not parsable, then
2394 # service,
2395 # version, and
2396 # instance are the empty string.
2397 &quot;service&quot;: &quot;A String&quot;, # App service.
2398 #
2399 # By default, the task is sent to the service which is the default
2400 # service when the task is attempted.
2401 #
2402 # For some queues or tasks which were created using the App Engine
2403 # Task Queue API, host is not parsable
2404 # into service,
2405 # version, and
2406 # instance. For example, some tasks
2407 # which were created using the App Engine SDK use a custom domain
2408 # name; custom domains are not parsed by Cloud Tasks. If
2409 # host is not parsable, then
2410 # service,
2411 # version, and
2412 # instance are the empty string.
2413 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2414 #
2415 # The host is constructed from the domain name of the app associated with
2416 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2417 # service, version,
2418 # and instance. Tasks which were created using
2419 # the App Engine SDK might have a custom domain name.
2420 #
2421 # For more information, see
2422 # [How Requests are
2423 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2424 },
2425 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2426 # after which it becomes output only.
2427 #
2428 # The queue name.
2429 #
2430 # The queue name must have the following format:
2431 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2432 #
2433 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2434 # hyphens (-), colons (:), or periods (.).
2435 # For more information, see
2436 # [Identifying
2437 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2438 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2439 # The list of available locations can be obtained by calling
2440 # ListLocations.
2441 # For more information, see https://cloud.google.com/about/locations/.
2442 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2443 # hyphens (-). The maximum length is 100 characters.
2444 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2445 #
2446 # `state` can only be changed by called
2447 # PauseQueue,
2448 # ResumeQueue, or uploading
2449 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2450 # UpdateQueue cannot be used to change `state`.
2451 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
2452 #
2453 # * For tasks created using Cloud Tasks: the queue-level retry settings
2454 # apply to all tasks in the queue that were created using Cloud Tasks.
2455 # Retry settings cannot be set on individual tasks.
2456 # * For tasks created using the App Engine SDK: the queue-level retry
2457 # settings apply to all tasks in the queue which do not have retry settings
2458 # explicitly set on the task and were created by the App Engine SDK. See
2459 # [App Engine
2460 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2461 #
2462 # These settings determine when a failed task attempt is retried.
2463 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2464 # min_backoff and
2465 # max_backoff duration after it fails,
2466 # if the queue&#x27;s RetryConfig specifies that the task should be
2467 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002468 #
2469 # If unspecified when the queue is created, Cloud Tasks will pick the
2470 # default.
2471 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002472 #
2473 # `max_backoff` will be truncated to the nearest second.
2474 #
2475 # This field has the same meaning as
2476 # [max_backoff_seconds in
2477 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2478 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2479 #
2480 # A task&#x27;s retry interval starts at
2481 # min_backoff, then doubles
2482 # `max_doublings` times, then increases linearly, and finally
2483 # retries at intervals of
2484 # max_backoff up to
2485 # max_attempts times.
2486 #
2487 # For example, if min_backoff is 10s,
2488 # max_backoff is 300s, and
2489 # `max_doublings` is 3, then the a task will first be retried in
2490 # 10s. The retry interval will double three times, and then
2491 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2492 # intervals of max_backoff until the
2493 # task has been attempted max_attempts
2494 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2495 # 240s, 300s, 300s, ....
2496 #
2497 # If unspecified when the queue is created, Cloud Tasks will pick the
2498 # default.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002499 #
2500 #
2501 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002502 # [max_doublings in
2503 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2504 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2505 # retrying a failed task, measured from when the task was first
2506 # attempted. Once `max_retry_duration` time has passed *and* the
2507 # task has been attempted max_attempts
2508 # times, no further attempts will be made and the task will be
2509 # deleted.
2510 #
2511 # If zero, then the task age is unlimited.
2512 #
2513 # If unspecified when the queue is created, Cloud Tasks will pick the
2514 # default.
2515 #
2516 #
2517 # `max_retry_duration` will be truncated to the nearest second.
2518 #
2519 # This field has the same meaning as
2520 # [task_age_limit in
2521 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2522 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
2523 #
2524 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2525 # first attempt fails, then there will be `max_attempts - 1` retries). Must
2526 # be &gt;= -1.
2527 #
2528 # If unspecified when the queue is created, Cloud Tasks will pick the
2529 # default.
2530 #
2531 # -1 indicates unlimited attempts.
2532 #
2533 # This field has the same meaning as
2534 # [task_retry_limit in
2535 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2536 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2537 # min_backoff and
2538 # max_backoff duration after it fails,
2539 # if the queue&#x27;s RetryConfig specifies that the task should be
2540 # retried.
2541 #
2542 # If unspecified when the queue is created, Cloud Tasks will pick the
2543 # default.
2544 #
2545 #
2546 # `min_backoff` will be truncated to the nearest second.
2547 #
2548 # This field has the same meaning as
2549 # [min_backoff_seconds in
2550 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002551 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002552 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002553</div>
2554
2555<div class="method">
2556 <code class="details" id="pause">pause(name, body=None, x__xgafv=None)</code>
2557 <pre>Pauses the queue.
2558
2559If a queue is paused then the system will stop dispatching tasks
2560until the queue is resumed via
2561ResumeQueue. Tasks can still be added
2562when the queue is paused. A queue is paused if its
2563state is PAUSED.
2564
2565Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002566 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002567`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
2568 body: object, The request body.
2569 The object takes the form of:
2570
2571{ # Request message for PauseQueue.
2572 }
2573
2574 x__xgafv: string, V1 error format.
2575 Allowed values
2576 1 - v1 error format
2577 2 - v2 error format
2578
2579Returns:
2580 An object of the form:
2581
2582 { # A queue is a container of related tasks. Queues are configured to manage
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002583 # how those tasks are dispatched. Configurable properties include rate limits,
2584 # retry options, queue types, and others.
2585 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
2586 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2587 # field is unset, then no logs are written.
2588 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2589 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
2590 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2591 # This field may contain any value between 0.0 and 1.0, inclusive.
2592 # 0.0 is the default and means that no operations are logged.
2593 },
2594 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
2595 #
2596 # All tasks that were created before this time
2597 # were purged.
2598 #
2599 # A queue can be purged using PurgeQueue, the
2600 # [App Engine Task Queue SDK, or the Cloud
2601 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2602 #
2603 # Purge time will be truncated to the nearest microsecond. Purge
2604 # time will be unset if the queue has never been purged.
2605 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2606 #
2607 # rate_limits and retry_config are
2608 # related because they both control task attempts. However they control task
2609 # attempts in different ways:
2610 #
2611 # * rate_limits controls the total rate of
2612 # dispatches from a queue (i.e. all traffic dispatched from the
2613 # queue, regardless of whether the dispatch is from a first
2614 # attempt or a retry).
2615 # * retry_config controls what happens to
2616 # particular a task after its first attempt fails. That is,
2617 # retry_config controls task retries (the
2618 # second attempt, third attempt, etc).
2619 #
2620 # The queue&#x27;s actual dispatch rate is the result of:
2621 #
2622 # * Number of tasks in the queue
2623 # * User-specified throttling: rate_limits,
2624 # retry_config, and the
2625 # queue&#x27;s state.
2626 # * System throttling due to `429` (Too Many Requests) or `503` (Service
2627 # Unavailable) responses from the worker, high error rates, or to smooth
2628 # sudden large traffic spikes.
2629 #
2630 # This message determines the maximum rate that tasks can be dispatched by a
2631 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2632 #
2633 # Note: The debugging command, RunTask, will run a task
2634 # even if the queue has reached its RateLimits.
2635 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim65020912020-05-20 12:08:20 -07002636 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002637 # Max burst size limits how fast tasks in queue are processed when
2638 # many tasks are in the queue and the rate is high. This field
2639 # allows the queue to have a high rate so processing starts shortly
2640 # after a task is enqueued, but still limits resource usage when
2641 # many tasks are enqueued in a short period of time.
Bu Sun Kim65020912020-05-20 12:08:20 -07002642 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002643 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2644 # algorithm is used to control the rate of task dispatches. Each
2645 # queue has a token bucket that holds tokens, up to the maximum
2646 # specified by `max_burst_size`. Each time a task is dispatched, a
2647 # token is removed from the bucket. Tasks will be dispatched until
2648 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2649 # continuously refilled with new tokens based on
2650 # max_dispatches_per_second.
Bu Sun Kim65020912020-05-20 12:08:20 -07002651 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002652 # Cloud Tasks will pick the value of `max_burst_size` based on the
2653 # value of
2654 # max_dispatches_per_second.
2655 #
2656 # For queues that were created or updated using
2657 # `queue.yaml/xml`, `max_burst_size` is equal to
2658 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2659 # Since `max_burst_size` is output only, if
2660 # UpdateQueue is called on a queue
2661 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2662 # on the value of
2663 # max_dispatches_per_second,
2664 # regardless of whether
2665 # max_dispatches_per_second
2666 # is updated.
2667 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
2668 #
2669 # If unspecified when the queue is created, Cloud Tasks will pick the
2670 # default.
2671 #
2672 # * The maximum allowed value is 500.
2673 #
2674 #
2675 # This field has the same meaning as
2676 # [rate in
2677 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2678 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2679 # to be dispatched for this queue. After this threshold has been
2680 # reached, Cloud Tasks stops dispatching tasks until the number of
2681 # concurrent requests decreases.
2682 #
2683 # If unspecified when the queue is created, Cloud Tasks will pick the
2684 # default.
2685 #
2686 #
2687 # The maximum allowed value is 5,000.
2688 #
2689 #
2690 # This field has the same meaning as
2691 # [max_concurrent_requests in
2692 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
2693 },
2694 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
2695 # task-level app_engine_routing.
2696 # These settings apply only to
2697 # App Engine tasks in this queue.
2698 # Http tasks are not affected.
2699 #
2700 # If set, `app_engine_routing_override` is used for all
2701 # App Engine tasks in the queue, no matter what the
2702 # setting is for the
2703 # task-level app_engine_routing.
2704 #
2705 # Defines routing characteristics specific to App Engine - service, version,
2706 # and instance.
2707 #
2708 # For more information about services, versions, and instances see
2709 # [An Overview of App
2710 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2711 # [Microservices Architecture on Google App
2712 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2713 # [App Engine Standard request
2714 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2715 # and [App Engine Flex request
2716 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2717 #
2718 # Using AppEngineRouting requires
2719 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2720 # Google IAM permission for the project
2721 # and the following scope:
2722 #
2723 # `https://www.googleapis.com/auth/cloud-platform`
2724 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2725 #
2726 # By default, the task is sent to an instance which is available when
2727 # the task is attempted.
2728 #
2729 # Requests can only be sent to a specific instance if
2730 # [manual scaling is used in App Engine
2731 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2732 # App Engine Flex does not support instances. For more information, see
Bu Sun Kim65020912020-05-20 12:08:20 -07002733 # [App Engine Standard request
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002734 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
Bu Sun Kim65020912020-05-20 12:08:20 -07002735 # and [App Engine Flex request
2736 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002737 &quot;version&quot;: &quot;A String&quot;, # App version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002738 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002739 # By default, the task is sent to the version which is the default
2740 # version when the task is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002741 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002742 # For some queues or tasks which were created using the App Engine
2743 # Task Queue API, host is not parsable
2744 # into service,
2745 # version, and
2746 # instance. For example, some tasks
2747 # which were created using the App Engine SDK use a custom domain
2748 # name; custom domains are not parsed by Cloud Tasks. If
2749 # host is not parsable, then
2750 # service,
2751 # version, and
2752 # instance are the empty string.
2753 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002754 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002755 # By default, the task is sent to the service which is the default
2756 # service when the task is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002757 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002758 # For some queues or tasks which were created using the App Engine
2759 # Task Queue API, host is not parsable
2760 # into service,
2761 # version, and
2762 # instance. For example, some tasks
2763 # which were created using the App Engine SDK use a custom domain
2764 # name; custom domains are not parsed by Cloud Tasks. If
2765 # host is not parsable, then
2766 # service,
2767 # version, and
2768 # instance are the empty string.
2769 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002770 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002771 # The host is constructed from the domain name of the app associated with
2772 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2773 # service, version,
2774 # and instance. Tasks which were created using
2775 # the App Engine SDK might have a custom domain name.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002776 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002777 # For more information, see
2778 # [How Requests are
2779 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2780 },
2781 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2782 # after which it becomes output only.
2783 #
2784 # The queue name.
2785 #
2786 # The queue name must have the following format:
2787 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2788 #
2789 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2790 # hyphens (-), colons (:), or periods (.).
2791 # For more information, see
2792 # [Identifying
2793 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2794 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2795 # The list of available locations can be obtained by calling
2796 # ListLocations.
2797 # For more information, see https://cloud.google.com/about/locations/.
2798 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2799 # hyphens (-). The maximum length is 100 characters.
2800 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2801 #
2802 # `state` can only be changed by called
2803 # PauseQueue,
2804 # ResumeQueue, or uploading
2805 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2806 # UpdateQueue cannot be used to change `state`.
2807 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
2808 #
2809 # * For tasks created using Cloud Tasks: the queue-level retry settings
2810 # apply to all tasks in the queue that were created using Cloud Tasks.
2811 # Retry settings cannot be set on individual tasks.
2812 # * For tasks created using the App Engine SDK: the queue-level retry
2813 # settings apply to all tasks in the queue which do not have retry settings
2814 # explicitly set on the task and were created by the App Engine SDK. See
2815 # [App Engine
2816 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2817 #
2818 # These settings determine when a failed task attempt is retried.
2819 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2820 # min_backoff and
2821 # max_backoff duration after it fails,
2822 # if the queue&#x27;s RetryConfig specifies that the task should be
2823 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002824 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002825 # If unspecified when the queue is created, Cloud Tasks will pick the
2826 # default.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002827 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002828 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002829 # `max_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002830 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002831 # This field has the same meaning as
2832 # [max_backoff_seconds in
2833 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2834 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002835 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002836 # A task&#x27;s retry interval starts at
2837 # min_backoff, then doubles
2838 # `max_doublings` times, then increases linearly, and finally
2839 # retries at intervals of
2840 # max_backoff up to
2841 # max_attempts times.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002842 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002843 # For example, if min_backoff is 10s,
2844 # max_backoff is 300s, and
2845 # `max_doublings` is 3, then the a task will first be retried in
2846 # 10s. The retry interval will double three times, and then
2847 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2848 # intervals of max_backoff until the
2849 # task has been attempted max_attempts
2850 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2851 # 240s, 300s, 300s, ....
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002852 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002853 # If unspecified when the queue is created, Cloud Tasks will pick the
2854 # default.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002855 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002856 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002857 # This field has the same meaning as
2858 # [max_doublings in
2859 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2860 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2861 # retrying a failed task, measured from when the task was first
2862 # attempted. Once `max_retry_duration` time has passed *and* the
2863 # task has been attempted max_attempts
2864 # times, no further attempts will be made and the task will be
2865 # deleted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002866 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002867 # If zero, then the task age is unlimited.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002868 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002869 # If unspecified when the queue is created, Cloud Tasks will pick the
2870 # default.
2871 #
2872 #
2873 # `max_retry_duration` will be truncated to the nearest second.
2874 #
2875 # This field has the same meaning as
2876 # [task_age_limit in
2877 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2878 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
2879 #
2880 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2881 # first attempt fails, then there will be `max_attempts - 1` retries). Must
2882 # be &gt;= -1.
2883 #
2884 # If unspecified when the queue is created, Cloud Tasks will pick the
2885 # default.
2886 #
2887 # -1 indicates unlimited attempts.
2888 #
2889 # This field has the same meaning as
2890 # [task_retry_limit in
2891 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2892 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2893 # min_backoff and
2894 # max_backoff duration after it fails,
2895 # if the queue&#x27;s RetryConfig specifies that the task should be
2896 # retried.
2897 #
2898 # If unspecified when the queue is created, Cloud Tasks will pick the
2899 # default.
2900 #
2901 #
2902 # `min_backoff` will be truncated to the nearest second.
2903 #
2904 # This field has the same meaning as
2905 # [min_backoff_seconds in
2906 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2907 },
2908 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002909</div>
2910
2911<div class="method">
2912 <code class="details" id="purge">purge(name, body=None, x__xgafv=None)</code>
2913 <pre>Purges a queue by deleting all of its tasks.
2914
2915All tasks created before this method is called are permanently deleted.
2916
2917Purge operations can take up to one minute to take effect. Tasks
2918might be dispatched before the purge takes effect. A purge is irreversible.
2919
2920Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002921 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002922`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
2923 body: object, The request body.
2924 The object takes the form of:
2925
2926{ # Request message for PurgeQueue.
2927 }
2928
2929 x__xgafv: string, V1 error format.
2930 Allowed values
2931 1 - v1 error format
2932 2 - v2 error format
2933
2934Returns:
2935 An object of the form:
2936
2937 { # A queue is a container of related tasks. Queues are configured to manage
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002938 # how those tasks are dispatched. Configurable properties include rate limits,
2939 # retry options, queue types, and others.
2940 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
2941 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2942 # field is unset, then no logs are written.
2943 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2944 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
2945 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2946 # This field may contain any value between 0.0 and 1.0, inclusive.
2947 # 0.0 is the default and means that no operations are logged.
2948 },
2949 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
2950 #
2951 # All tasks that were created before this time
2952 # were purged.
2953 #
2954 # A queue can be purged using PurgeQueue, the
2955 # [App Engine Task Queue SDK, or the Cloud
2956 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2957 #
2958 # Purge time will be truncated to the nearest microsecond. Purge
2959 # time will be unset if the queue has never been purged.
2960 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2961 #
2962 # rate_limits and retry_config are
2963 # related because they both control task attempts. However they control task
2964 # attempts in different ways:
2965 #
2966 # * rate_limits controls the total rate of
2967 # dispatches from a queue (i.e. all traffic dispatched from the
2968 # queue, regardless of whether the dispatch is from a first
2969 # attempt or a retry).
2970 # * retry_config controls what happens to
2971 # particular a task after its first attempt fails. That is,
2972 # retry_config controls task retries (the
2973 # second attempt, third attempt, etc).
2974 #
2975 # The queue&#x27;s actual dispatch rate is the result of:
2976 #
2977 # * Number of tasks in the queue
2978 # * User-specified throttling: rate_limits,
2979 # retry_config, and the
2980 # queue&#x27;s state.
2981 # * System throttling due to `429` (Too Many Requests) or `503` (Service
2982 # Unavailable) responses from the worker, high error rates, or to smooth
2983 # sudden large traffic spikes.
2984 #
2985 # This message determines the maximum rate that tasks can be dispatched by a
2986 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2987 #
2988 # Note: The debugging command, RunTask, will run a task
2989 # even if the queue has reached its RateLimits.
2990 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim65020912020-05-20 12:08:20 -07002991 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002992 # Max burst size limits how fast tasks in queue are processed when
2993 # many tasks are in the queue and the rate is high. This field
2994 # allows the queue to have a high rate so processing starts shortly
2995 # after a task is enqueued, but still limits resource usage when
2996 # many tasks are enqueued in a short period of time.
Bu Sun Kim65020912020-05-20 12:08:20 -07002997 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002998 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2999 # algorithm is used to control the rate of task dispatches. Each
3000 # queue has a token bucket that holds tokens, up to the maximum
3001 # specified by `max_burst_size`. Each time a task is dispatched, a
3002 # token is removed from the bucket. Tasks will be dispatched until
3003 # the queue&#x27;s bucket runs out of tokens. The bucket will be
3004 # continuously refilled with new tokens based on
3005 # max_dispatches_per_second.
Bu Sun Kim65020912020-05-20 12:08:20 -07003006 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003007 # Cloud Tasks will pick the value of `max_burst_size` based on the
3008 # value of
3009 # max_dispatches_per_second.
3010 #
3011 # For queues that were created or updated using
3012 # `queue.yaml/xml`, `max_burst_size` is equal to
3013 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3014 # Since `max_burst_size` is output only, if
3015 # UpdateQueue is called on a queue
3016 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3017 # on the value of
3018 # max_dispatches_per_second,
3019 # regardless of whether
3020 # max_dispatches_per_second
3021 # is updated.
3022 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
3023 #
3024 # If unspecified when the queue is created, Cloud Tasks will pick the
3025 # default.
3026 #
3027 # * The maximum allowed value is 500.
3028 #
3029 #
3030 # This field has the same meaning as
3031 # [rate in
3032 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
3033 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3034 # to be dispatched for this queue. After this threshold has been
3035 # reached, Cloud Tasks stops dispatching tasks until the number of
3036 # concurrent requests decreases.
3037 #
3038 # If unspecified when the queue is created, Cloud Tasks will pick the
3039 # default.
3040 #
3041 #
3042 # The maximum allowed value is 5,000.
3043 #
3044 #
3045 # This field has the same meaning as
3046 # [max_concurrent_requests in
3047 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
3048 },
3049 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
3050 # task-level app_engine_routing.
3051 # These settings apply only to
3052 # App Engine tasks in this queue.
3053 # Http tasks are not affected.
3054 #
3055 # If set, `app_engine_routing_override` is used for all
3056 # App Engine tasks in the queue, no matter what the
3057 # setting is for the
3058 # task-level app_engine_routing.
3059 #
3060 # Defines routing characteristics specific to App Engine - service, version,
3061 # and instance.
3062 #
3063 # For more information about services, versions, and instances see
3064 # [An Overview of App
3065 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3066 # [Microservices Architecture on Google App
3067 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3068 # [App Engine Standard request
3069 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3070 # and [App Engine Flex request
3071 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3072 #
3073 # Using AppEngineRouting requires
3074 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3075 # Google IAM permission for the project
3076 # and the following scope:
3077 #
3078 # `https://www.googleapis.com/auth/cloud-platform`
3079 &quot;instance&quot;: &quot;A String&quot;, # App instance.
3080 #
3081 # By default, the task is sent to an instance which is available when
3082 # the task is attempted.
3083 #
3084 # Requests can only be sent to a specific instance if
3085 # [manual scaling is used in App Engine
3086 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3087 # App Engine Flex does not support instances. For more information, see
Bu Sun Kim65020912020-05-20 12:08:20 -07003088 # [App Engine Standard request
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003089 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
Bu Sun Kim65020912020-05-20 12:08:20 -07003090 # and [App Engine Flex request
3091 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003092 &quot;version&quot;: &quot;A String&quot;, # App version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003093 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003094 # By default, the task is sent to the version which is the default
3095 # version when the task is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003096 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003097 # For some queues or tasks which were created using the App Engine
3098 # Task Queue API, host is not parsable
3099 # into service,
3100 # version, and
3101 # instance. For example, some tasks
3102 # which were created using the App Engine SDK use a custom domain
3103 # name; custom domains are not parsed by Cloud Tasks. If
3104 # host is not parsable, then
3105 # service,
3106 # version, and
3107 # instance are the empty string.
3108 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003109 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003110 # By default, the task is sent to the service which is the default
3111 # service when the task is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003112 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003113 # For some queues or tasks which were created using the App Engine
3114 # Task Queue API, host is not parsable
3115 # into service,
3116 # version, and
3117 # instance. For example, some tasks
3118 # which were created using the App Engine SDK use a custom domain
3119 # name; custom domains are not parsed by Cloud Tasks. If
3120 # host is not parsable, then
3121 # service,
3122 # version, and
3123 # instance are the empty string.
3124 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003125 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003126 # The host is constructed from the domain name of the app associated with
3127 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
3128 # service, version,
3129 # and instance. Tasks which were created using
3130 # the App Engine SDK might have a custom domain name.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003131 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003132 # For more information, see
3133 # [How Requests are
3134 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3135 },
3136 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
3137 # after which it becomes output only.
3138 #
3139 # The queue name.
3140 #
3141 # The queue name must have the following format:
3142 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
3143 #
3144 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3145 # hyphens (-), colons (:), or periods (.).
3146 # For more information, see
3147 # [Identifying
3148 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3149 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
3150 # The list of available locations can be obtained by calling
3151 # ListLocations.
3152 # For more information, see https://cloud.google.com/about/locations/.
3153 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3154 # hyphens (-). The maximum length is 100 characters.
3155 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
3156 #
3157 # `state` can only be changed by called
3158 # PauseQueue,
3159 # ResumeQueue, or uploading
3160 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3161 # UpdateQueue cannot be used to change `state`.
3162 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
3163 #
3164 # * For tasks created using Cloud Tasks: the queue-level retry settings
3165 # apply to all tasks in the queue that were created using Cloud Tasks.
3166 # Retry settings cannot be set on individual tasks.
3167 # * For tasks created using the App Engine SDK: the queue-level retry
3168 # settings apply to all tasks in the queue which do not have retry settings
3169 # explicitly set on the task and were created by the App Engine SDK. See
3170 # [App Engine
3171 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3172 #
3173 # These settings determine when a failed task attempt is retried.
3174 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3175 # min_backoff and
3176 # max_backoff duration after it fails,
3177 # if the queue&#x27;s RetryConfig specifies that the task should be
3178 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003179 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003180 # If unspecified when the queue is created, Cloud Tasks will pick the
3181 # default.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003182 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003183 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003184 # `max_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003185 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003186 # This field has the same meaning as
3187 # [max_backoff_seconds in
3188 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3189 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003190 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003191 # A task&#x27;s retry interval starts at
3192 # min_backoff, then doubles
3193 # `max_doublings` times, then increases linearly, and finally
3194 # retries at intervals of
3195 # max_backoff up to
3196 # max_attempts times.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003197 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003198 # For example, if min_backoff is 10s,
3199 # max_backoff is 300s, and
3200 # `max_doublings` is 3, then the a task will first be retried in
3201 # 10s. The retry interval will double three times, and then
3202 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3203 # intervals of max_backoff until the
3204 # task has been attempted max_attempts
3205 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3206 # 240s, 300s, 300s, ....
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003207 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003208 # If unspecified when the queue is created, Cloud Tasks will pick the
3209 # default.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003210 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003211 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003212 # This field has the same meaning as
3213 # [max_doublings in
3214 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3215 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
3216 # retrying a failed task, measured from when the task was first
3217 # attempted. Once `max_retry_duration` time has passed *and* the
3218 # task has been attempted max_attempts
3219 # times, no further attempts will be made and the task will be
3220 # deleted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003221 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003222 # If zero, then the task age is unlimited.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003223 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003224 # If unspecified when the queue is created, Cloud Tasks will pick the
3225 # default.
3226 #
3227 #
3228 # `max_retry_duration` will be truncated to the nearest second.
3229 #
3230 # This field has the same meaning as
3231 # [task_age_limit in
3232 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3233 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
3234 #
3235 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
3236 # first attempt fails, then there will be `max_attempts - 1` retries). Must
3237 # be &gt;= -1.
3238 #
3239 # If unspecified when the queue is created, Cloud Tasks will pick the
3240 # default.
3241 #
3242 # -1 indicates unlimited attempts.
3243 #
3244 # This field has the same meaning as
3245 # [task_retry_limit in
3246 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3247 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3248 # min_backoff and
3249 # max_backoff duration after it fails,
3250 # if the queue&#x27;s RetryConfig specifies that the task should be
3251 # retried.
3252 #
3253 # If unspecified when the queue is created, Cloud Tasks will pick the
3254 # default.
3255 #
3256 #
3257 # `min_backoff` will be truncated to the nearest second.
3258 #
3259 # This field has the same meaning as
3260 # [min_backoff_seconds in
3261 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3262 },
3263 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003264</div>
3265
3266<div class="method">
3267 <code class="details" id="resume">resume(name, body=None, x__xgafv=None)</code>
3268 <pre>Resume a queue.
3269
3270This method resumes a queue after it has been
3271PAUSED or
3272DISABLED. The state of a queue is stored
Bu Sun Kim65020912020-05-20 12:08:20 -07003273in the queue&#x27;s state; after calling this method it
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003274will be set to RUNNING.
3275
3276WARNING: Resuming many high-QPS queues at the same time can
3277lead to target overloading. If you are resuming high-QPS
3278queues, follow the 500/50/5 pattern described in
3279[Managing Cloud Tasks Scaling
3280Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
3281
3282Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07003283 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003284`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
3285 body: object, The request body.
3286 The object takes the form of:
3287
3288{ # Request message for ResumeQueue.
3289 }
3290
3291 x__xgafv: string, V1 error format.
3292 Allowed values
3293 1 - v1 error format
3294 2 - v2 error format
3295
3296Returns:
3297 An object of the form:
3298
3299 { # A queue is a container of related tasks. Queues are configured to manage
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003300 # how those tasks are dispatched. Configurable properties include rate limits,
3301 # retry options, queue types, and others.
3302 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
3303 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
3304 # field is unset, then no logs are written.
3305 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3306 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
3307 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3308 # This field may contain any value between 0.0 and 1.0, inclusive.
3309 # 0.0 is the default and means that no operations are logged.
3310 },
3311 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
3312 #
3313 # All tasks that were created before this time
3314 # were purged.
3315 #
3316 # A queue can be purged using PurgeQueue, the
3317 # [App Engine Task Queue SDK, or the Cloud
3318 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
3319 #
3320 # Purge time will be truncated to the nearest microsecond. Purge
3321 # time will be unset if the queue has never been purged.
3322 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
3323 #
3324 # rate_limits and retry_config are
3325 # related because they both control task attempts. However they control task
3326 # attempts in different ways:
3327 #
3328 # * rate_limits controls the total rate of
3329 # dispatches from a queue (i.e. all traffic dispatched from the
3330 # queue, regardless of whether the dispatch is from a first
3331 # attempt or a retry).
3332 # * retry_config controls what happens to
3333 # particular a task after its first attempt fails. That is,
3334 # retry_config controls task retries (the
3335 # second attempt, third attempt, etc).
3336 #
3337 # The queue&#x27;s actual dispatch rate is the result of:
3338 #
3339 # * Number of tasks in the queue
3340 # * User-specified throttling: rate_limits,
3341 # retry_config, and the
3342 # queue&#x27;s state.
3343 # * System throttling due to `429` (Too Many Requests) or `503` (Service
3344 # Unavailable) responses from the worker, high error rates, or to smooth
3345 # sudden large traffic spikes.
3346 #
3347 # This message determines the maximum rate that tasks can be dispatched by a
3348 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3349 #
3350 # Note: The debugging command, RunTask, will run a task
3351 # even if the queue has reached its RateLimits.
3352 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim65020912020-05-20 12:08:20 -07003353 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003354 # Max burst size limits how fast tasks in queue are processed when
3355 # many tasks are in the queue and the rate is high. This field
3356 # allows the queue to have a high rate so processing starts shortly
3357 # after a task is enqueued, but still limits resource usage when
3358 # many tasks are enqueued in a short period of time.
Bu Sun Kim65020912020-05-20 12:08:20 -07003359 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003360 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3361 # algorithm is used to control the rate of task dispatches. Each
3362 # queue has a token bucket that holds tokens, up to the maximum
3363 # specified by `max_burst_size`. Each time a task is dispatched, a
3364 # token is removed from the bucket. Tasks will be dispatched until
3365 # the queue&#x27;s bucket runs out of tokens. The bucket will be
3366 # continuously refilled with new tokens based on
3367 # max_dispatches_per_second.
Bu Sun Kim65020912020-05-20 12:08:20 -07003368 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003369 # Cloud Tasks will pick the value of `max_burst_size` based on the
3370 # value of
3371 # max_dispatches_per_second.
3372 #
3373 # For queues that were created or updated using
3374 # `queue.yaml/xml`, `max_burst_size` is equal to
3375 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3376 # Since `max_burst_size` is output only, if
3377 # UpdateQueue is called on a queue
3378 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3379 # on the value of
3380 # max_dispatches_per_second,
3381 # regardless of whether
3382 # max_dispatches_per_second
3383 # is updated.
3384 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
3385 #
3386 # If unspecified when the queue is created, Cloud Tasks will pick the
3387 # default.
3388 #
3389 # * The maximum allowed value is 500.
3390 #
3391 #
3392 # This field has the same meaning as
3393 # [rate in
3394 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
3395 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3396 # to be dispatched for this queue. After this threshold has been
3397 # reached, Cloud Tasks stops dispatching tasks until the number of
3398 # concurrent requests decreases.
3399 #
3400 # If unspecified when the queue is created, Cloud Tasks will pick the
3401 # default.
3402 #
3403 #
3404 # The maximum allowed value is 5,000.
3405 #
3406 #
3407 # This field has the same meaning as
3408 # [max_concurrent_requests in
3409 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
3410 },
3411 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
3412 # task-level app_engine_routing.
3413 # These settings apply only to
3414 # App Engine tasks in this queue.
3415 # Http tasks are not affected.
3416 #
3417 # If set, `app_engine_routing_override` is used for all
3418 # App Engine tasks in the queue, no matter what the
3419 # setting is for the
3420 # task-level app_engine_routing.
3421 #
3422 # Defines routing characteristics specific to App Engine - service, version,
3423 # and instance.
3424 #
3425 # For more information about services, versions, and instances see
3426 # [An Overview of App
3427 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3428 # [Microservices Architecture on Google App
3429 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3430 # [App Engine Standard request
3431 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3432 # and [App Engine Flex request
3433 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3434 #
3435 # Using AppEngineRouting requires
3436 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3437 # Google IAM permission for the project
3438 # and the following scope:
3439 #
3440 # `https://www.googleapis.com/auth/cloud-platform`
3441 &quot;instance&quot;: &quot;A String&quot;, # App instance.
3442 #
3443 # By default, the task is sent to an instance which is available when
3444 # the task is attempted.
3445 #
3446 # Requests can only be sent to a specific instance if
3447 # [manual scaling is used in App Engine
3448 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3449 # App Engine Flex does not support instances. For more information, see
Bu Sun Kim65020912020-05-20 12:08:20 -07003450 # [App Engine Standard request
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003451 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
Bu Sun Kim65020912020-05-20 12:08:20 -07003452 # and [App Engine Flex request
3453 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003454 &quot;version&quot;: &quot;A String&quot;, # App version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003455 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003456 # By default, the task is sent to the version which is the default
3457 # version when the task is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003458 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003459 # For some queues or tasks which were created using the App Engine
3460 # Task Queue API, host is not parsable
3461 # into service,
3462 # version, and
3463 # instance. For example, some tasks
3464 # which were created using the App Engine SDK use a custom domain
3465 # name; custom domains are not parsed by Cloud Tasks. If
3466 # host is not parsable, then
3467 # service,
3468 # version, and
3469 # instance are the empty string.
3470 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003471 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003472 # By default, the task is sent to the service which is the default
3473 # service when the task is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003474 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003475 # For some queues or tasks which were created using the App Engine
3476 # Task Queue API, host is not parsable
3477 # into service,
3478 # version, and
3479 # instance. For example, some tasks
3480 # which were created using the App Engine SDK use a custom domain
3481 # name; custom domains are not parsed by Cloud Tasks. If
3482 # host is not parsable, then
3483 # service,
3484 # version, and
3485 # instance are the empty string.
3486 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003487 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003488 # The host is constructed from the domain name of the app associated with
3489 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
3490 # service, version,
3491 # and instance. Tasks which were created using
3492 # the App Engine SDK might have a custom domain name.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003493 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003494 # For more information, see
3495 # [How Requests are
3496 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3497 },
3498 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
3499 # after which it becomes output only.
3500 #
3501 # The queue name.
3502 #
3503 # The queue name must have the following format:
3504 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
3505 #
3506 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3507 # hyphens (-), colons (:), or periods (.).
3508 # For more information, see
3509 # [Identifying
3510 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3511 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
3512 # The list of available locations can be obtained by calling
3513 # ListLocations.
3514 # For more information, see https://cloud.google.com/about/locations/.
3515 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3516 # hyphens (-). The maximum length is 100 characters.
3517 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
3518 #
3519 # `state` can only be changed by called
3520 # PauseQueue,
3521 # ResumeQueue, or uploading
3522 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3523 # UpdateQueue cannot be used to change `state`.
3524 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
3525 #
3526 # * For tasks created using Cloud Tasks: the queue-level retry settings
3527 # apply to all tasks in the queue that were created using Cloud Tasks.
3528 # Retry settings cannot be set on individual tasks.
3529 # * For tasks created using the App Engine SDK: the queue-level retry
3530 # settings apply to all tasks in the queue which do not have retry settings
3531 # explicitly set on the task and were created by the App Engine SDK. See
3532 # [App Engine
3533 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3534 #
3535 # These settings determine when a failed task attempt is retried.
3536 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3537 # min_backoff and
3538 # max_backoff duration after it fails,
3539 # if the queue&#x27;s RetryConfig specifies that the task should be
3540 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003541 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003542 # If unspecified when the queue is created, Cloud Tasks will pick the
3543 # default.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003544 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003545 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003546 # `max_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003547 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003548 # This field has the same meaning as
3549 # [max_backoff_seconds in
3550 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3551 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003552 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003553 # A task&#x27;s retry interval starts at
3554 # min_backoff, then doubles
3555 # `max_doublings` times, then increases linearly, and finally
3556 # retries at intervals of
3557 # max_backoff up to
3558 # max_attempts times.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003559 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003560 # For example, if min_backoff is 10s,
3561 # max_backoff is 300s, and
3562 # `max_doublings` is 3, then the a task will first be retried in
3563 # 10s. The retry interval will double three times, and then
3564 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3565 # intervals of max_backoff until the
3566 # task has been attempted max_attempts
3567 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3568 # 240s, 300s, 300s, ....
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003569 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003570 # If unspecified when the queue is created, Cloud Tasks will pick the
3571 # default.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003572 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003573 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003574 # This field has the same meaning as
3575 # [max_doublings in
3576 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3577 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
3578 # retrying a failed task, measured from when the task was first
3579 # attempted. Once `max_retry_duration` time has passed *and* the
3580 # task has been attempted max_attempts
3581 # times, no further attempts will be made and the task will be
3582 # deleted.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003583 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003584 # If zero, then the task age is unlimited.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003585 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003586 # If unspecified when the queue is created, Cloud Tasks will pick the
3587 # default.
3588 #
3589 #
3590 # `max_retry_duration` will be truncated to the nearest second.
3591 #
3592 # This field has the same meaning as
3593 # [task_age_limit in
3594 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3595 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
3596 #
3597 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
3598 # first attempt fails, then there will be `max_attempts - 1` retries). Must
3599 # be &gt;= -1.
3600 #
3601 # If unspecified when the queue is created, Cloud Tasks will pick the
3602 # default.
3603 #
3604 # -1 indicates unlimited attempts.
3605 #
3606 # This field has the same meaning as
3607 # [task_retry_limit in
3608 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3609 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3610 # min_backoff and
3611 # max_backoff duration after it fails,
3612 # if the queue&#x27;s RetryConfig specifies that the task should be
3613 # retried.
3614 #
3615 # If unspecified when the queue is created, Cloud Tasks will pick the
3616 # default.
3617 #
3618 #
3619 # `min_backoff` will be truncated to the nearest second.
3620 #
3621 # This field has the same meaning as
3622 # [min_backoff_seconds in
3623 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3624 },
3625 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003626</div>
3627
3628<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003629 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003630 <pre>Sets the access control policy for a Queue. Replaces any existing
3631policy.
3632
3633Note: The Cloud Console does not check queue-level IAM permissions yet.
3634Project-level permissions are required to use the Cloud Console.
3635
3636Authorization requires the following
3637[Google IAM](https://cloud.google.com/iam) permission on the specified
3638resource parent:
3639
3640* `cloudtasks.queues.setIamPolicy`
3641
3642Args:
3643 resource: string, REQUIRED: The resource for which the policy is being specified.
3644See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003645 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003646 The object takes the form of:
3647
3648{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07003649 &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 -07003650 # the policy is limited to a few 10s of KB. An empty policy is a
3651 # valid policy but certain Cloud Platform services (such as Projects)
3652 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -07003653 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003654 #
3655 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003656 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
3657 # `members` to a single `role`. Members can be user accounts, service accounts,
3658 # Google groups, and domains (such as G Suite). A `role` is a named list of
3659 # permissions; each `role` can be an IAM predefined role or a user-created
3660 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003661 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003662 # For some types of Google Cloud resources, a `binding` can also specify a
3663 # `condition`, which is a logical expression that allows access to a resource
3664 # only if the expression evaluates to `true`. A condition can add constraints
3665 # based on attributes of the request, the resource, or both. To learn which
3666 # resources support conditions in their IAM policies, see the
3667 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07003668 #
3669 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003670 #
3671 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003672 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003673 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003674 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
3675 # &quot;members&quot;: [
3676 # &quot;user:mike@example.com&quot;,
3677 # &quot;group:admins@example.com&quot;,
3678 # &quot;domain:google.com&quot;,
3679 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003680 # ]
3681 # },
3682 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003683 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
3684 # &quot;members&quot;: [
3685 # &quot;user:eve@example.com&quot;
3686 # ],
3687 # &quot;condition&quot;: {
3688 # &quot;title&quot;: &quot;expirable access&quot;,
3689 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
3690 # &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 -07003691 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003692 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07003693 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003694 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
3695 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003696 # }
3697 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003698 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003699 #
3700 # bindings:
3701 # - members:
3702 # - user:mike@example.com
3703 # - group:admins@example.com
3704 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07003705 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
3706 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003707 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07003708 # - user:eve@example.com
3709 # role: roles/resourcemanager.organizationViewer
3710 # condition:
3711 # title: expirable access
3712 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07003713 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07003714 # - etag: BwWWja0YfJA=
3715 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003716 #
3717 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07003718 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07003719 &quot;version&quot;: 42, # Specifies the format of the policy.
3720 #
3721 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
3722 # are rejected.
3723 #
3724 # Any operation that affects conditional role bindings must specify version
3725 # `3`. This requirement applies to the following operations:
3726 #
3727 # * Getting a policy that includes a conditional role binding
3728 # * Adding a conditional role binding to a policy
3729 # * Changing a conditional role binding in a policy
3730 # * Removing any role binding, with or without a condition, from a policy
3731 # that includes conditions
3732 #
3733 # **Important:** If you use IAM Conditions, you must include the `etag` field
3734 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3735 # you to overwrite a version `3` policy with a version `1` policy, and all of
3736 # the conditions in the version `3` policy are lost.
3737 #
3738 # If a policy does not include any conditions, operations on that policy may
3739 # specify any valid version or leave the field unset.
3740 #
3741 # To learn which resources support conditions in their IAM policies, see the
3742 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3743 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07003744 # `condition` that determines how and when the `bindings` are applied. Each
3745 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003746 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003747 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
3748 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07003749 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003750 # `members` can have the following values:
3751 #
3752 # * `allUsers`: A special identifier that represents anyone who is
3753 # on the internet; with or without a Google account.
3754 #
3755 # * `allAuthenticatedUsers`: A special identifier that represents anyone
3756 # who is authenticated with a Google account or a service account.
3757 #
3758 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07003759 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003760 #
3761 #
3762 # * `serviceAccount:{emailid}`: An email address that represents a service
3763 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
3764 #
3765 # * `group:{emailid}`: An email address that represents a Google group.
3766 # For example, `admins@example.com`.
3767 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003768 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
3769 # identifier) representing a user that has been recently deleted. For
3770 # example, `alice@example.com?uid=123456789012345678901`. If the user is
3771 # recovered, this value reverts to `user:{emailid}` and the recovered user
3772 # retains the role in the binding.
3773 #
3774 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
3775 # unique identifier) representing a service account that has been recently
3776 # deleted. For example,
3777 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
3778 # If the service account is undeleted, this value reverts to
3779 # `serviceAccount:{emailid}` and the undeleted service account retains the
3780 # role in the binding.
3781 #
3782 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
3783 # identifier) representing a Google group that has been recently
3784 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
3785 # the group is recovered, this value reverts to `group:{emailid}` and the
3786 # recovered group retains the role in the binding.
3787 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003788 #
3789 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
3790 # users of that domain. For example, `google.com` or `example.com`.
3791 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003792 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003793 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003794 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
3795 #
3796 # If the condition evaluates to `true`, then this binding applies to the
3797 # current request.
3798 #
3799 # If the condition evaluates to `false`, then this binding does not apply to
3800 # the current request. However, a different role binding might grant the same
3801 # role to one or more of the members in this binding.
3802 #
3803 # To learn which resources support conditions in their IAM policies, see the
3804 # [IAM
3805 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3806 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
3807 # are documented at https://github.com/google/cel-spec.
3808 #
3809 # Example (Comparison):
3810 #
3811 # title: &quot;Summary size limit&quot;
3812 # description: &quot;Determines if a summary is less than 100 chars&quot;
3813 # expression: &quot;document.summary.size() &lt; 100&quot;
3814 #
3815 # Example (Equality):
3816 #
3817 # title: &quot;Requestor is owner&quot;
3818 # description: &quot;Determines if requestor is the document owner&quot;
3819 # expression: &quot;document.owner == request.auth.claims.email&quot;
3820 #
3821 # Example (Logic):
3822 #
3823 # title: &quot;Public documents&quot;
3824 # description: &quot;Determine whether the document should be publicly visible&quot;
3825 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
3826 #
3827 # Example (Data Manipulation):
3828 #
3829 # title: &quot;Notification string&quot;
3830 # description: &quot;Create a notification string with a timestamp.&quot;
3831 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
3832 #
3833 # The exact variables and functions that may be referenced within an expression
3834 # are determined by the service that evaluates it. See the service
3835 # documentation for additional information.
3836 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
3837 # describes the expression, e.g. when hovered over it in a UI.
3838 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
3839 # syntax.
3840 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
3841 # reporting, e.g. a file name and a position in the file.
3842 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
3843 # its purpose. This can be used e.g. in UIs which allow to enter the
3844 # expression.
3845 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003846 },
3847 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003848 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
3849 # prevent simultaneous updates of a policy from overwriting each other.
3850 # It is strongly suggested that systems make use of the `etag` in the
3851 # read-modify-write cycle to perform policy updates in order to avoid race
3852 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
3853 # systems are expected to put that etag in the request to `setIamPolicy` to
3854 # ensure that their change will be applied to the same version of the policy.
3855 #
3856 # **Important:** If you use IAM Conditions, you must include the `etag` field
3857 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3858 # you to overwrite a version `3` policy with a version `1` policy, and all of
3859 # the conditions in the version `3` policy are lost.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003860 },
3861 }
3862
3863 x__xgafv: string, V1 error format.
3864 Allowed values
3865 1 - v1 error format
3866 2 - v2 error format
3867
3868Returns:
3869 An object of the form:
3870
Dan O'Mearadd494642020-05-01 07:42:23 -07003871 { # An Identity and Access Management (IAM) policy, which specifies access
3872 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003873 #
3874 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003875 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
3876 # `members` to a single `role`. Members can be user accounts, service accounts,
3877 # Google groups, and domains (such as G Suite). A `role` is a named list of
3878 # permissions; each `role` can be an IAM predefined role or a user-created
3879 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003880 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003881 # For some types of Google Cloud resources, a `binding` can also specify a
3882 # `condition`, which is a logical expression that allows access to a resource
3883 # only if the expression evaluates to `true`. A condition can add constraints
3884 # based on attributes of the request, the resource, or both. To learn which
3885 # resources support conditions in their IAM policies, see the
3886 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07003887 #
3888 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003889 #
3890 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003891 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003892 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003893 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
3894 # &quot;members&quot;: [
3895 # &quot;user:mike@example.com&quot;,
3896 # &quot;group:admins@example.com&quot;,
3897 # &quot;domain:google.com&quot;,
3898 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003899 # ]
3900 # },
3901 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003902 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
3903 # &quot;members&quot;: [
3904 # &quot;user:eve@example.com&quot;
3905 # ],
3906 # &quot;condition&quot;: {
3907 # &quot;title&quot;: &quot;expirable access&quot;,
3908 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
3909 # &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 -07003910 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003911 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07003912 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003913 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
3914 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003915 # }
3916 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003917 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003918 #
3919 # bindings:
3920 # - members:
3921 # - user:mike@example.com
3922 # - group:admins@example.com
3923 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07003924 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
3925 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003926 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07003927 # - user:eve@example.com
3928 # role: roles/resourcemanager.organizationViewer
3929 # condition:
3930 # title: expirable access
3931 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07003932 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07003933 # - etag: BwWWja0YfJA=
3934 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003935 #
3936 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07003937 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07003938 &quot;version&quot;: 42, # Specifies the format of the policy.
3939 #
3940 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
3941 # are rejected.
3942 #
3943 # Any operation that affects conditional role bindings must specify version
3944 # `3`. This requirement applies to the following operations:
3945 #
3946 # * Getting a policy that includes a conditional role binding
3947 # * Adding a conditional role binding to a policy
3948 # * Changing a conditional role binding in a policy
3949 # * Removing any role binding, with or without a condition, from a policy
3950 # that includes conditions
3951 #
3952 # **Important:** If you use IAM Conditions, you must include the `etag` field
3953 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3954 # you to overwrite a version `3` policy with a version `1` policy, and all of
3955 # the conditions in the version `3` policy are lost.
3956 #
3957 # If a policy does not include any conditions, operations on that policy may
3958 # specify any valid version or leave the field unset.
3959 #
3960 # To learn which resources support conditions in their IAM policies, see the
3961 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3962 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07003963 # `condition` that determines how and when the `bindings` are applied. Each
3964 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003965 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003966 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
3967 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07003968 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003969 # `members` can have the following values:
3970 #
3971 # * `allUsers`: A special identifier that represents anyone who is
3972 # on the internet; with or without a Google account.
3973 #
3974 # * `allAuthenticatedUsers`: A special identifier that represents anyone
3975 # who is authenticated with a Google account or a service account.
3976 #
3977 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07003978 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003979 #
3980 #
3981 # * `serviceAccount:{emailid}`: An email address that represents a service
3982 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
3983 #
3984 # * `group:{emailid}`: An email address that represents a Google group.
3985 # For example, `admins@example.com`.
3986 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003987 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
3988 # identifier) representing a user that has been recently deleted. For
3989 # example, `alice@example.com?uid=123456789012345678901`. If the user is
3990 # recovered, this value reverts to `user:{emailid}` and the recovered user
3991 # retains the role in the binding.
3992 #
3993 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
3994 # unique identifier) representing a service account that has been recently
3995 # deleted. For example,
3996 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
3997 # If the service account is undeleted, this value reverts to
3998 # `serviceAccount:{emailid}` and the undeleted service account retains the
3999 # role in the binding.
4000 #
4001 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
4002 # identifier) representing a Google group that has been recently
4003 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
4004 # the group is recovered, this value reverts to `group:{emailid}` and the
4005 # recovered group retains the role in the binding.
4006 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004007 #
4008 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
4009 # users of that domain. For example, `google.com` or `example.com`.
4010 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004011 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004012 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004013 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
4014 #
4015 # If the condition evaluates to `true`, then this binding applies to the
4016 # current request.
4017 #
4018 # If the condition evaluates to `false`, then this binding does not apply to
4019 # the current request. However, a different role binding might grant the same
4020 # role to one or more of the members in this binding.
4021 #
4022 # To learn which resources support conditions in their IAM policies, see the
4023 # [IAM
4024 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4025 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
4026 # are documented at https://github.com/google/cel-spec.
4027 #
4028 # Example (Comparison):
4029 #
4030 # title: &quot;Summary size limit&quot;
4031 # description: &quot;Determines if a summary is less than 100 chars&quot;
4032 # expression: &quot;document.summary.size() &lt; 100&quot;
4033 #
4034 # Example (Equality):
4035 #
4036 # title: &quot;Requestor is owner&quot;
4037 # description: &quot;Determines if requestor is the document owner&quot;
4038 # expression: &quot;document.owner == request.auth.claims.email&quot;
4039 #
4040 # Example (Logic):
4041 #
4042 # title: &quot;Public documents&quot;
4043 # description: &quot;Determine whether the document should be publicly visible&quot;
4044 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
4045 #
4046 # Example (Data Manipulation):
4047 #
4048 # title: &quot;Notification string&quot;
4049 # description: &quot;Create a notification string with a timestamp.&quot;
4050 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
4051 #
4052 # The exact variables and functions that may be referenced within an expression
4053 # are determined by the service that evaluates it. See the service
4054 # documentation for additional information.
4055 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
4056 # describes the expression, e.g. when hovered over it in a UI.
4057 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
4058 # syntax.
4059 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
4060 # reporting, e.g. a file name and a position in the file.
4061 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
4062 # its purpose. This can be used e.g. in UIs which allow to enter the
4063 # expression.
4064 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004065 },
4066 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004067 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
4068 # prevent simultaneous updates of a policy from overwriting each other.
4069 # It is strongly suggested that systems make use of the `etag` in the
4070 # read-modify-write cycle to perform policy updates in order to avoid race
4071 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
4072 # systems are expected to put that etag in the request to `setIamPolicy` to
4073 # ensure that their change will be applied to the same version of the policy.
4074 #
4075 # **Important:** If you use IAM Conditions, you must include the `etag` field
4076 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4077 # you to overwrite a version `3` policy with a version `1` policy, and all of
4078 # the conditions in the version `3` policy are lost.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004079 }</pre>
4080</div>
4081
4082<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004083 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004084 <pre>Returns permissions that a caller has on a Queue.
4085If the resource does not exist, this will return an empty set of
4086permissions, not a NOT_FOUND error.
4087
4088Note: This operation is designed to be used for building permission-aware
4089UIs and command-line tools, not for authorization checking. This operation
Bu Sun Kim65020912020-05-20 12:08:20 -07004090may &quot;fail open&quot; without warning.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004091
4092Args:
4093 resource: string, REQUIRED: The resource for which the policy detail is being requested.
4094See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004095 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004096 The object takes the form of:
4097
4098{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07004099 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
4100 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004101 # information see
4102 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07004103 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004104 ],
4105 }
4106
4107 x__xgafv: string, V1 error format.
4108 Allowed values
4109 1 - v1 error format
4110 2 - v2 error format
4111
4112Returns:
4113 An object of the form:
4114
4115 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07004116 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004117 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07004118 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004119 ],
4120 }</pre>
4121</div>
4122
4123</body></html>