blob: f0398de970053b9d6084bb79037ebc2da13b78b2 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="cloudtasks_v2beta3.html">Cloud Tasks API</a> . <a href="cloudtasks_v2beta3.projects.html">projects</a> . <a href="cloudtasks_v2beta3.projects.locations.html">locations</a> . <a href="cloudtasks_v2beta3.projects.locations.queues.html">queues</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="cloudtasks_v2beta3.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">
Dan O'Mearadd494642020-05-01 07:42:23 -070095 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None, filter=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
139Tasks' implementation of
140ListLocations. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 The object takes the form of:
143
144{ # A queue is a container of related tasks. Queues are configured to manage
145 # how those tasks are dispatched. Configurable properties include rate limits,
146 # retry options, queue types, and others.
147 "name": "A String", # Caller-specified and required in CreateQueue,
148 # after which it becomes output only.
149 #
150 # The queue name.
151 #
152 # The queue name must have the following format:
153 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
154 #
155 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
156 # hyphens (-), colons (:), or periods (.).
157 # For more information, see
158 # [Identifying
159 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
160 # * `LOCATION_ID` is the canonical ID for the queue's location.
161 # The list of available locations can be obtained by calling
162 # ListLocations.
163 # For more information, see https://cloud.google.com/about/locations/.
164 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
165 # hyphens (-). The maximum length is 100 characters.
166 "stackdriverLoggingConfig": { # Configuration options for writing logs to # Configuration options for writing logs to
167 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
168 # field is unset, then no logs are written.
169 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
170 "samplingRatio": 3.14, # Specifies the fraction of operations to write to
171 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
172 # This field may contain any value between 0.0 and 1.0, inclusive.
173 # 0.0 is the default and means that no operations are logged.
174 },
175 "rateLimits": { # Rate limits. # Rate limits for task dispatches.
176 #
177 # rate_limits and retry_config are
178 # related because they both control task attempts. However they control task
179 # attempts in different ways:
180 #
181 # * rate_limits controls the total rate of
182 # dispatches from a queue (i.e. all traffic dispatched from the
183 # queue, regardless of whether the dispatch is from a first
184 # attempt or a retry).
185 # * retry_config controls what happens to
186 # particular a task after its first attempt fails. That is,
187 # retry_config controls task retries (the
188 # second attempt, third attempt, etc).
189 #
190 # The queue's actual dispatch rate is the result of:
191 #
192 # * Number of tasks in the queue
193 # * User-specified throttling: rate_limits,
194 # retry_config, and the
195 # queue's state.
196 # * System throttling due to `429` (Too Many Requests) or `503` (Service
197 # Unavailable) responses from the worker, high error rates, or to smooth
198 # sudden large traffic spikes.
199 #
200 # This message determines the maximum rate that tasks can be dispatched by a
201 # queue, regardless of whether the dispatch is a first task attempt or a retry.
202 #
203 # Note: The debugging command, RunTask, will run a task
204 # even if the queue has reached its RateLimits.
205 "maxConcurrentDispatches": 42, # The maximum number of concurrent tasks that Cloud Tasks allows
206 # to be dispatched for this queue. After this threshold has been
207 # reached, Cloud Tasks stops dispatching tasks until the number of
208 # concurrent requests decreases.
209 #
210 # If unspecified when the queue is created, Cloud Tasks will pick the
211 # default.
212 #
213 #
214 # The maximum allowed value is 5,000.
215 #
216 #
217 # This field has the same meaning as
218 # [max_concurrent_requests in
219 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
220 "maxBurstSize": 42, # Output only. The max burst size.
221 #
222 # Max burst size limits how fast tasks in queue are processed when
223 # many tasks are in the queue and the rate is high. This field
224 # allows the queue to have a high rate so processing starts shortly
225 # after a task is enqueued, but still limits resource usage when
226 # many tasks are enqueued in a short period of time.
227 #
228 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
229 # algorithm is used to control the rate of task dispatches. Each
230 # queue has a token bucket that holds tokens, up to the maximum
231 # specified by `max_burst_size`. Each time a task is dispatched, a
232 # token is removed from the bucket. Tasks will be dispatched until
233 # the queue's bucket runs out of tokens. The bucket will be
234 # continuously refilled with new tokens based on
235 # max_dispatches_per_second.
236 #
237 # Cloud Tasks will pick the value of `max_burst_size` based on the
238 # value of
239 # max_dispatches_per_second.
240 #
241 # For App Engine queues that were created or updated using
242 # `queue.yaml/xml`, `max_burst_size` is equal to
243 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
244 # Since `max_burst_size` is output only, if
245 # UpdateQueue is called on a queue
246 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
247 # on the value of
248 # max_dispatches_per_second,
249 # regardless of whether
250 # max_dispatches_per_second
251 # is updated.
252 "maxDispatchesPerSecond": 3.14, # The maximum rate at which tasks are dispatched from this queue.
253 #
254 # If unspecified when the queue is created, Cloud Tasks will pick the
255 # default.
256 #
257 # * For App Engine queues, the maximum allowed value
258 # is 500.
259 #
260 #
261 # This field has the same meaning as
262 # [rate in
263 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
264 },
265 "state": "A String", # Output only. The state of the queue.
266 #
267 # `state` can only be changed by called
268 # PauseQueue,
269 # ResumeQueue, or uploading
270 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
271 # UpdateQueue cannot be used to change `state`.
272 "purgeTime": "A String", # Output only. The last time this queue was purged.
273 #
274 # All tasks that were created before this time
275 # were purged.
276 #
277 # A queue can be purged using PurgeQueue, the
278 # [App Engine Task Queue SDK, or the Cloud
279 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
280 #
281 # Purge time will be truncated to the nearest microsecond. Purge
282 # time will be unset if the queue has never been purged.
283 "appEngineHttpQueue": { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
284 # App Engine tasks in this queue.
285 # Http tasks are not affected by this proto.
286 #
287 # The task will be delivered to the App Engine application hostname
288 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
289 # The documentation for AppEngineHttpRequest explains how the
290 # task's host URL is constructed.
291 #
292 # Using AppEngineHttpQueue requires
293 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
294 # Google IAM permission for the project
295 # and the following scope:
296 #
297 # `https://www.googleapis.com/auth/cloud-platform`
298 "appEngineRoutingOverride": { # App Engine Routing. # Overrides for the
299 # task-level app_engine_routing.
300 #
301 # If set, `app_engine_routing_override` is used for all tasks in
302 # the queue, no matter what the setting is for the
303 # task-level app_engine_routing.
304 #
305 # Defines routing characteristics specific to App Engine - service, version,
306 # and instance.
307 #
308 # For more information about services, versions, and instances see
309 # [An Overview of App
310 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
311 # [Microservices Architecture on Google App
312 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
313 # [App Engine Standard request
314 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
315 # and [App Engine Flex request
316 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
317 "instance": "A String", # App instance.
318 #
319 # By default, the task is sent to an instance which is available when
320 # the task is attempted.
321 #
322 # Requests can only be sent to a specific instance if
323 # [manual scaling is used in App Engine
324 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
325 # App Engine Flex does not support instances. For more information, see
326 # [App Engine Standard request
327 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
328 # and [App Engine Flex request
329 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
330 "host": "A String", # Output only. The host that the task is sent to.
331 #
332 # The host is constructed from the domain name of the app associated with
Dan O'Mearadd494642020-05-01 07:42:23 -0700333 # the queue's project ID (for example &lt;app-id&gt;.appspot.com), and the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700334 # service, version,
335 # and instance. Tasks which were created using
336 # the App Engine SDK might have a custom domain name.
337 #
338 # For more information, see
339 # [How Requests are
340 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
341 "version": "A String", # App version.
342 #
343 # By default, the task is sent to the version which is the default
344 # version when the task is attempted.
345 #
346 # For some queues or tasks which were created using the App Engine
347 # Task Queue API, host is not parsable
348 # into service,
349 # version, and
350 # instance. For example, some tasks
351 # which were created using the App Engine SDK use a custom domain
352 # name; custom domains are not parsed by Cloud Tasks. If
353 # host is not parsable, then
354 # service,
355 # version, and
356 # instance are the empty string.
357 "service": "A String", # App service.
358 #
359 # By default, the task is sent to the service which is the default
360 # service when the task is attempted.
361 #
362 # For some queues or tasks which were created using the App Engine
363 # Task Queue API, host is not parsable
364 # into service,
365 # version, and
366 # instance. For example, some tasks
367 # which were created using the App Engine SDK use a custom domain
368 # name; custom domains are not parsed by Cloud Tasks. If
369 # host is not parsable, then
370 # service,
371 # version, and
372 # instance are the empty string.
373 },
374 },
375 "retryConfig": { # Retry config. # Settings that determine the retry behavior.
376 #
377 # * For tasks created using Cloud Tasks: the queue-level retry settings
378 # apply to all tasks in the queue that were created using Cloud Tasks.
379 # Retry settings cannot be set on individual tasks.
380 # * For tasks created using the App Engine SDK: the queue-level retry
381 # settings apply to all tasks in the queue which do not have retry settings
382 # explicitly set on the task and were created by the App Engine SDK. See
383 # [App Engine
384 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
385 #
386 # These settings determine when a failed task attempt is retried.
387 "maxRetryDuration": "A String", # If positive, `max_retry_duration` specifies the time limit for
388 # retrying a failed task, measured from when the task was first
389 # attempted. Once `max_retry_duration` time has passed *and* the
390 # task has been attempted max_attempts
391 # times, no further attempts will be made and the task will be
392 # deleted.
393 #
394 # If zero, then the task age is unlimited.
395 #
396 # If unspecified when the queue is created, Cloud Tasks will pick the
397 # default.
398 #
399 #
400 # `max_retry_duration` will be truncated to the nearest second.
401 #
402 # This field has the same meaning as
403 # [task_age_limit in
404 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
405 "maxDoublings": 42, # The time between retries will double `max_doublings` times.
406 #
407 # A task's retry interval starts at
408 # min_backoff, then doubles
409 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -0700410 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411 # max_backoff up to
412 # max_attempts times.
413 #
414 # For example, if min_backoff is 10s,
415 # max_backoff is 300s, and
416 # `max_doublings` is 3, then the a task will first be retried in
417 # 10s. The retry interval will double three times, and then
418 # increase linearly by 2^3 * 10s. Finally, the task will retry at
419 # intervals of max_backoff until the
420 # task has been attempted max_attempts
421 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
422 # 240s, 300s, 300s, ....
423 #
424 # If unspecified when the queue is created, Cloud Tasks will pick the
425 # default.
426 #
427 #
428 # This field has the same meaning as
429 # [max_doublings in
430 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
431 "maxAttempts": 42, # Number of attempts per task.
432 #
433 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
434 # first attempt fails, then there will be `max_attempts - 1` retries). Must
Dan O'Mearadd494642020-05-01 07:42:23 -0700435 # be &gt;= -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700436 #
437 # If unspecified when the queue is created, Cloud Tasks will pick the
438 # default.
439 #
440 # -1 indicates unlimited attempts.
441 #
442 # This field has the same meaning as
443 # [task_retry_limit in
444 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
445 "maxBackoff": "A String", # A task will be scheduled for retry between
446 # min_backoff and
447 # max_backoff duration after it fails,
448 # if the queue's RetryConfig specifies that the task should be
449 # retried.
450 #
451 # If unspecified when the queue is created, Cloud Tasks will pick the
452 # default.
453 #
454 #
455 # `max_backoff` will be truncated to the nearest second.
456 #
457 # This field has the same meaning as
458 # [max_backoff_seconds in
459 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
460 "minBackoff": "A String", # A task will be scheduled for retry between
461 # min_backoff and
462 # max_backoff duration after it fails,
463 # if the queue's RetryConfig specifies that the task should be
464 # retried.
465 #
466 # If unspecified when the queue is created, Cloud Tasks will pick the
467 # default.
468 #
469 #
470 # `min_backoff` will be truncated to the nearest second.
471 #
472 # This field has the same meaning as
473 # [min_backoff_seconds in
474 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
475 },
476}
477
478 x__xgafv: string, V1 error format.
479 Allowed values
480 1 - v1 error format
481 2 - v2 error format
482
483Returns:
484 An object of the form:
485
486 { # A queue is a container of related tasks. Queues are configured to manage
487 # how those tasks are dispatched. Configurable properties include rate limits,
488 # retry options, queue types, and others.
489 "name": "A String", # Caller-specified and required in CreateQueue,
490 # after which it becomes output only.
491 #
492 # The queue name.
493 #
494 # The queue name must have the following format:
495 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
496 #
497 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
498 # hyphens (-), colons (:), or periods (.).
499 # For more information, see
500 # [Identifying
501 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
502 # * `LOCATION_ID` is the canonical ID for the queue's location.
503 # The list of available locations can be obtained by calling
504 # ListLocations.
505 # For more information, see https://cloud.google.com/about/locations/.
506 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
507 # hyphens (-). The maximum length is 100 characters.
508 "stackdriverLoggingConfig": { # Configuration options for writing logs to # Configuration options for writing logs to
509 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
510 # field is unset, then no logs are written.
511 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
512 "samplingRatio": 3.14, # Specifies the fraction of operations to write to
513 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
514 # This field may contain any value between 0.0 and 1.0, inclusive.
515 # 0.0 is the default and means that no operations are logged.
516 },
517 "rateLimits": { # Rate limits. # Rate limits for task dispatches.
518 #
519 # rate_limits and retry_config are
520 # related because they both control task attempts. However they control task
521 # attempts in different ways:
522 #
523 # * rate_limits controls the total rate of
524 # dispatches from a queue (i.e. all traffic dispatched from the
525 # queue, regardless of whether the dispatch is from a first
526 # attempt or a retry).
527 # * retry_config controls what happens to
528 # particular a task after its first attempt fails. That is,
529 # retry_config controls task retries (the
530 # second attempt, third attempt, etc).
531 #
532 # The queue's actual dispatch rate is the result of:
533 #
534 # * Number of tasks in the queue
535 # * User-specified throttling: rate_limits,
536 # retry_config, and the
537 # queue's state.
538 # * System throttling due to `429` (Too Many Requests) or `503` (Service
539 # Unavailable) responses from the worker, high error rates, or to smooth
540 # sudden large traffic spikes.
541 #
542 # This message determines the maximum rate that tasks can be dispatched by a
543 # queue, regardless of whether the dispatch is a first task attempt or a retry.
544 #
545 # Note: The debugging command, RunTask, will run a task
546 # even if the queue has reached its RateLimits.
547 "maxConcurrentDispatches": 42, # The maximum number of concurrent tasks that Cloud Tasks allows
548 # to be dispatched for this queue. After this threshold has been
549 # reached, Cloud Tasks stops dispatching tasks until the number of
550 # concurrent requests decreases.
551 #
552 # If unspecified when the queue is created, Cloud Tasks will pick the
553 # default.
554 #
555 #
556 # The maximum allowed value is 5,000.
557 #
558 #
559 # This field has the same meaning as
560 # [max_concurrent_requests in
561 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
562 "maxBurstSize": 42, # Output only. The max burst size.
563 #
564 # Max burst size limits how fast tasks in queue are processed when
565 # many tasks are in the queue and the rate is high. This field
566 # allows the queue to have a high rate so processing starts shortly
567 # after a task is enqueued, but still limits resource usage when
568 # many tasks are enqueued in a short period of time.
569 #
570 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
571 # algorithm is used to control the rate of task dispatches. Each
572 # queue has a token bucket that holds tokens, up to the maximum
573 # specified by `max_burst_size`. Each time a task is dispatched, a
574 # token is removed from the bucket. Tasks will be dispatched until
575 # the queue's bucket runs out of tokens. The bucket will be
576 # continuously refilled with new tokens based on
577 # max_dispatches_per_second.
578 #
579 # Cloud Tasks will pick the value of `max_burst_size` based on the
580 # value of
581 # max_dispatches_per_second.
582 #
583 # For App Engine queues that were created or updated using
584 # `queue.yaml/xml`, `max_burst_size` is equal to
585 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
586 # Since `max_burst_size` is output only, if
587 # UpdateQueue is called on a queue
588 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
589 # on the value of
590 # max_dispatches_per_second,
591 # regardless of whether
592 # max_dispatches_per_second
593 # is updated.
594 "maxDispatchesPerSecond": 3.14, # The maximum rate at which tasks are dispatched from this queue.
595 #
596 # If unspecified when the queue is created, Cloud Tasks will pick the
597 # default.
598 #
599 # * For App Engine queues, the maximum allowed value
600 # is 500.
601 #
602 #
603 # This field has the same meaning as
604 # [rate in
605 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
606 },
607 "state": "A String", # Output only. The state of the queue.
608 #
609 # `state` can only be changed by called
610 # PauseQueue,
611 # ResumeQueue, or uploading
612 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
613 # UpdateQueue cannot be used to change `state`.
614 "purgeTime": "A String", # Output only. The last time this queue was purged.
615 #
616 # All tasks that were created before this time
617 # were purged.
618 #
619 # A queue can be purged using PurgeQueue, the
620 # [App Engine Task Queue SDK, or the Cloud
621 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
622 #
623 # Purge time will be truncated to the nearest microsecond. Purge
624 # time will be unset if the queue has never been purged.
625 "appEngineHttpQueue": { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
626 # App Engine tasks in this queue.
627 # Http tasks are not affected by this proto.
628 #
629 # The task will be delivered to the App Engine application hostname
630 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
631 # The documentation for AppEngineHttpRequest explains how the
632 # task's host URL is constructed.
633 #
634 # Using AppEngineHttpQueue requires
635 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
636 # Google IAM permission for the project
637 # and the following scope:
638 #
639 # `https://www.googleapis.com/auth/cloud-platform`
640 "appEngineRoutingOverride": { # App Engine Routing. # Overrides for the
641 # task-level app_engine_routing.
642 #
643 # If set, `app_engine_routing_override` is used for all tasks in
644 # the queue, no matter what the setting is for the
645 # task-level app_engine_routing.
646 #
647 # Defines routing characteristics specific to App Engine - service, version,
648 # and instance.
649 #
650 # For more information about services, versions, and instances see
651 # [An Overview of App
652 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
653 # [Microservices Architecture on Google App
654 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
655 # [App Engine Standard request
656 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
657 # and [App Engine Flex request
658 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
659 "instance": "A String", # App instance.
660 #
661 # By default, the task is sent to an instance which is available when
662 # the task is attempted.
663 #
664 # Requests can only be sent to a specific instance if
665 # [manual scaling is used in App Engine
666 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
667 # App Engine Flex does not support instances. For more information, see
668 # [App Engine Standard request
669 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
670 # and [App Engine Flex request
671 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
672 "host": "A String", # Output only. The host that the task is sent to.
673 #
674 # The host is constructed from the domain name of the app associated with
Dan O'Mearadd494642020-05-01 07:42:23 -0700675 # the queue's project ID (for example &lt;app-id&gt;.appspot.com), and the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700676 # service, version,
677 # and instance. Tasks which were created using
678 # the App Engine SDK might have a custom domain name.
679 #
680 # For more information, see
681 # [How Requests are
682 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
683 "version": "A String", # App version.
684 #
685 # By default, the task is sent to the version which is the default
686 # version when the task is attempted.
687 #
688 # For some queues or tasks which were created using the App Engine
689 # Task Queue API, host is not parsable
690 # into service,
691 # version, and
692 # instance. For example, some tasks
693 # which were created using the App Engine SDK use a custom domain
694 # name; custom domains are not parsed by Cloud Tasks. If
695 # host is not parsable, then
696 # service,
697 # version, and
698 # instance are the empty string.
699 "service": "A String", # App service.
700 #
701 # By default, the task is sent to the service which is the default
702 # service when the task is attempted.
703 #
704 # For some queues or tasks which were created using the App Engine
705 # Task Queue API, host is not parsable
706 # into service,
707 # version, and
708 # instance. For example, some tasks
709 # which were created using the App Engine SDK use a custom domain
710 # name; custom domains are not parsed by Cloud Tasks. If
711 # host is not parsable, then
712 # service,
713 # version, and
714 # instance are the empty string.
715 },
716 },
717 "retryConfig": { # Retry config. # Settings that determine the retry behavior.
718 #
719 # * For tasks created using Cloud Tasks: the queue-level retry settings
720 # apply to all tasks in the queue that were created using Cloud Tasks.
721 # Retry settings cannot be set on individual tasks.
722 # * For tasks created using the App Engine SDK: the queue-level retry
723 # settings apply to all tasks in the queue which do not have retry settings
724 # explicitly set on the task and were created by the App Engine SDK. See
725 # [App Engine
726 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
727 #
728 # These settings determine when a failed task attempt is retried.
729 "maxRetryDuration": "A String", # If positive, `max_retry_duration` specifies the time limit for
730 # retrying a failed task, measured from when the task was first
731 # attempted. Once `max_retry_duration` time has passed *and* the
732 # task has been attempted max_attempts
733 # times, no further attempts will be made and the task will be
734 # deleted.
735 #
736 # If zero, then the task age is unlimited.
737 #
738 # If unspecified when the queue is created, Cloud Tasks will pick the
739 # default.
740 #
741 #
742 # `max_retry_duration` will be truncated to the nearest second.
743 #
744 # This field has the same meaning as
745 # [task_age_limit in
746 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
747 "maxDoublings": 42, # The time between retries will double `max_doublings` times.
748 #
749 # A task's retry interval starts at
750 # min_backoff, then doubles
751 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -0700752 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700753 # max_backoff up to
754 # max_attempts times.
755 #
756 # For example, if min_backoff is 10s,
757 # max_backoff is 300s, and
758 # `max_doublings` is 3, then the a task will first be retried in
759 # 10s. The retry interval will double three times, and then
760 # increase linearly by 2^3 * 10s. Finally, the task will retry at
761 # intervals of max_backoff until the
762 # task has been attempted max_attempts
763 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
764 # 240s, 300s, 300s, ....
765 #
766 # If unspecified when the queue is created, Cloud Tasks will pick the
767 # default.
768 #
769 #
770 # This field has the same meaning as
771 # [max_doublings in
772 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
773 "maxAttempts": 42, # Number of attempts per task.
774 #
775 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
776 # first attempt fails, then there will be `max_attempts - 1` retries). Must
Dan O'Mearadd494642020-05-01 07:42:23 -0700777 # be &gt;= -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700778 #
779 # If unspecified when the queue is created, Cloud Tasks will pick the
780 # default.
781 #
782 # -1 indicates unlimited attempts.
783 #
784 # This field has the same meaning as
785 # [task_retry_limit in
786 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
787 "maxBackoff": "A String", # A task will be scheduled for retry between
788 # min_backoff and
789 # max_backoff duration after it fails,
790 # if the queue's RetryConfig specifies that the task should be
791 # retried.
792 #
793 # If unspecified when the queue is created, Cloud Tasks will pick the
794 # default.
795 #
796 #
797 # `max_backoff` will be truncated to the nearest second.
798 #
799 # This field has the same meaning as
800 # [max_backoff_seconds in
801 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
802 "minBackoff": "A String", # A task will be scheduled for retry between
803 # min_backoff and
804 # max_backoff duration after it fails,
805 # if the queue's RetryConfig specifies that the task should be
806 # retried.
807 #
808 # If unspecified when the queue is created, Cloud Tasks will pick the
809 # default.
810 #
811 #
812 # `min_backoff` will be truncated to the nearest second.
813 #
814 # This field has the same meaning as
815 # [min_backoff_seconds in
816 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
817 },
818 }</pre>
819</div>
820
821<div class="method">
822 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
823 <pre>Deletes a queue.
824
825This command will delete the queue even if it has tasks in it.
826
827Note: If you delete a queue, a queue with the same name can't be created
828for 7 days.
829
830WARNING: Using this method may have unintended side effects if you are
831using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
832Read
833[Overview of Queue Management and
834queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
835this method.
836
837Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700838 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700839`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
840 x__xgafv: string, V1 error format.
841 Allowed values
842 1 - v1 error format
843 2 - v2 error format
844
845Returns:
846 An object of the form:
847
848 { # A generic empty message that you can re-use to avoid defining duplicated
849 # empty messages in your APIs. A typical example is to use it as the request
850 # or the response type of an API method. For instance:
851 #
852 # service Foo {
853 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
854 # }
855 #
856 # The JSON representation for `Empty` is empty JSON object `{}`.
857 }</pre>
858</div>
859
860<div class="method">
861 <code class="details" id="get">get(name, x__xgafv=None)</code>
862 <pre>Gets a queue.
863
864Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700865 name: string, Required. The resource name of the queue. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700866`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
867 x__xgafv: string, V1 error format.
868 Allowed values
869 1 - v1 error format
870 2 - v2 error format
871
872Returns:
873 An object of the form:
874
875 { # A queue is a container of related tasks. Queues are configured to manage
876 # how those tasks are dispatched. Configurable properties include rate limits,
877 # retry options, queue types, and others.
878 "name": "A String", # Caller-specified and required in CreateQueue,
879 # after which it becomes output only.
880 #
881 # The queue name.
882 #
883 # The queue name must have the following format:
884 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
885 #
886 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
887 # hyphens (-), colons (:), or periods (.).
888 # For more information, see
889 # [Identifying
890 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
891 # * `LOCATION_ID` is the canonical ID for the queue's location.
892 # The list of available locations can be obtained by calling
893 # ListLocations.
894 # For more information, see https://cloud.google.com/about/locations/.
895 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
896 # hyphens (-). The maximum length is 100 characters.
897 "stackdriverLoggingConfig": { # Configuration options for writing logs to # Configuration options for writing logs to
898 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
899 # field is unset, then no logs are written.
900 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
901 "samplingRatio": 3.14, # Specifies the fraction of operations to write to
902 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
903 # This field may contain any value between 0.0 and 1.0, inclusive.
904 # 0.0 is the default and means that no operations are logged.
905 },
906 "rateLimits": { # Rate limits. # Rate limits for task dispatches.
907 #
908 # rate_limits and retry_config are
909 # related because they both control task attempts. However they control task
910 # attempts in different ways:
911 #
912 # * rate_limits controls the total rate of
913 # dispatches from a queue (i.e. all traffic dispatched from the
914 # queue, regardless of whether the dispatch is from a first
915 # attempt or a retry).
916 # * retry_config controls what happens to
917 # particular a task after its first attempt fails. That is,
918 # retry_config controls task retries (the
919 # second attempt, third attempt, etc).
920 #
921 # The queue's actual dispatch rate is the result of:
922 #
923 # * Number of tasks in the queue
924 # * User-specified throttling: rate_limits,
925 # retry_config, and the
926 # queue's state.
927 # * System throttling due to `429` (Too Many Requests) or `503` (Service
928 # Unavailable) responses from the worker, high error rates, or to smooth
929 # sudden large traffic spikes.
930 #
931 # This message determines the maximum rate that tasks can be dispatched by a
932 # queue, regardless of whether the dispatch is a first task attempt or a retry.
933 #
934 # Note: The debugging command, RunTask, will run a task
935 # even if the queue has reached its RateLimits.
936 "maxConcurrentDispatches": 42, # The maximum number of concurrent tasks that Cloud Tasks allows
937 # to be dispatched for this queue. After this threshold has been
938 # reached, Cloud Tasks stops dispatching tasks until the number of
939 # concurrent requests decreases.
940 #
941 # If unspecified when the queue is created, Cloud Tasks will pick the
942 # default.
943 #
944 #
945 # The maximum allowed value is 5,000.
946 #
947 #
948 # This field has the same meaning as
949 # [max_concurrent_requests in
950 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
951 "maxBurstSize": 42, # Output only. The max burst size.
952 #
953 # Max burst size limits how fast tasks in queue are processed when
954 # many tasks are in the queue and the rate is high. This field
955 # allows the queue to have a high rate so processing starts shortly
956 # after a task is enqueued, but still limits resource usage when
957 # many tasks are enqueued in a short period of time.
958 #
959 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
960 # algorithm is used to control the rate of task dispatches. Each
961 # queue has a token bucket that holds tokens, up to the maximum
962 # specified by `max_burst_size`. Each time a task is dispatched, a
963 # token is removed from the bucket. Tasks will be dispatched until
964 # the queue's bucket runs out of tokens. The bucket will be
965 # continuously refilled with new tokens based on
966 # max_dispatches_per_second.
967 #
968 # Cloud Tasks will pick the value of `max_burst_size` based on the
969 # value of
970 # max_dispatches_per_second.
971 #
972 # For App Engine queues that were created or updated using
973 # `queue.yaml/xml`, `max_burst_size` is equal to
974 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
975 # Since `max_burst_size` is output only, if
976 # UpdateQueue is called on a queue
977 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
978 # on the value of
979 # max_dispatches_per_second,
980 # regardless of whether
981 # max_dispatches_per_second
982 # is updated.
983 "maxDispatchesPerSecond": 3.14, # The maximum rate at which tasks are dispatched from this queue.
984 #
985 # If unspecified when the queue is created, Cloud Tasks will pick the
986 # default.
987 #
988 # * For App Engine queues, the maximum allowed value
989 # is 500.
990 #
991 #
992 # This field has the same meaning as
993 # [rate in
994 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
995 },
996 "state": "A String", # Output only. The state of the queue.
997 #
998 # `state` can only be changed by called
999 # PauseQueue,
1000 # ResumeQueue, or uploading
1001 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
1002 # UpdateQueue cannot be used to change `state`.
1003 "purgeTime": "A String", # Output only. The last time this queue was purged.
1004 #
1005 # All tasks that were created before this time
1006 # were purged.
1007 #
1008 # A queue can be purged using PurgeQueue, the
1009 # [App Engine Task Queue SDK, or the Cloud
1010 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
1011 #
1012 # Purge time will be truncated to the nearest microsecond. Purge
1013 # time will be unset if the queue has never been purged.
1014 "appEngineHttpQueue": { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
1015 # App Engine tasks in this queue.
1016 # Http tasks are not affected by this proto.
1017 #
1018 # The task will be delivered to the App Engine application hostname
1019 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
1020 # The documentation for AppEngineHttpRequest explains how the
1021 # task's host URL is constructed.
1022 #
1023 # Using AppEngineHttpQueue requires
1024 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1025 # Google IAM permission for the project
1026 # and the following scope:
1027 #
1028 # `https://www.googleapis.com/auth/cloud-platform`
1029 "appEngineRoutingOverride": { # App Engine Routing. # Overrides for the
1030 # task-level app_engine_routing.
1031 #
1032 # If set, `app_engine_routing_override` is used for all tasks in
1033 # the queue, no matter what the setting is for the
1034 # task-level app_engine_routing.
1035 #
1036 # Defines routing characteristics specific to App Engine - service, version,
1037 # and instance.
1038 #
1039 # For more information about services, versions, and instances see
1040 # [An Overview of App
1041 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1042 # [Microservices Architecture on Google App
1043 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1044 # [App Engine Standard request
1045 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1046 # and [App Engine Flex request
1047 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1048 "instance": "A String", # App instance.
1049 #
1050 # By default, the task is sent to an instance which is available when
1051 # the task is attempted.
1052 #
1053 # Requests can only be sent to a specific instance if
1054 # [manual scaling is used in App Engine
1055 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1056 # App Engine Flex does not support instances. For more information, see
1057 # [App Engine Standard request
1058 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1059 # and [App Engine Flex request
1060 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1061 "host": "A String", # Output only. The host that the task is sent to.
1062 #
1063 # The host is constructed from the domain name of the app associated with
Dan O'Mearadd494642020-05-01 07:42:23 -07001064 # the queue's project ID (for example &lt;app-id&gt;.appspot.com), and the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001065 # service, version,
1066 # and instance. Tasks which were created using
1067 # the App Engine SDK might have a custom domain name.
1068 #
1069 # For more information, see
1070 # [How Requests are
1071 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1072 "version": "A String", # App version.
1073 #
1074 # By default, the task is sent to the version which is the default
1075 # version when the task is attempted.
1076 #
1077 # For some queues or tasks which were created using the App Engine
1078 # Task Queue API, host is not parsable
1079 # into service,
1080 # version, and
1081 # instance. For example, some tasks
1082 # which were created using the App Engine SDK use a custom domain
1083 # name; custom domains are not parsed by Cloud Tasks. If
1084 # host is not parsable, then
1085 # service,
1086 # version, and
1087 # instance are the empty string.
1088 "service": "A String", # App service.
1089 #
1090 # By default, the task is sent to the service which is the default
1091 # service when the task is attempted.
1092 #
1093 # For some queues or tasks which were created using the App Engine
1094 # Task Queue API, host is not parsable
1095 # into service,
1096 # version, and
1097 # instance. For example, some tasks
1098 # which were created using the App Engine SDK use a custom domain
1099 # name; custom domains are not parsed by Cloud Tasks. If
1100 # host is not parsable, then
1101 # service,
1102 # version, and
1103 # instance are the empty string.
1104 },
1105 },
1106 "retryConfig": { # Retry config. # Settings that determine the retry behavior.
1107 #
1108 # * For tasks created using Cloud Tasks: the queue-level retry settings
1109 # apply to all tasks in the queue that were created using Cloud Tasks.
1110 # Retry settings cannot be set on individual tasks.
1111 # * For tasks created using the App Engine SDK: the queue-level retry
1112 # settings apply to all tasks in the queue which do not have retry settings
1113 # explicitly set on the task and were created by the App Engine SDK. See
1114 # [App Engine
1115 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
1116 #
1117 # These settings determine when a failed task attempt is retried.
1118 "maxRetryDuration": "A String", # If positive, `max_retry_duration` specifies the time limit for
1119 # retrying a failed task, measured from when the task was first
1120 # attempted. Once `max_retry_duration` time has passed *and* the
1121 # task has been attempted max_attempts
1122 # times, no further attempts will be made and the task will be
1123 # deleted.
1124 #
1125 # If zero, then the task age is unlimited.
1126 #
1127 # If unspecified when the queue is created, Cloud Tasks will pick the
1128 # default.
1129 #
1130 #
1131 # `max_retry_duration` will be truncated to the nearest second.
1132 #
1133 # This field has the same meaning as
1134 # [task_age_limit in
1135 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1136 "maxDoublings": 42, # The time between retries will double `max_doublings` times.
1137 #
1138 # A task's retry interval starts at
1139 # min_backoff, then doubles
1140 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07001141 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001142 # max_backoff up to
1143 # max_attempts times.
1144 #
1145 # For example, if min_backoff is 10s,
1146 # max_backoff is 300s, and
1147 # `max_doublings` is 3, then the a task will first be retried in
1148 # 10s. The retry interval will double three times, and then
1149 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1150 # intervals of max_backoff until the
1151 # task has been attempted max_attempts
1152 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1153 # 240s, 300s, 300s, ....
1154 #
1155 # If unspecified when the queue is created, Cloud Tasks will pick the
1156 # default.
1157 #
1158 #
1159 # This field has the same meaning as
1160 # [max_doublings in
1161 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1162 "maxAttempts": 42, # Number of attempts per task.
1163 #
1164 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
1165 # first attempt fails, then there will be `max_attempts - 1` retries). Must
Dan O'Mearadd494642020-05-01 07:42:23 -07001166 # be &gt;= -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001167 #
1168 # If unspecified when the queue is created, Cloud Tasks will pick the
1169 # default.
1170 #
1171 # -1 indicates unlimited attempts.
1172 #
1173 # This field has the same meaning as
1174 # [task_retry_limit in
1175 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1176 "maxBackoff": "A String", # A task will be scheduled for retry between
1177 # min_backoff and
1178 # max_backoff duration after it fails,
1179 # if the queue's RetryConfig specifies that the task should be
1180 # retried.
1181 #
1182 # If unspecified when the queue is created, Cloud Tasks will pick the
1183 # default.
1184 #
1185 #
1186 # `max_backoff` will be truncated to the nearest second.
1187 #
1188 # This field has the same meaning as
1189 # [max_backoff_seconds in
1190 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1191 "minBackoff": "A String", # A task will be scheduled for retry between
1192 # min_backoff and
1193 # max_backoff duration after it fails,
1194 # if the queue's RetryConfig specifies that the task should be
1195 # retried.
1196 #
1197 # If unspecified when the queue is created, Cloud Tasks will pick the
1198 # default.
1199 #
1200 #
1201 # `min_backoff` will be truncated to the nearest second.
1202 #
1203 # This field has the same meaning as
1204 # [min_backoff_seconds in
1205 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1206 },
1207 }</pre>
1208</div>
1209
1210<div class="method">
1211 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
1212 <pre>Gets the access control policy for a Queue.
1213Returns an empty policy if the resource exists and does not have a policy
1214set.
1215
1216Authorization requires the following
1217[Google IAM](https://cloud.google.com/iam) permission on the specified
1218resource parent:
1219
1220* `cloudtasks.queues.getIamPolicy`
1221
1222Args:
1223 resource: string, REQUIRED: The resource for which the policy is being requested.
1224See the operation documentation for the appropriate value for this field. (required)
1225 body: object, The request body.
1226 The object takes the form of:
1227
1228{ # Request message for `GetIamPolicy` method.
Dan O'Mearadd494642020-05-01 07:42:23 -07001229 "options": { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
1230 # `GetIamPolicy`.
1231 "requestedPolicyVersion": 42, # Optional. The policy format version to be returned.
1232 #
1233 # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
1234 # rejected.
1235 #
1236 # Requests for policies with any conditional bindings must specify version 3.
1237 # Policies without any conditional bindings may specify any valid value or
1238 # leave the field unset.
1239 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001240 }
1241
1242 x__xgafv: string, V1 error format.
1243 Allowed values
1244 1 - v1 error format
1245 2 - v2 error format
1246
1247Returns:
1248 An object of the form:
1249
Dan O'Mearadd494642020-05-01 07:42:23 -07001250 { # An Identity and Access Management (IAM) policy, which specifies access
1251 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001252 #
1253 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001254 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1255 # `members` to a single `role`. Members can be user accounts, service accounts,
1256 # Google groups, and domains (such as G Suite). A `role` is a named list of
1257 # permissions; each `role` can be an IAM predefined role or a user-created
1258 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001259 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001260 # Optionally, a `binding` can specify a `condition`, which is a logical
1261 # expression that allows access to a resource only if the expression evaluates
1262 # to `true`. A condition can add constraints based on attributes of the
1263 # request, the resource, or both.
1264 #
1265 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001266 #
1267 # {
1268 # "bindings": [
1269 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07001270 # "role": "roles/resourcemanager.organizationAdmin",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001271 # "members": [
1272 # "user:mike@example.com",
1273 # "group:admins@example.com",
1274 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -07001275 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001276 # ]
1277 # },
1278 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07001279 # "role": "roles/resourcemanager.organizationViewer",
1280 # "members": ["user:eve@example.com"],
1281 # "condition": {
1282 # "title": "expirable access",
1283 # "description": "Does not grant access after Sep 2020",
1284 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
1285 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001286 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001287 # ],
1288 # "etag": "BwWWja0YfJA=",
1289 # "version": 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001290 # }
1291 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001292 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001293 #
1294 # bindings:
1295 # - members:
1296 # - user:mike@example.com
1297 # - group:admins@example.com
1298 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001299 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1300 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001301 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001302 # - user:eve@example.com
1303 # role: roles/resourcemanager.organizationViewer
1304 # condition:
1305 # title: expirable access
1306 # description: Does not grant access after Sep 2020
1307 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
1308 # - etag: BwWWja0YfJA=
1309 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001310 #
1311 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001312 # [IAM documentation](https://cloud.google.com/iam/docs/).
1313 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
1314 # `condition` that determines how and when the `bindings` are applied. Each
1315 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001316 { # Associates `members` with a `role`.
1317 "role": "A String", # Role that is assigned to `members`.
1318 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Dan O'Mearadd494642020-05-01 07:42:23 -07001319 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001320 # NOTE: An unsatisfied condition will not allow user access via current
1321 # binding. Different bindings, including their conditions, are examined
1322 # independently.
Dan O'Mearadd494642020-05-01 07:42:23 -07001323 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1324 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001325 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001326 # Example (Comparison):
1327 #
1328 # title: "Summary size limit"
1329 # description: "Determines if a summary is less than 100 chars"
1330 # expression: "document.summary.size() &lt; 100"
1331 #
1332 # Example (Equality):
1333 #
1334 # title: "Requestor is owner"
1335 # description: "Determines if requestor is the document owner"
1336 # expression: "document.owner == request.auth.claims.email"
1337 #
1338 # Example (Logic):
1339 #
1340 # title: "Public documents"
1341 # description: "Determine whether the document should be publicly visible"
1342 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
1343 #
1344 # Example (Data Manipulation):
1345 #
1346 # title: "Notification string"
1347 # description: "Create a notification string with a timestamp."
1348 # expression: "'New message received at ' + string(document.create_time)"
1349 #
1350 # The exact variables and functions that may be referenced within an expression
1351 # are determined by the service that evaluates it. See the service
1352 # documentation for additional information.
1353 "description": "A String", # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001354 # describes the expression, e.g. when hovered over it in a UI.
Dan O'Mearadd494642020-05-01 07:42:23 -07001355 "expression": "A String", # Textual representation of an expression in Common Expression Language
1356 # syntax.
1357 "location": "A String", # Optional. String indicating the location of the expression for error
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001358 # reporting, e.g. a file name and a position in the file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001359 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001360 # its purpose. This can be used e.g. in UIs which allow to enter the
1361 # expression.
1362 },
1363 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
1364 # `members` can have the following values:
1365 #
1366 # * `allUsers`: A special identifier that represents anyone who is
1367 # on the internet; with or without a Google account.
1368 #
1369 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1370 # who is authenticated with a Google account or a service account.
1371 #
1372 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001373 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001374 #
1375 #
1376 # * `serviceAccount:{emailid}`: An email address that represents a service
1377 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1378 #
1379 # * `group:{emailid}`: An email address that represents a Google group.
1380 # For example, `admins@example.com`.
1381 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001382 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1383 # identifier) representing a user that has been recently deleted. For
1384 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1385 # recovered, this value reverts to `user:{emailid}` and the recovered user
1386 # retains the role in the binding.
1387 #
1388 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1389 # unique identifier) representing a service account that has been recently
1390 # deleted. For example,
1391 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1392 # If the service account is undeleted, this value reverts to
1393 # `serviceAccount:{emailid}` and the undeleted service account retains the
1394 # role in the binding.
1395 #
1396 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1397 # identifier) representing a Google group that has been recently
1398 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1399 # the group is recovered, this value reverts to `group:{emailid}` and the
1400 # recovered group retains the role in the binding.
1401 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001402 #
1403 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1404 # users of that domain. For example, `google.com` or `example.com`.
1405 #
1406 "A String",
1407 ],
1408 },
1409 ],
1410 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
1411 # prevent simultaneous updates of a policy from overwriting each other.
1412 # It is strongly suggested that systems make use of the `etag` in the
1413 # read-modify-write cycle to perform policy updates in order to avoid race
1414 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1415 # systems are expected to put that etag in the request to `setIamPolicy` to
1416 # ensure that their change will be applied to the same version of the policy.
1417 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001418 # **Important:** If you use IAM Conditions, you must include the `etag` field
1419 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1420 # you to overwrite a version `3` policy with a version `1` policy, and all of
1421 # the conditions in the version `3` policy are lost.
1422 "version": 42, # Specifies the format of the policy.
1423 #
1424 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1425 # are rejected.
1426 #
1427 # Any operation that affects conditional role bindings must specify version
1428 # `3`. This requirement applies to the following operations:
1429 #
1430 # * Getting a policy that includes a conditional role binding
1431 # * Adding a conditional role binding to a policy
1432 # * Changing a conditional role binding in a policy
1433 # * Removing any role binding, with or without a condition, from a policy
1434 # that includes conditions
1435 #
1436 # **Important:** If you use IAM Conditions, you must include the `etag` field
1437 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1438 # you to overwrite a version `3` policy with a version `1` policy, and all of
1439 # the conditions in the version `3` policy are lost.
1440 #
1441 # If a policy does not include any conditions, operations on that policy may
1442 # specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001443 }</pre>
1444</div>
1445
1446<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001447 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None, filter=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001448 <pre>Lists queues.
1449
1450Queues are returned in lexicographical order.
1451
1452Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001453 parent: string, Required. The location name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001454For example: `projects/PROJECT_ID/locations/LOCATION_ID` (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001455 pageSize: integer, Requested page size.
1456
1457The maximum page size is 9800. If unspecified, the page size will
1458be the maximum. Fewer queues than requested might be returned,
1459even if more queues exist; use the
1460next_page_token in the
1461response to determine if more queues exist.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001462 pageToken: string, A token identifying the page of results to return.
1463
1464To request the first page results, page_token must be empty. To
1465request the next page of results, page_token must be the value of
1466next_page_token returned
1467from the previous call to ListQueues
1468method. It is an error to switch the value of the
1469filter while iterating through pages.
1470 x__xgafv: string, V1 error format.
1471 Allowed values
1472 1 - v1 error format
1473 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001474 filter: string, `filter` can be used to specify a subset of queues. Any Queue
1475field can be used as a filter and several operators as supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07001476For example: `&lt;=, &lt;, &gt;=, &gt;, !=, =, :`. The filter syntax is the same as
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001477described in
1478[Stackdriver's Advanced Logs
1479Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
1480
1481Sample filter "state: PAUSED".
1482
1483Note that using filters might cause fewer queues than the
1484requested page_size to be returned.
1485
1486Returns:
1487 An object of the form:
1488
1489 { # Response message for ListQueues.
1490 "nextPageToken": "A String", # A token to retrieve next page of results.
1491 #
1492 # To return the next page of results, call
1493 # ListQueues with this value as the
1494 # page_token.
1495 #
1496 # If the next_page_token is empty, there are no more results.
1497 #
1498 # The page token is valid for only 2 hours.
1499 "queues": [ # The list of queues.
1500 { # A queue is a container of related tasks. Queues are configured to manage
1501 # how those tasks are dispatched. Configurable properties include rate limits,
1502 # retry options, queue types, and others.
1503 "name": "A String", # Caller-specified and required in CreateQueue,
1504 # after which it becomes output only.
1505 #
1506 # The queue name.
1507 #
1508 # The queue name must have the following format:
1509 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1510 #
1511 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1512 # hyphens (-), colons (:), or periods (.).
1513 # For more information, see
1514 # [Identifying
1515 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1516 # * `LOCATION_ID` is the canonical ID for the queue's location.
1517 # The list of available locations can be obtained by calling
1518 # ListLocations.
1519 # For more information, see https://cloud.google.com/about/locations/.
1520 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1521 # hyphens (-). The maximum length is 100 characters.
1522 "stackdriverLoggingConfig": { # Configuration options for writing logs to # Configuration options for writing logs to
1523 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
1524 # field is unset, then no logs are written.
1525 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1526 "samplingRatio": 3.14, # Specifies the fraction of operations to write to
1527 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1528 # This field may contain any value between 0.0 and 1.0, inclusive.
1529 # 0.0 is the default and means that no operations are logged.
1530 },
1531 "rateLimits": { # Rate limits. # Rate limits for task dispatches.
1532 #
1533 # rate_limits and retry_config are
1534 # related because they both control task attempts. However they control task
1535 # attempts in different ways:
1536 #
1537 # * rate_limits controls the total rate of
1538 # dispatches from a queue (i.e. all traffic dispatched from the
1539 # queue, regardless of whether the dispatch is from a first
1540 # attempt or a retry).
1541 # * retry_config controls what happens to
1542 # particular a task after its first attempt fails. That is,
1543 # retry_config controls task retries (the
1544 # second attempt, third attempt, etc).
1545 #
1546 # The queue's actual dispatch rate is the result of:
1547 #
1548 # * Number of tasks in the queue
1549 # * User-specified throttling: rate_limits,
1550 # retry_config, and the
1551 # queue's state.
1552 # * System throttling due to `429` (Too Many Requests) or `503` (Service
1553 # Unavailable) responses from the worker, high error rates, or to smooth
1554 # sudden large traffic spikes.
1555 #
1556 # This message determines the maximum rate that tasks can be dispatched by a
1557 # queue, regardless of whether the dispatch is a first task attempt or a retry.
1558 #
1559 # Note: The debugging command, RunTask, will run a task
1560 # even if the queue has reached its RateLimits.
1561 "maxConcurrentDispatches": 42, # The maximum number of concurrent tasks that Cloud Tasks allows
1562 # to be dispatched for this queue. After this threshold has been
1563 # reached, Cloud Tasks stops dispatching tasks until the number of
1564 # concurrent requests decreases.
1565 #
1566 # If unspecified when the queue is created, Cloud Tasks will pick the
1567 # default.
1568 #
1569 #
1570 # The maximum allowed value is 5,000.
1571 #
1572 #
1573 # This field has the same meaning as
1574 # [max_concurrent_requests in
1575 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
1576 "maxBurstSize": 42, # Output only. The max burst size.
1577 #
1578 # Max burst size limits how fast tasks in queue are processed when
1579 # many tasks are in the queue and the rate is high. This field
1580 # allows the queue to have a high rate so processing starts shortly
1581 # after a task is enqueued, but still limits resource usage when
1582 # many tasks are enqueued in a short period of time.
1583 #
1584 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1585 # algorithm is used to control the rate of task dispatches. Each
1586 # queue has a token bucket that holds tokens, up to the maximum
1587 # specified by `max_burst_size`. Each time a task is dispatched, a
1588 # token is removed from the bucket. Tasks will be dispatched until
1589 # the queue's bucket runs out of tokens. The bucket will be
1590 # continuously refilled with new tokens based on
1591 # max_dispatches_per_second.
1592 #
1593 # Cloud Tasks will pick the value of `max_burst_size` based on the
1594 # value of
1595 # max_dispatches_per_second.
1596 #
1597 # For App Engine queues that were created or updated using
1598 # `queue.yaml/xml`, `max_burst_size` is equal to
1599 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1600 # Since `max_burst_size` is output only, if
1601 # UpdateQueue is called on a queue
1602 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
1603 # on the value of
1604 # max_dispatches_per_second,
1605 # regardless of whether
1606 # max_dispatches_per_second
1607 # is updated.
1608 "maxDispatchesPerSecond": 3.14, # The maximum rate at which tasks are dispatched from this queue.
1609 #
1610 # If unspecified when the queue is created, Cloud Tasks will pick the
1611 # default.
1612 #
1613 # * For App Engine queues, the maximum allowed value
1614 # is 500.
1615 #
1616 #
1617 # This field has the same meaning as
1618 # [rate in
1619 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
1620 },
1621 "state": "A String", # Output only. The state of the queue.
1622 #
1623 # `state` can only be changed by called
1624 # PauseQueue,
1625 # ResumeQueue, or uploading
1626 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
1627 # UpdateQueue cannot be used to change `state`.
1628 "purgeTime": "A String", # Output only. The last time this queue was purged.
1629 #
1630 # All tasks that were created before this time
1631 # were purged.
1632 #
1633 # A queue can be purged using PurgeQueue, the
1634 # [App Engine Task Queue SDK, or the Cloud
1635 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
1636 #
1637 # Purge time will be truncated to the nearest microsecond. Purge
1638 # time will be unset if the queue has never been purged.
1639 "appEngineHttpQueue": { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
1640 # App Engine tasks in this queue.
1641 # Http tasks are not affected by this proto.
1642 #
1643 # The task will be delivered to the App Engine application hostname
1644 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
1645 # The documentation for AppEngineHttpRequest explains how the
1646 # task's host URL is constructed.
1647 #
1648 # Using AppEngineHttpQueue requires
1649 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1650 # Google IAM permission for the project
1651 # and the following scope:
1652 #
1653 # `https://www.googleapis.com/auth/cloud-platform`
1654 "appEngineRoutingOverride": { # App Engine Routing. # Overrides for the
1655 # task-level app_engine_routing.
1656 #
1657 # If set, `app_engine_routing_override` is used for all tasks in
1658 # the queue, no matter what the setting is for the
1659 # task-level app_engine_routing.
1660 #
1661 # Defines routing characteristics specific to App Engine - service, version,
1662 # and instance.
1663 #
1664 # For more information about services, versions, and instances see
1665 # [An Overview of App
1666 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1667 # [Microservices Architecture on Google App
1668 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1669 # [App Engine Standard request
1670 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1671 # and [App Engine Flex request
1672 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1673 "instance": "A String", # App instance.
1674 #
1675 # By default, the task is sent to an instance which is available when
1676 # the task is attempted.
1677 #
1678 # Requests can only be sent to a specific instance if
1679 # [manual scaling is used in App Engine
1680 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1681 # App Engine Flex does not support instances. For more information, see
1682 # [App Engine Standard request
1683 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1684 # and [App Engine Flex request
1685 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1686 "host": "A String", # Output only. The host that the task is sent to.
1687 #
1688 # The host is constructed from the domain name of the app associated with
Dan O'Mearadd494642020-05-01 07:42:23 -07001689 # the queue's project ID (for example &lt;app-id&gt;.appspot.com), and the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001690 # service, version,
1691 # and instance. Tasks which were created using
1692 # the App Engine SDK might have a custom domain name.
1693 #
1694 # For more information, see
1695 # [How Requests are
1696 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1697 "version": "A String", # App version.
1698 #
1699 # By default, the task is sent to the version which is the default
1700 # version when the task is attempted.
1701 #
1702 # For some queues or tasks which were created using the App Engine
1703 # Task Queue API, host is not parsable
1704 # into service,
1705 # version, and
1706 # instance. For example, some tasks
1707 # which were created using the App Engine SDK use a custom domain
1708 # name; custom domains are not parsed by Cloud Tasks. If
1709 # host is not parsable, then
1710 # service,
1711 # version, and
1712 # instance are the empty string.
1713 "service": "A String", # App service.
1714 #
1715 # By default, the task is sent to the service which is the default
1716 # service when the task is attempted.
1717 #
1718 # For some queues or tasks which were created using the App Engine
1719 # Task Queue API, host is not parsable
1720 # into service,
1721 # version, and
1722 # instance. For example, some tasks
1723 # which were created using the App Engine SDK use a custom domain
1724 # name; custom domains are not parsed by Cloud Tasks. If
1725 # host is not parsable, then
1726 # service,
1727 # version, and
1728 # instance are the empty string.
1729 },
1730 },
1731 "retryConfig": { # Retry config. # Settings that determine the retry behavior.
1732 #
1733 # * For tasks created using Cloud Tasks: the queue-level retry settings
1734 # apply to all tasks in the queue that were created using Cloud Tasks.
1735 # Retry settings cannot be set on individual tasks.
1736 # * For tasks created using the App Engine SDK: the queue-level retry
1737 # settings apply to all tasks in the queue which do not have retry settings
1738 # explicitly set on the task and were created by the App Engine SDK. See
1739 # [App Engine
1740 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
1741 #
1742 # These settings determine when a failed task attempt is retried.
1743 "maxRetryDuration": "A String", # If positive, `max_retry_duration` specifies the time limit for
1744 # retrying a failed task, measured from when the task was first
1745 # attempted. Once `max_retry_duration` time has passed *and* the
1746 # task has been attempted max_attempts
1747 # times, no further attempts will be made and the task will be
1748 # deleted.
1749 #
1750 # If zero, then the task age is unlimited.
1751 #
1752 # If unspecified when the queue is created, Cloud Tasks will pick the
1753 # default.
1754 #
1755 #
1756 # `max_retry_duration` will be truncated to the nearest second.
1757 #
1758 # This field has the same meaning as
1759 # [task_age_limit in
1760 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1761 "maxDoublings": 42, # The time between retries will double `max_doublings` times.
1762 #
1763 # A task's retry interval starts at
1764 # min_backoff, then doubles
1765 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07001766 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001767 # max_backoff up to
1768 # max_attempts times.
1769 #
1770 # For example, if min_backoff is 10s,
1771 # max_backoff is 300s, and
1772 # `max_doublings` is 3, then the a task will first be retried in
1773 # 10s. The retry interval will double three times, and then
1774 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1775 # intervals of max_backoff until the
1776 # task has been attempted max_attempts
1777 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1778 # 240s, 300s, 300s, ....
1779 #
1780 # If unspecified when the queue is created, Cloud Tasks will pick the
1781 # default.
1782 #
1783 #
1784 # This field has the same meaning as
1785 # [max_doublings in
1786 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1787 "maxAttempts": 42, # Number of attempts per task.
1788 #
1789 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
1790 # first attempt fails, then there will be `max_attempts - 1` retries). Must
Dan O'Mearadd494642020-05-01 07:42:23 -07001791 # be &gt;= -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001792 #
1793 # If unspecified when the queue is created, Cloud Tasks will pick the
1794 # default.
1795 #
1796 # -1 indicates unlimited attempts.
1797 #
1798 # This field has the same meaning as
1799 # [task_retry_limit in
1800 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1801 "maxBackoff": "A String", # A task will be scheduled for retry between
1802 # min_backoff and
1803 # max_backoff duration after it fails,
1804 # if the queue's RetryConfig specifies that the task should be
1805 # retried.
1806 #
1807 # If unspecified when the queue is created, Cloud Tasks will pick the
1808 # default.
1809 #
1810 #
1811 # `max_backoff` will be truncated to the nearest second.
1812 #
1813 # This field has the same meaning as
1814 # [max_backoff_seconds in
1815 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1816 "minBackoff": "A String", # A task will be scheduled for retry between
1817 # min_backoff and
1818 # max_backoff duration after it fails,
1819 # if the queue's RetryConfig specifies that the task should be
1820 # retried.
1821 #
1822 # If unspecified when the queue is created, Cloud Tasks will pick the
1823 # default.
1824 #
1825 #
1826 # `min_backoff` will be truncated to the nearest second.
1827 #
1828 # This field has the same meaning as
1829 # [min_backoff_seconds in
1830 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1831 },
1832 },
1833 ],
1834 }</pre>
1835</div>
1836
1837<div class="method">
1838 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1839 <pre>Retrieves the next page of results.
1840
1841Args:
1842 previous_request: The request for the previous page. (required)
1843 previous_response: The response from the request for the previous page. (required)
1844
1845Returns:
1846 A request object that you can call 'execute()' on to request the next
1847 page. Returns None if there are no more items in the collection.
1848 </pre>
1849</div>
1850
1851<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001852 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001853 <pre>Updates a queue.
1854
1855This method creates the queue if it does not exist and updates
1856the queue if it does exist.
1857
1858Queues created with this method allow tasks to live for a maximum of 31
1859days. After a task is 31 days old, the task will be deleted regardless of whether
1860it was dispatched or not.
1861
1862WARNING: Using this method may have unintended side effects if you are
1863using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
1864Read
1865[Overview of Queue Management and
1866queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
1867this method.
1868
1869Args:
1870 name: string, Caller-specified and required in CreateQueue,
1871after which it becomes output only.
1872
1873The queue name.
1874
1875The queue name must have the following format:
1876`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1877
1878* `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1879 hyphens (-), colons (:), or periods (.).
1880 For more information, see
1881 [Identifying
1882 projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1883* `LOCATION_ID` is the canonical ID for the queue's location.
1884 The list of available locations can be obtained by calling
1885 ListLocations.
1886 For more information, see https://cloud.google.com/about/locations/.
1887* `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1888 hyphens (-). The maximum length is 100 characters. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001889 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001890 The object takes the form of:
1891
1892{ # A queue is a container of related tasks. Queues are configured to manage
1893 # how those tasks are dispatched. Configurable properties include rate limits,
1894 # retry options, queue types, and others.
1895 "name": "A String", # Caller-specified and required in CreateQueue,
1896 # after which it becomes output only.
1897 #
1898 # The queue name.
1899 #
1900 # The queue name must have the following format:
1901 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1902 #
1903 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1904 # hyphens (-), colons (:), or periods (.).
1905 # For more information, see
1906 # [Identifying
1907 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1908 # * `LOCATION_ID` is the canonical ID for the queue's location.
1909 # The list of available locations can be obtained by calling
1910 # ListLocations.
1911 # For more information, see https://cloud.google.com/about/locations/.
1912 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1913 # hyphens (-). The maximum length is 100 characters.
1914 "stackdriverLoggingConfig": { # Configuration options for writing logs to # Configuration options for writing logs to
1915 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
1916 # field is unset, then no logs are written.
1917 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1918 "samplingRatio": 3.14, # Specifies the fraction of operations to write to
1919 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1920 # This field may contain any value between 0.0 and 1.0, inclusive.
1921 # 0.0 is the default and means that no operations are logged.
1922 },
1923 "rateLimits": { # Rate limits. # Rate limits for task dispatches.
1924 #
1925 # rate_limits and retry_config are
1926 # related because they both control task attempts. However they control task
1927 # attempts in different ways:
1928 #
1929 # * rate_limits controls the total rate of
1930 # dispatches from a queue (i.e. all traffic dispatched from the
1931 # queue, regardless of whether the dispatch is from a first
1932 # attempt or a retry).
1933 # * retry_config controls what happens to
1934 # particular a task after its first attempt fails. That is,
1935 # retry_config controls task retries (the
1936 # second attempt, third attempt, etc).
1937 #
1938 # The queue's actual dispatch rate is the result of:
1939 #
1940 # * Number of tasks in the queue
1941 # * User-specified throttling: rate_limits,
1942 # retry_config, and the
1943 # queue's state.
1944 # * System throttling due to `429` (Too Many Requests) or `503` (Service
1945 # Unavailable) responses from the worker, high error rates, or to smooth
1946 # sudden large traffic spikes.
1947 #
1948 # This message determines the maximum rate that tasks can be dispatched by a
1949 # queue, regardless of whether the dispatch is a first task attempt or a retry.
1950 #
1951 # Note: The debugging command, RunTask, will run a task
1952 # even if the queue has reached its RateLimits.
1953 "maxConcurrentDispatches": 42, # The maximum number of concurrent tasks that Cloud Tasks allows
1954 # to be dispatched for this queue. After this threshold has been
1955 # reached, Cloud Tasks stops dispatching tasks until the number of
1956 # concurrent requests decreases.
1957 #
1958 # If unspecified when the queue is created, Cloud Tasks will pick the
1959 # default.
1960 #
1961 #
1962 # The maximum allowed value is 5,000.
1963 #
1964 #
1965 # This field has the same meaning as
1966 # [max_concurrent_requests in
1967 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
1968 "maxBurstSize": 42, # Output only. The max burst size.
1969 #
1970 # Max burst size limits how fast tasks in queue are processed when
1971 # many tasks are in the queue and the rate is high. This field
1972 # allows the queue to have a high rate so processing starts shortly
1973 # after a task is enqueued, but still limits resource usage when
1974 # many tasks are enqueued in a short period of time.
1975 #
1976 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1977 # algorithm is used to control the rate of task dispatches. Each
1978 # queue has a token bucket that holds tokens, up to the maximum
1979 # specified by `max_burst_size`. Each time a task is dispatched, a
1980 # token is removed from the bucket. Tasks will be dispatched until
1981 # the queue's bucket runs out of tokens. The bucket will be
1982 # continuously refilled with new tokens based on
1983 # max_dispatches_per_second.
1984 #
1985 # Cloud Tasks will pick the value of `max_burst_size` based on the
1986 # value of
1987 # max_dispatches_per_second.
1988 #
1989 # For App Engine queues that were created or updated using
1990 # `queue.yaml/xml`, `max_burst_size` is equal to
1991 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1992 # Since `max_burst_size` is output only, if
1993 # UpdateQueue is called on a queue
1994 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
1995 # on the value of
1996 # max_dispatches_per_second,
1997 # regardless of whether
1998 # max_dispatches_per_second
1999 # is updated.
2000 "maxDispatchesPerSecond": 3.14, # The maximum rate at which tasks are dispatched from this queue.
2001 #
2002 # If unspecified when the queue is created, Cloud Tasks will pick the
2003 # default.
2004 #
2005 # * For App Engine queues, the maximum allowed value
2006 # is 500.
2007 #
2008 #
2009 # This field has the same meaning as
2010 # [rate in
2011 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2012 },
2013 "state": "A String", # Output only. The state of the queue.
2014 #
2015 # `state` can only be changed by called
2016 # PauseQueue,
2017 # ResumeQueue, or uploading
2018 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2019 # UpdateQueue cannot be used to change `state`.
2020 "purgeTime": "A String", # Output only. The last time this queue was purged.
2021 #
2022 # All tasks that were created before this time
2023 # were purged.
2024 #
2025 # A queue can be purged using PurgeQueue, the
2026 # [App Engine Task Queue SDK, or the Cloud
2027 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2028 #
2029 # Purge time will be truncated to the nearest microsecond. Purge
2030 # time will be unset if the queue has never been purged.
2031 "appEngineHttpQueue": { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
2032 # App Engine tasks in this queue.
2033 # Http tasks are not affected by this proto.
2034 #
2035 # The task will be delivered to the App Engine application hostname
2036 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
2037 # The documentation for AppEngineHttpRequest explains how the
2038 # task's host URL is constructed.
2039 #
2040 # Using AppEngineHttpQueue requires
2041 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2042 # Google IAM permission for the project
2043 # and the following scope:
2044 #
2045 # `https://www.googleapis.com/auth/cloud-platform`
2046 "appEngineRoutingOverride": { # App Engine Routing. # Overrides for the
2047 # task-level app_engine_routing.
2048 #
2049 # If set, `app_engine_routing_override` is used for all tasks in
2050 # the queue, no matter what the setting is for the
2051 # task-level app_engine_routing.
2052 #
2053 # Defines routing characteristics specific to App Engine - service, version,
2054 # and instance.
2055 #
2056 # For more information about services, versions, and instances see
2057 # [An Overview of App
2058 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2059 # [Microservices Architecture on Google App
2060 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2061 # [App Engine Standard request
2062 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2063 # and [App Engine Flex request
2064 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2065 "instance": "A String", # App instance.
2066 #
2067 # By default, the task is sent to an instance which is available when
2068 # the task is attempted.
2069 #
2070 # Requests can only be sent to a specific instance if
2071 # [manual scaling is used in App Engine
2072 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2073 # App Engine Flex does not support instances. For more information, see
2074 # [App Engine Standard request
2075 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2076 # and [App Engine Flex request
2077 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2078 "host": "A String", # Output only. The host that the task is sent to.
2079 #
2080 # The host is constructed from the domain name of the app associated with
Dan O'Mearadd494642020-05-01 07:42:23 -07002081 # the queue's project ID (for example &lt;app-id&gt;.appspot.com), and the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002082 # service, version,
2083 # and instance. Tasks which were created using
2084 # the App Engine SDK might have a custom domain name.
2085 #
2086 # For more information, see
2087 # [How Requests are
2088 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2089 "version": "A String", # App version.
2090 #
2091 # By default, the task is sent to the version which is the default
2092 # version when the task is attempted.
2093 #
2094 # For some queues or tasks which were created using the App Engine
2095 # Task Queue API, host is not parsable
2096 # into service,
2097 # version, and
2098 # instance. For example, some tasks
2099 # which were created using the App Engine SDK use a custom domain
2100 # name; custom domains are not parsed by Cloud Tasks. If
2101 # host is not parsable, then
2102 # service,
2103 # version, and
2104 # instance are the empty string.
2105 "service": "A String", # App service.
2106 #
2107 # By default, the task is sent to the service which is the default
2108 # service when the task is attempted.
2109 #
2110 # For some queues or tasks which were created using the App Engine
2111 # Task Queue API, host is not parsable
2112 # into service,
2113 # version, and
2114 # instance. For example, some tasks
2115 # which were created using the App Engine SDK use a custom domain
2116 # name; custom domains are not parsed by Cloud Tasks. If
2117 # host is not parsable, then
2118 # service,
2119 # version, and
2120 # instance are the empty string.
2121 },
2122 },
2123 "retryConfig": { # Retry config. # Settings that determine the retry behavior.
2124 #
2125 # * For tasks created using Cloud Tasks: the queue-level retry settings
2126 # apply to all tasks in the queue that were created using Cloud Tasks.
2127 # Retry settings cannot be set on individual tasks.
2128 # * For tasks created using the App Engine SDK: the queue-level retry
2129 # settings apply to all tasks in the queue which do not have retry settings
2130 # explicitly set on the task and were created by the App Engine SDK. See
2131 # [App Engine
2132 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2133 #
2134 # These settings determine when a failed task attempt is retried.
2135 "maxRetryDuration": "A String", # If positive, `max_retry_duration` specifies the time limit for
2136 # retrying a failed task, measured from when the task was first
2137 # attempted. Once `max_retry_duration` time has passed *and* the
2138 # task has been attempted max_attempts
2139 # times, no further attempts will be made and the task will be
2140 # deleted.
2141 #
2142 # If zero, then the task age is unlimited.
2143 #
2144 # If unspecified when the queue is created, Cloud Tasks will pick the
2145 # default.
2146 #
2147 #
2148 # `max_retry_duration` will be truncated to the nearest second.
2149 #
2150 # This field has the same meaning as
2151 # [task_age_limit in
2152 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2153 "maxDoublings": 42, # The time between retries will double `max_doublings` times.
2154 #
2155 # A task's retry interval starts at
2156 # min_backoff, then doubles
2157 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07002158 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002159 # max_backoff up to
2160 # max_attempts times.
2161 #
2162 # For example, if min_backoff is 10s,
2163 # max_backoff is 300s, and
2164 # `max_doublings` is 3, then the a task will first be retried in
2165 # 10s. The retry interval will double three times, and then
2166 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2167 # intervals of max_backoff until the
2168 # task has been attempted max_attempts
2169 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2170 # 240s, 300s, 300s, ....
2171 #
2172 # If unspecified when the queue is created, Cloud Tasks will pick the
2173 # default.
2174 #
2175 #
2176 # This field has the same meaning as
2177 # [max_doublings in
2178 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2179 "maxAttempts": 42, # Number of attempts per task.
2180 #
2181 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2182 # first attempt fails, then there will be `max_attempts - 1` retries). Must
Dan O'Mearadd494642020-05-01 07:42:23 -07002183 # be &gt;= -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002184 #
2185 # If unspecified when the queue is created, Cloud Tasks will pick the
2186 # default.
2187 #
2188 # -1 indicates unlimited attempts.
2189 #
2190 # This field has the same meaning as
2191 # [task_retry_limit in
2192 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2193 "maxBackoff": "A String", # A task will be scheduled for retry between
2194 # min_backoff and
2195 # max_backoff duration after it fails,
2196 # if the queue's RetryConfig specifies that the task should be
2197 # retried.
2198 #
2199 # If unspecified when the queue is created, Cloud Tasks will pick the
2200 # default.
2201 #
2202 #
2203 # `max_backoff` will be truncated to the nearest second.
2204 #
2205 # This field has the same meaning as
2206 # [max_backoff_seconds in
2207 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2208 "minBackoff": "A String", # A task will be scheduled for retry between
2209 # min_backoff and
2210 # max_backoff duration after it fails,
2211 # if the queue's RetryConfig specifies that the task should be
2212 # retried.
2213 #
2214 # If unspecified when the queue is created, Cloud Tasks will pick the
2215 # default.
2216 #
2217 #
2218 # `min_backoff` will be truncated to the nearest second.
2219 #
2220 # This field has the same meaning as
2221 # [min_backoff_seconds in
2222 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2223 },
2224}
2225
2226 updateMask: string, A mask used to specify which fields of the queue are being updated.
2227
2228If empty, then all fields will be updated.
2229 x__xgafv: string, V1 error format.
2230 Allowed values
2231 1 - v1 error format
2232 2 - v2 error format
2233
2234Returns:
2235 An object of the form:
2236
2237 { # A queue is a container of related tasks. Queues are configured to manage
2238 # how those tasks are dispatched. Configurable properties include rate limits,
2239 # retry options, queue types, and others.
2240 "name": "A String", # Caller-specified and required in CreateQueue,
2241 # after which it becomes output only.
2242 #
2243 # The queue name.
2244 #
2245 # The queue name must have the following format:
2246 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2247 #
2248 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2249 # hyphens (-), colons (:), or periods (.).
2250 # For more information, see
2251 # [Identifying
2252 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2253 # * `LOCATION_ID` is the canonical ID for the queue's location.
2254 # The list of available locations can be obtained by calling
2255 # ListLocations.
2256 # For more information, see https://cloud.google.com/about/locations/.
2257 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2258 # hyphens (-). The maximum length is 100 characters.
2259 "stackdriverLoggingConfig": { # Configuration options for writing logs to # Configuration options for writing logs to
2260 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2261 # field is unset, then no logs are written.
2262 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2263 "samplingRatio": 3.14, # Specifies the fraction of operations to write to
2264 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2265 # This field may contain any value between 0.0 and 1.0, inclusive.
2266 # 0.0 is the default and means that no operations are logged.
2267 },
2268 "rateLimits": { # Rate limits. # Rate limits for task dispatches.
2269 #
2270 # rate_limits and retry_config are
2271 # related because they both control task attempts. However they control task
2272 # attempts in different ways:
2273 #
2274 # * rate_limits controls the total rate of
2275 # dispatches from a queue (i.e. all traffic dispatched from the
2276 # queue, regardless of whether the dispatch is from a first
2277 # attempt or a retry).
2278 # * retry_config controls what happens to
2279 # particular a task after its first attempt fails. That is,
2280 # retry_config controls task retries (the
2281 # second attempt, third attempt, etc).
2282 #
2283 # The queue's actual dispatch rate is the result of:
2284 #
2285 # * Number of tasks in the queue
2286 # * User-specified throttling: rate_limits,
2287 # retry_config, and the
2288 # queue's state.
2289 # * System throttling due to `429` (Too Many Requests) or `503` (Service
2290 # Unavailable) responses from the worker, high error rates, or to smooth
2291 # sudden large traffic spikes.
2292 #
2293 # This message determines the maximum rate that tasks can be dispatched by a
2294 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2295 #
2296 # Note: The debugging command, RunTask, will run a task
2297 # even if the queue has reached its RateLimits.
2298 "maxConcurrentDispatches": 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2299 # to be dispatched for this queue. After this threshold has been
2300 # reached, Cloud Tasks stops dispatching tasks until the number of
2301 # concurrent requests decreases.
2302 #
2303 # If unspecified when the queue is created, Cloud Tasks will pick the
2304 # default.
2305 #
2306 #
2307 # The maximum allowed value is 5,000.
2308 #
2309 #
2310 # This field has the same meaning as
2311 # [max_concurrent_requests in
2312 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
2313 "maxBurstSize": 42, # Output only. The max burst size.
2314 #
2315 # Max burst size limits how fast tasks in queue are processed when
2316 # many tasks are in the queue and the rate is high. This field
2317 # allows the queue to have a high rate so processing starts shortly
2318 # after a task is enqueued, but still limits resource usage when
2319 # many tasks are enqueued in a short period of time.
2320 #
2321 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2322 # algorithm is used to control the rate of task dispatches. Each
2323 # queue has a token bucket that holds tokens, up to the maximum
2324 # specified by `max_burst_size`. Each time a task is dispatched, a
2325 # token is removed from the bucket. Tasks will be dispatched until
2326 # the queue's bucket runs out of tokens. The bucket will be
2327 # continuously refilled with new tokens based on
2328 # max_dispatches_per_second.
2329 #
2330 # Cloud Tasks will pick the value of `max_burst_size` based on the
2331 # value of
2332 # max_dispatches_per_second.
2333 #
2334 # For App Engine queues that were created or updated using
2335 # `queue.yaml/xml`, `max_burst_size` is equal to
2336 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2337 # Since `max_burst_size` is output only, if
2338 # UpdateQueue is called on a queue
2339 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2340 # on the value of
2341 # max_dispatches_per_second,
2342 # regardless of whether
2343 # max_dispatches_per_second
2344 # is updated.
2345 "maxDispatchesPerSecond": 3.14, # The maximum rate at which tasks are dispatched from this queue.
2346 #
2347 # If unspecified when the queue is created, Cloud Tasks will pick the
2348 # default.
2349 #
2350 # * For App Engine queues, the maximum allowed value
2351 # is 500.
2352 #
2353 #
2354 # This field has the same meaning as
2355 # [rate in
2356 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2357 },
2358 "state": "A String", # Output only. The state of the queue.
2359 #
2360 # `state` can only be changed by called
2361 # PauseQueue,
2362 # ResumeQueue, or uploading
2363 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2364 # UpdateQueue cannot be used to change `state`.
2365 "purgeTime": "A String", # Output only. The last time this queue was purged.
2366 #
2367 # All tasks that were created before this time
2368 # were purged.
2369 #
2370 # A queue can be purged using PurgeQueue, the
2371 # [App Engine Task Queue SDK, or the Cloud
2372 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2373 #
2374 # Purge time will be truncated to the nearest microsecond. Purge
2375 # time will be unset if the queue has never been purged.
2376 "appEngineHttpQueue": { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
2377 # App Engine tasks in this queue.
2378 # Http tasks are not affected by this proto.
2379 #
2380 # The task will be delivered to the App Engine application hostname
2381 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
2382 # The documentation for AppEngineHttpRequest explains how the
2383 # task's host URL is constructed.
2384 #
2385 # Using AppEngineHttpQueue requires
2386 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2387 # Google IAM permission for the project
2388 # and the following scope:
2389 #
2390 # `https://www.googleapis.com/auth/cloud-platform`
2391 "appEngineRoutingOverride": { # App Engine Routing. # Overrides for the
2392 # task-level app_engine_routing.
2393 #
2394 # If set, `app_engine_routing_override` is used for all tasks in
2395 # the queue, no matter what the setting is for the
2396 # task-level app_engine_routing.
2397 #
2398 # Defines routing characteristics specific to App Engine - service, version,
2399 # and instance.
2400 #
2401 # For more information about services, versions, and instances see
2402 # [An Overview of App
2403 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2404 # [Microservices Architecture on Google App
2405 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2406 # [App Engine Standard request
2407 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2408 # and [App Engine Flex request
2409 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2410 "instance": "A String", # App instance.
2411 #
2412 # By default, the task is sent to an instance which is available when
2413 # the task is attempted.
2414 #
2415 # Requests can only be sent to a specific instance if
2416 # [manual scaling is used in App Engine
2417 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2418 # App Engine Flex does not support instances. For more information, see
2419 # [App Engine Standard request
2420 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2421 # and [App Engine Flex request
2422 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2423 "host": "A String", # Output only. The host that the task is sent to.
2424 #
2425 # The host is constructed from the domain name of the app associated with
Dan O'Mearadd494642020-05-01 07:42:23 -07002426 # the queue's project ID (for example &lt;app-id&gt;.appspot.com), and the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002427 # service, version,
2428 # and instance. Tasks which were created using
2429 # the App Engine SDK might have a custom domain name.
2430 #
2431 # For more information, see
2432 # [How Requests are
2433 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2434 "version": "A String", # App version.
2435 #
2436 # By default, the task is sent to the version which is the default
2437 # version when the task is attempted.
2438 #
2439 # For some queues or tasks which were created using the App Engine
2440 # Task Queue API, host is not parsable
2441 # into service,
2442 # version, and
2443 # instance. For example, some tasks
2444 # which were created using the App Engine SDK use a custom domain
2445 # name; custom domains are not parsed by Cloud Tasks. If
2446 # host is not parsable, then
2447 # service,
2448 # version, and
2449 # instance are the empty string.
2450 "service": "A String", # App service.
2451 #
2452 # By default, the task is sent to the service which is the default
2453 # service when the task is attempted.
2454 #
2455 # For some queues or tasks which were created using the App Engine
2456 # Task Queue API, host is not parsable
2457 # into service,
2458 # version, and
2459 # instance. For example, some tasks
2460 # which were created using the App Engine SDK use a custom domain
2461 # name; custom domains are not parsed by Cloud Tasks. If
2462 # host is not parsable, then
2463 # service,
2464 # version, and
2465 # instance are the empty string.
2466 },
2467 },
2468 "retryConfig": { # Retry config. # Settings that determine the retry behavior.
2469 #
2470 # * For tasks created using Cloud Tasks: the queue-level retry settings
2471 # apply to all tasks in the queue that were created using Cloud Tasks.
2472 # Retry settings cannot be set on individual tasks.
2473 # * For tasks created using the App Engine SDK: the queue-level retry
2474 # settings apply to all tasks in the queue which do not have retry settings
2475 # explicitly set on the task and were created by the App Engine SDK. See
2476 # [App Engine
2477 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2478 #
2479 # These settings determine when a failed task attempt is retried.
2480 "maxRetryDuration": "A String", # If positive, `max_retry_duration` specifies the time limit for
2481 # retrying a failed task, measured from when the task was first
2482 # attempted. Once `max_retry_duration` time has passed *and* the
2483 # task has been attempted max_attempts
2484 # times, no further attempts will be made and the task will be
2485 # deleted.
2486 #
2487 # If zero, then the task age is unlimited.
2488 #
2489 # If unspecified when the queue is created, Cloud Tasks will pick the
2490 # default.
2491 #
2492 #
2493 # `max_retry_duration` will be truncated to the nearest second.
2494 #
2495 # This field has the same meaning as
2496 # [task_age_limit in
2497 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2498 "maxDoublings": 42, # The time between retries will double `max_doublings` times.
2499 #
2500 # A task's retry interval starts at
2501 # min_backoff, then doubles
2502 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07002503 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002504 # max_backoff up to
2505 # max_attempts times.
2506 #
2507 # For example, if min_backoff is 10s,
2508 # max_backoff is 300s, and
2509 # `max_doublings` is 3, then the a task will first be retried in
2510 # 10s. The retry interval will double three times, and then
2511 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2512 # intervals of max_backoff until the
2513 # task has been attempted max_attempts
2514 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2515 # 240s, 300s, 300s, ....
2516 #
2517 # If unspecified when the queue is created, Cloud Tasks will pick the
2518 # default.
2519 #
2520 #
2521 # This field has the same meaning as
2522 # [max_doublings in
2523 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2524 "maxAttempts": 42, # Number of attempts per task.
2525 #
2526 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2527 # first attempt fails, then there will be `max_attempts - 1` retries). Must
Dan O'Mearadd494642020-05-01 07:42:23 -07002528 # be &gt;= -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002529 #
2530 # If unspecified when the queue is created, Cloud Tasks will pick the
2531 # default.
2532 #
2533 # -1 indicates unlimited attempts.
2534 #
2535 # This field has the same meaning as
2536 # [task_retry_limit in
2537 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2538 "maxBackoff": "A String", # A task will be scheduled for retry between
2539 # min_backoff and
2540 # max_backoff duration after it fails,
2541 # if the queue's RetryConfig specifies that the task should be
2542 # retried.
2543 #
2544 # If unspecified when the queue is created, Cloud Tasks will pick the
2545 # default.
2546 #
2547 #
2548 # `max_backoff` will be truncated to the nearest second.
2549 #
2550 # This field has the same meaning as
2551 # [max_backoff_seconds in
2552 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2553 "minBackoff": "A String", # A task will be scheduled for retry between
2554 # min_backoff and
2555 # max_backoff duration after it fails,
2556 # if the queue's RetryConfig specifies that the task should be
2557 # retried.
2558 #
2559 # If unspecified when the queue is created, Cloud Tasks will pick the
2560 # default.
2561 #
2562 #
2563 # `min_backoff` will be truncated to the nearest second.
2564 #
2565 # This field has the same meaning as
2566 # [min_backoff_seconds in
2567 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2568 },
2569 }</pre>
2570</div>
2571
2572<div class="method">
2573 <code class="details" id="pause">pause(name, body=None, x__xgafv=None)</code>
2574 <pre>Pauses the queue.
2575
2576If a queue is paused then the system will stop dispatching tasks
2577until the queue is resumed via
2578ResumeQueue. Tasks can still be added
2579when the queue is paused. A queue is paused if its
2580state is PAUSED.
2581
2582Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002583 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002584`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
2585 body: object, The request body.
2586 The object takes the form of:
2587
2588{ # Request message for PauseQueue.
2589 }
2590
2591 x__xgafv: string, V1 error format.
2592 Allowed values
2593 1 - v1 error format
2594 2 - v2 error format
2595
2596Returns:
2597 An object of the form:
2598
2599 { # A queue is a container of related tasks. Queues are configured to manage
2600 # how those tasks are dispatched. Configurable properties include rate limits,
2601 # retry options, queue types, and others.
2602 "name": "A String", # Caller-specified and required in CreateQueue,
2603 # after which it becomes output only.
2604 #
2605 # The queue name.
2606 #
2607 # The queue name must have the following format:
2608 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2609 #
2610 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2611 # hyphens (-), colons (:), or periods (.).
2612 # For more information, see
2613 # [Identifying
2614 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2615 # * `LOCATION_ID` is the canonical ID for the queue's location.
2616 # The list of available locations can be obtained by calling
2617 # ListLocations.
2618 # For more information, see https://cloud.google.com/about/locations/.
2619 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2620 # hyphens (-). The maximum length is 100 characters.
2621 "stackdriverLoggingConfig": { # Configuration options for writing logs to # Configuration options for writing logs to
2622 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2623 # field is unset, then no logs are written.
2624 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2625 "samplingRatio": 3.14, # Specifies the fraction of operations to write to
2626 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2627 # This field may contain any value between 0.0 and 1.0, inclusive.
2628 # 0.0 is the default and means that no operations are logged.
2629 },
2630 "rateLimits": { # Rate limits. # Rate limits for task dispatches.
2631 #
2632 # rate_limits and retry_config are
2633 # related because they both control task attempts. However they control task
2634 # attempts in different ways:
2635 #
2636 # * rate_limits controls the total rate of
2637 # dispatches from a queue (i.e. all traffic dispatched from the
2638 # queue, regardless of whether the dispatch is from a first
2639 # attempt or a retry).
2640 # * retry_config controls what happens to
2641 # particular a task after its first attempt fails. That is,
2642 # retry_config controls task retries (the
2643 # second attempt, third attempt, etc).
2644 #
2645 # The queue's actual dispatch rate is the result of:
2646 #
2647 # * Number of tasks in the queue
2648 # * User-specified throttling: rate_limits,
2649 # retry_config, and the
2650 # queue's state.
2651 # * System throttling due to `429` (Too Many Requests) or `503` (Service
2652 # Unavailable) responses from the worker, high error rates, or to smooth
2653 # sudden large traffic spikes.
2654 #
2655 # This message determines the maximum rate that tasks can be dispatched by a
2656 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2657 #
2658 # Note: The debugging command, RunTask, will run a task
2659 # even if the queue has reached its RateLimits.
2660 "maxConcurrentDispatches": 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2661 # to be dispatched for this queue. After this threshold has been
2662 # reached, Cloud Tasks stops dispatching tasks until the number of
2663 # concurrent requests decreases.
2664 #
2665 # If unspecified when the queue is created, Cloud Tasks will pick the
2666 # default.
2667 #
2668 #
2669 # The maximum allowed value is 5,000.
2670 #
2671 #
2672 # This field has the same meaning as
2673 # [max_concurrent_requests in
2674 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
2675 "maxBurstSize": 42, # Output only. The max burst size.
2676 #
2677 # Max burst size limits how fast tasks in queue are processed when
2678 # many tasks are in the queue and the rate is high. This field
2679 # allows the queue to have a high rate so processing starts shortly
2680 # after a task is enqueued, but still limits resource usage when
2681 # many tasks are enqueued in a short period of time.
2682 #
2683 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2684 # algorithm is used to control the rate of task dispatches. Each
2685 # queue has a token bucket that holds tokens, up to the maximum
2686 # specified by `max_burst_size`. Each time a task is dispatched, a
2687 # token is removed from the bucket. Tasks will be dispatched until
2688 # the queue's bucket runs out of tokens. The bucket will be
2689 # continuously refilled with new tokens based on
2690 # max_dispatches_per_second.
2691 #
2692 # Cloud Tasks will pick the value of `max_burst_size` based on the
2693 # value of
2694 # max_dispatches_per_second.
2695 #
2696 # For App Engine queues that were created or updated using
2697 # `queue.yaml/xml`, `max_burst_size` is equal to
2698 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2699 # Since `max_burst_size` is output only, if
2700 # UpdateQueue is called on a queue
2701 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2702 # on the value of
2703 # max_dispatches_per_second,
2704 # regardless of whether
2705 # max_dispatches_per_second
2706 # is updated.
2707 "maxDispatchesPerSecond": 3.14, # The maximum rate at which tasks are dispatched from this queue.
2708 #
2709 # If unspecified when the queue is created, Cloud Tasks will pick the
2710 # default.
2711 #
2712 # * For App Engine queues, the maximum allowed value
2713 # is 500.
2714 #
2715 #
2716 # This field has the same meaning as
2717 # [rate in
2718 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2719 },
2720 "state": "A String", # Output only. The state of the queue.
2721 #
2722 # `state` can only be changed by called
2723 # PauseQueue,
2724 # ResumeQueue, or uploading
2725 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2726 # UpdateQueue cannot be used to change `state`.
2727 "purgeTime": "A String", # Output only. The last time this queue was purged.
2728 #
2729 # All tasks that were created before this time
2730 # were purged.
2731 #
2732 # A queue can be purged using PurgeQueue, the
2733 # [App Engine Task Queue SDK, or the Cloud
2734 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2735 #
2736 # Purge time will be truncated to the nearest microsecond. Purge
2737 # time will be unset if the queue has never been purged.
2738 "appEngineHttpQueue": { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
2739 # App Engine tasks in this queue.
2740 # Http tasks are not affected by this proto.
2741 #
2742 # The task will be delivered to the App Engine application hostname
2743 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
2744 # The documentation for AppEngineHttpRequest explains how the
2745 # task's host URL is constructed.
2746 #
2747 # Using AppEngineHttpQueue requires
2748 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2749 # Google IAM permission for the project
2750 # and the following scope:
2751 #
2752 # `https://www.googleapis.com/auth/cloud-platform`
2753 "appEngineRoutingOverride": { # App Engine Routing. # Overrides for the
2754 # task-level app_engine_routing.
2755 #
2756 # If set, `app_engine_routing_override` is used for all tasks in
2757 # the queue, no matter what the setting is for the
2758 # task-level app_engine_routing.
2759 #
2760 # Defines routing characteristics specific to App Engine - service, version,
2761 # and instance.
2762 #
2763 # For more information about services, versions, and instances see
2764 # [An Overview of App
2765 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2766 # [Microservices Architecture on Google App
2767 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2768 # [App Engine Standard request
2769 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2770 # and [App Engine Flex request
2771 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2772 "instance": "A String", # App instance.
2773 #
2774 # By default, the task is sent to an instance which is available when
2775 # the task is attempted.
2776 #
2777 # Requests can only be sent to a specific instance if
2778 # [manual scaling is used in App Engine
2779 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2780 # App Engine Flex does not support instances. For more information, see
2781 # [App Engine Standard request
2782 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2783 # and [App Engine Flex request
2784 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2785 "host": "A String", # Output only. The host that the task is sent to.
2786 #
2787 # The host is constructed from the domain name of the app associated with
Dan O'Mearadd494642020-05-01 07:42:23 -07002788 # the queue's project ID (for example &lt;app-id&gt;.appspot.com), and the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002789 # service, version,
2790 # and instance. Tasks which were created using
2791 # the App Engine SDK might have a custom domain name.
2792 #
2793 # For more information, see
2794 # [How Requests are
2795 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2796 "version": "A String", # App version.
2797 #
2798 # By default, the task is sent to the version which is the default
2799 # version when the task is attempted.
2800 #
2801 # For some queues or tasks which were created using the App Engine
2802 # Task Queue API, host is not parsable
2803 # into service,
2804 # version, and
2805 # instance. For example, some tasks
2806 # which were created using the App Engine SDK use a custom domain
2807 # name; custom domains are not parsed by Cloud Tasks. If
2808 # host is not parsable, then
2809 # service,
2810 # version, and
2811 # instance are the empty string.
2812 "service": "A String", # App service.
2813 #
2814 # By default, the task is sent to the service which is the default
2815 # service when the task is attempted.
2816 #
2817 # For some queues or tasks which were created using the App Engine
2818 # Task Queue API, host is not parsable
2819 # into service,
2820 # version, and
2821 # instance. For example, some tasks
2822 # which were created using the App Engine SDK use a custom domain
2823 # name; custom domains are not parsed by Cloud Tasks. If
2824 # host is not parsable, then
2825 # service,
2826 # version, and
2827 # instance are the empty string.
2828 },
2829 },
2830 "retryConfig": { # Retry config. # Settings that determine the retry behavior.
2831 #
2832 # * For tasks created using Cloud Tasks: the queue-level retry settings
2833 # apply to all tasks in the queue that were created using Cloud Tasks.
2834 # Retry settings cannot be set on individual tasks.
2835 # * For tasks created using the App Engine SDK: the queue-level retry
2836 # settings apply to all tasks in the queue which do not have retry settings
2837 # explicitly set on the task and were created by the App Engine SDK. See
2838 # [App Engine
2839 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2840 #
2841 # These settings determine when a failed task attempt is retried.
2842 "maxRetryDuration": "A String", # If positive, `max_retry_duration` specifies the time limit for
2843 # retrying a failed task, measured from when the task was first
2844 # attempted. Once `max_retry_duration` time has passed *and* the
2845 # task has been attempted max_attempts
2846 # times, no further attempts will be made and the task will be
2847 # deleted.
2848 #
2849 # If zero, then the task age is unlimited.
2850 #
2851 # If unspecified when the queue is created, Cloud Tasks will pick the
2852 # default.
2853 #
2854 #
2855 # `max_retry_duration` will be truncated to the nearest second.
2856 #
2857 # This field has the same meaning as
2858 # [task_age_limit in
2859 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2860 "maxDoublings": 42, # The time between retries will double `max_doublings` times.
2861 #
2862 # A task's retry interval starts at
2863 # min_backoff, then doubles
2864 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07002865 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002866 # max_backoff up to
2867 # max_attempts times.
2868 #
2869 # For example, if min_backoff is 10s,
2870 # max_backoff is 300s, and
2871 # `max_doublings` is 3, then the a task will first be retried in
2872 # 10s. The retry interval will double three times, and then
2873 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2874 # intervals of max_backoff until the
2875 # task has been attempted max_attempts
2876 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2877 # 240s, 300s, 300s, ....
2878 #
2879 # If unspecified when the queue is created, Cloud Tasks will pick the
2880 # default.
2881 #
2882 #
2883 # This field has the same meaning as
2884 # [max_doublings in
2885 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2886 "maxAttempts": 42, # Number of attempts per task.
2887 #
2888 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2889 # first attempt fails, then there will be `max_attempts - 1` retries). Must
Dan O'Mearadd494642020-05-01 07:42:23 -07002890 # be &gt;= -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002891 #
2892 # If unspecified when the queue is created, Cloud Tasks will pick the
2893 # default.
2894 #
2895 # -1 indicates unlimited attempts.
2896 #
2897 # This field has the same meaning as
2898 # [task_retry_limit in
2899 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2900 "maxBackoff": "A String", # A task will be scheduled for retry between
2901 # min_backoff and
2902 # max_backoff duration after it fails,
2903 # if the queue's RetryConfig specifies that the task should be
2904 # retried.
2905 #
2906 # If unspecified when the queue is created, Cloud Tasks will pick the
2907 # default.
2908 #
2909 #
2910 # `max_backoff` will be truncated to the nearest second.
2911 #
2912 # This field has the same meaning as
2913 # [max_backoff_seconds in
2914 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2915 "minBackoff": "A String", # A task will be scheduled for retry between
2916 # min_backoff and
2917 # max_backoff duration after it fails,
2918 # if the queue's RetryConfig specifies that the task should be
2919 # retried.
2920 #
2921 # If unspecified when the queue is created, Cloud Tasks will pick the
2922 # default.
2923 #
2924 #
2925 # `min_backoff` will be truncated to the nearest second.
2926 #
2927 # This field has the same meaning as
2928 # [min_backoff_seconds in
2929 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2930 },
2931 }</pre>
2932</div>
2933
2934<div class="method">
2935 <code class="details" id="purge">purge(name, body=None, x__xgafv=None)</code>
2936 <pre>Purges a queue by deleting all of its tasks.
2937
2938All tasks created before this method is called are permanently deleted.
2939
2940Purge operations can take up to one minute to take effect. Tasks
2941might be dispatched before the purge takes effect. A purge is irreversible.
2942
2943Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002944 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002945`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
2946 body: object, The request body.
2947 The object takes the form of:
2948
2949{ # Request message for PurgeQueue.
2950 }
2951
2952 x__xgafv: string, V1 error format.
2953 Allowed values
2954 1 - v1 error format
2955 2 - v2 error format
2956
2957Returns:
2958 An object of the form:
2959
2960 { # A queue is a container of related tasks. Queues are configured to manage
2961 # how those tasks are dispatched. Configurable properties include rate limits,
2962 # retry options, queue types, and others.
2963 "name": "A String", # Caller-specified and required in CreateQueue,
2964 # after which it becomes output only.
2965 #
2966 # The queue name.
2967 #
2968 # The queue name must have the following format:
2969 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2970 #
2971 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2972 # hyphens (-), colons (:), or periods (.).
2973 # For more information, see
2974 # [Identifying
2975 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2976 # * `LOCATION_ID` is the canonical ID for the queue's location.
2977 # The list of available locations can be obtained by calling
2978 # ListLocations.
2979 # For more information, see https://cloud.google.com/about/locations/.
2980 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2981 # hyphens (-). The maximum length is 100 characters.
2982 "stackdriverLoggingConfig": { # Configuration options for writing logs to # Configuration options for writing logs to
2983 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2984 # field is unset, then no logs are written.
2985 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2986 "samplingRatio": 3.14, # Specifies the fraction of operations to write to
2987 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2988 # This field may contain any value between 0.0 and 1.0, inclusive.
2989 # 0.0 is the default and means that no operations are logged.
2990 },
2991 "rateLimits": { # Rate limits. # Rate limits for task dispatches.
2992 #
2993 # rate_limits and retry_config are
2994 # related because they both control task attempts. However they control task
2995 # attempts in different ways:
2996 #
2997 # * rate_limits controls the total rate of
2998 # dispatches from a queue (i.e. all traffic dispatched from the
2999 # queue, regardless of whether the dispatch is from a first
3000 # attempt or a retry).
3001 # * retry_config controls what happens to
3002 # particular a task after its first attempt fails. That is,
3003 # retry_config controls task retries (the
3004 # second attempt, third attempt, etc).
3005 #
3006 # The queue's actual dispatch rate is the result of:
3007 #
3008 # * Number of tasks in the queue
3009 # * User-specified throttling: rate_limits,
3010 # retry_config, and the
3011 # queue's state.
3012 # * System throttling due to `429` (Too Many Requests) or `503` (Service
3013 # Unavailable) responses from the worker, high error rates, or to smooth
3014 # sudden large traffic spikes.
3015 #
3016 # This message determines the maximum rate that tasks can be dispatched by a
3017 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3018 #
3019 # Note: The debugging command, RunTask, will run a task
3020 # even if the queue has reached its RateLimits.
3021 "maxConcurrentDispatches": 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3022 # to be dispatched for this queue. After this threshold has been
3023 # reached, Cloud Tasks stops dispatching tasks until the number of
3024 # concurrent requests decreases.
3025 #
3026 # If unspecified when the queue is created, Cloud Tasks will pick the
3027 # default.
3028 #
3029 #
3030 # The maximum allowed value is 5,000.
3031 #
3032 #
3033 # This field has the same meaning as
3034 # [max_concurrent_requests in
3035 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
3036 "maxBurstSize": 42, # Output only. The max burst size.
3037 #
3038 # Max burst size limits how fast tasks in queue are processed when
3039 # many tasks are in the queue and the rate is high. This field
3040 # allows the queue to have a high rate so processing starts shortly
3041 # after a task is enqueued, but still limits resource usage when
3042 # many tasks are enqueued in a short period of time.
3043 #
3044 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3045 # algorithm is used to control the rate of task dispatches. Each
3046 # queue has a token bucket that holds tokens, up to the maximum
3047 # specified by `max_burst_size`. Each time a task is dispatched, a
3048 # token is removed from the bucket. Tasks will be dispatched until
3049 # the queue's bucket runs out of tokens. The bucket will be
3050 # continuously refilled with new tokens based on
3051 # max_dispatches_per_second.
3052 #
3053 # Cloud Tasks will pick the value of `max_burst_size` based on the
3054 # value of
3055 # max_dispatches_per_second.
3056 #
3057 # For App Engine queues that were created or updated using
3058 # `queue.yaml/xml`, `max_burst_size` is equal to
3059 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3060 # Since `max_burst_size` is output only, if
3061 # UpdateQueue is called on a queue
3062 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3063 # on the value of
3064 # max_dispatches_per_second,
3065 # regardless of whether
3066 # max_dispatches_per_second
3067 # is updated.
3068 "maxDispatchesPerSecond": 3.14, # The maximum rate at which tasks are dispatched from this queue.
3069 #
3070 # If unspecified when the queue is created, Cloud Tasks will pick the
3071 # default.
3072 #
3073 # * For App Engine queues, the maximum allowed value
3074 # is 500.
3075 #
3076 #
3077 # This field has the same meaning as
3078 # [rate in
3079 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
3080 },
3081 "state": "A String", # Output only. The state of the queue.
3082 #
3083 # `state` can only be changed by called
3084 # PauseQueue,
3085 # ResumeQueue, or uploading
3086 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3087 # UpdateQueue cannot be used to change `state`.
3088 "purgeTime": "A String", # Output only. The last time this queue was purged.
3089 #
3090 # All tasks that were created before this time
3091 # were purged.
3092 #
3093 # A queue can be purged using PurgeQueue, the
3094 # [App Engine Task Queue SDK, or the Cloud
3095 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
3096 #
3097 # Purge time will be truncated to the nearest microsecond. Purge
3098 # time will be unset if the queue has never been purged.
3099 "appEngineHttpQueue": { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
3100 # App Engine tasks in this queue.
3101 # Http tasks are not affected by this proto.
3102 #
3103 # The task will be delivered to the App Engine application hostname
3104 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
3105 # The documentation for AppEngineHttpRequest explains how the
3106 # task's host URL is constructed.
3107 #
3108 # Using AppEngineHttpQueue requires
3109 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3110 # Google IAM permission for the project
3111 # and the following scope:
3112 #
3113 # `https://www.googleapis.com/auth/cloud-platform`
3114 "appEngineRoutingOverride": { # App Engine Routing. # Overrides for the
3115 # task-level app_engine_routing.
3116 #
3117 # If set, `app_engine_routing_override` is used for all tasks in
3118 # the queue, no matter what the setting is for the
3119 # task-level app_engine_routing.
3120 #
3121 # Defines routing characteristics specific to App Engine - service, version,
3122 # and instance.
3123 #
3124 # For more information about services, versions, and instances see
3125 # [An Overview of App
3126 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3127 # [Microservices Architecture on Google App
3128 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3129 # [App Engine Standard request
3130 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3131 # and [App Engine Flex request
3132 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3133 "instance": "A String", # App instance.
3134 #
3135 # By default, the task is sent to an instance which is available when
3136 # the task is attempted.
3137 #
3138 # Requests can only be sent to a specific instance if
3139 # [manual scaling is used in App Engine
3140 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3141 # App Engine Flex does not support instances. For more information, see
3142 # [App Engine Standard request
3143 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3144 # and [App Engine Flex request
3145 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3146 "host": "A String", # Output only. The host that the task is sent to.
3147 #
3148 # The host is constructed from the domain name of the app associated with
Dan O'Mearadd494642020-05-01 07:42:23 -07003149 # the queue's project ID (for example &lt;app-id&gt;.appspot.com), and the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003150 # service, version,
3151 # and instance. Tasks which were created using
3152 # the App Engine SDK might have a custom domain name.
3153 #
3154 # For more information, see
3155 # [How Requests are
3156 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3157 "version": "A String", # App version.
3158 #
3159 # By default, the task is sent to the version which is the default
3160 # version when the task is attempted.
3161 #
3162 # For some queues or tasks which were created using the App Engine
3163 # Task Queue API, host is not parsable
3164 # into service,
3165 # version, and
3166 # instance. For example, some tasks
3167 # which were created using the App Engine SDK use a custom domain
3168 # name; custom domains are not parsed by Cloud Tasks. If
3169 # host is not parsable, then
3170 # service,
3171 # version, and
3172 # instance are the empty string.
3173 "service": "A String", # App service.
3174 #
3175 # By default, the task is sent to the service which is the default
3176 # service when the task is attempted.
3177 #
3178 # For some queues or tasks which were created using the App Engine
3179 # Task Queue API, host is not parsable
3180 # into service,
3181 # version, and
3182 # instance. For example, some tasks
3183 # which were created using the App Engine SDK use a custom domain
3184 # name; custom domains are not parsed by Cloud Tasks. If
3185 # host is not parsable, then
3186 # service,
3187 # version, and
3188 # instance are the empty string.
3189 },
3190 },
3191 "retryConfig": { # Retry config. # Settings that determine the retry behavior.
3192 #
3193 # * For tasks created using Cloud Tasks: the queue-level retry settings
3194 # apply to all tasks in the queue that were created using Cloud Tasks.
3195 # Retry settings cannot be set on individual tasks.
3196 # * For tasks created using the App Engine SDK: the queue-level retry
3197 # settings apply to all tasks in the queue which do not have retry settings
3198 # explicitly set on the task and were created by the App Engine SDK. See
3199 # [App Engine
3200 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3201 #
3202 # These settings determine when a failed task attempt is retried.
3203 "maxRetryDuration": "A String", # If positive, `max_retry_duration` specifies the time limit for
3204 # retrying a failed task, measured from when the task was first
3205 # attempted. Once `max_retry_duration` time has passed *and* the
3206 # task has been attempted max_attempts
3207 # times, no further attempts will be made and the task will be
3208 # deleted.
3209 #
3210 # If zero, then the task age is unlimited.
3211 #
3212 # If unspecified when the queue is created, Cloud Tasks will pick the
3213 # default.
3214 #
3215 #
3216 # `max_retry_duration` will be truncated to the nearest second.
3217 #
3218 # This field has the same meaning as
3219 # [task_age_limit in
3220 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3221 "maxDoublings": 42, # The time between retries will double `max_doublings` times.
3222 #
3223 # A task's retry interval starts at
3224 # min_backoff, then doubles
3225 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07003226 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003227 # max_backoff up to
3228 # max_attempts times.
3229 #
3230 # For example, if min_backoff is 10s,
3231 # max_backoff is 300s, and
3232 # `max_doublings` is 3, then the a task will first be retried in
3233 # 10s. The retry interval will double three times, and then
3234 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3235 # intervals of max_backoff until the
3236 # task has been attempted max_attempts
3237 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3238 # 240s, 300s, 300s, ....
3239 #
3240 # If unspecified when the queue is created, Cloud Tasks will pick the
3241 # default.
3242 #
3243 #
3244 # This field has the same meaning as
3245 # [max_doublings in
3246 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3247 "maxAttempts": 42, # Number of attempts per task.
3248 #
3249 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
3250 # first attempt fails, then there will be `max_attempts - 1` retries). Must
Dan O'Mearadd494642020-05-01 07:42:23 -07003251 # be &gt;= -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003252 #
3253 # If unspecified when the queue is created, Cloud Tasks will pick the
3254 # default.
3255 #
3256 # -1 indicates unlimited attempts.
3257 #
3258 # This field has the same meaning as
3259 # [task_retry_limit in
3260 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3261 "maxBackoff": "A String", # A task will be scheduled for retry between
3262 # min_backoff and
3263 # max_backoff duration after it fails,
3264 # if the queue's RetryConfig specifies that the task should be
3265 # retried.
3266 #
3267 # If unspecified when the queue is created, Cloud Tasks will pick the
3268 # default.
3269 #
3270 #
3271 # `max_backoff` will be truncated to the nearest second.
3272 #
3273 # This field has the same meaning as
3274 # [max_backoff_seconds in
3275 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3276 "minBackoff": "A String", # A task will be scheduled for retry between
3277 # min_backoff and
3278 # max_backoff duration after it fails,
3279 # if the queue's RetryConfig specifies that the task should be
3280 # retried.
3281 #
3282 # If unspecified when the queue is created, Cloud Tasks will pick the
3283 # default.
3284 #
3285 #
3286 # `min_backoff` will be truncated to the nearest second.
3287 #
3288 # This field has the same meaning as
3289 # [min_backoff_seconds in
3290 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3291 },
3292 }</pre>
3293</div>
3294
3295<div class="method">
3296 <code class="details" id="resume">resume(name, body=None, x__xgafv=None)</code>
3297 <pre>Resume a queue.
3298
3299This method resumes a queue after it has been
3300PAUSED or
3301DISABLED. The state of a queue is stored
3302in the queue's state; after calling this method it
3303will be set to RUNNING.
3304
3305WARNING: Resuming many high-QPS queues at the same time can
3306lead to target overloading. If you are resuming high-QPS
3307queues, follow the 500/50/5 pattern described in
3308[Managing Cloud Tasks Scaling
3309Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
3310
3311Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07003312 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003313`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
3314 body: object, The request body.
3315 The object takes the form of:
3316
3317{ # Request message for ResumeQueue.
3318 }
3319
3320 x__xgafv: string, V1 error format.
3321 Allowed values
3322 1 - v1 error format
3323 2 - v2 error format
3324
3325Returns:
3326 An object of the form:
3327
3328 { # A queue is a container of related tasks. Queues are configured to manage
3329 # how those tasks are dispatched. Configurable properties include rate limits,
3330 # retry options, queue types, and others.
3331 "name": "A String", # Caller-specified and required in CreateQueue,
3332 # after which it becomes output only.
3333 #
3334 # The queue name.
3335 #
3336 # The queue name must have the following format:
3337 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
3338 #
3339 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3340 # hyphens (-), colons (:), or periods (.).
3341 # For more information, see
3342 # [Identifying
3343 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3344 # * `LOCATION_ID` is the canonical ID for the queue's location.
3345 # The list of available locations can be obtained by calling
3346 # ListLocations.
3347 # For more information, see https://cloud.google.com/about/locations/.
3348 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3349 # hyphens (-). The maximum length is 100 characters.
3350 "stackdriverLoggingConfig": { # Configuration options for writing logs to # Configuration options for writing logs to
3351 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
3352 # field is unset, then no logs are written.
3353 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3354 "samplingRatio": 3.14, # Specifies the fraction of operations to write to
3355 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3356 # This field may contain any value between 0.0 and 1.0, inclusive.
3357 # 0.0 is the default and means that no operations are logged.
3358 },
3359 "rateLimits": { # Rate limits. # Rate limits for task dispatches.
3360 #
3361 # rate_limits and retry_config are
3362 # related because they both control task attempts. However they control task
3363 # attempts in different ways:
3364 #
3365 # * rate_limits controls the total rate of
3366 # dispatches from a queue (i.e. all traffic dispatched from the
3367 # queue, regardless of whether the dispatch is from a first
3368 # attempt or a retry).
3369 # * retry_config controls what happens to
3370 # particular a task after its first attempt fails. That is,
3371 # retry_config controls task retries (the
3372 # second attempt, third attempt, etc).
3373 #
3374 # The queue's actual dispatch rate is the result of:
3375 #
3376 # * Number of tasks in the queue
3377 # * User-specified throttling: rate_limits,
3378 # retry_config, and the
3379 # queue's state.
3380 # * System throttling due to `429` (Too Many Requests) or `503` (Service
3381 # Unavailable) responses from the worker, high error rates, or to smooth
3382 # sudden large traffic spikes.
3383 #
3384 # This message determines the maximum rate that tasks can be dispatched by a
3385 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3386 #
3387 # Note: The debugging command, RunTask, will run a task
3388 # even if the queue has reached its RateLimits.
3389 "maxConcurrentDispatches": 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3390 # to be dispatched for this queue. After this threshold has been
3391 # reached, Cloud Tasks stops dispatching tasks until the number of
3392 # concurrent requests decreases.
3393 #
3394 # If unspecified when the queue is created, Cloud Tasks will pick the
3395 # default.
3396 #
3397 #
3398 # The maximum allowed value is 5,000.
3399 #
3400 #
3401 # This field has the same meaning as
3402 # [max_concurrent_requests in
3403 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
3404 "maxBurstSize": 42, # Output only. The max burst size.
3405 #
3406 # Max burst size limits how fast tasks in queue are processed when
3407 # many tasks are in the queue and the rate is high. This field
3408 # allows the queue to have a high rate so processing starts shortly
3409 # after a task is enqueued, but still limits resource usage when
3410 # many tasks are enqueued in a short period of time.
3411 #
3412 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3413 # algorithm is used to control the rate of task dispatches. Each
3414 # queue has a token bucket that holds tokens, up to the maximum
3415 # specified by `max_burst_size`. Each time a task is dispatched, a
3416 # token is removed from the bucket. Tasks will be dispatched until
3417 # the queue's bucket runs out of tokens. The bucket will be
3418 # continuously refilled with new tokens based on
3419 # max_dispatches_per_second.
3420 #
3421 # Cloud Tasks will pick the value of `max_burst_size` based on the
3422 # value of
3423 # max_dispatches_per_second.
3424 #
3425 # For App Engine queues that were created or updated using
3426 # `queue.yaml/xml`, `max_burst_size` is equal to
3427 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3428 # Since `max_burst_size` is output only, if
3429 # UpdateQueue is called on a queue
3430 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3431 # on the value of
3432 # max_dispatches_per_second,
3433 # regardless of whether
3434 # max_dispatches_per_second
3435 # is updated.
3436 "maxDispatchesPerSecond": 3.14, # The maximum rate at which tasks are dispatched from this queue.
3437 #
3438 # If unspecified when the queue is created, Cloud Tasks will pick the
3439 # default.
3440 #
3441 # * For App Engine queues, the maximum allowed value
3442 # is 500.
3443 #
3444 #
3445 # This field has the same meaning as
3446 # [rate in
3447 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
3448 },
3449 "state": "A String", # Output only. The state of the queue.
3450 #
3451 # `state` can only be changed by called
3452 # PauseQueue,
3453 # ResumeQueue, or uploading
3454 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3455 # UpdateQueue cannot be used to change `state`.
3456 "purgeTime": "A String", # Output only. The last time this queue was purged.
3457 #
3458 # All tasks that were created before this time
3459 # were purged.
3460 #
3461 # A queue can be purged using PurgeQueue, the
3462 # [App Engine Task Queue SDK, or the Cloud
3463 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
3464 #
3465 # Purge time will be truncated to the nearest microsecond. Purge
3466 # time will be unset if the queue has never been purged.
3467 "appEngineHttpQueue": { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
3468 # App Engine tasks in this queue.
3469 # Http tasks are not affected by this proto.
3470 #
3471 # The task will be delivered to the App Engine application hostname
3472 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
3473 # The documentation for AppEngineHttpRequest explains how the
3474 # task's host URL is constructed.
3475 #
3476 # Using AppEngineHttpQueue requires
3477 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3478 # Google IAM permission for the project
3479 # and the following scope:
3480 #
3481 # `https://www.googleapis.com/auth/cloud-platform`
3482 "appEngineRoutingOverride": { # App Engine Routing. # Overrides for the
3483 # task-level app_engine_routing.
3484 #
3485 # If set, `app_engine_routing_override` is used for all tasks in
3486 # the queue, no matter what the setting is for the
3487 # task-level app_engine_routing.
3488 #
3489 # Defines routing characteristics specific to App Engine - service, version,
3490 # and instance.
3491 #
3492 # For more information about services, versions, and instances see
3493 # [An Overview of App
3494 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3495 # [Microservices Architecture on Google App
3496 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3497 # [App Engine Standard request
3498 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3499 # and [App Engine Flex request
3500 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3501 "instance": "A String", # App instance.
3502 #
3503 # By default, the task is sent to an instance which is available when
3504 # the task is attempted.
3505 #
3506 # Requests can only be sent to a specific instance if
3507 # [manual scaling is used in App Engine
3508 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3509 # App Engine Flex does not support instances. For more information, see
3510 # [App Engine Standard request
3511 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3512 # and [App Engine Flex request
3513 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3514 "host": "A String", # Output only. The host that the task is sent to.
3515 #
3516 # The host is constructed from the domain name of the app associated with
Dan O'Mearadd494642020-05-01 07:42:23 -07003517 # the queue's project ID (for example &lt;app-id&gt;.appspot.com), and the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003518 # service, version,
3519 # and instance. Tasks which were created using
3520 # the App Engine SDK might have a custom domain name.
3521 #
3522 # For more information, see
3523 # [How Requests are
3524 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3525 "version": "A String", # App version.
3526 #
3527 # By default, the task is sent to the version which is the default
3528 # version when the task is attempted.
3529 #
3530 # For some queues or tasks which were created using the App Engine
3531 # Task Queue API, host is not parsable
3532 # into service,
3533 # version, and
3534 # instance. For example, some tasks
3535 # which were created using the App Engine SDK use a custom domain
3536 # name; custom domains are not parsed by Cloud Tasks. If
3537 # host is not parsable, then
3538 # service,
3539 # version, and
3540 # instance are the empty string.
3541 "service": "A String", # App service.
3542 #
3543 # By default, the task is sent to the service which is the default
3544 # service when the task is attempted.
3545 #
3546 # For some queues or tasks which were created using the App Engine
3547 # Task Queue API, host is not parsable
3548 # into service,
3549 # version, and
3550 # instance. For example, some tasks
3551 # which were created using the App Engine SDK use a custom domain
3552 # name; custom domains are not parsed by Cloud Tasks. If
3553 # host is not parsable, then
3554 # service,
3555 # version, and
3556 # instance are the empty string.
3557 },
3558 },
3559 "retryConfig": { # Retry config. # Settings that determine the retry behavior.
3560 #
3561 # * For tasks created using Cloud Tasks: the queue-level retry settings
3562 # apply to all tasks in the queue that were created using Cloud Tasks.
3563 # Retry settings cannot be set on individual tasks.
3564 # * For tasks created using the App Engine SDK: the queue-level retry
3565 # settings apply to all tasks in the queue which do not have retry settings
3566 # explicitly set on the task and were created by the App Engine SDK. See
3567 # [App Engine
3568 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3569 #
3570 # These settings determine when a failed task attempt is retried.
3571 "maxRetryDuration": "A String", # If positive, `max_retry_duration` specifies the time limit for
3572 # retrying a failed task, measured from when the task was first
3573 # attempted. Once `max_retry_duration` time has passed *and* the
3574 # task has been attempted max_attempts
3575 # times, no further attempts will be made and the task will be
3576 # deleted.
3577 #
3578 # If zero, then the task age is unlimited.
3579 #
3580 # If unspecified when the queue is created, Cloud Tasks will pick the
3581 # default.
3582 #
3583 #
3584 # `max_retry_duration` will be truncated to the nearest second.
3585 #
3586 # This field has the same meaning as
3587 # [task_age_limit in
3588 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3589 "maxDoublings": 42, # The time between retries will double `max_doublings` times.
3590 #
3591 # A task's retry interval starts at
3592 # min_backoff, then doubles
3593 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07003594 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003595 # max_backoff up to
3596 # max_attempts times.
3597 #
3598 # For example, if min_backoff is 10s,
3599 # max_backoff is 300s, and
3600 # `max_doublings` is 3, then the a task will first be retried in
3601 # 10s. The retry interval will double three times, and then
3602 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3603 # intervals of max_backoff until the
3604 # task has been attempted max_attempts
3605 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3606 # 240s, 300s, 300s, ....
3607 #
3608 # If unspecified when the queue is created, Cloud Tasks will pick the
3609 # default.
3610 #
3611 #
3612 # This field has the same meaning as
3613 # [max_doublings in
3614 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3615 "maxAttempts": 42, # Number of attempts per task.
3616 #
3617 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
3618 # first attempt fails, then there will be `max_attempts - 1` retries). Must
Dan O'Mearadd494642020-05-01 07:42:23 -07003619 # be &gt;= -1.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003620 #
3621 # If unspecified when the queue is created, Cloud Tasks will pick the
3622 # default.
3623 #
3624 # -1 indicates unlimited attempts.
3625 #
3626 # This field has the same meaning as
3627 # [task_retry_limit in
3628 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3629 "maxBackoff": "A String", # A task will be scheduled for retry between
3630 # min_backoff and
3631 # max_backoff duration after it fails,
3632 # if the queue's RetryConfig specifies that the task should be
3633 # retried.
3634 #
3635 # If unspecified when the queue is created, Cloud Tasks will pick the
3636 # default.
3637 #
3638 #
3639 # `max_backoff` will be truncated to the nearest second.
3640 #
3641 # This field has the same meaning as
3642 # [max_backoff_seconds in
3643 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3644 "minBackoff": "A String", # A task will be scheduled for retry between
3645 # min_backoff and
3646 # max_backoff duration after it fails,
3647 # if the queue's RetryConfig specifies that the task should be
3648 # retried.
3649 #
3650 # If unspecified when the queue is created, Cloud Tasks will pick the
3651 # default.
3652 #
3653 #
3654 # `min_backoff` will be truncated to the nearest second.
3655 #
3656 # This field has the same meaning as
3657 # [min_backoff_seconds in
3658 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3659 },
3660 }</pre>
3661</div>
3662
3663<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003664 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003665 <pre>Sets the access control policy for a Queue. Replaces any existing
3666policy.
3667
3668Note: The Cloud Console does not check queue-level IAM permissions yet.
3669Project-level permissions are required to use the Cloud Console.
3670
3671Authorization requires the following
3672[Google IAM](https://cloud.google.com/iam) permission on the specified
3673resource parent:
3674
3675* `cloudtasks.queues.setIamPolicy`
3676
3677Args:
3678 resource: string, REQUIRED: The resource for which the policy is being specified.
3679See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003680 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003681 The object takes the form of:
3682
3683{ # Request message for `SetIamPolicy` method.
Dan O'Mearadd494642020-05-01 07:42:23 -07003684 "policy": { # 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 -07003685 # the policy is limited to a few 10s of KB. An empty policy is a
3686 # valid policy but certain Cloud Platform services (such as Projects)
3687 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -07003688 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003689 #
3690 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003691 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
3692 # `members` to a single `role`. Members can be user accounts, service accounts,
3693 # Google groups, and domains (such as G Suite). A `role` is a named list of
3694 # permissions; each `role` can be an IAM predefined role or a user-created
3695 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003696 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003697 # Optionally, a `binding` can specify a `condition`, which is a logical
3698 # expression that allows access to a resource only if the expression evaluates
3699 # to `true`. A condition can add constraints based on attributes of the
3700 # request, the resource, or both.
3701 #
3702 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003703 #
3704 # {
3705 # "bindings": [
3706 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07003707 # "role": "roles/resourcemanager.organizationAdmin",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003708 # "members": [
3709 # "user:mike@example.com",
3710 # "group:admins@example.com",
3711 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -07003712 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003713 # ]
3714 # },
3715 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07003716 # "role": "roles/resourcemanager.organizationViewer",
3717 # "members": ["user:eve@example.com"],
3718 # "condition": {
3719 # "title": "expirable access",
3720 # "description": "Does not grant access after Sep 2020",
3721 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
3722 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003723 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07003724 # ],
3725 # "etag": "BwWWja0YfJA=",
3726 # "version": 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003727 # }
3728 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003729 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003730 #
3731 # bindings:
3732 # - members:
3733 # - user:mike@example.com
3734 # - group:admins@example.com
3735 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07003736 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
3737 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003738 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07003739 # - user:eve@example.com
3740 # role: roles/resourcemanager.organizationViewer
3741 # condition:
3742 # title: expirable access
3743 # description: Does not grant access after Sep 2020
3744 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
3745 # - etag: BwWWja0YfJA=
3746 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003747 #
3748 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07003749 # [IAM documentation](https://cloud.google.com/iam/docs/).
3750 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
3751 # `condition` that determines how and when the `bindings` are applied. Each
3752 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003753 { # Associates `members` with a `role`.
3754 "role": "A String", # Role that is assigned to `members`.
3755 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Dan O'Mearadd494642020-05-01 07:42:23 -07003756 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003757 # NOTE: An unsatisfied condition will not allow user access via current
3758 # binding. Different bindings, including their conditions, are examined
3759 # independently.
Dan O'Mearadd494642020-05-01 07:42:23 -07003760 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
3761 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003762 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003763 # Example (Comparison):
3764 #
3765 # title: "Summary size limit"
3766 # description: "Determines if a summary is less than 100 chars"
3767 # expression: "document.summary.size() &lt; 100"
3768 #
3769 # Example (Equality):
3770 #
3771 # title: "Requestor is owner"
3772 # description: "Determines if requestor is the document owner"
3773 # expression: "document.owner == request.auth.claims.email"
3774 #
3775 # Example (Logic):
3776 #
3777 # title: "Public documents"
3778 # description: "Determine whether the document should be publicly visible"
3779 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
3780 #
3781 # Example (Data Manipulation):
3782 #
3783 # title: "Notification string"
3784 # description: "Create a notification string with a timestamp."
3785 # expression: "'New message received at ' + string(document.create_time)"
3786 #
3787 # The exact variables and functions that may be referenced within an expression
3788 # are determined by the service that evaluates it. See the service
3789 # documentation for additional information.
3790 "description": "A String", # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003791 # describes the expression, e.g. when hovered over it in a UI.
Dan O'Mearadd494642020-05-01 07:42:23 -07003792 "expression": "A String", # Textual representation of an expression in Common Expression Language
3793 # syntax.
3794 "location": "A String", # Optional. String indicating the location of the expression for error
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003795 # reporting, e.g. a file name and a position in the file.
Dan O'Mearadd494642020-05-01 07:42:23 -07003796 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003797 # its purpose. This can be used e.g. in UIs which allow to enter the
3798 # expression.
3799 },
3800 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
3801 # `members` can have the following values:
3802 #
3803 # * `allUsers`: A special identifier that represents anyone who is
3804 # on the internet; with or without a Google account.
3805 #
3806 # * `allAuthenticatedUsers`: A special identifier that represents anyone
3807 # who is authenticated with a Google account or a service account.
3808 #
3809 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07003810 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003811 #
3812 #
3813 # * `serviceAccount:{emailid}`: An email address that represents a service
3814 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
3815 #
3816 # * `group:{emailid}`: An email address that represents a Google group.
3817 # For example, `admins@example.com`.
3818 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003819 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
3820 # identifier) representing a user that has been recently deleted. For
3821 # example, `alice@example.com?uid=123456789012345678901`. If the user is
3822 # recovered, this value reverts to `user:{emailid}` and the recovered user
3823 # retains the role in the binding.
3824 #
3825 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
3826 # unique identifier) representing a service account that has been recently
3827 # deleted. For example,
3828 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
3829 # If the service account is undeleted, this value reverts to
3830 # `serviceAccount:{emailid}` and the undeleted service account retains the
3831 # role in the binding.
3832 #
3833 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
3834 # identifier) representing a Google group that has been recently
3835 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
3836 # the group is recovered, this value reverts to `group:{emailid}` and the
3837 # recovered group retains the role in the binding.
3838 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003839 #
3840 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
3841 # users of that domain. For example, `google.com` or `example.com`.
3842 #
3843 "A String",
3844 ],
3845 },
3846 ],
3847 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
3848 # prevent simultaneous updates of a policy from overwriting each other.
3849 # It is strongly suggested that systems make use of the `etag` in the
3850 # read-modify-write cycle to perform policy updates in order to avoid race
3851 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
3852 # systems are expected to put that etag in the request to `setIamPolicy` to
3853 # ensure that their change will be applied to the same version of the policy.
3854 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003855 # **Important:** If you use IAM Conditions, you must include the `etag` field
3856 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3857 # you to overwrite a version `3` policy with a version `1` policy, and all of
3858 # the conditions in the version `3` policy are lost.
3859 "version": 42, # Specifies the format of the policy.
3860 #
3861 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
3862 # are rejected.
3863 #
3864 # Any operation that affects conditional role bindings must specify version
3865 # `3`. This requirement applies to the following operations:
3866 #
3867 # * Getting a policy that includes a conditional role binding
3868 # * Adding a conditional role binding to a policy
3869 # * Changing a conditional role binding in a policy
3870 # * Removing any role binding, with or without a condition, from a policy
3871 # that includes conditions
3872 #
3873 # **Important:** If you use IAM Conditions, you must include the `etag` field
3874 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3875 # you to overwrite a version `3` policy with a version `1` policy, and all of
3876 # the conditions in the version `3` policy are lost.
3877 #
3878 # If a policy does not include any conditions, operations on that policy may
3879 # specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003880 },
3881 }
3882
3883 x__xgafv: string, V1 error format.
3884 Allowed values
3885 1 - v1 error format
3886 2 - v2 error format
3887
3888Returns:
3889 An object of the form:
3890
Dan O'Mearadd494642020-05-01 07:42:23 -07003891 { # An Identity and Access Management (IAM) policy, which specifies access
3892 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003893 #
3894 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003895 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
3896 # `members` to a single `role`. Members can be user accounts, service accounts,
3897 # Google groups, and domains (such as G Suite). A `role` is a named list of
3898 # permissions; each `role` can be an IAM predefined role or a user-created
3899 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003900 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003901 # Optionally, a `binding` can specify a `condition`, which is a logical
3902 # expression that allows access to a resource only if the expression evaluates
3903 # to `true`. A condition can add constraints based on attributes of the
3904 # request, the resource, or both.
3905 #
3906 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003907 #
3908 # {
3909 # "bindings": [
3910 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07003911 # "role": "roles/resourcemanager.organizationAdmin",
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003912 # "members": [
3913 # "user:mike@example.com",
3914 # "group:admins@example.com",
3915 # "domain:google.com",
Dan O'Mearadd494642020-05-01 07:42:23 -07003916 # "serviceAccount:my-project-id@appspot.gserviceaccount.com"
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003917 # ]
3918 # },
3919 # {
Dan O'Mearadd494642020-05-01 07:42:23 -07003920 # "role": "roles/resourcemanager.organizationViewer",
3921 # "members": ["user:eve@example.com"],
3922 # "condition": {
3923 # "title": "expirable access",
3924 # "description": "Does not grant access after Sep 2020",
3925 # "expression": "request.time &lt; timestamp('2020-10-01T00:00:00.000Z')",
3926 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003927 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07003928 # ],
3929 # "etag": "BwWWja0YfJA=",
3930 # "version": 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003931 # }
3932 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003933 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003934 #
3935 # bindings:
3936 # - members:
3937 # - user:mike@example.com
3938 # - group:admins@example.com
3939 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07003940 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
3941 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003942 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07003943 # - user:eve@example.com
3944 # role: roles/resourcemanager.organizationViewer
3945 # condition:
3946 # title: expirable access
3947 # description: Does not grant access after Sep 2020
3948 # expression: request.time &lt; timestamp('2020-10-01T00:00:00.000Z')
3949 # - etag: BwWWja0YfJA=
3950 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003951 #
3952 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07003953 # [IAM documentation](https://cloud.google.com/iam/docs/).
3954 "bindings": [ # Associates a list of `members` to a `role`. Optionally, may specify a
3955 # `condition` that determines how and when the `bindings` are applied. Each
3956 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003957 { # Associates `members` with a `role`.
3958 "role": "A String", # Role that is assigned to `members`.
3959 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Dan O'Mearadd494642020-05-01 07:42:23 -07003960 "condition": { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003961 # NOTE: An unsatisfied condition will not allow user access via current
3962 # binding. Different bindings, including their conditions, are examined
3963 # independently.
Dan O'Mearadd494642020-05-01 07:42:23 -07003964 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
3965 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003966 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003967 # Example (Comparison):
3968 #
3969 # title: "Summary size limit"
3970 # description: "Determines if a summary is less than 100 chars"
3971 # expression: "document.summary.size() &lt; 100"
3972 #
3973 # Example (Equality):
3974 #
3975 # title: "Requestor is owner"
3976 # description: "Determines if requestor is the document owner"
3977 # expression: "document.owner == request.auth.claims.email"
3978 #
3979 # Example (Logic):
3980 #
3981 # title: "Public documents"
3982 # description: "Determine whether the document should be publicly visible"
3983 # expression: "document.type != 'private' &amp;&amp; document.type != 'internal'"
3984 #
3985 # Example (Data Manipulation):
3986 #
3987 # title: "Notification string"
3988 # description: "Create a notification string with a timestamp."
3989 # expression: "'New message received at ' + string(document.create_time)"
3990 #
3991 # The exact variables and functions that may be referenced within an expression
3992 # are determined by the service that evaluates it. See the service
3993 # documentation for additional information.
3994 "description": "A String", # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003995 # describes the expression, e.g. when hovered over it in a UI.
Dan O'Mearadd494642020-05-01 07:42:23 -07003996 "expression": "A String", # Textual representation of an expression in Common Expression Language
3997 # syntax.
3998 "location": "A String", # Optional. String indicating the location of the expression for error
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003999 # reporting, e.g. a file name and a position in the file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004000 "title": "A String", # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004001 # its purpose. This can be used e.g. in UIs which allow to enter the
4002 # expression.
4003 },
4004 "members": [ # Specifies the identities requesting access for a Cloud Platform resource.
4005 # `members` can have the following values:
4006 #
4007 # * `allUsers`: A special identifier that represents anyone who is
4008 # on the internet; with or without a Google account.
4009 #
4010 # * `allAuthenticatedUsers`: A special identifier that represents anyone
4011 # who is authenticated with a Google account or a service account.
4012 #
4013 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07004014 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004015 #
4016 #
4017 # * `serviceAccount:{emailid}`: An email address that represents a service
4018 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
4019 #
4020 # * `group:{emailid}`: An email address that represents a Google group.
4021 # For example, `admins@example.com`.
4022 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004023 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
4024 # identifier) representing a user that has been recently deleted. For
4025 # example, `alice@example.com?uid=123456789012345678901`. If the user is
4026 # recovered, this value reverts to `user:{emailid}` and the recovered user
4027 # retains the role in the binding.
4028 #
4029 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
4030 # unique identifier) representing a service account that has been recently
4031 # deleted. For example,
4032 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
4033 # If the service account is undeleted, this value reverts to
4034 # `serviceAccount:{emailid}` and the undeleted service account retains the
4035 # role in the binding.
4036 #
4037 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
4038 # identifier) representing a Google group that has been recently
4039 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
4040 # the group is recovered, this value reverts to `group:{emailid}` and the
4041 # recovered group retains the role in the binding.
4042 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004043 #
4044 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
4045 # users of that domain. For example, `google.com` or `example.com`.
4046 #
4047 "A String",
4048 ],
4049 },
4050 ],
4051 "etag": "A String", # `etag` is used for optimistic concurrency control as a way to help
4052 # prevent simultaneous updates of a policy from overwriting each other.
4053 # It is strongly suggested that systems make use of the `etag` in the
4054 # read-modify-write cycle to perform policy updates in order to avoid race
4055 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
4056 # systems are expected to put that etag in the request to `setIamPolicy` to
4057 # ensure that their change will be applied to the same version of the policy.
4058 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004059 # **Important:** If you use IAM Conditions, you must include the `etag` field
4060 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4061 # you to overwrite a version `3` policy with a version `1` policy, and all of
4062 # the conditions in the version `3` policy are lost.
4063 "version": 42, # Specifies the format of the policy.
4064 #
4065 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
4066 # are rejected.
4067 #
4068 # Any operation that affects conditional role bindings must specify version
4069 # `3`. This requirement applies to the following operations:
4070 #
4071 # * Getting a policy that includes a conditional role binding
4072 # * Adding a conditional role binding to a policy
4073 # * Changing a conditional role binding in a policy
4074 # * Removing any role binding, with or without a condition, from a policy
4075 # that includes conditions
4076 #
4077 # **Important:** If you use IAM Conditions, you must include the `etag` field
4078 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4079 # you to overwrite a version `3` policy with a version `1` policy, and all of
4080 # the conditions in the version `3` policy are lost.
4081 #
4082 # If a policy does not include any conditions, operations on that policy may
4083 # specify any valid version or leave the field unset.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004084 }</pre>
4085</div>
4086
4087<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004088 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004089 <pre>Returns permissions that a caller has on a Queue.
4090If the resource does not exist, this will return an empty set of
4091permissions, not a NOT_FOUND error.
4092
4093Note: This operation is designed to be used for building permission-aware
4094UIs and command-line tools, not for authorization checking. This operation
4095may "fail open" without warning.
4096
4097Args:
4098 resource: string, REQUIRED: The resource for which the policy detail is being requested.
4099See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004100 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004101 The object takes the form of:
4102
4103{ # Request message for `TestIamPermissions` method.
4104 "permissions": [ # The set of permissions to check for the `resource`. Permissions with
4105 # wildcards (such as '*' or 'storage.*') are not allowed. For more
4106 # information see
4107 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
4108 "A String",
4109 ],
4110 }
4111
4112 x__xgafv: string, V1 error format.
4113 Allowed values
4114 1 - v1 error format
4115 2 - v2 error format
4116
4117Returns:
4118 An object of the form:
4119
4120 { # Response message for `TestIamPermissions` method.
4121 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is
4122 # allowed.
4123 "A String",
4124 ],
4125 }</pre>
4126</div>
4127
4128</body></html>