blob: 071c4eefe49f455e7fd3699a03205a79bd88488d [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 Kim65020912020-05-20 12:08:20 -070095 <code><a href="#list">list(parent, filter=None, pageToken=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 Kim715bd7f2019-06-14 16:50:42 -0700145 # how those tasks are dispatched. Configurable properties include rate limits,
146 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148 # task-level app_engine_routing.
149 # These settings apply only to
150 # App Engine tasks in this queue.
Dan O'Mearadd494642020-05-01 07:42:23 -0700151 # Http tasks are not affected.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700152 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 # If set, `app_engine_routing_override` is used for all
154 # App Engine tasks in the queue, no matter what the
155 # setting is for the
156 # task-level app_engine_routing.
157 #
158 # Defines routing characteristics specific to App Engine - service, version,
159 # and instance.
160 #
161 # For more information about services, versions, and instances see
162 # [An Overview of App
163 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
164 # [Microservices Architecture on Google App
165 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
166 # [App Engine Standard request
167 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
168 # and [App Engine Flex request
169 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Dan O'Mearadd494642020-05-01 07:42:23 -0700170 #
171 # Using AppEngineRouting requires
172 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
173 # Google IAM permission for the project
174 # and the following scope:
175 #
176 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700178 #
179 # By default, the task is sent to the service which is the default
180 # service when the task is attempted.
181 #
182 # For some queues or tasks which were created using the App Engine
183 # Task Queue API, host is not parsable
184 # into service,
185 # version, and
186 # instance. For example, some tasks
187 # which were created using the App Engine SDK use a custom domain
188 # name; custom domains are not parsed by Cloud Tasks. If
189 # host is not parsable, then
190 # service,
191 # version, and
192 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -0700193 &quot;instance&quot;: &quot;A String&quot;, # App instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700194 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700195 # By default, the task is sent to an instance which is available when
196 # the task is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700197 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700198 # Requests can only be sent to a specific instance if
199 # [manual scaling is used in App Engine
200 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
201 # App Engine Flex does not support instances. For more information, see
202 # [App Engine Standard request
203 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
204 # and [App Engine Flex request
205 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
206 &quot;version&quot;: &quot;A String&quot;, # App version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700207 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700208 # By default, the task is sent to the version which is the default
209 # version when the task is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700211 # For some queues or tasks which were created using the App Engine
212 # Task Queue API, host is not parsable
213 # into service,
214 # version, and
215 # instance. For example, some tasks
216 # which were created using the App Engine SDK use a custom domain
217 # name; custom domains are not parsed by Cloud Tasks. If
218 # host is not parsable, then
219 # service,
220 # version, and
221 # instance are the empty string.
222 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700223 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700224 # The host is constructed from the domain name of the app associated with
225 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
226 # service, version,
227 # and instance. Tasks which were created using
228 # the App Engine SDK might have a custom domain name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700229 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700230 # For more information, see
231 # [How Requests are
232 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700233 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700234 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
235 #
236 # All tasks that were created before this time
237 # were purged.
238 #
239 # A queue can be purged using PurgeQueue, the
240 # [App Engine Task Queue SDK, or the Cloud
241 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
242 #
243 # Purge time will be truncated to the nearest microsecond. Purge
244 # time will be unset if the queue has never been purged.
245 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
246 #
247 # * For tasks created using Cloud Tasks: the queue-level retry settings
248 # apply to all tasks in the queue that were created using Cloud Tasks.
249 # Retry settings cannot be set on individual tasks.
250 # * For tasks created using the App Engine SDK: the queue-level retry
251 # settings apply to all tasks in the queue which do not have retry settings
252 # explicitly set on the task and were created by the App Engine SDK. See
253 # [App Engine
254 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
255 #
256 # These settings determine when a failed task attempt is retried.
257 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
258 # retrying a failed task, measured from when the task was first
259 # attempted. Once `max_retry_duration` time has passed *and* the
260 # task has been attempted max_attempts
261 # times, no further attempts will be made and the task will be
262 # deleted.
263 #
264 # If zero, then the task age is unlimited.
265 #
266 # If unspecified when the queue is created, Cloud Tasks will pick the
267 # default.
268 #
269 #
270 # `max_retry_duration` will be truncated to the nearest second.
271 #
272 # This field has the same meaning as
273 # [task_age_limit in
274 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
275 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
276 #
277 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
278 # first attempt fails, then there will be `max_attempts - 1` retries). Must
279 # be &gt;= -1.
280 #
281 # If unspecified when the queue is created, Cloud Tasks will pick the
282 # default.
283 #
284 # -1 indicates unlimited attempts.
285 #
286 # This field has the same meaning as
287 # [task_retry_limit in
288 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
289 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
290 #
291 # A task&#x27;s retry interval starts at
292 # min_backoff, then doubles
293 # `max_doublings` times, then increases linearly, and finally
294 # retries at intervals of
295 # max_backoff up to
296 # max_attempts times.
297 #
298 # For example, if min_backoff is 10s,
299 # max_backoff is 300s, and
300 # `max_doublings` is 3, then the a task will first be retried in
301 # 10s. The retry interval will double three times, and then
302 # increase linearly by 2^3 * 10s. Finally, the task will retry at
303 # intervals of max_backoff until the
304 # task has been attempted max_attempts
305 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
306 # 240s, 300s, 300s, ....
307 #
308 # If unspecified when the queue is created, Cloud Tasks will pick the
309 # default.
310 #
311 #
312 # This field has the same meaning as
313 # [max_doublings in
314 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
315 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
316 # min_backoff and
317 # max_backoff duration after it fails,
318 # if the queue&#x27;s RetryConfig specifies that the task should be
319 # retried.
320 #
321 # If unspecified when the queue is created, Cloud Tasks will pick the
322 # default.
323 #
324 #
325 # `min_backoff` will be truncated to the nearest second.
326 #
327 # This field has the same meaning as
328 # [min_backoff_seconds in
329 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
330 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
331 # min_backoff and
332 # max_backoff duration after it fails,
333 # if the queue&#x27;s RetryConfig specifies that the task should be
334 # retried.
335 #
336 # If unspecified when the queue is created, Cloud Tasks will pick the
337 # default.
338 #
339 #
340 # `max_backoff` will be truncated to the nearest second.
341 #
342 # This field has the same meaning as
343 # [max_backoff_seconds in
344 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
345 },
346 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
347 #
348 # `state` can only be changed by called
349 # PauseQueue,
350 # ResumeQueue, or uploading
351 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
352 # UpdateQueue cannot be used to change `state`.
353 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
354 # after which it becomes output only.
355 #
356 # The queue name.
357 #
358 # The queue name must have the following format:
359 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
360 #
361 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
362 # hyphens (-), colons (:), or periods (.).
363 # For more information, see
364 # [Identifying
365 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
366 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
367 # The list of available locations can be obtained by calling
368 # ListLocations.
369 # For more information, see https://cloud.google.com/about/locations/.
370 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
371 # hyphens (-). The maximum length is 100 characters.
372 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
373 #
374 # rate_limits and retry_config are
375 # related because they both control task attempts. However they control task
376 # attempts in different ways:
377 #
378 # * rate_limits controls the total rate of
379 # dispatches from a queue (i.e. all traffic dispatched from the
380 # queue, regardless of whether the dispatch is from a first
381 # attempt or a retry).
382 # * retry_config controls what happens to
383 # particular a task after its first attempt fails. That is,
384 # retry_config controls task retries (the
385 # second attempt, third attempt, etc).
386 #
387 # The queue&#x27;s actual dispatch rate is the result of:
388 #
389 # * Number of tasks in the queue
390 # * User-specified throttling: rate_limits,
391 # retry_config, and the
392 # queue&#x27;s state.
393 # * System throttling due to `429` (Too Many Requests) or `503` (Service
394 # Unavailable) responses from the worker, high error rates, or to smooth
395 # sudden large traffic spikes.
396 #
397 # This message determines the maximum rate that tasks can be dispatched by a
398 # queue, regardless of whether the dispatch is a first task attempt or a retry.
399 #
400 # Note: The debugging command, RunTask, will run a task
401 # even if the queue has reached its RateLimits.
402 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
403 #
404 # Max burst size limits how fast tasks in queue are processed when
405 # many tasks are in the queue and the rate is high. This field
406 # allows the queue to have a high rate so processing starts shortly
407 # after a task is enqueued, but still limits resource usage when
408 # many tasks are enqueued in a short period of time.
409 #
410 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
411 # algorithm is used to control the rate of task dispatches. Each
412 # queue has a token bucket that holds tokens, up to the maximum
413 # specified by `max_burst_size`. Each time a task is dispatched, a
414 # token is removed from the bucket. Tasks will be dispatched until
415 # the queue&#x27;s bucket runs out of tokens. The bucket will be
416 # continuously refilled with new tokens based on
417 # max_dispatches_per_second.
418 #
419 # Cloud Tasks will pick the value of `max_burst_size` based on the
420 # value of
421 # max_dispatches_per_second.
422 #
423 # For queues that were created or updated using
424 # `queue.yaml/xml`, `max_burst_size` is equal to
425 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
426 # Since `max_burst_size` is output only, if
427 # UpdateQueue is called on a queue
428 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
429 # on the value of
430 # max_dispatches_per_second,
431 # regardless of whether
432 # max_dispatches_per_second
433 # is updated.
434 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
435 # to be dispatched for this queue. After this threshold has been
436 # reached, Cloud Tasks stops dispatching tasks until the number of
437 # concurrent requests decreases.
438 #
439 # If unspecified when the queue is created, Cloud Tasks will pick the
440 # default.
441 #
442 #
443 # The maximum allowed value is 5,000.
444 #
445 #
446 # This field has the same meaning as
447 # [max_concurrent_requests in
448 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
449 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
450 #
451 # If unspecified when the queue is created, Cloud Tasks will pick the
452 # default.
453 #
454 # * The maximum allowed value is 500.
455 #
456 #
457 # This field has the same meaning as
458 # [rate in
459 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
460 },
461 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
462 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
463 # field is unset, then no logs are written.
464 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
465 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
466 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
467 # This field may contain any value between 0.0 and 1.0, inclusive.
468 # 0.0 is the default and means that no operations are logged.
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;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
484 # task-level app_engine_routing.
485 # These settings apply only to
486 # App Engine tasks in this queue.
487 # Http tasks are not affected.
488 #
489 # If set, `app_engine_routing_override` is used for all
490 # App Engine tasks in the queue, no matter what the
491 # setting is for the
492 # task-level app_engine_routing.
493 #
494 # Defines routing characteristics specific to App Engine - service, version,
495 # and instance.
496 #
497 # For more information about services, versions, and instances see
498 # [An Overview of App
499 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
500 # [Microservices Architecture on Google App
501 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
502 # [App Engine Standard request
503 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
504 # and [App Engine Flex request
505 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
506 #
507 # Using AppEngineRouting requires
508 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
509 # Google IAM permission for the project
510 # and the following scope:
511 #
512 # `https://www.googleapis.com/auth/cloud-platform`
513 &quot;service&quot;: &quot;A String&quot;, # App service.
514 #
515 # By default, the task is sent to the service which is the default
516 # service when the task is attempted.
517 #
518 # For some queues or tasks which were created using the App Engine
519 # Task Queue API, host is not parsable
520 # into service,
521 # version, and
522 # instance. For example, some tasks
523 # which were created using the App Engine SDK use a custom domain
524 # name; custom domains are not parsed by Cloud Tasks. If
525 # host is not parsable, then
526 # service,
527 # version, and
528 # instance are the empty string.
529 &quot;instance&quot;: &quot;A String&quot;, # App instance.
530 #
531 # By default, the task is sent to an instance which is available when
532 # the task is attempted.
533 #
534 # Requests can only be sent to a specific instance if
535 # [manual scaling is used in App Engine
536 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
537 # App Engine Flex does not support instances. For more information, see
538 # [App Engine Standard request
539 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
540 # and [App Engine Flex request
541 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
542 &quot;version&quot;: &quot;A String&quot;, # App version.
543 #
544 # By default, the task is sent to the version which is the default
545 # version when the task is attempted.
546 #
547 # For some queues or tasks which were created using the App Engine
548 # Task Queue API, host is not parsable
549 # into service,
550 # version, and
551 # instance. For example, some tasks
552 # which were created using the App Engine SDK use a custom domain
553 # name; custom domains are not parsed by Cloud Tasks. If
554 # host is not parsable, then
555 # service,
556 # version, and
557 # instance are the empty string.
558 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
559 #
560 # The host is constructed from the domain name of the app associated with
561 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
562 # service, version,
563 # and instance. Tasks which were created using
564 # the App Engine SDK might have a custom domain name.
565 #
566 # For more information, see
567 # [How Requests are
568 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
569 },
570 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
571 #
572 # All tasks that were created before this time
573 # were purged.
574 #
575 # A queue can be purged using PurgeQueue, the
576 # [App Engine Task Queue SDK, or the Cloud
577 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
578 #
579 # Purge time will be truncated to the nearest microsecond. Purge
580 # time will be unset if the queue has never been purged.
581 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
582 #
583 # * For tasks created using Cloud Tasks: the queue-level retry settings
584 # apply to all tasks in the queue that were created using Cloud Tasks.
585 # Retry settings cannot be set on individual tasks.
586 # * For tasks created using the App Engine SDK: the queue-level retry
587 # settings apply to all tasks in the queue which do not have retry settings
588 # explicitly set on the task and were created by the App Engine SDK. See
589 # [App Engine
590 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
591 #
592 # These settings determine when a failed task attempt is retried.
593 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
594 # retrying a failed task, measured from when the task was first
595 # attempted. Once `max_retry_duration` time has passed *and* the
596 # task has been attempted max_attempts
597 # times, no further attempts will be made and the task will be
598 # deleted.
599 #
600 # If zero, then the task age is unlimited.
601 #
602 # If unspecified when the queue is created, Cloud Tasks will pick the
603 # default.
604 #
605 #
606 # `max_retry_duration` will be truncated to the nearest second.
607 #
608 # This field has the same meaning as
609 # [task_age_limit in
610 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
611 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
612 #
613 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
614 # first attempt fails, then there will be `max_attempts - 1` retries). Must
615 # be &gt;= -1.
616 #
617 # If unspecified when the queue is created, Cloud Tasks will pick the
618 # default.
619 #
620 # -1 indicates unlimited attempts.
621 #
622 # This field has the same meaning as
623 # [task_retry_limit in
624 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
625 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
626 #
627 # A task&#x27;s retry interval starts at
628 # min_backoff, then doubles
629 # `max_doublings` times, then increases linearly, and finally
630 # retries at intervals of
631 # max_backoff up to
632 # max_attempts times.
633 #
634 # For example, if min_backoff is 10s,
635 # max_backoff is 300s, and
636 # `max_doublings` is 3, then the a task will first be retried in
637 # 10s. The retry interval will double three times, and then
638 # increase linearly by 2^3 * 10s. Finally, the task will retry at
639 # intervals of max_backoff until the
640 # task has been attempted max_attempts
641 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
642 # 240s, 300s, 300s, ....
643 #
644 # If unspecified when the queue is created, Cloud Tasks will pick the
645 # default.
646 #
647 #
648 # This field has the same meaning as
649 # [max_doublings in
650 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
651 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
652 # min_backoff and
653 # max_backoff duration after it fails,
654 # if the queue&#x27;s RetryConfig specifies that the task should be
655 # retried.
656 #
657 # If unspecified when the queue is created, Cloud Tasks will pick the
658 # default.
659 #
660 #
661 # `min_backoff` will be truncated to the nearest second.
662 #
663 # This field has the same meaning as
664 # [min_backoff_seconds in
665 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
666 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
667 # min_backoff and
668 # max_backoff duration after it fails,
669 # if the queue&#x27;s RetryConfig specifies that the task should be
670 # retried.
671 #
672 # If unspecified when the queue is created, Cloud Tasks will pick the
673 # default.
674 #
675 #
676 # `max_backoff` will be truncated to the nearest second.
677 #
678 # This field has the same meaning as
679 # [max_backoff_seconds in
680 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
681 },
682 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
683 #
684 # `state` can only be changed by called
685 # PauseQueue,
686 # ResumeQueue, or uploading
687 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
688 # UpdateQueue cannot be used to change `state`.
689 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
690 # after which it becomes output only.
691 #
692 # The queue name.
693 #
694 # The queue name must have the following format:
695 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
696 #
697 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
698 # hyphens (-), colons (:), or periods (.).
699 # For more information, see
700 # [Identifying
701 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
702 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
703 # The list of available locations can be obtained by calling
704 # ListLocations.
705 # For more information, see https://cloud.google.com/about/locations/.
706 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
707 # hyphens (-). The maximum length is 100 characters.
708 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
709 #
710 # rate_limits and retry_config are
711 # related because they both control task attempts. However they control task
712 # attempts in different ways:
713 #
714 # * rate_limits controls the total rate of
715 # dispatches from a queue (i.e. all traffic dispatched from the
716 # queue, regardless of whether the dispatch is from a first
717 # attempt or a retry).
718 # * retry_config controls what happens to
719 # particular a task after its first attempt fails. That is,
720 # retry_config controls task retries (the
721 # second attempt, third attempt, etc).
722 #
723 # The queue&#x27;s actual dispatch rate is the result of:
724 #
725 # * Number of tasks in the queue
726 # * User-specified throttling: rate_limits,
727 # retry_config, and the
728 # queue&#x27;s state.
729 # * System throttling due to `429` (Too Many Requests) or `503` (Service
730 # Unavailable) responses from the worker, high error rates, or to smooth
731 # sudden large traffic spikes.
732 #
733 # This message determines the maximum rate that tasks can be dispatched by a
734 # queue, regardless of whether the dispatch is a first task attempt or a retry.
735 #
736 # Note: The debugging command, RunTask, will run a task
737 # even if the queue has reached its RateLimits.
738 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
739 #
740 # Max burst size limits how fast tasks in queue are processed when
741 # many tasks are in the queue and the rate is high. This field
742 # allows the queue to have a high rate so processing starts shortly
743 # after a task is enqueued, but still limits resource usage when
744 # many tasks are enqueued in a short period of time.
745 #
746 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
747 # algorithm is used to control the rate of task dispatches. Each
748 # queue has a token bucket that holds tokens, up to the maximum
749 # specified by `max_burst_size`. Each time a task is dispatched, a
750 # token is removed from the bucket. Tasks will be dispatched until
751 # the queue&#x27;s bucket runs out of tokens. The bucket will be
752 # continuously refilled with new tokens based on
753 # max_dispatches_per_second.
754 #
755 # Cloud Tasks will pick the value of `max_burst_size` based on the
756 # value of
757 # max_dispatches_per_second.
758 #
759 # For queues that were created or updated using
760 # `queue.yaml/xml`, `max_burst_size` is equal to
761 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
762 # Since `max_burst_size` is output only, if
763 # UpdateQueue is called on a queue
764 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
765 # on the value of
766 # max_dispatches_per_second,
767 # regardless of whether
768 # max_dispatches_per_second
769 # is updated.
770 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
771 # to be dispatched for this queue. After this threshold has been
772 # reached, Cloud Tasks stops dispatching tasks until the number of
773 # concurrent requests decreases.
774 #
775 # If unspecified when the queue is created, Cloud Tasks will pick the
776 # default.
777 #
778 #
779 # The maximum allowed value is 5,000.
780 #
781 #
782 # This field has the same meaning as
783 # [max_concurrent_requests in
784 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
785 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
786 #
787 # If unspecified when the queue is created, Cloud Tasks will pick the
788 # default.
789 #
790 # * The maximum allowed value is 500.
791 #
792 #
793 # This field has the same meaning as
794 # [rate in
795 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
796 },
797 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
798 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
799 # field is unset, then no logs are written.
800 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
801 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
802 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
803 # This field may contain any value between 0.0 and 1.0, inclusive.
804 # 0.0 is the default and means that no operations are logged.
805 },
806 }</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 Kim4ed7d3f2020-05-27 12:20:54 -0700864 # how those tasks are dispatched. Configurable properties include rate limits,
865 # retry options, queue types, and others.
866 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
867 # task-level app_engine_routing.
868 # These settings apply only to
869 # App Engine tasks in this queue.
870 # Http tasks are not affected.
Bu Sun Kim65020912020-05-20 12:08:20 -0700871 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700872 # If set, `app_engine_routing_override` is used for all
873 # App Engine tasks in the queue, no matter what the
874 # setting is for the
875 # task-level app_engine_routing.
Bu Sun Kim65020912020-05-20 12:08:20 -0700876 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700877 # Defines routing characteristics specific to App Engine - service, version,
878 # and instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700879 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700880 # For more information about services, versions, and instances see
881 # [An Overview of App
882 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
883 # [Microservices Architecture on Google App
884 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
Bu Sun Kim65020912020-05-20 12:08:20 -0700885 # [App Engine Standard request
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700886 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
Bu Sun Kim65020912020-05-20 12:08:20 -0700887 # and [App Engine Flex request
888 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700889 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700890 # Using AppEngineRouting requires
891 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
892 # Google IAM permission for the project
893 # and the following scope:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700894 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700895 # `https://www.googleapis.com/auth/cloud-platform`
896 &quot;service&quot;: &quot;A String&quot;, # App service.
897 #
898 # By default, the task is sent to the service which is the default
899 # service when the task is attempted.
900 #
901 # For some queues or tasks which were created using the App Engine
902 # Task Queue API, host is not parsable
903 # into service,
904 # version, and
905 # instance. For example, some tasks
906 # which were created using the App Engine SDK use a custom domain
907 # name; custom domains are not parsed by Cloud Tasks. If
908 # host is not parsable, then
909 # service,
910 # version, and
911 # instance are the empty string.
912 &quot;instance&quot;: &quot;A String&quot;, # App instance.
913 #
914 # By default, the task is sent to an instance which is available when
915 # the task is attempted.
916 #
917 # Requests can only be sent to a specific instance if
918 # [manual scaling is used in App Engine
919 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
920 # App Engine Flex does not support instances. For more information, see
921 # [App Engine Standard request
922 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
923 # and [App Engine Flex request
924 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
925 &quot;version&quot;: &quot;A String&quot;, # App version.
926 #
927 # By default, the task is sent to the version which is the default
928 # version when the task is attempted.
929 #
930 # For some queues or tasks which were created using the App Engine
931 # Task Queue API, host is not parsable
932 # into service,
933 # version, and
934 # instance. For example, some tasks
935 # which were created using the App Engine SDK use a custom domain
936 # name; custom domains are not parsed by Cloud Tasks. If
937 # host is not parsable, then
938 # service,
939 # version, and
940 # instance are the empty string.
941 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
942 #
943 # The host is constructed from the domain name of the app associated with
944 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
945 # service, version,
946 # and instance. Tasks which were created using
947 # the App Engine SDK might have a custom domain name.
948 #
949 # For more information, see
950 # [How Requests are
951 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
952 },
953 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700954 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700955 # All tasks that were created before this time
956 # were purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700957 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700958 # A queue can be purged using PurgeQueue, the
959 # [App Engine Task Queue SDK, or the Cloud
960 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
961 #
962 # Purge time will be truncated to the nearest microsecond. Purge
963 # time will be unset if the queue has never been purged.
964 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
965 #
966 # * For tasks created using Cloud Tasks: the queue-level retry settings
967 # apply to all tasks in the queue that were created using Cloud Tasks.
968 # Retry settings cannot be set on individual tasks.
969 # * For tasks created using the App Engine SDK: the queue-level retry
970 # settings apply to all tasks in the queue which do not have retry settings
971 # explicitly set on the task and were created by the App Engine SDK. See
972 # [App Engine
973 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
974 #
975 # These settings determine when a failed task attempt is retried.
976 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
977 # retrying a failed task, measured from when the task was first
978 # attempted. Once `max_retry_duration` time has passed *and* the
979 # task has been attempted max_attempts
980 # times, no further attempts will be made and the task will be
981 # deleted.
982 #
983 # If zero, then the task age is unlimited.
984 #
985 # If unspecified when the queue is created, Cloud Tasks will pick the
986 # default.
987 #
988 #
989 # `max_retry_duration` will be truncated to the nearest second.
990 #
991 # This field has the same meaning as
992 # [task_age_limit in
993 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
994 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
995 #
996 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
997 # first attempt fails, then there will be `max_attempts - 1` retries). Must
998 # be &gt;= -1.
999 #
1000 # If unspecified when the queue is created, Cloud Tasks will pick the
1001 # default.
1002 #
1003 # -1 indicates unlimited attempts.
1004 #
1005 # This field has the same meaning as
1006 # [task_retry_limit in
1007 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1008 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
1009 #
1010 # A task&#x27;s retry interval starts at
1011 # min_backoff, then doubles
1012 # `max_doublings` times, then increases linearly, and finally
1013 # retries at intervals of
1014 # max_backoff up to
1015 # max_attempts times.
1016 #
1017 # For example, if min_backoff is 10s,
1018 # max_backoff is 300s, and
1019 # `max_doublings` is 3, then the a task will first be retried in
1020 # 10s. The retry interval will double three times, and then
1021 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1022 # intervals of max_backoff until the
1023 # task has been attempted max_attempts
1024 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1025 # 240s, 300s, 300s, ....
1026 #
1027 # If unspecified when the queue is created, Cloud Tasks will pick the
1028 # default.
1029 #
1030 #
1031 # This field has the same meaning as
1032 # [max_doublings in
1033 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1034 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1035 # min_backoff and
1036 # max_backoff duration after it fails,
1037 # if the queue&#x27;s RetryConfig specifies that the task should be
1038 # retried.
1039 #
1040 # If unspecified when the queue is created, Cloud Tasks will pick the
1041 # default.
1042 #
1043 #
1044 # `min_backoff` will be truncated to the nearest second.
1045 #
1046 # This field has the same meaning as
1047 # [min_backoff_seconds in
1048 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1049 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1050 # min_backoff and
1051 # max_backoff duration after it fails,
1052 # if the queue&#x27;s RetryConfig specifies that the task should be
1053 # retried.
1054 #
1055 # If unspecified when the queue is created, Cloud Tasks will pick the
1056 # default.
1057 #
1058 #
1059 # `max_backoff` will be truncated to the nearest second.
1060 #
1061 # This field has the same meaning as
1062 # [max_backoff_seconds in
1063 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1064 },
1065 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
1066 #
1067 # `state` can only be changed by called
1068 # PauseQueue,
1069 # ResumeQueue, or uploading
1070 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
1071 # UpdateQueue cannot be used to change `state`.
1072 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
1073 # after which it becomes output only.
1074 #
1075 # The queue name.
1076 #
1077 # The queue name must have the following format:
1078 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1079 #
1080 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1081 # hyphens (-), colons (:), or periods (.).
1082 # For more information, see
1083 # [Identifying
1084 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1085 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
1086 # The list of available locations can be obtained by calling
1087 # ListLocations.
1088 # For more information, see https://cloud.google.com/about/locations/.
1089 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1090 # hyphens (-). The maximum length is 100 characters.
1091 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
1092 #
1093 # rate_limits and retry_config are
1094 # related because they both control task attempts. However they control task
1095 # attempts in different ways:
1096 #
1097 # * rate_limits controls the total rate of
1098 # dispatches from a queue (i.e. all traffic dispatched from the
1099 # queue, regardless of whether the dispatch is from a first
1100 # attempt or a retry).
1101 # * retry_config controls what happens to
1102 # particular a task after its first attempt fails. That is,
1103 # retry_config controls task retries (the
1104 # second attempt, third attempt, etc).
1105 #
1106 # The queue&#x27;s actual dispatch rate is the result of:
1107 #
1108 # * Number of tasks in the queue
1109 # * User-specified throttling: rate_limits,
1110 # retry_config, and the
1111 # queue&#x27;s state.
1112 # * System throttling due to `429` (Too Many Requests) or `503` (Service
1113 # Unavailable) responses from the worker, high error rates, or to smooth
1114 # sudden large traffic spikes.
1115 #
1116 # This message determines the maximum rate that tasks can be dispatched by a
1117 # queue, regardless of whether the dispatch is a first task attempt or a retry.
1118 #
1119 # Note: The debugging command, RunTask, will run a task
1120 # even if the queue has reached its RateLimits.
1121 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
1122 #
1123 # Max burst size limits how fast tasks in queue are processed when
1124 # many tasks are in the queue and the rate is high. This field
1125 # allows the queue to have a high rate so processing starts shortly
1126 # after a task is enqueued, but still limits resource usage when
1127 # many tasks are enqueued in a short period of time.
1128 #
1129 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1130 # algorithm is used to control the rate of task dispatches. Each
1131 # queue has a token bucket that holds tokens, up to the maximum
1132 # specified by `max_burst_size`. Each time a task is dispatched, a
1133 # token is removed from the bucket. Tasks will be dispatched until
1134 # the queue&#x27;s bucket runs out of tokens. The bucket will be
1135 # continuously refilled with new tokens based on
1136 # max_dispatches_per_second.
1137 #
1138 # Cloud Tasks will pick the value of `max_burst_size` based on the
1139 # value of
1140 # max_dispatches_per_second.
1141 #
1142 # For queues that were created or updated using
1143 # `queue.yaml/xml`, `max_burst_size` is equal to
1144 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1145 # Since `max_burst_size` is output only, if
1146 # UpdateQueue is called on a queue
1147 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
1148 # on the value of
1149 # max_dispatches_per_second,
1150 # regardless of whether
1151 # max_dispatches_per_second
1152 # is updated.
1153 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
1154 # to be dispatched for this queue. After this threshold has been
1155 # reached, Cloud Tasks stops dispatching tasks until the number of
1156 # concurrent requests decreases.
1157 #
1158 # If unspecified when the queue is created, Cloud Tasks will pick the
1159 # default.
1160 #
1161 #
1162 # The maximum allowed value is 5,000.
1163 #
1164 #
1165 # This field has the same meaning as
1166 # [max_concurrent_requests in
1167 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
1168 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
1169 #
1170 # If unspecified when the queue is created, Cloud Tasks will pick the
1171 # default.
1172 #
1173 # * The maximum allowed value is 500.
1174 #
1175 #
1176 # This field has the same meaning as
1177 # [rate in
1178 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
1179 },
1180 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
1181 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
1182 # field is unset, then no logs are written.
1183 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1184 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
1185 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1186 # This field may contain any value between 0.0 and 1.0, inclusive.
1187 # 0.0 is the default and means that no operations are logged.
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;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1304 # prevent simultaneous updates of a policy from overwriting each other.
1305 # It is strongly suggested that systems make use of the `etag` in the
1306 # read-modify-write cycle to perform policy updates in order to avoid race
1307 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1308 # systems are expected to put that etag in the request to `setIamPolicy` to
1309 # ensure that their change will be applied to the same version of the policy.
1310 #
1311 # **Important:** If you use IAM Conditions, you must include the `etag` field
1312 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1313 # you to overwrite a version `3` policy with a version `1` policy, and all of
1314 # the conditions in the version `3` policy are lost.
1315 &quot;version&quot;: 42, # Specifies the format of the policy.
1316 #
1317 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1318 # are rejected.
1319 #
1320 # Any operation that affects conditional role bindings must specify version
1321 # `3`. This requirement applies to the following operations:
1322 #
1323 # * Getting a policy that includes a conditional role binding
1324 # * Adding a conditional role binding to a policy
1325 # * Changing a conditional role binding in a policy
1326 # * Removing any role binding, with or without a condition, from a policy
1327 # that includes conditions
1328 #
1329 # **Important:** If you use IAM Conditions, you must include the `etag` field
1330 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1331 # you to overwrite a version `3` policy with a version `1` policy, and all of
1332 # the conditions in the version `3` policy are lost.
1333 #
1334 # If a policy does not include any conditions, operations on that policy may
1335 # specify any valid version or leave the field unset.
1336 #
1337 # To learn which resources support conditions in their IAM policies, see the
1338 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1339 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001340 # `condition` that determines how and when the `bindings` are applied. Each
1341 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001342 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001343 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1344 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1345 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1346 #
1347 # If the condition evaluates to `true`, then this binding applies to the
1348 # current request.
1349 #
1350 # If the condition evaluates to `false`, then this binding does not apply to
1351 # the current request. However, a different role binding might grant the same
1352 # role to one or more of the members in this binding.
1353 #
1354 # To learn which resources support conditions in their IAM policies, see the
1355 # [IAM
1356 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1357 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1358 # are documented at https://github.com/google/cel-spec.
1359 #
1360 # Example (Comparison):
1361 #
1362 # title: &quot;Summary size limit&quot;
1363 # description: &quot;Determines if a summary is less than 100 chars&quot;
1364 # expression: &quot;document.summary.size() &lt; 100&quot;
1365 #
1366 # Example (Equality):
1367 #
1368 # title: &quot;Requestor is owner&quot;
1369 # description: &quot;Determines if requestor is the document owner&quot;
1370 # expression: &quot;document.owner == request.auth.claims.email&quot;
1371 #
1372 # Example (Logic):
1373 #
1374 # title: &quot;Public documents&quot;
1375 # description: &quot;Determine whether the document should be publicly visible&quot;
1376 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1377 #
1378 # Example (Data Manipulation):
1379 #
1380 # title: &quot;Notification string&quot;
1381 # description: &quot;Create a notification string with a timestamp.&quot;
1382 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1383 #
1384 # The exact variables and functions that may be referenced within an expression
1385 # are determined by the service that evaluates it. See the service
1386 # documentation for additional information.
1387 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1388 # syntax.
1389 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1390 # its purpose. This can be used e.g. in UIs which allow to enter the
1391 # expression.
1392 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1393 # reporting, e.g. a file name and a position in the file.
1394 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1395 # describes the expression, e.g. when hovered over it in a UI.
1396 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001397 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001398 # `members` can have the following values:
1399 #
1400 # * `allUsers`: A special identifier that represents anyone who is
1401 # on the internet; with or without a Google account.
1402 #
1403 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1404 # who is authenticated with a Google account or a service account.
1405 #
1406 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001407 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001408 #
1409 #
1410 # * `serviceAccount:{emailid}`: An email address that represents a service
1411 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1412 #
1413 # * `group:{emailid}`: An email address that represents a Google group.
1414 # For example, `admins@example.com`.
1415 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001416 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1417 # identifier) representing a user that has been recently deleted. For
1418 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1419 # recovered, this value reverts to `user:{emailid}` and the recovered user
1420 # retains the role in the binding.
1421 #
1422 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1423 # unique identifier) representing a service account that has been recently
1424 # deleted. For example,
1425 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1426 # If the service account is undeleted, this value reverts to
1427 # `serviceAccount:{emailid}` and the undeleted service account retains the
1428 # role in the binding.
1429 #
1430 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1431 # identifier) representing a Google group that has been recently
1432 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1433 # the group is recovered, this value reverts to `group:{emailid}` and the
1434 # recovered group retains the role in the binding.
1435 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001436 #
1437 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1438 # users of that domain. For example, `google.com` or `example.com`.
1439 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001440 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001441 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001442 },
1443 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001444 }</pre>
1445</div>
1446
1447<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001448 <code class="details" id="list">list(parent, filter=None, pageToken=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 Kim65020912020-05-20 12:08:20 -07001456 filter: string, `filter` can be used to specify a subset of queues. Any Queue
1457field can be used as a filter and several operators as supported.
1458For example: `&lt;=, &lt;, &gt;=, &gt;, !=, =, :`. The filter syntax is the same as
1459described in
1460[Stackdriver&#x27;s Advanced Logs
1461Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
1462
1463Sample filter &quot;state: PAUSED&quot;.
1464
1465Note that using filters might cause fewer queues than the
1466requested page_size to be returned.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001467 pageToken: string, A token identifying the page of results to return.
1468
1469To request the first page results, page_token must be empty. To
1470request the next page of results, page_token must be the value of
1471next_page_token returned
1472from the previous call to ListQueues
1473method. It is an error to switch the value of the
1474filter while iterating through pages.
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 Kim65020912020-05-20 12:08:20 -07001491 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results.
1492 #
1493 # To return the next page of results, call
1494 # ListQueues with this value as the
1495 # page_token.
1496 #
1497 # If the next_page_token is empty, there are no more results.
1498 #
1499 # The page token is valid for only 2 hours.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001500 &quot;queues&quot;: [ # The list of queues.
1501 { # A queue is a container of related tasks. Queues are configured to manage
1502 # how those tasks are dispatched. Configurable properties include rate limits,
1503 # retry options, queue types, and others.
1504 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
1505 # task-level app_engine_routing.
1506 # These settings apply only to
1507 # App Engine tasks in this queue.
1508 # Http tasks are not affected.
1509 #
1510 # If set, `app_engine_routing_override` is used for all
1511 # App Engine tasks in the queue, no matter what the
1512 # setting is for the
1513 # task-level app_engine_routing.
1514 #
1515 # Defines routing characteristics specific to App Engine - service, version,
1516 # and instance.
1517 #
1518 # For more information about services, versions, and instances see
1519 # [An Overview of App
1520 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1521 # [Microservices Architecture on Google App
1522 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1523 # [App Engine Standard request
1524 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1525 # and [App Engine Flex request
1526 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1527 #
1528 # Using AppEngineRouting requires
1529 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1530 # Google IAM permission for the project
1531 # and the following scope:
1532 #
1533 # `https://www.googleapis.com/auth/cloud-platform`
1534 &quot;service&quot;: &quot;A String&quot;, # App service.
1535 #
1536 # By default, the task is sent to the service which is the default
1537 # service when the task is attempted.
1538 #
1539 # For some queues or tasks which were created using the App Engine
1540 # Task Queue API, host is not parsable
1541 # into service,
1542 # version, and
1543 # instance. For example, some tasks
1544 # which were created using the App Engine SDK use a custom domain
1545 # name; custom domains are not parsed by Cloud Tasks. If
1546 # host is not parsable, then
1547 # service,
1548 # version, and
1549 # instance are the empty string.
1550 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1551 #
1552 # By default, the task is sent to an instance which is available when
1553 # the task is attempted.
1554 #
1555 # Requests can only be sent to a specific instance if
1556 # [manual scaling is used in App Engine
1557 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1558 # App Engine Flex does not support instances. For more information, see
1559 # [App Engine Standard request
1560 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1561 # and [App Engine Flex request
1562 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1563 &quot;version&quot;: &quot;A String&quot;, # App version.
1564 #
1565 # By default, the task is sent to the version which is the default
1566 # version when the task is attempted.
1567 #
1568 # For some queues or tasks which were created using the App Engine
1569 # Task Queue API, host is not parsable
1570 # into service,
1571 # version, and
1572 # instance. For example, some tasks
1573 # which were created using the App Engine SDK use a custom domain
1574 # name; custom domains are not parsed by Cloud Tasks. If
1575 # host is not parsable, then
1576 # service,
1577 # version, and
1578 # instance are the empty string.
1579 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1580 #
1581 # The host is constructed from the domain name of the app associated with
1582 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1583 # service, version,
1584 # and instance. Tasks which were created using
1585 # the App Engine SDK might have a custom domain name.
1586 #
1587 # For more information, see
1588 # [How Requests are
1589 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1590 },
1591 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
1592 #
1593 # All tasks that were created before this time
1594 # were purged.
1595 #
1596 # A queue can be purged using PurgeQueue, the
1597 # [App Engine Task Queue SDK, or the Cloud
1598 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
1599 #
1600 # Purge time will be truncated to the nearest microsecond. Purge
1601 # time will be unset if the queue has never been purged.
1602 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
1603 #
1604 # * For tasks created using Cloud Tasks: the queue-level retry settings
1605 # apply to all tasks in the queue that were created using Cloud Tasks.
1606 # Retry settings cannot be set on individual tasks.
1607 # * For tasks created using the App Engine SDK: the queue-level retry
1608 # settings apply to all tasks in the queue which do not have retry settings
1609 # explicitly set on the task and were created by the App Engine SDK. See
1610 # [App Engine
1611 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
1612 #
1613 # These settings determine when a failed task attempt is retried.
1614 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
1615 # retrying a failed task, measured from when the task was first
1616 # attempted. Once `max_retry_duration` time has passed *and* the
1617 # task has been attempted max_attempts
1618 # times, no further attempts will be made and the task will be
1619 # deleted.
1620 #
1621 # If zero, then the task age is unlimited.
1622 #
1623 # If unspecified when the queue is created, Cloud Tasks will pick the
1624 # default.
1625 #
1626 #
1627 # `max_retry_duration` will be truncated to the nearest second.
1628 #
1629 # This field has the same meaning as
1630 # [task_age_limit in
1631 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1632 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
1633 #
1634 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
1635 # first attempt fails, then there will be `max_attempts - 1` retries). Must
1636 # be &gt;= -1.
1637 #
1638 # If unspecified when the queue is created, Cloud Tasks will pick the
1639 # default.
1640 #
1641 # -1 indicates unlimited attempts.
1642 #
1643 # This field has the same meaning as
1644 # [task_retry_limit in
1645 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1646 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
1647 #
1648 # A task&#x27;s retry interval starts at
1649 # min_backoff, then doubles
1650 # `max_doublings` times, then increases linearly, and finally
1651 # retries at intervals of
1652 # max_backoff up to
1653 # max_attempts times.
1654 #
1655 # For example, if min_backoff is 10s,
1656 # max_backoff is 300s, and
1657 # `max_doublings` is 3, then the a task will first be retried in
1658 # 10s. The retry interval will double three times, and then
1659 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1660 # intervals of max_backoff until the
1661 # task has been attempted max_attempts
1662 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1663 # 240s, 300s, 300s, ....
1664 #
1665 # If unspecified when the queue is created, Cloud Tasks will pick the
1666 # default.
1667 #
1668 #
1669 # This field has the same meaning as
1670 # [max_doublings in
1671 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1672 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1673 # min_backoff and
1674 # max_backoff duration after it fails,
1675 # if the queue&#x27;s RetryConfig specifies that the task should be
1676 # retried.
1677 #
1678 # If unspecified when the queue is created, Cloud Tasks will pick the
1679 # default.
1680 #
1681 #
1682 # `min_backoff` will be truncated to the nearest second.
1683 #
1684 # This field has the same meaning as
1685 # [min_backoff_seconds in
1686 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1687 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1688 # min_backoff and
1689 # max_backoff duration after it fails,
1690 # if the queue&#x27;s RetryConfig specifies that the task should be
1691 # retried.
1692 #
1693 # If unspecified when the queue is created, Cloud Tasks will pick the
1694 # default.
1695 #
1696 #
1697 # `max_backoff` will be truncated to the nearest second.
1698 #
1699 # This field has the same meaning as
1700 # [max_backoff_seconds in
1701 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1702 },
1703 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
1704 #
1705 # `state` can only be changed by called
1706 # PauseQueue,
1707 # ResumeQueue, or uploading
1708 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
1709 # UpdateQueue cannot be used to change `state`.
1710 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
1711 # after which it becomes output only.
1712 #
1713 # The queue name.
1714 #
1715 # The queue name must have the following format:
1716 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1717 #
1718 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1719 # hyphens (-), colons (:), or periods (.).
1720 # For more information, see
1721 # [Identifying
1722 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1723 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
1724 # The list of available locations can be obtained by calling
1725 # ListLocations.
1726 # For more information, see https://cloud.google.com/about/locations/.
1727 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1728 # hyphens (-). The maximum length is 100 characters.
1729 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
1730 #
1731 # rate_limits and retry_config are
1732 # related because they both control task attempts. However they control task
1733 # attempts in different ways:
1734 #
1735 # * rate_limits controls the total rate of
1736 # dispatches from a queue (i.e. all traffic dispatched from the
1737 # queue, regardless of whether the dispatch is from a first
1738 # attempt or a retry).
1739 # * retry_config controls what happens to
1740 # particular a task after its first attempt fails. That is,
1741 # retry_config controls task retries (the
1742 # second attempt, third attempt, etc).
1743 #
1744 # The queue&#x27;s actual dispatch rate is the result of:
1745 #
1746 # * Number of tasks in the queue
1747 # * User-specified throttling: rate_limits,
1748 # retry_config, and the
1749 # queue&#x27;s state.
1750 # * System throttling due to `429` (Too Many Requests) or `503` (Service
1751 # Unavailable) responses from the worker, high error rates, or to smooth
1752 # sudden large traffic spikes.
1753 #
1754 # This message determines the maximum rate that tasks can be dispatched by a
1755 # queue, regardless of whether the dispatch is a first task attempt or a retry.
1756 #
1757 # Note: The debugging command, RunTask, will run a task
1758 # even if the queue has reached its RateLimits.
1759 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
1760 #
1761 # Max burst size limits how fast tasks in queue are processed when
1762 # many tasks are in the queue and the rate is high. This field
1763 # allows the queue to have a high rate so processing starts shortly
1764 # after a task is enqueued, but still limits resource usage when
1765 # many tasks are enqueued in a short period of time.
1766 #
1767 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1768 # algorithm is used to control the rate of task dispatches. Each
1769 # queue has a token bucket that holds tokens, up to the maximum
1770 # specified by `max_burst_size`. Each time a task is dispatched, a
1771 # token is removed from the bucket. Tasks will be dispatched until
1772 # the queue&#x27;s bucket runs out of tokens. The bucket will be
1773 # continuously refilled with new tokens based on
1774 # max_dispatches_per_second.
1775 #
1776 # Cloud Tasks will pick the value of `max_burst_size` based on the
1777 # value of
1778 # max_dispatches_per_second.
1779 #
1780 # For queues that were created or updated using
1781 # `queue.yaml/xml`, `max_burst_size` is equal to
1782 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1783 # Since `max_burst_size` is output only, if
1784 # UpdateQueue is called on a queue
1785 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
1786 # on the value of
1787 # max_dispatches_per_second,
1788 # regardless of whether
1789 # max_dispatches_per_second
1790 # is updated.
1791 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
1792 # to be dispatched for this queue. After this threshold has been
1793 # reached, Cloud Tasks stops dispatching tasks until the number of
1794 # concurrent requests decreases.
1795 #
1796 # If unspecified when the queue is created, Cloud Tasks will pick the
1797 # default.
1798 #
1799 #
1800 # The maximum allowed value is 5,000.
1801 #
1802 #
1803 # This field has the same meaning as
1804 # [max_concurrent_requests in
1805 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
1806 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
1807 #
1808 # If unspecified when the queue is created, Cloud Tasks will pick the
1809 # default.
1810 #
1811 # * The maximum allowed value is 500.
1812 #
1813 #
1814 # This field has the same meaning as
1815 # [rate in
1816 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
1817 },
1818 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
1819 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
1820 # field is unset, then no logs are written.
1821 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1822 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
1823 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1824 # This field may contain any value between 0.0 and 1.0, inclusive.
1825 # 0.0 is the default and means that no operations are logged.
1826 },
1827 },
1828 ],
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 Kim715bd7f2019-06-14 16:50:42 -07001888 # how those tasks are dispatched. Configurable properties include rate limits,
1889 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07001890 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001891 # task-level app_engine_routing.
1892 # These settings apply only to
1893 # App Engine tasks in this queue.
Dan O'Mearadd494642020-05-01 07:42:23 -07001894 # Http tasks are not affected.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001895 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001896 # If set, `app_engine_routing_override` is used for all
1897 # App Engine tasks in the queue, no matter what the
1898 # setting is for the
1899 # task-level app_engine_routing.
1900 #
1901 # Defines routing characteristics specific to App Engine - service, version,
1902 # and instance.
1903 #
1904 # For more information about services, versions, and instances see
1905 # [An Overview of App
1906 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1907 # [Microservices Architecture on Google App
1908 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1909 # [App Engine Standard request
1910 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1911 # and [App Engine Flex request
1912 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Dan O'Mearadd494642020-05-01 07:42:23 -07001913 #
1914 # Using AppEngineRouting requires
1915 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1916 # Google IAM permission for the project
1917 # and the following scope:
1918 #
1919 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -07001920 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001921 #
1922 # By default, the task is sent to the service which is the default
1923 # service when the task is attempted.
1924 #
1925 # For some queues or tasks which were created using the App Engine
1926 # Task Queue API, host is not parsable
1927 # into service,
1928 # version, and
1929 # instance. For example, some tasks
1930 # which were created using the App Engine SDK use a custom domain
1931 # name; custom domains are not parsed by Cloud Tasks. If
1932 # host is not parsable, then
1933 # service,
1934 # version, and
1935 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07001936 &quot;instance&quot;: &quot;A String&quot;, # App instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07001937 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001938 # By default, the task is sent to an instance which is available when
1939 # the task is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001940 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001941 # Requests can only be sent to a specific instance if
1942 # [manual scaling is used in App Engine
1943 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1944 # App Engine Flex does not support instances. For more information, see
1945 # [App Engine Standard request
1946 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1947 # and [App Engine Flex request
1948 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1949 &quot;version&quot;: &quot;A String&quot;, # App version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001950 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001951 # By default, the task is sent to the version which is the default
1952 # version when the task is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001953 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001954 # For some queues or tasks which were created using the App Engine
1955 # Task Queue API, host is not parsable
1956 # into service,
1957 # version, and
1958 # instance. For example, some tasks
1959 # which were created using the App Engine SDK use a custom domain
1960 # name; custom domains are not parsed by Cloud Tasks. If
1961 # host is not parsable, then
1962 # service,
1963 # version, and
1964 # instance are the empty string.
1965 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001966 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001967 # The host is constructed from the domain name of the app associated with
1968 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1969 # service, version,
1970 # and instance. Tasks which were created using
1971 # the App Engine SDK might have a custom domain name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001972 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001973 # For more information, see
1974 # [How Requests are
1975 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001976 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001977 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
1978 #
1979 # All tasks that were created before this time
1980 # were purged.
1981 #
1982 # A queue can be purged using PurgeQueue, the
1983 # [App Engine Task Queue SDK, or the Cloud
1984 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
1985 #
1986 # Purge time will be truncated to the nearest microsecond. Purge
1987 # time will be unset if the queue has never been purged.
1988 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
1989 #
1990 # * For tasks created using Cloud Tasks: the queue-level retry settings
1991 # apply to all tasks in the queue that were created using Cloud Tasks.
1992 # Retry settings cannot be set on individual tasks.
1993 # * For tasks created using the App Engine SDK: the queue-level retry
1994 # settings apply to all tasks in the queue which do not have retry settings
1995 # explicitly set on the task and were created by the App Engine SDK. See
1996 # [App Engine
1997 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
1998 #
1999 # These settings determine when a failed task attempt is retried.
2000 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2001 # retrying a failed task, measured from when the task was first
2002 # attempted. Once `max_retry_duration` time has passed *and* the
2003 # task has been attempted max_attempts
2004 # times, no further attempts will be made and the task will be
2005 # deleted.
2006 #
2007 # If zero, then the task age is unlimited.
2008 #
2009 # If unspecified when the queue is created, Cloud Tasks will pick the
2010 # default.
2011 #
2012 #
2013 # `max_retry_duration` will be truncated to the nearest second.
2014 #
2015 # This field has the same meaning as
2016 # [task_age_limit in
2017 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2018 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
2019 #
2020 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2021 # first attempt fails, then there will be `max_attempts - 1` retries). Must
2022 # be &gt;= -1.
2023 #
2024 # If unspecified when the queue is created, Cloud Tasks will pick the
2025 # default.
2026 #
2027 # -1 indicates unlimited attempts.
2028 #
2029 # This field has the same meaning as
2030 # [task_retry_limit in
2031 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2032 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2033 #
2034 # A task&#x27;s retry interval starts at
2035 # min_backoff, then doubles
2036 # `max_doublings` times, then increases linearly, and finally
2037 # retries at intervals of
2038 # max_backoff up to
2039 # max_attempts times.
2040 #
2041 # For example, if min_backoff is 10s,
2042 # max_backoff is 300s, and
2043 # `max_doublings` is 3, then the a task will first be retried in
2044 # 10s. The retry interval will double three times, and then
2045 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2046 # intervals of max_backoff until the
2047 # task has been attempted max_attempts
2048 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2049 # 240s, 300s, 300s, ....
2050 #
2051 # If unspecified when the queue is created, Cloud Tasks will pick the
2052 # default.
2053 #
2054 #
2055 # This field has the same meaning as
2056 # [max_doublings in
2057 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2058 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2059 # min_backoff and
2060 # max_backoff duration after it fails,
2061 # if the queue&#x27;s RetryConfig specifies that the task should be
2062 # retried.
2063 #
2064 # If unspecified when the queue is created, Cloud Tasks will pick the
2065 # default.
2066 #
2067 #
2068 # `min_backoff` will be truncated to the nearest second.
2069 #
2070 # This field has the same meaning as
2071 # [min_backoff_seconds in
2072 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2073 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2074 # min_backoff and
2075 # max_backoff duration after it fails,
2076 # if the queue&#x27;s RetryConfig specifies that the task should be
2077 # retried.
2078 #
2079 # If unspecified when the queue is created, Cloud Tasks will pick the
2080 # default.
2081 #
2082 #
2083 # `max_backoff` will be truncated to the nearest second.
2084 #
2085 # This field has the same meaning as
2086 # [max_backoff_seconds in
2087 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2088 },
2089 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2090 #
2091 # `state` can only be changed by called
2092 # PauseQueue,
2093 # ResumeQueue, or uploading
2094 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2095 # UpdateQueue cannot be used to change `state`.
2096 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2097 # after which it becomes output only.
2098 #
2099 # The queue name.
2100 #
2101 # The queue name must have the following format:
2102 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2103 #
2104 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2105 # hyphens (-), colons (:), or periods (.).
2106 # For more information, see
2107 # [Identifying
2108 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2109 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2110 # The list of available locations can be obtained by calling
2111 # ListLocations.
2112 # For more information, see https://cloud.google.com/about/locations/.
2113 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2114 # hyphens (-). The maximum length is 100 characters.
2115 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2116 #
2117 # rate_limits and retry_config are
2118 # related because they both control task attempts. However they control task
2119 # attempts in different ways:
2120 #
2121 # * rate_limits controls the total rate of
2122 # dispatches from a queue (i.e. all traffic dispatched from the
2123 # queue, regardless of whether the dispatch is from a first
2124 # attempt or a retry).
2125 # * retry_config controls what happens to
2126 # particular a task after its first attempt fails. That is,
2127 # retry_config controls task retries (the
2128 # second attempt, third attempt, etc).
2129 #
2130 # The queue&#x27;s actual dispatch rate is the result of:
2131 #
2132 # * Number of tasks in the queue
2133 # * User-specified throttling: rate_limits,
2134 # retry_config, and the
2135 # queue&#x27;s state.
2136 # * System throttling due to `429` (Too Many Requests) or `503` (Service
2137 # Unavailable) responses from the worker, high error rates, or to smooth
2138 # sudden large traffic spikes.
2139 #
2140 # This message determines the maximum rate that tasks can be dispatched by a
2141 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2142 #
2143 # Note: The debugging command, RunTask, will run a task
2144 # even if the queue has reached its RateLimits.
2145 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
2146 #
2147 # Max burst size limits how fast tasks in queue are processed when
2148 # many tasks are in the queue and the rate is high. This field
2149 # allows the queue to have a high rate so processing starts shortly
2150 # after a task is enqueued, but still limits resource usage when
2151 # many tasks are enqueued in a short period of time.
2152 #
2153 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2154 # algorithm is used to control the rate of task dispatches. Each
2155 # queue has a token bucket that holds tokens, up to the maximum
2156 # specified by `max_burst_size`. Each time a task is dispatched, a
2157 # token is removed from the bucket. Tasks will be dispatched until
2158 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2159 # continuously refilled with new tokens based on
2160 # max_dispatches_per_second.
2161 #
2162 # Cloud Tasks will pick the value of `max_burst_size` based on the
2163 # value of
2164 # max_dispatches_per_second.
2165 #
2166 # For queues that were created or updated using
2167 # `queue.yaml/xml`, `max_burst_size` is equal to
2168 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2169 # Since `max_burst_size` is output only, if
2170 # UpdateQueue is called on a queue
2171 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2172 # on the value of
2173 # max_dispatches_per_second,
2174 # regardless of whether
2175 # max_dispatches_per_second
2176 # is updated.
2177 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2178 # to be dispatched for this queue. After this threshold has been
2179 # reached, Cloud Tasks stops dispatching tasks until the number of
2180 # concurrent requests decreases.
2181 #
2182 # If unspecified when the queue is created, Cloud Tasks will pick the
2183 # default.
2184 #
2185 #
2186 # The maximum allowed value is 5,000.
2187 #
2188 #
2189 # This field has the same meaning as
2190 # [max_concurrent_requests in
2191 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
2192 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
2193 #
2194 # If unspecified when the queue is created, Cloud Tasks will pick the
2195 # default.
2196 #
2197 # * The maximum allowed value is 500.
2198 #
2199 #
2200 # This field has the same meaning as
2201 # [rate in
2202 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2203 },
2204 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
2205 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2206 # field is unset, then no logs are written.
2207 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2208 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
2209 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2210 # This field may contain any value between 0.0 and 1.0, inclusive.
2211 # 0.0 is the default and means that no operations are logged.
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;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
2230 # task-level app_engine_routing.
2231 # These settings apply only to
2232 # App Engine tasks in this queue.
2233 # Http tasks are not affected.
2234 #
2235 # If set, `app_engine_routing_override` is used for all
2236 # App Engine tasks in the queue, no matter what the
2237 # setting is for the
2238 # task-level app_engine_routing.
2239 #
2240 # Defines routing characteristics specific to App Engine - service, version,
2241 # and instance.
2242 #
2243 # For more information about services, versions, and instances see
2244 # [An Overview of App
2245 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2246 # [Microservices Architecture on Google App
2247 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2248 # [App Engine Standard request
2249 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2250 # and [App Engine Flex request
2251 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2252 #
2253 # Using AppEngineRouting requires
2254 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2255 # Google IAM permission for the project
2256 # and the following scope:
2257 #
2258 # `https://www.googleapis.com/auth/cloud-platform`
2259 &quot;service&quot;: &quot;A String&quot;, # App service.
2260 #
2261 # By default, the task is sent to the service which is the default
2262 # service when the task is attempted.
2263 #
2264 # For some queues or tasks which were created using the App Engine
2265 # Task Queue API, host is not parsable
2266 # into service,
2267 # version, and
2268 # instance. For example, some tasks
2269 # which were created using the App Engine SDK use a custom domain
2270 # name; custom domains are not parsed by Cloud Tasks. If
2271 # host is not parsable, then
2272 # service,
2273 # version, and
2274 # instance are the empty string.
2275 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2276 #
2277 # By default, the task is sent to an instance which is available when
2278 # the task is attempted.
2279 #
2280 # Requests can only be sent to a specific instance if
2281 # [manual scaling is used in App Engine
2282 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2283 # App Engine Flex does not support instances. For more information, see
2284 # [App Engine Standard request
2285 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2286 # and [App Engine Flex request
2287 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2288 &quot;version&quot;: &quot;A String&quot;, # App version.
2289 #
2290 # By default, the task is sent to the version which is the default
2291 # version when the task is attempted.
2292 #
2293 # For some queues or tasks which were created using the App Engine
2294 # Task Queue API, host is not parsable
2295 # into service,
2296 # version, and
2297 # instance. For example, some tasks
2298 # which were created using the App Engine SDK use a custom domain
2299 # name; custom domains are not parsed by Cloud Tasks. If
2300 # host is not parsable, then
2301 # service,
2302 # version, and
2303 # instance are the empty string.
2304 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2305 #
2306 # The host is constructed from the domain name of the app associated with
2307 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2308 # service, version,
2309 # and instance. Tasks which were created using
2310 # the App Engine SDK might have a custom domain name.
2311 #
2312 # For more information, see
2313 # [How Requests are
2314 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2315 },
2316 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
2317 #
2318 # All tasks that were created before this time
2319 # were purged.
2320 #
2321 # A queue can be purged using PurgeQueue, the
2322 # [App Engine Task Queue SDK, or the Cloud
2323 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2324 #
2325 # Purge time will be truncated to the nearest microsecond. Purge
2326 # time will be unset if the queue has never been purged.
2327 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
2328 #
2329 # * For tasks created using Cloud Tasks: the queue-level retry settings
2330 # apply to all tasks in the queue that were created using Cloud Tasks.
2331 # Retry settings cannot be set on individual tasks.
2332 # * For tasks created using the App Engine SDK: the queue-level retry
2333 # settings apply to all tasks in the queue which do not have retry settings
2334 # explicitly set on the task and were created by the App Engine SDK. See
2335 # [App Engine
2336 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2337 #
2338 # These settings determine when a failed task attempt is retried.
2339 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2340 # retrying a failed task, measured from when the task was first
2341 # attempted. Once `max_retry_duration` time has passed *and* the
2342 # task has been attempted max_attempts
2343 # times, no further attempts will be made and the task will be
2344 # deleted.
2345 #
2346 # If zero, then the task age is unlimited.
2347 #
2348 # If unspecified when the queue is created, Cloud Tasks will pick the
2349 # default.
2350 #
2351 #
2352 # `max_retry_duration` will be truncated to the nearest second.
2353 #
2354 # This field has the same meaning as
2355 # [task_age_limit in
2356 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2357 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
2358 #
2359 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2360 # first attempt fails, then there will be `max_attempts - 1` retries). Must
2361 # be &gt;= -1.
2362 #
2363 # If unspecified when the queue is created, Cloud Tasks will pick the
2364 # default.
2365 #
2366 # -1 indicates unlimited attempts.
2367 #
2368 # This field has the same meaning as
2369 # [task_retry_limit in
2370 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2371 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2372 #
2373 # A task&#x27;s retry interval starts at
2374 # min_backoff, then doubles
2375 # `max_doublings` times, then increases linearly, and finally
2376 # retries at intervals of
2377 # max_backoff up to
2378 # max_attempts times.
2379 #
2380 # For example, if min_backoff is 10s,
2381 # max_backoff is 300s, and
2382 # `max_doublings` is 3, then the a task will first be retried in
2383 # 10s. The retry interval will double three times, and then
2384 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2385 # intervals of max_backoff until the
2386 # task has been attempted max_attempts
2387 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2388 # 240s, 300s, 300s, ....
2389 #
2390 # If unspecified when the queue is created, Cloud Tasks will pick the
2391 # default.
2392 #
2393 #
2394 # This field has the same meaning as
2395 # [max_doublings in
2396 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2397 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2398 # min_backoff and
2399 # max_backoff duration after it fails,
2400 # if the queue&#x27;s RetryConfig specifies that the task should be
2401 # retried.
2402 #
2403 # If unspecified when the queue is created, Cloud Tasks will pick the
2404 # default.
2405 #
2406 #
2407 # `min_backoff` will be truncated to the nearest second.
2408 #
2409 # This field has the same meaning as
2410 # [min_backoff_seconds in
2411 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2412 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2413 # min_backoff and
2414 # max_backoff duration after it fails,
2415 # if the queue&#x27;s RetryConfig specifies that the task should be
2416 # retried.
2417 #
2418 # If unspecified when the queue is created, Cloud Tasks will pick the
2419 # default.
2420 #
2421 #
2422 # `max_backoff` will be truncated to the nearest second.
2423 #
2424 # This field has the same meaning as
2425 # [max_backoff_seconds in
2426 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2427 },
2428 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2429 #
2430 # `state` can only be changed by called
2431 # PauseQueue,
2432 # ResumeQueue, or uploading
2433 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2434 # UpdateQueue cannot be used to change `state`.
2435 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2436 # after which it becomes output only.
2437 #
2438 # The queue name.
2439 #
2440 # The queue name must have the following format:
2441 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2442 #
2443 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2444 # hyphens (-), colons (:), or periods (.).
2445 # For more information, see
2446 # [Identifying
2447 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2448 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2449 # The list of available locations can be obtained by calling
2450 # ListLocations.
2451 # For more information, see https://cloud.google.com/about/locations/.
2452 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2453 # hyphens (-). The maximum length is 100 characters.
2454 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2455 #
2456 # rate_limits and retry_config are
2457 # related because they both control task attempts. However they control task
2458 # attempts in different ways:
2459 #
2460 # * rate_limits controls the total rate of
2461 # dispatches from a queue (i.e. all traffic dispatched from the
2462 # queue, regardless of whether the dispatch is from a first
2463 # attempt or a retry).
2464 # * retry_config controls what happens to
2465 # particular a task after its first attempt fails. That is,
2466 # retry_config controls task retries (the
2467 # second attempt, third attempt, etc).
2468 #
2469 # The queue&#x27;s actual dispatch rate is the result of:
2470 #
2471 # * Number of tasks in the queue
2472 # * User-specified throttling: rate_limits,
2473 # retry_config, and the
2474 # queue&#x27;s state.
2475 # * System throttling due to `429` (Too Many Requests) or `503` (Service
2476 # Unavailable) responses from the worker, high error rates, or to smooth
2477 # sudden large traffic spikes.
2478 #
2479 # This message determines the maximum rate that tasks can be dispatched by a
2480 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2481 #
2482 # Note: The debugging command, RunTask, will run a task
2483 # even if the queue has reached its RateLimits.
2484 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
2485 #
2486 # Max burst size limits how fast tasks in queue are processed when
2487 # many tasks are in the queue and the rate is high. This field
2488 # allows the queue to have a high rate so processing starts shortly
2489 # after a task is enqueued, but still limits resource usage when
2490 # many tasks are enqueued in a short period of time.
2491 #
2492 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2493 # algorithm is used to control the rate of task dispatches. Each
2494 # queue has a token bucket that holds tokens, up to the maximum
2495 # specified by `max_burst_size`. Each time a task is dispatched, a
2496 # token is removed from the bucket. Tasks will be dispatched until
2497 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2498 # continuously refilled with new tokens based on
2499 # max_dispatches_per_second.
2500 #
2501 # Cloud Tasks will pick the value of `max_burst_size` based on the
2502 # value of
2503 # max_dispatches_per_second.
2504 #
2505 # For queues that were created or updated using
2506 # `queue.yaml/xml`, `max_burst_size` is equal to
2507 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2508 # Since `max_burst_size` is output only, if
2509 # UpdateQueue is called on a queue
2510 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2511 # on the value of
2512 # max_dispatches_per_second,
2513 # regardless of whether
2514 # max_dispatches_per_second
2515 # is updated.
2516 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2517 # to be dispatched for this queue. After this threshold has been
2518 # reached, Cloud Tasks stops dispatching tasks until the number of
2519 # concurrent requests decreases.
2520 #
2521 # If unspecified when the queue is created, Cloud Tasks will pick the
2522 # default.
2523 #
2524 #
2525 # The maximum allowed value is 5,000.
2526 #
2527 #
2528 # This field has the same meaning as
2529 # [max_concurrent_requests in
2530 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
2531 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
2532 #
2533 # If unspecified when the queue is created, Cloud Tasks will pick the
2534 # default.
2535 #
2536 # * The maximum allowed value is 500.
2537 #
2538 #
2539 # This field has the same meaning as
2540 # [rate in
2541 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2542 },
2543 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
2544 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2545 # field is unset, then no logs are written.
2546 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2547 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
2548 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2549 # This field may contain any value between 0.0 and 1.0, inclusive.
2550 # 0.0 is the default and means that no operations are logged.
2551 },
2552 }</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 Kim4ed7d3f2020-05-27 12:20:54 -07002583 # how those tasks are dispatched. Configurable properties include rate limits,
2584 # retry options, queue types, and others.
2585 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
2586 # task-level app_engine_routing.
2587 # These settings apply only to
2588 # App Engine tasks in this queue.
2589 # Http tasks are not affected.
Bu Sun Kim65020912020-05-20 12:08:20 -07002590 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002591 # If set, `app_engine_routing_override` is used for all
2592 # App Engine tasks in the queue, no matter what the
2593 # setting is for the
2594 # task-level app_engine_routing.
Bu Sun Kim65020912020-05-20 12:08:20 -07002595 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002596 # Defines routing characteristics specific to App Engine - service, version,
2597 # and instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002598 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002599 # For more information about services, versions, and instances see
2600 # [An Overview of App
2601 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2602 # [Microservices Architecture on Google App
2603 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
Bu Sun Kim65020912020-05-20 12:08:20 -07002604 # [App Engine Standard request
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002605 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
Bu Sun Kim65020912020-05-20 12:08:20 -07002606 # and [App Engine Flex request
2607 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002608 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002609 # Using AppEngineRouting requires
2610 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2611 # Google IAM permission for the project
2612 # and the following scope:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002613 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002614 # `https://www.googleapis.com/auth/cloud-platform`
2615 &quot;service&quot;: &quot;A String&quot;, # App service.
2616 #
2617 # By default, the task is sent to the service which is the default
2618 # service when the task is attempted.
2619 #
2620 # For some queues or tasks which were created using the App Engine
2621 # Task Queue API, host is not parsable
2622 # into service,
2623 # version, and
2624 # instance. For example, some tasks
2625 # which were created using the App Engine SDK use a custom domain
2626 # name; custom domains are not parsed by Cloud Tasks. If
2627 # host is not parsable, then
2628 # service,
2629 # version, and
2630 # instance are the empty string.
2631 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2632 #
2633 # By default, the task is sent to an instance which is available when
2634 # the task is attempted.
2635 #
2636 # Requests can only be sent to a specific instance if
2637 # [manual scaling is used in App Engine
2638 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2639 # App Engine Flex does not support instances. For more information, see
2640 # [App Engine Standard request
2641 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2642 # and [App Engine Flex request
2643 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2644 &quot;version&quot;: &quot;A String&quot;, # App version.
2645 #
2646 # By default, the task is sent to the version which is the default
2647 # version when the task is attempted.
2648 #
2649 # For some queues or tasks which were created using the App Engine
2650 # Task Queue API, host is not parsable
2651 # into service,
2652 # version, and
2653 # instance. For example, some tasks
2654 # which were created using the App Engine SDK use a custom domain
2655 # name; custom domains are not parsed by Cloud Tasks. If
2656 # host is not parsable, then
2657 # service,
2658 # version, and
2659 # instance are the empty string.
2660 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2661 #
2662 # The host is constructed from the domain name of the app associated with
2663 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2664 # service, version,
2665 # and instance. Tasks which were created using
2666 # the App Engine SDK might have a custom domain name.
2667 #
2668 # For more information, see
2669 # [How Requests are
2670 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2671 },
2672 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002673 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002674 # All tasks that were created before this time
2675 # were purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002676 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002677 # A queue can be purged using PurgeQueue, the
2678 # [App Engine Task Queue SDK, or the Cloud
2679 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2680 #
2681 # Purge time will be truncated to the nearest microsecond. Purge
2682 # time will be unset if the queue has never been purged.
2683 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
2684 #
2685 # * For tasks created using Cloud Tasks: the queue-level retry settings
2686 # apply to all tasks in the queue that were created using Cloud Tasks.
2687 # Retry settings cannot be set on individual tasks.
2688 # * For tasks created using the App Engine SDK: the queue-level retry
2689 # settings apply to all tasks in the queue which do not have retry settings
2690 # explicitly set on the task and were created by the App Engine SDK. See
2691 # [App Engine
2692 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2693 #
2694 # These settings determine when a failed task attempt is retried.
2695 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2696 # retrying a failed task, measured from when the task was first
2697 # attempted. Once `max_retry_duration` time has passed *and* the
2698 # task has been attempted max_attempts
2699 # times, no further attempts will be made and the task will be
2700 # deleted.
2701 #
2702 # If zero, then the task age is unlimited.
2703 #
2704 # If unspecified when the queue is created, Cloud Tasks will pick the
2705 # default.
2706 #
2707 #
2708 # `max_retry_duration` will be truncated to the nearest second.
2709 #
2710 # This field has the same meaning as
2711 # [task_age_limit in
2712 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2713 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
2714 #
2715 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2716 # first attempt fails, then there will be `max_attempts - 1` retries). Must
2717 # be &gt;= -1.
2718 #
2719 # If unspecified when the queue is created, Cloud Tasks will pick the
2720 # default.
2721 #
2722 # -1 indicates unlimited attempts.
2723 #
2724 # This field has the same meaning as
2725 # [task_retry_limit in
2726 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2727 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2728 #
2729 # A task&#x27;s retry interval starts at
2730 # min_backoff, then doubles
2731 # `max_doublings` times, then increases linearly, and finally
2732 # retries at intervals of
2733 # max_backoff up to
2734 # max_attempts times.
2735 #
2736 # For example, if min_backoff is 10s,
2737 # max_backoff is 300s, and
2738 # `max_doublings` is 3, then the a task will first be retried in
2739 # 10s. The retry interval will double three times, and then
2740 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2741 # intervals of max_backoff until the
2742 # task has been attempted max_attempts
2743 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2744 # 240s, 300s, 300s, ....
2745 #
2746 # If unspecified when the queue is created, Cloud Tasks will pick the
2747 # default.
2748 #
2749 #
2750 # This field has the same meaning as
2751 # [max_doublings in
2752 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2753 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2754 # min_backoff and
2755 # max_backoff duration after it fails,
2756 # if the queue&#x27;s RetryConfig specifies that the task should be
2757 # retried.
2758 #
2759 # If unspecified when the queue is created, Cloud Tasks will pick the
2760 # default.
2761 #
2762 #
2763 # `min_backoff` will be truncated to the nearest second.
2764 #
2765 # This field has the same meaning as
2766 # [min_backoff_seconds in
2767 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2768 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2769 # min_backoff and
2770 # max_backoff duration after it fails,
2771 # if the queue&#x27;s RetryConfig specifies that the task should be
2772 # retried.
2773 #
2774 # If unspecified when the queue is created, Cloud Tasks will pick the
2775 # default.
2776 #
2777 #
2778 # `max_backoff` will be truncated to the nearest second.
2779 #
2780 # This field has the same meaning as
2781 # [max_backoff_seconds in
2782 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2783 },
2784 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2785 #
2786 # `state` can only be changed by called
2787 # PauseQueue,
2788 # ResumeQueue, or uploading
2789 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2790 # UpdateQueue cannot be used to change `state`.
2791 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2792 # after which it becomes output only.
2793 #
2794 # The queue name.
2795 #
2796 # The queue name must have the following format:
2797 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2798 #
2799 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2800 # hyphens (-), colons (:), or periods (.).
2801 # For more information, see
2802 # [Identifying
2803 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2804 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2805 # The list of available locations can be obtained by calling
2806 # ListLocations.
2807 # For more information, see https://cloud.google.com/about/locations/.
2808 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2809 # hyphens (-). The maximum length is 100 characters.
2810 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2811 #
2812 # rate_limits and retry_config are
2813 # related because they both control task attempts. However they control task
2814 # attempts in different ways:
2815 #
2816 # * rate_limits controls the total rate of
2817 # dispatches from a queue (i.e. all traffic dispatched from the
2818 # queue, regardless of whether the dispatch is from a first
2819 # attempt or a retry).
2820 # * retry_config controls what happens to
2821 # particular a task after its first attempt fails. That is,
2822 # retry_config controls task retries (the
2823 # second attempt, third attempt, etc).
2824 #
2825 # The queue&#x27;s actual dispatch rate is the result of:
2826 #
2827 # * Number of tasks in the queue
2828 # * User-specified throttling: rate_limits,
2829 # retry_config, and the
2830 # queue&#x27;s state.
2831 # * System throttling due to `429` (Too Many Requests) or `503` (Service
2832 # Unavailable) responses from the worker, high error rates, or to smooth
2833 # sudden large traffic spikes.
2834 #
2835 # This message determines the maximum rate that tasks can be dispatched by a
2836 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2837 #
2838 # Note: The debugging command, RunTask, will run a task
2839 # even if the queue has reached its RateLimits.
2840 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
2841 #
2842 # Max burst size limits how fast tasks in queue are processed when
2843 # many tasks are in the queue and the rate is high. This field
2844 # allows the queue to have a high rate so processing starts shortly
2845 # after a task is enqueued, but still limits resource usage when
2846 # many tasks are enqueued in a short period of time.
2847 #
2848 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2849 # algorithm is used to control the rate of task dispatches. Each
2850 # queue has a token bucket that holds tokens, up to the maximum
2851 # specified by `max_burst_size`. Each time a task is dispatched, a
2852 # token is removed from the bucket. Tasks will be dispatched until
2853 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2854 # continuously refilled with new tokens based on
2855 # max_dispatches_per_second.
2856 #
2857 # Cloud Tasks will pick the value of `max_burst_size` based on the
2858 # value of
2859 # max_dispatches_per_second.
2860 #
2861 # For queues that were created or updated using
2862 # `queue.yaml/xml`, `max_burst_size` is equal to
2863 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2864 # Since `max_burst_size` is output only, if
2865 # UpdateQueue is called on a queue
2866 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2867 # on the value of
2868 # max_dispatches_per_second,
2869 # regardless of whether
2870 # max_dispatches_per_second
2871 # is updated.
2872 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2873 # to be dispatched for this queue. After this threshold has been
2874 # reached, Cloud Tasks stops dispatching tasks until the number of
2875 # concurrent requests decreases.
2876 #
2877 # If unspecified when the queue is created, Cloud Tasks will pick the
2878 # default.
2879 #
2880 #
2881 # The maximum allowed value is 5,000.
2882 #
2883 #
2884 # This field has the same meaning as
2885 # [max_concurrent_requests in
2886 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
2887 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
2888 #
2889 # If unspecified when the queue is created, Cloud Tasks will pick the
2890 # default.
2891 #
2892 # * The maximum allowed value is 500.
2893 #
2894 #
2895 # This field has the same meaning as
2896 # [rate in
2897 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2898 },
2899 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
2900 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2901 # field is unset, then no logs are written.
2902 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2903 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
2904 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2905 # This field may contain any value between 0.0 and 1.0, inclusive.
2906 # 0.0 is the default and means that no operations are logged.
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 Kim4ed7d3f2020-05-27 12:20:54 -07002938 # how those tasks are dispatched. Configurable properties include rate limits,
2939 # retry options, queue types, and others.
2940 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
2941 # task-level app_engine_routing.
2942 # These settings apply only to
2943 # App Engine tasks in this queue.
2944 # Http tasks are not affected.
Bu Sun Kim65020912020-05-20 12:08:20 -07002945 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002946 # If set, `app_engine_routing_override` is used for all
2947 # App Engine tasks in the queue, no matter what the
2948 # setting is for the
2949 # task-level app_engine_routing.
Bu Sun Kim65020912020-05-20 12:08:20 -07002950 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002951 # Defines routing characteristics specific to App Engine - service, version,
2952 # and instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07002953 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002954 # For more information about services, versions, and instances see
2955 # [An Overview of App
2956 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2957 # [Microservices Architecture on Google App
2958 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
Bu Sun Kim65020912020-05-20 12:08:20 -07002959 # [App Engine Standard request
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002960 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
Bu Sun Kim65020912020-05-20 12:08:20 -07002961 # and [App Engine Flex request
2962 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002963 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002964 # Using AppEngineRouting requires
2965 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2966 # Google IAM permission for the project
2967 # and the following scope:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002968 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002969 # `https://www.googleapis.com/auth/cloud-platform`
2970 &quot;service&quot;: &quot;A String&quot;, # App service.
2971 #
2972 # By default, the task is sent to the service which is the default
2973 # service when the task is attempted.
2974 #
2975 # For some queues or tasks which were created using the App Engine
2976 # Task Queue API, host is not parsable
2977 # into service,
2978 # version, and
2979 # instance. For example, some tasks
2980 # which were created using the App Engine SDK use a custom domain
2981 # name; custom domains are not parsed by Cloud Tasks. If
2982 # host is not parsable, then
2983 # service,
2984 # version, and
2985 # instance are the empty string.
2986 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2987 #
2988 # By default, the task is sent to an instance which is available when
2989 # the task is attempted.
2990 #
2991 # Requests can only be sent to a specific instance if
2992 # [manual scaling is used in App Engine
2993 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2994 # App Engine Flex does not support instances. For more information, see
2995 # [App Engine Standard request
2996 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2997 # and [App Engine Flex request
2998 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2999 &quot;version&quot;: &quot;A String&quot;, # App version.
3000 #
3001 # By default, the task is sent to the version which is the default
3002 # version when the task is attempted.
3003 #
3004 # For some queues or tasks which were created using the App Engine
3005 # Task Queue API, host is not parsable
3006 # into service,
3007 # version, and
3008 # instance. For example, some tasks
3009 # which were created using the App Engine SDK use a custom domain
3010 # name; custom domains are not parsed by Cloud Tasks. If
3011 # host is not parsable, then
3012 # service,
3013 # version, and
3014 # instance are the empty string.
3015 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
3016 #
3017 # The host is constructed from the domain name of the app associated with
3018 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
3019 # service, version,
3020 # and instance. Tasks which were created using
3021 # the App Engine SDK might have a custom domain name.
3022 #
3023 # For more information, see
3024 # [How Requests are
3025 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3026 },
3027 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003028 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003029 # All tasks that were created before this time
3030 # were purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003031 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003032 # A queue can be purged using PurgeQueue, the
3033 # [App Engine Task Queue SDK, or the Cloud
3034 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
3035 #
3036 # Purge time will be truncated to the nearest microsecond. Purge
3037 # time will be unset if the queue has never been purged.
3038 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
3039 #
3040 # * For tasks created using Cloud Tasks: the queue-level retry settings
3041 # apply to all tasks in the queue that were created using Cloud Tasks.
3042 # Retry settings cannot be set on individual tasks.
3043 # * For tasks created using the App Engine SDK: the queue-level retry
3044 # settings apply to all tasks in the queue which do not have retry settings
3045 # explicitly set on the task and were created by the App Engine SDK. See
3046 # [App Engine
3047 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3048 #
3049 # These settings determine when a failed task attempt is retried.
3050 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
3051 # retrying a failed task, measured from when the task was first
3052 # attempted. Once `max_retry_duration` time has passed *and* the
3053 # task has been attempted max_attempts
3054 # times, no further attempts will be made and the task will be
3055 # deleted.
3056 #
3057 # If zero, then the task age is unlimited.
3058 #
3059 # If unspecified when the queue is created, Cloud Tasks will pick the
3060 # default.
3061 #
3062 #
3063 # `max_retry_duration` will be truncated to the nearest second.
3064 #
3065 # This field has the same meaning as
3066 # [task_age_limit in
3067 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3068 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
3069 #
3070 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
3071 # first attempt fails, then there will be `max_attempts - 1` retries). Must
3072 # be &gt;= -1.
3073 #
3074 # If unspecified when the queue is created, Cloud Tasks will pick the
3075 # default.
3076 #
3077 # -1 indicates unlimited attempts.
3078 #
3079 # This field has the same meaning as
3080 # [task_retry_limit in
3081 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3082 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
3083 #
3084 # A task&#x27;s retry interval starts at
3085 # min_backoff, then doubles
3086 # `max_doublings` times, then increases linearly, and finally
3087 # retries at intervals of
3088 # max_backoff up to
3089 # max_attempts times.
3090 #
3091 # For example, if min_backoff is 10s,
3092 # max_backoff is 300s, and
3093 # `max_doublings` is 3, then the a task will first be retried in
3094 # 10s. The retry interval will double three times, and then
3095 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3096 # intervals of max_backoff until the
3097 # task has been attempted max_attempts
3098 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3099 # 240s, 300s, 300s, ....
3100 #
3101 # If unspecified when the queue is created, Cloud Tasks will pick the
3102 # default.
3103 #
3104 #
3105 # This field has the same meaning as
3106 # [max_doublings in
3107 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3108 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3109 # min_backoff and
3110 # max_backoff duration after it fails,
3111 # if the queue&#x27;s RetryConfig specifies that the task should be
3112 # retried.
3113 #
3114 # If unspecified when the queue is created, Cloud Tasks will pick the
3115 # default.
3116 #
3117 #
3118 # `min_backoff` will be truncated to the nearest second.
3119 #
3120 # This field has the same meaning as
3121 # [min_backoff_seconds in
3122 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3123 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3124 # min_backoff and
3125 # max_backoff duration after it fails,
3126 # if the queue&#x27;s RetryConfig specifies that the task should be
3127 # retried.
3128 #
3129 # If unspecified when the queue is created, Cloud Tasks will pick the
3130 # default.
3131 #
3132 #
3133 # `max_backoff` will be truncated to the nearest second.
3134 #
3135 # This field has the same meaning as
3136 # [max_backoff_seconds in
3137 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3138 },
3139 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
3140 #
3141 # `state` can only be changed by called
3142 # PauseQueue,
3143 # ResumeQueue, or uploading
3144 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3145 # UpdateQueue cannot be used to change `state`.
3146 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
3147 # after which it becomes output only.
3148 #
3149 # The queue name.
3150 #
3151 # The queue name must have the following format:
3152 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
3153 #
3154 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3155 # hyphens (-), colons (:), or periods (.).
3156 # For more information, see
3157 # [Identifying
3158 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3159 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
3160 # The list of available locations can be obtained by calling
3161 # ListLocations.
3162 # For more information, see https://cloud.google.com/about/locations/.
3163 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3164 # hyphens (-). The maximum length is 100 characters.
3165 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
3166 #
3167 # rate_limits and retry_config are
3168 # related because they both control task attempts. However they control task
3169 # attempts in different ways:
3170 #
3171 # * rate_limits controls the total rate of
3172 # dispatches from a queue (i.e. all traffic dispatched from the
3173 # queue, regardless of whether the dispatch is from a first
3174 # attempt or a retry).
3175 # * retry_config controls what happens to
3176 # particular a task after its first attempt fails. That is,
3177 # retry_config controls task retries (the
3178 # second attempt, third attempt, etc).
3179 #
3180 # The queue&#x27;s actual dispatch rate is the result of:
3181 #
3182 # * Number of tasks in the queue
3183 # * User-specified throttling: rate_limits,
3184 # retry_config, and the
3185 # queue&#x27;s state.
3186 # * System throttling due to `429` (Too Many Requests) or `503` (Service
3187 # Unavailable) responses from the worker, high error rates, or to smooth
3188 # sudden large traffic spikes.
3189 #
3190 # This message determines the maximum rate that tasks can be dispatched by a
3191 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3192 #
3193 # Note: The debugging command, RunTask, will run a task
3194 # even if the queue has reached its RateLimits.
3195 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
3196 #
3197 # Max burst size limits how fast tasks in queue are processed when
3198 # many tasks are in the queue and the rate is high. This field
3199 # allows the queue to have a high rate so processing starts shortly
3200 # after a task is enqueued, but still limits resource usage when
3201 # many tasks are enqueued in a short period of time.
3202 #
3203 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3204 # algorithm is used to control the rate of task dispatches. Each
3205 # queue has a token bucket that holds tokens, up to the maximum
3206 # specified by `max_burst_size`. Each time a task is dispatched, a
3207 # token is removed from the bucket. Tasks will be dispatched until
3208 # the queue&#x27;s bucket runs out of tokens. The bucket will be
3209 # continuously refilled with new tokens based on
3210 # max_dispatches_per_second.
3211 #
3212 # Cloud Tasks will pick the value of `max_burst_size` based on the
3213 # value of
3214 # max_dispatches_per_second.
3215 #
3216 # For queues that were created or updated using
3217 # `queue.yaml/xml`, `max_burst_size` is equal to
3218 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3219 # Since `max_burst_size` is output only, if
3220 # UpdateQueue is called on a queue
3221 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3222 # on the value of
3223 # max_dispatches_per_second,
3224 # regardless of whether
3225 # max_dispatches_per_second
3226 # is updated.
3227 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3228 # to be dispatched for this queue. After this threshold has been
3229 # reached, Cloud Tasks stops dispatching tasks until the number of
3230 # concurrent requests decreases.
3231 #
3232 # If unspecified when the queue is created, Cloud Tasks will pick the
3233 # default.
3234 #
3235 #
3236 # The maximum allowed value is 5,000.
3237 #
3238 #
3239 # This field has the same meaning as
3240 # [max_concurrent_requests in
3241 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
3242 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
3243 #
3244 # If unspecified when the queue is created, Cloud Tasks will pick the
3245 # default.
3246 #
3247 # * The maximum allowed value is 500.
3248 #
3249 #
3250 # This field has the same meaning as
3251 # [rate in
3252 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
3253 },
3254 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
3255 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
3256 # field is unset, then no logs are written.
3257 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3258 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
3259 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3260 # This field may contain any value between 0.0 and 1.0, inclusive.
3261 # 0.0 is the default and means that no operations are logged.
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 Kim4ed7d3f2020-05-27 12:20:54 -07003300 # how those tasks are dispatched. Configurable properties include rate limits,
3301 # retry options, queue types, and others.
3302 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for
3303 # task-level app_engine_routing.
3304 # These settings apply only to
3305 # App Engine tasks in this queue.
3306 # Http tasks are not affected.
Bu Sun Kim65020912020-05-20 12:08:20 -07003307 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003308 # If set, `app_engine_routing_override` is used for all
3309 # App Engine tasks in the queue, no matter what the
3310 # setting is for the
3311 # task-level app_engine_routing.
Bu Sun Kim65020912020-05-20 12:08:20 -07003312 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003313 # Defines routing characteristics specific to App Engine - service, version,
3314 # and instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07003315 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003316 # For more information about services, versions, and instances see
3317 # [An Overview of App
3318 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3319 # [Microservices Architecture on Google App
3320 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
Bu Sun Kim65020912020-05-20 12:08:20 -07003321 # [App Engine Standard request
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003322 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
Bu Sun Kim65020912020-05-20 12:08:20 -07003323 # and [App Engine Flex request
3324 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003325 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003326 # Using AppEngineRouting requires
3327 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3328 # Google IAM permission for the project
3329 # and the following scope:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003330 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003331 # `https://www.googleapis.com/auth/cloud-platform`
3332 &quot;service&quot;: &quot;A String&quot;, # App service.
3333 #
3334 # By default, the task is sent to the service which is the default
3335 # service when the task is attempted.
3336 #
3337 # For some queues or tasks which were created using the App Engine
3338 # Task Queue API, host is not parsable
3339 # into service,
3340 # version, and
3341 # instance. For example, some tasks
3342 # which were created using the App Engine SDK use a custom domain
3343 # name; custom domains are not parsed by Cloud Tasks. If
3344 # host is not parsable, then
3345 # service,
3346 # version, and
3347 # instance are the empty string.
3348 &quot;instance&quot;: &quot;A String&quot;, # App instance.
3349 #
3350 # By default, the task is sent to an instance which is available when
3351 # the task is attempted.
3352 #
3353 # Requests can only be sent to a specific instance if
3354 # [manual scaling is used in App Engine
3355 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3356 # App Engine Flex does not support instances. For more information, see
3357 # [App Engine Standard request
3358 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3359 # and [App Engine Flex request
3360 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3361 &quot;version&quot;: &quot;A String&quot;, # App version.
3362 #
3363 # By default, the task is sent to the version which is the default
3364 # version when the task is attempted.
3365 #
3366 # For some queues or tasks which were created using the App Engine
3367 # Task Queue API, host is not parsable
3368 # into service,
3369 # version, and
3370 # instance. For example, some tasks
3371 # which were created using the App Engine SDK use a custom domain
3372 # name; custom domains are not parsed by Cloud Tasks. If
3373 # host is not parsable, then
3374 # service,
3375 # version, and
3376 # instance are the empty string.
3377 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
3378 #
3379 # The host is constructed from the domain name of the app associated with
3380 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
3381 # service, version,
3382 # and instance. Tasks which were created using
3383 # the App Engine SDK might have a custom domain name.
3384 #
3385 # For more information, see
3386 # [How Requests are
3387 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3388 },
3389 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003390 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003391 # All tasks that were created before this time
3392 # were purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003393 #
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003394 # A queue can be purged using PurgeQueue, the
3395 # [App Engine Task Queue SDK, or the Cloud
3396 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
3397 #
3398 # Purge time will be truncated to the nearest microsecond. Purge
3399 # time will be unset if the queue has never been purged.
3400 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
3401 #
3402 # * For tasks created using Cloud Tasks: the queue-level retry settings
3403 # apply to all tasks in the queue that were created using Cloud Tasks.
3404 # Retry settings cannot be set on individual tasks.
3405 # * For tasks created using the App Engine SDK: the queue-level retry
3406 # settings apply to all tasks in the queue which do not have retry settings
3407 # explicitly set on the task and were created by the App Engine SDK. See
3408 # [App Engine
3409 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3410 #
3411 # These settings determine when a failed task attempt is retried.
3412 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
3413 # retrying a failed task, measured from when the task was first
3414 # attempted. Once `max_retry_duration` time has passed *and* the
3415 # task has been attempted max_attempts
3416 # times, no further attempts will be made and the task will be
3417 # deleted.
3418 #
3419 # If zero, then the task age is unlimited.
3420 #
3421 # If unspecified when the queue is created, Cloud Tasks will pick the
3422 # default.
3423 #
3424 #
3425 # `max_retry_duration` will be truncated to the nearest second.
3426 #
3427 # This field has the same meaning as
3428 # [task_age_limit in
3429 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3430 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
3431 #
3432 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
3433 # first attempt fails, then there will be `max_attempts - 1` retries). Must
3434 # be &gt;= -1.
3435 #
3436 # If unspecified when the queue is created, Cloud Tasks will pick the
3437 # default.
3438 #
3439 # -1 indicates unlimited attempts.
3440 #
3441 # This field has the same meaning as
3442 # [task_retry_limit in
3443 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3444 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
3445 #
3446 # A task&#x27;s retry interval starts at
3447 # min_backoff, then doubles
3448 # `max_doublings` times, then increases linearly, and finally
3449 # retries at intervals of
3450 # max_backoff up to
3451 # max_attempts times.
3452 #
3453 # For example, if min_backoff is 10s,
3454 # max_backoff is 300s, and
3455 # `max_doublings` is 3, then the a task will first be retried in
3456 # 10s. The retry interval will double three times, and then
3457 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3458 # intervals of max_backoff until the
3459 # task has been attempted max_attempts
3460 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3461 # 240s, 300s, 300s, ....
3462 #
3463 # If unspecified when the queue is created, Cloud Tasks will pick the
3464 # default.
3465 #
3466 #
3467 # This field has the same meaning as
3468 # [max_doublings in
3469 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3470 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3471 # min_backoff and
3472 # max_backoff duration after it fails,
3473 # if the queue&#x27;s RetryConfig specifies that the task should be
3474 # retried.
3475 #
3476 # If unspecified when the queue is created, Cloud Tasks will pick the
3477 # default.
3478 #
3479 #
3480 # `min_backoff` will be truncated to the nearest second.
3481 #
3482 # This field has the same meaning as
3483 # [min_backoff_seconds in
3484 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3485 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3486 # min_backoff and
3487 # max_backoff duration after it fails,
3488 # if the queue&#x27;s RetryConfig specifies that the task should be
3489 # retried.
3490 #
3491 # If unspecified when the queue is created, Cloud Tasks will pick the
3492 # default.
3493 #
3494 #
3495 # `max_backoff` will be truncated to the nearest second.
3496 #
3497 # This field has the same meaning as
3498 # [max_backoff_seconds in
3499 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3500 },
3501 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
3502 #
3503 # `state` can only be changed by called
3504 # PauseQueue,
3505 # ResumeQueue, or uploading
3506 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3507 # UpdateQueue cannot be used to change `state`.
3508 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
3509 # after which it becomes output only.
3510 #
3511 # The queue name.
3512 #
3513 # The queue name must have the following format:
3514 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
3515 #
3516 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3517 # hyphens (-), colons (:), or periods (.).
3518 # For more information, see
3519 # [Identifying
3520 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3521 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
3522 # The list of available locations can be obtained by calling
3523 # ListLocations.
3524 # For more information, see https://cloud.google.com/about/locations/.
3525 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3526 # hyphens (-). The maximum length is 100 characters.
3527 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
3528 #
3529 # rate_limits and retry_config are
3530 # related because they both control task attempts. However they control task
3531 # attempts in different ways:
3532 #
3533 # * rate_limits controls the total rate of
3534 # dispatches from a queue (i.e. all traffic dispatched from the
3535 # queue, regardless of whether the dispatch is from a first
3536 # attempt or a retry).
3537 # * retry_config controls what happens to
3538 # particular a task after its first attempt fails. That is,
3539 # retry_config controls task retries (the
3540 # second attempt, third attempt, etc).
3541 #
3542 # The queue&#x27;s actual dispatch rate is the result of:
3543 #
3544 # * Number of tasks in the queue
3545 # * User-specified throttling: rate_limits,
3546 # retry_config, and the
3547 # queue&#x27;s state.
3548 # * System throttling due to `429` (Too Many Requests) or `503` (Service
3549 # Unavailable) responses from the worker, high error rates, or to smooth
3550 # sudden large traffic spikes.
3551 #
3552 # This message determines the maximum rate that tasks can be dispatched by a
3553 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3554 #
3555 # Note: The debugging command, RunTask, will run a task
3556 # even if the queue has reached its RateLimits.
3557 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
3558 #
3559 # Max burst size limits how fast tasks in queue are processed when
3560 # many tasks are in the queue and the rate is high. This field
3561 # allows the queue to have a high rate so processing starts shortly
3562 # after a task is enqueued, but still limits resource usage when
3563 # many tasks are enqueued in a short period of time.
3564 #
3565 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3566 # algorithm is used to control the rate of task dispatches. Each
3567 # queue has a token bucket that holds tokens, up to the maximum
3568 # specified by `max_burst_size`. Each time a task is dispatched, a
3569 # token is removed from the bucket. Tasks will be dispatched until
3570 # the queue&#x27;s bucket runs out of tokens. The bucket will be
3571 # continuously refilled with new tokens based on
3572 # max_dispatches_per_second.
3573 #
3574 # Cloud Tasks will pick the value of `max_burst_size` based on the
3575 # value of
3576 # max_dispatches_per_second.
3577 #
3578 # For queues that were created or updated using
3579 # `queue.yaml/xml`, `max_burst_size` is equal to
3580 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3581 # Since `max_burst_size` is output only, if
3582 # UpdateQueue is called on a queue
3583 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3584 # on the value of
3585 # max_dispatches_per_second,
3586 # regardless of whether
3587 # max_dispatches_per_second
3588 # is updated.
3589 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3590 # to be dispatched for this queue. After this threshold has been
3591 # reached, Cloud Tasks stops dispatching tasks until the number of
3592 # concurrent requests decreases.
3593 #
3594 # If unspecified when the queue is created, Cloud Tasks will pick the
3595 # default.
3596 #
3597 #
3598 # The maximum allowed value is 5,000.
3599 #
3600 #
3601 # This field has the same meaning as
3602 # [max_concurrent_requests in
3603 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
3604 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
3605 #
3606 # If unspecified when the queue is created, Cloud Tasks will pick the
3607 # default.
3608 #
3609 # * The maximum allowed value is 500.
3610 #
3611 #
3612 # This field has the same meaning as
3613 # [rate in
3614 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
3615 },
3616 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
3617 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
3618 # field is unset, then no logs are written.
3619 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3620 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
3621 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3622 # This field may contain any value between 0.0 and 1.0, inclusive.
3623 # 0.0 is the default and means that no operations are logged.
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;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
3720 # prevent simultaneous updates of a policy from overwriting each other.
3721 # It is strongly suggested that systems make use of the `etag` in the
3722 # read-modify-write cycle to perform policy updates in order to avoid race
3723 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
3724 # systems are expected to put that etag in the request to `setIamPolicy` to
3725 # ensure that their change will be applied to the same version of the policy.
3726 #
3727 # **Important:** If you use IAM Conditions, you must include the `etag` field
3728 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3729 # you to overwrite a version `3` policy with a version `1` policy, and all of
3730 # the conditions in the version `3` policy are lost.
3731 &quot;version&quot;: 42, # Specifies the format of the policy.
3732 #
3733 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
3734 # are rejected.
3735 #
3736 # Any operation that affects conditional role bindings must specify version
3737 # `3`. This requirement applies to the following operations:
3738 #
3739 # * Getting a policy that includes a conditional role binding
3740 # * Adding a conditional role binding to a policy
3741 # * Changing a conditional role binding in a policy
3742 # * Removing any role binding, with or without a condition, from a policy
3743 # that includes conditions
3744 #
3745 # **Important:** If you use IAM Conditions, you must include the `etag` field
3746 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3747 # you to overwrite a version `3` policy with a version `1` policy, and all of
3748 # the conditions in the version `3` policy are lost.
3749 #
3750 # If a policy does not include any conditions, operations on that policy may
3751 # specify any valid version or leave the field unset.
3752 #
3753 # To learn which resources support conditions in their IAM policies, see the
3754 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3755 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07003756 # `condition` that determines how and when the `bindings` are applied. Each
3757 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003758 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003759 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
3760 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
3761 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
3762 #
3763 # If the condition evaluates to `true`, then this binding applies to the
3764 # current request.
3765 #
3766 # If the condition evaluates to `false`, then this binding does not apply to
3767 # the current request. However, a different role binding might grant the same
3768 # role to one or more of the members in this binding.
3769 #
3770 # To learn which resources support conditions in their IAM policies, see the
3771 # [IAM
3772 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3773 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
3774 # are documented at https://github.com/google/cel-spec.
3775 #
3776 # Example (Comparison):
3777 #
3778 # title: &quot;Summary size limit&quot;
3779 # description: &quot;Determines if a summary is less than 100 chars&quot;
3780 # expression: &quot;document.summary.size() &lt; 100&quot;
3781 #
3782 # Example (Equality):
3783 #
3784 # title: &quot;Requestor is owner&quot;
3785 # description: &quot;Determines if requestor is the document owner&quot;
3786 # expression: &quot;document.owner == request.auth.claims.email&quot;
3787 #
3788 # Example (Logic):
3789 #
3790 # title: &quot;Public documents&quot;
3791 # description: &quot;Determine whether the document should be publicly visible&quot;
3792 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
3793 #
3794 # Example (Data Manipulation):
3795 #
3796 # title: &quot;Notification string&quot;
3797 # description: &quot;Create a notification string with a timestamp.&quot;
3798 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
3799 #
3800 # The exact variables and functions that may be referenced within an expression
3801 # are determined by the service that evaluates it. See the service
3802 # documentation for additional information.
3803 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
3804 # syntax.
3805 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
3806 # its purpose. This can be used e.g. in UIs which allow to enter the
3807 # expression.
3808 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
3809 # reporting, e.g. a file name and a position in the file.
3810 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
3811 # describes the expression, e.g. when hovered over it in a UI.
3812 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003813 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003814 # `members` can have the following values:
3815 #
3816 # * `allUsers`: A special identifier that represents anyone who is
3817 # on the internet; with or without a Google account.
3818 #
3819 # * `allAuthenticatedUsers`: A special identifier that represents anyone
3820 # who is authenticated with a Google account or a service account.
3821 #
3822 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07003823 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003824 #
3825 #
3826 # * `serviceAccount:{emailid}`: An email address that represents a service
3827 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
3828 #
3829 # * `group:{emailid}`: An email address that represents a Google group.
3830 # For example, `admins@example.com`.
3831 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003832 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
3833 # identifier) representing a user that has been recently deleted. For
3834 # example, `alice@example.com?uid=123456789012345678901`. If the user is
3835 # recovered, this value reverts to `user:{emailid}` and the recovered user
3836 # retains the role in the binding.
3837 #
3838 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
3839 # unique identifier) representing a service account that has been recently
3840 # deleted. For example,
3841 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
3842 # If the service account is undeleted, this value reverts to
3843 # `serviceAccount:{emailid}` and the undeleted service account retains the
3844 # role in the binding.
3845 #
3846 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
3847 # identifier) representing a Google group that has been recently
3848 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
3849 # the group is recovered, this value reverts to `group:{emailid}` and the
3850 # recovered group retains the role in the binding.
3851 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003852 #
3853 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
3854 # users of that domain. For example, `google.com` or `example.com`.
3855 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003856 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003857 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003858 },
3859 ],
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;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
3939 # prevent simultaneous updates of a policy from overwriting each other.
3940 # It is strongly suggested that systems make use of the `etag` in the
3941 # read-modify-write cycle to perform policy updates in order to avoid race
3942 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
3943 # systems are expected to put that etag in the request to `setIamPolicy` to
3944 # ensure that their change will be applied to the same version of the policy.
3945 #
3946 # **Important:** If you use IAM Conditions, you must include the `etag` field
3947 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3948 # you to overwrite a version `3` policy with a version `1` policy, and all of
3949 # the conditions in the version `3` policy are lost.
3950 &quot;version&quot;: 42, # Specifies the format of the policy.
3951 #
3952 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
3953 # are rejected.
3954 #
3955 # Any operation that affects conditional role bindings must specify version
3956 # `3`. This requirement applies to the following operations:
3957 #
3958 # * Getting a policy that includes a conditional role binding
3959 # * Adding a conditional role binding to a policy
3960 # * Changing a conditional role binding in a policy
3961 # * Removing any role binding, with or without a condition, from a policy
3962 # that includes conditions
3963 #
3964 # **Important:** If you use IAM Conditions, you must include the `etag` field
3965 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3966 # you to overwrite a version `3` policy with a version `1` policy, and all of
3967 # the conditions in the version `3` policy are lost.
3968 #
3969 # If a policy does not include any conditions, operations on that policy may
3970 # specify any valid version or leave the field unset.
3971 #
3972 # To learn which resources support conditions in their IAM policies, see the
3973 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3974 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07003975 # `condition` that determines how and when the `bindings` are applied. Each
3976 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003977 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003978 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
3979 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
3980 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
3981 #
3982 # If the condition evaluates to `true`, then this binding applies to the
3983 # current request.
3984 #
3985 # If the condition evaluates to `false`, then this binding does not apply to
3986 # the current request. However, a different role binding might grant the same
3987 # role to one or more of the members in this binding.
3988 #
3989 # To learn which resources support conditions in their IAM policies, see the
3990 # [IAM
3991 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3992 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
3993 # are documented at https://github.com/google/cel-spec.
3994 #
3995 # Example (Comparison):
3996 #
3997 # title: &quot;Summary size limit&quot;
3998 # description: &quot;Determines if a summary is less than 100 chars&quot;
3999 # expression: &quot;document.summary.size() &lt; 100&quot;
4000 #
4001 # Example (Equality):
4002 #
4003 # title: &quot;Requestor is owner&quot;
4004 # description: &quot;Determines if requestor is the document owner&quot;
4005 # expression: &quot;document.owner == request.auth.claims.email&quot;
4006 #
4007 # Example (Logic):
4008 #
4009 # title: &quot;Public documents&quot;
4010 # description: &quot;Determine whether the document should be publicly visible&quot;
4011 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
4012 #
4013 # Example (Data Manipulation):
4014 #
4015 # title: &quot;Notification string&quot;
4016 # description: &quot;Create a notification string with a timestamp.&quot;
4017 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
4018 #
4019 # The exact variables and functions that may be referenced within an expression
4020 # are determined by the service that evaluates it. See the service
4021 # documentation for additional information.
4022 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
4023 # syntax.
4024 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
4025 # its purpose. This can be used e.g. in UIs which allow to enter the
4026 # expression.
4027 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
4028 # reporting, e.g. a file name and a position in the file.
4029 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
4030 # describes the expression, e.g. when hovered over it in a UI.
4031 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004032 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004033 # `members` can have the following values:
4034 #
4035 # * `allUsers`: A special identifier that represents anyone who is
4036 # on the internet; with or without a Google account.
4037 #
4038 # * `allAuthenticatedUsers`: A special identifier that represents anyone
4039 # who is authenticated with a Google account or a service account.
4040 #
4041 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07004042 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004043 #
4044 #
4045 # * `serviceAccount:{emailid}`: An email address that represents a service
4046 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
4047 #
4048 # * `group:{emailid}`: An email address that represents a Google group.
4049 # For example, `admins@example.com`.
4050 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004051 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
4052 # identifier) representing a user that has been recently deleted. For
4053 # example, `alice@example.com?uid=123456789012345678901`. If the user is
4054 # recovered, this value reverts to `user:{emailid}` and the recovered user
4055 # retains the role in the binding.
4056 #
4057 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
4058 # unique identifier) representing a service account that has been recently
4059 # deleted. For example,
4060 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
4061 # If the service account is undeleted, this value reverts to
4062 # `serviceAccount:{emailid}` and the undeleted service account retains the
4063 # role in the binding.
4064 #
4065 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
4066 # identifier) representing a Google group that has been recently
4067 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
4068 # the group is recovered, this value reverts to `group:{emailid}` and the
4069 # recovered group retains the role in the binding.
4070 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004071 #
4072 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
4073 # users of that domain. For example, `google.com` or `example.com`.
4074 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004075 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004076 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004077 },
4078 ],
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>