blob: 11d0f4106d5ef4b29507f6e9a078e7611dfdd0be [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">
Bu Sun Kim65020912020-05-20 12:08:20 -070095 <code><a href="#list">list(parent, pageToken=None, pageSize=None, filter=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096<p class="firstline">Lists queues.</p>
97<p class="toc_element">
98 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
99<p class="firstline">Retrieves the next page of results.</p>
100<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700101 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102<p class="firstline">Updates a queue.</p>
103<p class="toc_element">
104 <code><a href="#pause">pause(name, body=None, x__xgafv=None)</a></code></p>
105<p class="firstline">Pauses the queue.</p>
106<p class="toc_element">
107 <code><a href="#purge">purge(name, body=None, x__xgafv=None)</a></code></p>
108<p class="firstline">Purges a queue by deleting all of its tasks.</p>
109<p class="toc_element">
110 <code><a href="#resume">resume(name, body=None, x__xgafv=None)</a></code></p>
111<p class="firstline">Resume a queue.</p>
112<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700113 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114<p class="firstline">Sets the access control policy for a Queue. Replaces any existing</p>
115<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700116 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117<p class="firstline">Returns permissions that a caller has on a Queue.</p>
118<h3>Method Details</h3>
119<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121 <pre>Creates a queue.
122
123Queues created with this method allow tasks to live for a maximum of 31
124days. After a task is 31 days old, the task will be deleted regardless of whether
125it was dispatched or not.
126
127WARNING: Using this method may have unintended side effects if you are
128using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
129Read
130[Overview of Queue Management and
131queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
132this method.
133
134Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 parent: string, Required. The location name in which the queue will be created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136For example: `projects/PROJECT_ID/locations/LOCATION_ID`
137
138The list of allowed locations can be obtained by calling Cloud
Bu Sun Kim65020912020-05-20 12:08:20 -0700139Tasks&#x27; implementation of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700140ListLocations. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 The object takes the form of:
143
144{ # A queue is a container of related tasks. Queues are configured to manage
145 # how those tasks are dispatched. Configurable properties include rate limits,
146 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
148 #
149 # rate_limits and retry_config are
150 # related because they both control task attempts. However they control task
151 # attempts in different ways:
152 #
153 # * rate_limits controls the total rate of
154 # dispatches from a queue (i.e. all traffic dispatched from the
155 # queue, regardless of whether the dispatch is from a first
156 # attempt or a retry).
157 # * retry_config controls what happens to
158 # particular a task after its first attempt fails. That is,
159 # retry_config controls task retries (the
160 # second attempt, third attempt, etc).
161 #
162 # The queue&#x27;s actual dispatch rate is the result of:
163 #
164 # * Number of tasks in the queue
165 # * User-specified throttling: rate_limits,
166 # retry_config, and the
167 # queue&#x27;s state.
168 # * System throttling due to `429` (Too Many Requests) or `503` (Service
169 # Unavailable) responses from the worker, high error rates, or to smooth
170 # sudden large traffic spikes.
171 #
172 # This message determines the maximum rate that tasks can be dispatched by a
173 # queue, regardless of whether the dispatch is a first task attempt or a retry.
174 #
175 # Note: The debugging command, RunTask, will run a task
176 # even if the queue has reached its RateLimits.
177 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700178 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700179 # Max burst size limits how fast tasks in queue are processed when
180 # many tasks are in the queue and the rate is high. This field
181 # allows the queue to have a high rate so processing starts shortly
182 # after a task is enqueued, but still limits resource usage when
183 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700184 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700185 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
186 # algorithm is used to control the rate of task dispatches. Each
187 # queue has a token bucket that holds tokens, up to the maximum
188 # specified by `max_burst_size`. Each time a task is dispatched, a
189 # token is removed from the bucket. Tasks will be dispatched until
190 # the queue&#x27;s bucket runs out of tokens. The bucket will be
191 # continuously refilled with new tokens based on
192 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700194 # Cloud Tasks will pick the value of `max_burst_size` based on the
195 # value of
196 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700197 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700198 # For App Engine queues that were created or updated using
199 # `queue.yaml/xml`, `max_burst_size` is equal to
200 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
201 # Since `max_burst_size` is output only, if
202 # UpdateQueue is called on a queue
203 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
204 # on the value of
205 # max_dispatches_per_second,
206 # regardless of whether
207 # max_dispatches_per_second
208 # is updated.
209 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
210 # to be dispatched for this queue. After this threshold has been
211 # reached, Cloud Tasks stops dispatching tasks until the number of
212 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700213 #
214 # If unspecified when the queue is created, Cloud Tasks will pick the
215 # default.
216 #
217 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700218 # The maximum allowed value is 5,000.
219 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220 #
221 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700222 # [max_concurrent_requests in
223 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
224 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700225 #
226 # If unspecified when the queue is created, Cloud Tasks will pick the
227 # default.
228 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700229 # * For App Engine queues, the maximum allowed value
230 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700231 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700232 #
233 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700234 # [rate in
235 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
236 },
237 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
238 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
239 # field is unset, then no logs are written.
240 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
241 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
242 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
243 # This field may contain any value between 0.0 and 1.0, inclusive.
244 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700245 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700246 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
247 # App Engine tasks in this queue.
248 # Http tasks are not affected by this proto.
249 #
250 # The task will be delivered to the App Engine application hostname
251 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
252 # The documentation for AppEngineHttpRequest explains how the
253 # task&#x27;s host URL is constructed.
254 #
255 # Using AppEngineHttpQueue requires
256 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
257 # Google IAM permission for the project
258 # and the following scope:
259 #
260 # `https://www.googleapis.com/auth/cloud-platform`
261 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
262 # task-level app_engine_routing.
263 #
264 # If set, `app_engine_routing_override` is used for all tasks in
265 # the queue, no matter what the setting is for the
266 # task-level app_engine_routing.
267 #
268 # Defines routing characteristics specific to App Engine - service, version,
269 # and instance.
270 #
271 # For more information about services, versions, and instances see
272 # [An Overview of App
273 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
274 # [Microservices Architecture on Google App
275 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
276 # [App Engine Standard request
277 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
278 # and [App Engine Flex request
279 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
280 &quot;service&quot;: &quot;A String&quot;, # App service.
281 #
282 # By default, the task is sent to the service which is the default
283 # service when the task is attempted.
284 #
285 # For some queues or tasks which were created using the App Engine
286 # Task Queue API, host is not parsable
287 # into service,
288 # version, and
289 # instance. For example, some tasks
290 # which were created using the App Engine SDK use a custom domain
291 # name; custom domains are not parsed by Cloud Tasks. If
292 # host is not parsable, then
293 # service,
294 # version, and
295 # instance are the empty string.
296 &quot;instance&quot;: &quot;A String&quot;, # App instance.
297 #
298 # By default, the task is sent to an instance which is available when
299 # the task is attempted.
300 #
301 # Requests can only be sent to a specific instance if
302 # [manual scaling is used in App Engine
303 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
304 # App Engine Flex does not support instances. For more information, see
305 # [App Engine Standard request
306 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
307 # and [App Engine Flex request
308 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
309 &quot;version&quot;: &quot;A String&quot;, # App version.
310 #
311 # By default, the task is sent to the version which is the default
312 # version when the task is attempted.
313 #
314 # For some queues or tasks which were created using the App Engine
315 # Task Queue API, host is not parsable
316 # into service,
317 # version, and
318 # instance. For example, some tasks
319 # which were created using the App Engine SDK use a custom domain
320 # name; custom domains are not parsed by Cloud Tasks. If
321 # host is not parsable, then
322 # service,
323 # version, and
324 # instance are the empty string.
325 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
326 #
327 # The host is constructed from the domain name of the app associated with
328 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
329 # service, version,
330 # and instance. Tasks which were created using
331 # the App Engine SDK might have a custom domain name.
332 #
333 # For more information, see
334 # [How Requests are
335 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
336 },
337 },
338 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
339 #
340 # All tasks that were created before this time
341 # were purged.
342 #
343 # A queue can be purged using PurgeQueue, the
344 # [App Engine Task Queue SDK, or the Cloud
345 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
346 #
347 # Purge time will be truncated to the nearest microsecond. Purge
348 # time will be unset if the queue has never been purged.
349 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
350 #
351 # * For tasks created using Cloud Tasks: the queue-level retry settings
352 # apply to all tasks in the queue that were created using Cloud Tasks.
353 # Retry settings cannot be set on individual tasks.
354 # * For tasks created using the App Engine SDK: the queue-level retry
355 # settings apply to all tasks in the queue which do not have retry settings
356 # explicitly set on the task and were created by the App Engine SDK. See
357 # [App Engine
358 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
359 #
360 # These settings determine when a failed task attempt is retried.
361 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
362 # retrying a failed task, measured from when the task was first
363 # attempted. Once `max_retry_duration` time has passed *and* the
364 # task has been attempted max_attempts
365 # times, no further attempts will be made and the task will be
366 # deleted.
367 #
368 # If zero, then the task age is unlimited.
369 #
370 # If unspecified when the queue is created, Cloud Tasks will pick the
371 # default.
372 #
373 #
374 # `max_retry_duration` will be truncated to the nearest second.
375 #
376 # This field has the same meaning as
377 # [task_age_limit in
378 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
379 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
380 #
381 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
382 # first attempt fails, then there will be `max_attempts - 1` retries). Must
383 # be &gt;= -1.
384 #
385 # If unspecified when the queue is created, Cloud Tasks will pick the
386 # default.
387 #
388 # -1 indicates unlimited attempts.
389 #
390 # This field has the same meaning as
391 # [task_retry_limit in
392 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
393 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
394 #
395 # A task&#x27;s retry interval starts at
396 # min_backoff, then doubles
397 # `max_doublings` times, then increases linearly, and finally
398 # retries at intervals of
399 # max_backoff up to
400 # max_attempts times.
401 #
402 # For example, if min_backoff is 10s,
403 # max_backoff is 300s, and
404 # `max_doublings` is 3, then the a task will first be retried in
405 # 10s. The retry interval will double three times, and then
406 # increase linearly by 2^3 * 10s. Finally, the task will retry at
407 # intervals of max_backoff until the
408 # task has been attempted max_attempts
409 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
410 # 240s, 300s, 300s, ....
411 #
412 # If unspecified when the queue is created, Cloud Tasks will pick the
413 # default.
414 #
415 #
416 # This field has the same meaning as
417 # [max_doublings in
418 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
419 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
420 # min_backoff and
421 # max_backoff duration after it fails,
422 # if the queue&#x27;s RetryConfig specifies that the task should be
423 # retried.
424 #
425 # If unspecified when the queue is created, Cloud Tasks will pick the
426 # default.
427 #
428 #
429 # `min_backoff` will be truncated to the nearest second.
430 #
431 # This field has the same meaning as
432 # [min_backoff_seconds in
433 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
434 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
435 # min_backoff and
436 # max_backoff duration after it fails,
437 # if the queue&#x27;s RetryConfig specifies that the task should be
438 # retried.
439 #
440 # If unspecified when the queue is created, Cloud Tasks will pick the
441 # default.
442 #
443 #
444 # `max_backoff` will be truncated to the nearest second.
445 #
446 # This field has the same meaning as
447 # [max_backoff_seconds in
448 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
449 },
450 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
451 #
452 # `state` can only be changed by called
453 # PauseQueue,
454 # ResumeQueue, or uploading
455 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
456 # UpdateQueue cannot be used to change `state`.
457 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
458 # after which it becomes output only.
459 #
460 # The queue name.
461 #
462 # The queue name must have the following format:
463 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
464 #
465 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
466 # hyphens (-), colons (:), or periods (.).
467 # For more information, see
468 # [Identifying
469 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
470 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
471 # The list of available locations can be obtained by calling
472 # ListLocations.
473 # For more information, see https://cloud.google.com/about/locations/.
474 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
475 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700476}
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700489 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
490 #
491 # rate_limits and retry_config are
492 # related because they both control task attempts. However they control task
493 # attempts in different ways:
494 #
495 # * rate_limits controls the total rate of
496 # dispatches from a queue (i.e. all traffic dispatched from the
497 # queue, regardless of whether the dispatch is from a first
498 # attempt or a retry).
499 # * retry_config controls what happens to
500 # particular a task after its first attempt fails. That is,
501 # retry_config controls task retries (the
502 # second attempt, third attempt, etc).
503 #
504 # The queue&#x27;s actual dispatch rate is the result of:
505 #
506 # * Number of tasks in the queue
507 # * User-specified throttling: rate_limits,
508 # retry_config, and the
509 # queue&#x27;s state.
510 # * System throttling due to `429` (Too Many Requests) or `503` (Service
511 # Unavailable) responses from the worker, high error rates, or to smooth
512 # sudden large traffic spikes.
513 #
514 # This message determines the maximum rate that tasks can be dispatched by a
515 # queue, regardless of whether the dispatch is a first task attempt or a retry.
516 #
517 # Note: The debugging command, RunTask, will run a task
518 # even if the queue has reached its RateLimits.
519 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700520 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700521 # Max burst size limits how fast tasks in queue are processed when
522 # many tasks are in the queue and the rate is high. This field
523 # allows the queue to have a high rate so processing starts shortly
524 # after a task is enqueued, but still limits resource usage when
525 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700526 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700527 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
528 # algorithm is used to control the rate of task dispatches. Each
529 # queue has a token bucket that holds tokens, up to the maximum
530 # specified by `max_burst_size`. Each time a task is dispatched, a
531 # token is removed from the bucket. Tasks will be dispatched until
532 # the queue&#x27;s bucket runs out of tokens. The bucket will be
533 # continuously refilled with new tokens based on
534 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700535 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700536 # Cloud Tasks will pick the value of `max_burst_size` based on the
537 # value of
538 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700539 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700540 # For App Engine queues that were created or updated using
541 # `queue.yaml/xml`, `max_burst_size` is equal to
542 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
543 # Since `max_burst_size` is output only, if
544 # UpdateQueue is called on a queue
545 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
546 # on the value of
547 # max_dispatches_per_second,
548 # regardless of whether
549 # max_dispatches_per_second
550 # is updated.
551 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
552 # to be dispatched for this queue. After this threshold has been
553 # reached, Cloud Tasks stops dispatching tasks until the number of
554 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700555 #
556 # If unspecified when the queue is created, Cloud Tasks will pick the
557 # default.
558 #
559 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700560 # The maximum allowed value is 5,000.
561 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700562 #
563 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700564 # [max_concurrent_requests in
565 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
566 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700567 #
568 # If unspecified when the queue is created, Cloud Tasks will pick the
569 # default.
570 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700571 # * For App Engine queues, the maximum allowed value
572 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700573 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700574 #
575 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700576 # [rate in
577 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
578 },
579 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
580 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
581 # field is unset, then no logs are written.
582 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
583 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
584 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
585 # This field may contain any value between 0.0 and 1.0, inclusive.
586 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700587 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700588 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
589 # App Engine tasks in this queue.
590 # Http tasks are not affected by this proto.
591 #
592 # The task will be delivered to the App Engine application hostname
593 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
594 # The documentation for AppEngineHttpRequest explains how the
595 # task&#x27;s host URL is constructed.
596 #
597 # Using AppEngineHttpQueue requires
598 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
599 # Google IAM permission for the project
600 # and the following scope:
601 #
602 # `https://www.googleapis.com/auth/cloud-platform`
603 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
604 # task-level app_engine_routing.
605 #
606 # If set, `app_engine_routing_override` is used for all tasks in
607 # the queue, no matter what the setting is for the
608 # task-level app_engine_routing.
609 #
610 # Defines routing characteristics specific to App Engine - service, version,
611 # and instance.
612 #
613 # For more information about services, versions, and instances see
614 # [An Overview of App
615 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
616 # [Microservices Architecture on Google App
617 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
618 # [App Engine Standard request
619 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
620 # and [App Engine Flex request
621 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
622 &quot;service&quot;: &quot;A String&quot;, # App service.
623 #
624 # By default, the task is sent to the service which is the default
625 # service when the task is attempted.
626 #
627 # For some queues or tasks which were created using the App Engine
628 # Task Queue API, host is not parsable
629 # into service,
630 # version, and
631 # instance. For example, some tasks
632 # which were created using the App Engine SDK use a custom domain
633 # name; custom domains are not parsed by Cloud Tasks. If
634 # host is not parsable, then
635 # service,
636 # version, and
637 # instance are the empty string.
638 &quot;instance&quot;: &quot;A String&quot;, # App instance.
639 #
640 # By default, the task is sent to an instance which is available when
641 # the task is attempted.
642 #
643 # Requests can only be sent to a specific instance if
644 # [manual scaling is used in App Engine
645 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
646 # App Engine Flex does not support instances. For more information, see
647 # [App Engine Standard request
648 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
649 # and [App Engine Flex request
650 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
651 &quot;version&quot;: &quot;A String&quot;, # App version.
652 #
653 # By default, the task is sent to the version which is the default
654 # version when the task is attempted.
655 #
656 # For some queues or tasks which were created using the App Engine
657 # Task Queue API, host is not parsable
658 # into service,
659 # version, and
660 # instance. For example, some tasks
661 # which were created using the App Engine SDK use a custom domain
662 # name; custom domains are not parsed by Cloud Tasks. If
663 # host is not parsable, then
664 # service,
665 # version, and
666 # instance are the empty string.
667 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
668 #
669 # The host is constructed from the domain name of the app associated with
670 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
671 # service, version,
672 # and instance. Tasks which were created using
673 # the App Engine SDK might have a custom domain name.
674 #
675 # For more information, see
676 # [How Requests are
677 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
678 },
679 },
680 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
681 #
682 # All tasks that were created before this time
683 # were purged.
684 #
685 # A queue can be purged using PurgeQueue, the
686 # [App Engine Task Queue SDK, or the Cloud
687 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
688 #
689 # Purge time will be truncated to the nearest microsecond. Purge
690 # time will be unset if the queue has never been purged.
691 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
692 #
693 # * For tasks created using Cloud Tasks: the queue-level retry settings
694 # apply to all tasks in the queue that were created using Cloud Tasks.
695 # Retry settings cannot be set on individual tasks.
696 # * For tasks created using the App Engine SDK: the queue-level retry
697 # settings apply to all tasks in the queue which do not have retry settings
698 # explicitly set on the task and were created by the App Engine SDK. See
699 # [App Engine
700 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
701 #
702 # These settings determine when a failed task attempt is retried.
703 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
704 # retrying a failed task, measured from when the task was first
705 # attempted. Once `max_retry_duration` time has passed *and* the
706 # task has been attempted max_attempts
707 # times, no further attempts will be made and the task will be
708 # deleted.
709 #
710 # If zero, then the task age is unlimited.
711 #
712 # If unspecified when the queue is created, Cloud Tasks will pick the
713 # default.
714 #
715 #
716 # `max_retry_duration` will be truncated to the nearest second.
717 #
718 # This field has the same meaning as
719 # [task_age_limit in
720 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
721 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
722 #
723 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
724 # first attempt fails, then there will be `max_attempts - 1` retries). Must
725 # be &gt;= -1.
726 #
727 # If unspecified when the queue is created, Cloud Tasks will pick the
728 # default.
729 #
730 # -1 indicates unlimited attempts.
731 #
732 # This field has the same meaning as
733 # [task_retry_limit in
734 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
735 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
736 #
737 # A task&#x27;s retry interval starts at
738 # min_backoff, then doubles
739 # `max_doublings` times, then increases linearly, and finally
740 # retries at intervals of
741 # max_backoff up to
742 # max_attempts times.
743 #
744 # For example, if min_backoff is 10s,
745 # max_backoff is 300s, and
746 # `max_doublings` is 3, then the a task will first be retried in
747 # 10s. The retry interval will double three times, and then
748 # increase linearly by 2^3 * 10s. Finally, the task will retry at
749 # intervals of max_backoff until the
750 # task has been attempted max_attempts
751 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
752 # 240s, 300s, 300s, ....
753 #
754 # If unspecified when the queue is created, Cloud Tasks will pick the
755 # default.
756 #
757 #
758 # This field has the same meaning as
759 # [max_doublings in
760 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
761 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
762 # min_backoff and
763 # max_backoff duration after it fails,
764 # if the queue&#x27;s RetryConfig specifies that the task should be
765 # retried.
766 #
767 # If unspecified when the queue is created, Cloud Tasks will pick the
768 # default.
769 #
770 #
771 # `min_backoff` will be truncated to the nearest second.
772 #
773 # This field has the same meaning as
774 # [min_backoff_seconds in
775 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
776 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
777 # min_backoff and
778 # max_backoff duration after it fails,
779 # if the queue&#x27;s RetryConfig specifies that the task should be
780 # retried.
781 #
782 # If unspecified when the queue is created, Cloud Tasks will pick the
783 # default.
784 #
785 #
786 # `max_backoff` will be truncated to the nearest second.
787 #
788 # This field has the same meaning as
789 # [max_backoff_seconds in
790 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
791 },
792 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
793 #
794 # `state` can only be changed by called
795 # PauseQueue,
796 # ResumeQueue, or uploading
797 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
798 # UpdateQueue cannot be used to change `state`.
799 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
800 # after which it becomes output only.
801 #
802 # The queue name.
803 #
804 # The queue name must have the following format:
805 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
806 #
807 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
808 # hyphens (-), colons (:), or periods (.).
809 # For more information, see
810 # [Identifying
811 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
812 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
813 # The list of available locations can be obtained by calling
814 # ListLocations.
815 # For more information, see https://cloud.google.com/about/locations/.
816 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
817 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700818 }</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
Bu Sun Kim65020912020-05-20 12:08:20 -0700827Note: If you delete a queue, a queue with the same name can&#x27;t be created
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700828for 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700878 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
879 #
880 # rate_limits and retry_config are
881 # related because they both control task attempts. However they control task
882 # attempts in different ways:
883 #
884 # * rate_limits controls the total rate of
885 # dispatches from a queue (i.e. all traffic dispatched from the
886 # queue, regardless of whether the dispatch is from a first
887 # attempt or a retry).
888 # * retry_config controls what happens to
889 # particular a task after its first attempt fails. That is,
890 # retry_config controls task retries (the
891 # second attempt, third attempt, etc).
892 #
893 # The queue&#x27;s actual dispatch rate is the result of:
894 #
895 # * Number of tasks in the queue
896 # * User-specified throttling: rate_limits,
897 # retry_config, and the
898 # queue&#x27;s state.
899 # * System throttling due to `429` (Too Many Requests) or `503` (Service
900 # Unavailable) responses from the worker, high error rates, or to smooth
901 # sudden large traffic spikes.
902 #
903 # This message determines the maximum rate that tasks can be dispatched by a
904 # queue, regardless of whether the dispatch is a first task attempt or a retry.
905 #
906 # Note: The debugging command, RunTask, will run a task
907 # even if the queue has reached its RateLimits.
908 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700909 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700910 # Max burst size limits how fast tasks in queue are processed when
911 # many tasks are in the queue and the rate is high. This field
912 # allows the queue to have a high rate so processing starts shortly
913 # after a task is enqueued, but still limits resource usage when
914 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700915 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700916 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
917 # algorithm is used to control the rate of task dispatches. Each
918 # queue has a token bucket that holds tokens, up to the maximum
919 # specified by `max_burst_size`. Each time a task is dispatched, a
920 # token is removed from the bucket. Tasks will be dispatched until
921 # the queue&#x27;s bucket runs out of tokens. The bucket will be
922 # continuously refilled with new tokens based on
923 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700924 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700925 # Cloud Tasks will pick the value of `max_burst_size` based on the
926 # value of
927 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700928 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700929 # For App Engine queues that were created or updated using
930 # `queue.yaml/xml`, `max_burst_size` is equal to
931 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
932 # Since `max_burst_size` is output only, if
933 # UpdateQueue is called on a queue
934 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
935 # on the value of
936 # max_dispatches_per_second,
937 # regardless of whether
938 # max_dispatches_per_second
939 # is updated.
940 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
941 # to be dispatched for this queue. After this threshold has been
942 # reached, Cloud Tasks stops dispatching tasks until the number of
943 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700944 #
945 # If unspecified when the queue is created, Cloud Tasks will pick the
946 # default.
947 #
948 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700949 # The maximum allowed value is 5,000.
950 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700951 #
952 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700953 # [max_concurrent_requests in
954 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
955 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700956 #
957 # If unspecified when the queue is created, Cloud Tasks will pick the
958 # default.
959 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700960 # * For App Engine queues, the maximum allowed value
961 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700962 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700963 #
964 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700965 # [rate in
966 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
967 },
968 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
969 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
970 # field is unset, then no logs are written.
971 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
972 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
973 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
974 # This field may contain any value between 0.0 and 1.0, inclusive.
975 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700976 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700977 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
978 # App Engine tasks in this queue.
979 # Http tasks are not affected by this proto.
980 #
981 # The task will be delivered to the App Engine application hostname
982 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
983 # The documentation for AppEngineHttpRequest explains how the
984 # task&#x27;s host URL is constructed.
985 #
986 # Using AppEngineHttpQueue requires
987 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
988 # Google IAM permission for the project
989 # and the following scope:
990 #
991 # `https://www.googleapis.com/auth/cloud-platform`
992 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
993 # task-level app_engine_routing.
994 #
995 # If set, `app_engine_routing_override` is used for all tasks in
996 # the queue, no matter what the setting is for the
997 # task-level app_engine_routing.
998 #
999 # Defines routing characteristics specific to App Engine - service, version,
1000 # and instance.
1001 #
1002 # For more information about services, versions, and instances see
1003 # [An Overview of App
1004 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1005 # [Microservices Architecture on Google App
1006 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1007 # [App Engine Standard request
1008 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1009 # and [App Engine Flex request
1010 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1011 &quot;service&quot;: &quot;A String&quot;, # App service.
1012 #
1013 # By default, the task is sent to the service which is the default
1014 # service when the task is attempted.
1015 #
1016 # For some queues or tasks which were created using the App Engine
1017 # Task Queue API, host is not parsable
1018 # into service,
1019 # version, and
1020 # instance. For example, some tasks
1021 # which were created using the App Engine SDK use a custom domain
1022 # name; custom domains are not parsed by Cloud Tasks. If
1023 # host is not parsable, then
1024 # service,
1025 # version, and
1026 # instance are the empty string.
1027 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1028 #
1029 # By default, the task is sent to an instance which is available when
1030 # the task is attempted.
1031 #
1032 # Requests can only be sent to a specific instance if
1033 # [manual scaling is used in App Engine
1034 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1035 # App Engine Flex does not support instances. For more information, see
1036 # [App Engine Standard request
1037 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1038 # and [App Engine Flex request
1039 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1040 &quot;version&quot;: &quot;A String&quot;, # App version.
1041 #
1042 # By default, the task is sent to the version which is the default
1043 # version when the task is attempted.
1044 #
1045 # For some queues or tasks which were created using the App Engine
1046 # Task Queue API, host is not parsable
1047 # into service,
1048 # version, and
1049 # instance. For example, some tasks
1050 # which were created using the App Engine SDK use a custom domain
1051 # name; custom domains are not parsed by Cloud Tasks. If
1052 # host is not parsable, then
1053 # service,
1054 # version, and
1055 # instance are the empty string.
1056 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1057 #
1058 # The host is constructed from the domain name of the app associated with
1059 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1060 # service, version,
1061 # and instance. Tasks which were created using
1062 # the App Engine SDK might have a custom domain name.
1063 #
1064 # For more information, see
1065 # [How Requests are
1066 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1067 },
1068 },
1069 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
1070 #
1071 # All tasks that were created before this time
1072 # were purged.
1073 #
1074 # A queue can be purged using PurgeQueue, the
1075 # [App Engine Task Queue SDK, or the Cloud
1076 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
1077 #
1078 # Purge time will be truncated to the nearest microsecond. Purge
1079 # time will be unset if the queue has never been purged.
1080 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
1081 #
1082 # * For tasks created using Cloud Tasks: the queue-level retry settings
1083 # apply to all tasks in the queue that were created using Cloud Tasks.
1084 # Retry settings cannot be set on individual tasks.
1085 # * For tasks created using the App Engine SDK: the queue-level retry
1086 # settings apply to all tasks in the queue which do not have retry settings
1087 # explicitly set on the task and were created by the App Engine SDK. See
1088 # [App Engine
1089 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
1090 #
1091 # These settings determine when a failed task attempt is retried.
1092 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
1093 # retrying a failed task, measured from when the task was first
1094 # attempted. Once `max_retry_duration` time has passed *and* the
1095 # task has been attempted max_attempts
1096 # times, no further attempts will be made and the task will be
1097 # deleted.
1098 #
1099 # If zero, then the task age is unlimited.
1100 #
1101 # If unspecified when the queue is created, Cloud Tasks will pick the
1102 # default.
1103 #
1104 #
1105 # `max_retry_duration` will be truncated to the nearest second.
1106 #
1107 # This field has the same meaning as
1108 # [task_age_limit in
1109 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1110 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
1111 #
1112 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
1113 # first attempt fails, then there will be `max_attempts - 1` retries). Must
1114 # be &gt;= -1.
1115 #
1116 # If unspecified when the queue is created, Cloud Tasks will pick the
1117 # default.
1118 #
1119 # -1 indicates unlimited attempts.
1120 #
1121 # This field has the same meaning as
1122 # [task_retry_limit in
1123 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1124 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
1125 #
1126 # A task&#x27;s retry interval starts at
1127 # min_backoff, then doubles
1128 # `max_doublings` times, then increases linearly, and finally
1129 # retries at intervals of
1130 # max_backoff up to
1131 # max_attempts times.
1132 #
1133 # For example, if min_backoff is 10s,
1134 # max_backoff is 300s, and
1135 # `max_doublings` is 3, then the a task will first be retried in
1136 # 10s. The retry interval will double three times, and then
1137 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1138 # intervals of max_backoff until the
1139 # task has been attempted max_attempts
1140 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1141 # 240s, 300s, 300s, ....
1142 #
1143 # If unspecified when the queue is created, Cloud Tasks will pick the
1144 # default.
1145 #
1146 #
1147 # This field has the same meaning as
1148 # [max_doublings in
1149 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1150 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1151 # min_backoff and
1152 # max_backoff duration after it fails,
1153 # if the queue&#x27;s RetryConfig specifies that the task should be
1154 # retried.
1155 #
1156 # If unspecified when the queue is created, Cloud Tasks will pick the
1157 # default.
1158 #
1159 #
1160 # `min_backoff` will be truncated to the nearest second.
1161 #
1162 # This field has the same meaning as
1163 # [min_backoff_seconds in
1164 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1165 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1166 # min_backoff and
1167 # max_backoff duration after it fails,
1168 # if the queue&#x27;s RetryConfig specifies that the task should be
1169 # retried.
1170 #
1171 # If unspecified when the queue is created, Cloud Tasks will pick the
1172 # default.
1173 #
1174 #
1175 # `max_backoff` will be truncated to the nearest second.
1176 #
1177 # This field has the same meaning as
1178 # [max_backoff_seconds in
1179 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1180 },
1181 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
1182 #
1183 # `state` can only be changed by called
1184 # PauseQueue,
1185 # ResumeQueue, or uploading
1186 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
1187 # UpdateQueue cannot be used to change `state`.
1188 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
1189 # after which it becomes output only.
1190 #
1191 # The queue name.
1192 #
1193 # The queue name must have the following format:
1194 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1195 #
1196 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1197 # hyphens (-), colons (:), or periods (.).
1198 # For more information, see
1199 # [Identifying
1200 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1201 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
1202 # The list of available locations can be obtained by calling
1203 # ListLocations.
1204 # For more information, see https://cloud.google.com/about/locations/.
1205 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1206 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001207 }</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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001229 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
Dan O'Mearadd494642020-05-01 07:42:23 -07001230 # `GetIamPolicy`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001231 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.
Dan O'Mearadd494642020-05-01 07:42:23 -07001232 #
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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001239 #
1240 # To learn which resources support conditions in their IAM policies, see the
1241 # [IAM
1242 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001243 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001244 }
1245
1246 x__xgafv: string, V1 error format.
1247 Allowed values
1248 1 - v1 error format
1249 2 - v2 error format
1250
1251Returns:
1252 An object of the form:
1253
Dan O'Mearadd494642020-05-01 07:42:23 -07001254 { # An Identity and Access Management (IAM) policy, which specifies access
1255 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001256 #
1257 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001258 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1259 # `members` to a single `role`. Members can be user accounts, service accounts,
1260 # Google groups, and domains (such as G Suite). A `role` is a named list of
1261 # permissions; each `role` can be an IAM predefined role or a user-created
1262 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001263 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001264 # For some types of Google Cloud resources, a `binding` can also specify a
1265 # `condition`, which is a logical expression that allows access to a resource
1266 # only if the expression evaluates to `true`. A condition can add constraints
1267 # based on attributes of the request, the resource, or both. To learn which
1268 # resources support conditions in their IAM policies, see the
1269 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001270 #
1271 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001272 #
1273 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001274 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001275 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001276 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1277 # &quot;members&quot;: [
1278 # &quot;user:mike@example.com&quot;,
1279 # &quot;group:admins@example.com&quot;,
1280 # &quot;domain:google.com&quot;,
1281 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001282 # ]
1283 # },
1284 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001285 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1286 # &quot;members&quot;: [
1287 # &quot;user:eve@example.com&quot;
1288 # ],
1289 # &quot;condition&quot;: {
1290 # &quot;title&quot;: &quot;expirable access&quot;,
1291 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1292 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001293 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001294 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001295 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001296 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1297 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001298 # }
1299 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001300 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001301 #
1302 # bindings:
1303 # - members:
1304 # - user:mike@example.com
1305 # - group:admins@example.com
1306 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001307 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1308 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001309 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001310 # - user:eve@example.com
1311 # role: roles/resourcemanager.organizationViewer
1312 # condition:
1313 # title: expirable access
1314 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001315 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001316 # - etag: BwWWja0YfJA=
1317 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001318 #
1319 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001320 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001321 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001322 # `condition` that determines how and when the `bindings` are applied. Each
1323 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001324 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001325 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
1326 # `members` can have the following values:
1327 #
1328 # * `allUsers`: A special identifier that represents anyone who is
1329 # on the internet; with or without a Google account.
1330 #
1331 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1332 # who is authenticated with a Google account or a service account.
1333 #
1334 # * `user:{emailid}`: An email address that represents a specific Google
1335 # account. For example, `alice@example.com` .
1336 #
1337 #
1338 # * `serviceAccount:{emailid}`: An email address that represents a service
1339 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1340 #
1341 # * `group:{emailid}`: An email address that represents a Google group.
1342 # For example, `admins@example.com`.
1343 #
1344 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1345 # identifier) representing a user that has been recently deleted. For
1346 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1347 # recovered, this value reverts to `user:{emailid}` and the recovered user
1348 # retains the role in the binding.
1349 #
1350 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1351 # unique identifier) representing a service account that has been recently
1352 # deleted. For example,
1353 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1354 # If the service account is undeleted, this value reverts to
1355 # `serviceAccount:{emailid}` and the undeleted service account retains the
1356 # role in the binding.
1357 #
1358 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1359 # identifier) representing a Google group that has been recently
1360 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1361 # the group is recovered, this value reverts to `group:{emailid}` and the
1362 # recovered group retains the role in the binding.
1363 #
1364 #
1365 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1366 # users of that domain. For example, `google.com` or `example.com`.
1367 #
1368 &quot;A String&quot;,
1369 ],
1370 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1371 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001372 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1373 #
1374 # If the condition evaluates to `true`, then this binding applies to the
1375 # current request.
1376 #
1377 # If the condition evaluates to `false`, then this binding does not apply to
1378 # the current request. However, a different role binding might grant the same
1379 # role to one or more of the members in this binding.
1380 #
1381 # To learn which resources support conditions in their IAM policies, see the
1382 # [IAM
1383 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001384 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1385 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001386 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001387 # Example (Comparison):
1388 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001389 # title: &quot;Summary size limit&quot;
1390 # description: &quot;Determines if a summary is less than 100 chars&quot;
1391 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001392 #
1393 # Example (Equality):
1394 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001395 # title: &quot;Requestor is owner&quot;
1396 # description: &quot;Determines if requestor is the document owner&quot;
1397 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001398 #
1399 # Example (Logic):
1400 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001401 # title: &quot;Public documents&quot;
1402 # description: &quot;Determine whether the document should be publicly visible&quot;
1403 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001404 #
1405 # Example (Data Manipulation):
1406 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001407 # title: &quot;Notification string&quot;
1408 # description: &quot;Create a notification string with a timestamp.&quot;
1409 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001410 #
1411 # The exact variables and functions that may be referenced within an expression
1412 # are determined by the service that evaluates it. See the service
1413 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001414 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001415 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07001416 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
Dan O'Mearadd494642020-05-01 07:42:23 -07001417 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07001418 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001419 # its purpose. This can be used e.g. in UIs which allow to enter the
1420 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07001421 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1422 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001423 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001424 },
1425 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001426 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001427 # prevent simultaneous updates of a policy from overwriting each other.
1428 # It is strongly suggested that systems make use of the `etag` in the
1429 # read-modify-write cycle to perform policy updates in order to avoid race
1430 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1431 # systems are expected to put that etag in the request to `setIamPolicy` to
1432 # ensure that their change will be applied to the same version of the policy.
1433 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001434 # **Important:** If you use IAM Conditions, you must include the `etag` field
1435 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1436 # you to overwrite a version `3` policy with a version `1` policy, and all of
1437 # the conditions in the version `3` policy are lost.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001438 &quot;version&quot;: 42, # Specifies the format of the policy.
1439 #
1440 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1441 # are rejected.
1442 #
1443 # Any operation that affects conditional role bindings must specify version
1444 # `3`. This requirement applies to the following operations:
1445 #
1446 # * Getting a policy that includes a conditional role binding
1447 # * Adding a conditional role binding to a policy
1448 # * Changing a conditional role binding in a policy
1449 # * Removing any role binding, with or without a condition, from a policy
1450 # that includes conditions
1451 #
1452 # **Important:** If you use IAM Conditions, you must include the `etag` field
1453 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1454 # you to overwrite a version `3` policy with a version `1` policy, and all of
1455 # the conditions in the version `3` policy are lost.
1456 #
1457 # If a policy does not include any conditions, operations on that policy may
1458 # specify any valid version or leave the field unset.
1459 #
1460 # To learn which resources support conditions in their IAM policies, see the
1461 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001462 }</pre>
1463</div>
1464
1465<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001466 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, filter=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001467 <pre>Lists queues.
1468
1469Queues are returned in lexicographical order.
1470
1471Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001472 parent: string, Required. The location name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001473For example: `projects/PROJECT_ID/locations/LOCATION_ID` (required)
1474 pageToken: string, A token identifying the page of results to return.
1475
1476To request the first page results, page_token must be empty. To
1477request the next page of results, page_token must be the value of
1478next_page_token returned
1479from the previous call to ListQueues
1480method. It is an error to switch the value of the
1481filter while iterating through pages.
Bu Sun Kim65020912020-05-20 12:08:20 -07001482 pageSize: integer, Requested page size.
1483
1484The maximum page size is 9800. If unspecified, the page size will
1485be the maximum. Fewer queues than requested might be returned,
1486even if more queues exist; use the
1487next_page_token in the
1488response to determine if more queues exist.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001489 filter: string, `filter` can be used to specify a subset of queues. Any Queue
1490field can be used as a filter and several operators as supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07001491For example: `&lt;=, &lt;, &gt;=, &gt;, !=, =, :`. The filter syntax is the same as
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492described in
Bu Sun Kim65020912020-05-20 12:08:20 -07001493[Stackdriver&#x27;s Advanced Logs
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001494Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
1495
Bu Sun Kim65020912020-05-20 12:08:20 -07001496Sample filter &quot;state: PAUSED&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001497
1498Note that using filters might cause fewer queues than the
1499requested page_size to be returned.
Bu Sun Kim65020912020-05-20 12:08:20 -07001500 x__xgafv: string, V1 error format.
1501 Allowed values
1502 1 - v1 error format
1503 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001504
1505Returns:
1506 An object of the form:
1507
1508 { # Response message for ListQueues.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001509 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results.
1510 #
1511 # To return the next page of results, call
1512 # ListQueues with this value as the
1513 # page_token.
1514 #
1515 # If the next_page_token is empty, there are no more results.
1516 #
1517 # The page token is valid for only 2 hours.
Bu Sun Kim65020912020-05-20 12:08:20 -07001518 &quot;queues&quot;: [ # The list of queues.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001519 { # A queue is a container of related tasks. Queues are configured to manage
1520 # how those tasks are dispatched. Configurable properties include rate limits,
1521 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07001522 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
1523 #
1524 # rate_limits and retry_config are
1525 # related because they both control task attempts. However they control task
1526 # attempts in different ways:
1527 #
1528 # * rate_limits controls the total rate of
1529 # dispatches from a queue (i.e. all traffic dispatched from the
1530 # queue, regardless of whether the dispatch is from a first
1531 # attempt or a retry).
1532 # * retry_config controls what happens to
1533 # particular a task after its first attempt fails. That is,
1534 # retry_config controls task retries (the
1535 # second attempt, third attempt, etc).
1536 #
1537 # The queue&#x27;s actual dispatch rate is the result of:
1538 #
1539 # * Number of tasks in the queue
1540 # * User-specified throttling: rate_limits,
1541 # retry_config, and the
1542 # queue&#x27;s state.
1543 # * System throttling due to `429` (Too Many Requests) or `503` (Service
1544 # Unavailable) responses from the worker, high error rates, or to smooth
1545 # sudden large traffic spikes.
1546 #
1547 # This message determines the maximum rate that tasks can be dispatched by a
1548 # queue, regardless of whether the dispatch is a first task attempt or a retry.
1549 #
1550 # Note: The debugging command, RunTask, will run a task
1551 # even if the queue has reached its RateLimits.
1552 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001553 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001554 # Max burst size limits how fast tasks in queue are processed when
1555 # many tasks are in the queue and the rate is high. This field
1556 # allows the queue to have a high rate so processing starts shortly
1557 # after a task is enqueued, but still limits resource usage when
1558 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001559 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001560 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1561 # algorithm is used to control the rate of task dispatches. Each
1562 # queue has a token bucket that holds tokens, up to the maximum
1563 # specified by `max_burst_size`. Each time a task is dispatched, a
1564 # token is removed from the bucket. Tasks will be dispatched until
1565 # the queue&#x27;s bucket runs out of tokens. The bucket will be
1566 # continuously refilled with new tokens based on
1567 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001568 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001569 # Cloud Tasks will pick the value of `max_burst_size` based on the
1570 # value of
1571 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001572 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001573 # For App Engine queues that were created or updated using
1574 # `queue.yaml/xml`, `max_burst_size` is equal to
1575 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1576 # Since `max_burst_size` is output only, if
1577 # UpdateQueue is called on a queue
1578 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
1579 # on the value of
1580 # max_dispatches_per_second,
1581 # regardless of whether
1582 # max_dispatches_per_second
1583 # is updated.
1584 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
1585 # to be dispatched for this queue. After this threshold has been
1586 # reached, Cloud Tasks stops dispatching tasks until the number of
1587 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001588 #
1589 # If unspecified when the queue is created, Cloud Tasks will pick the
1590 # default.
1591 #
1592 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001593 # The maximum allowed value is 5,000.
1594 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001595 #
1596 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07001597 # [max_concurrent_requests in
1598 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
1599 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001600 #
1601 # If unspecified when the queue is created, Cloud Tasks will pick the
1602 # default.
1603 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001604 # * For App Engine queues, the maximum allowed value
1605 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001606 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001607 #
1608 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07001609 # [rate in
1610 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
1611 },
1612 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
1613 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
1614 # field is unset, then no logs are written.
1615 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1616 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
1617 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1618 # This field may contain any value between 0.0 and 1.0, inclusive.
1619 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001620 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001621 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
1622 # App Engine tasks in this queue.
1623 # Http tasks are not affected by this proto.
1624 #
1625 # The task will be delivered to the App Engine application hostname
1626 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
1627 # The documentation for AppEngineHttpRequest explains how the
1628 # task&#x27;s host URL is constructed.
1629 #
1630 # Using AppEngineHttpQueue requires
1631 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1632 # Google IAM permission for the project
1633 # and the following scope:
1634 #
1635 # `https://www.googleapis.com/auth/cloud-platform`
1636 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
1637 # task-level app_engine_routing.
1638 #
1639 # If set, `app_engine_routing_override` is used for all tasks in
1640 # the queue, no matter what the setting is for the
1641 # task-level app_engine_routing.
1642 #
1643 # Defines routing characteristics specific to App Engine - service, version,
1644 # and instance.
1645 #
1646 # For more information about services, versions, and instances see
1647 # [An Overview of App
1648 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1649 # [Microservices Architecture on Google App
1650 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1651 # [App Engine Standard request
1652 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1653 # and [App Engine Flex request
1654 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1655 &quot;service&quot;: &quot;A String&quot;, # App service.
1656 #
1657 # By default, the task is sent to the service which is the default
1658 # service when the task is attempted.
1659 #
1660 # For some queues or tasks which were created using the App Engine
1661 # Task Queue API, host is not parsable
1662 # into service,
1663 # version, and
1664 # instance. For example, some tasks
1665 # which were created using the App Engine SDK use a custom domain
1666 # name; custom domains are not parsed by Cloud Tasks. If
1667 # host is not parsable, then
1668 # service,
1669 # version, and
1670 # instance are the empty string.
1671 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1672 #
1673 # By default, the task is sent to an instance which is available when
1674 # the task is attempted.
1675 #
1676 # Requests can only be sent to a specific instance if
1677 # [manual scaling is used in App Engine
1678 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1679 # App Engine Flex does not support instances. For more information, see
1680 # [App Engine Standard request
1681 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1682 # and [App Engine Flex request
1683 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1684 &quot;version&quot;: &quot;A String&quot;, # App version.
1685 #
1686 # By default, the task is sent to the version which is the default
1687 # version when the task is attempted.
1688 #
1689 # For some queues or tasks which were created using the App Engine
1690 # Task Queue API, host is not parsable
1691 # into service,
1692 # version, and
1693 # instance. For example, some tasks
1694 # which were created using the App Engine SDK use a custom domain
1695 # name; custom domains are not parsed by Cloud Tasks. If
1696 # host is not parsable, then
1697 # service,
1698 # version, and
1699 # instance are the empty string.
1700 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1701 #
1702 # The host is constructed from the domain name of the app associated with
1703 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1704 # service, version,
1705 # and instance. Tasks which were created using
1706 # the App Engine SDK might have a custom domain name.
1707 #
1708 # For more information, see
1709 # [How Requests are
1710 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1711 },
1712 },
1713 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
1714 #
1715 # All tasks that were created before this time
1716 # were purged.
1717 #
1718 # A queue can be purged using PurgeQueue, the
1719 # [App Engine Task Queue SDK, or the Cloud
1720 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
1721 #
1722 # Purge time will be truncated to the nearest microsecond. Purge
1723 # time will be unset if the queue has never been purged.
1724 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
1725 #
1726 # * For tasks created using Cloud Tasks: the queue-level retry settings
1727 # apply to all tasks in the queue that were created using Cloud Tasks.
1728 # Retry settings cannot be set on individual tasks.
1729 # * For tasks created using the App Engine SDK: the queue-level retry
1730 # settings apply to all tasks in the queue which do not have retry settings
1731 # explicitly set on the task and were created by the App Engine SDK. See
1732 # [App Engine
1733 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
1734 #
1735 # These settings determine when a failed task attempt is retried.
1736 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
1737 # retrying a failed task, measured from when the task was first
1738 # attempted. Once `max_retry_duration` time has passed *and* the
1739 # task has been attempted max_attempts
1740 # times, no further attempts will be made and the task will be
1741 # deleted.
1742 #
1743 # If zero, then the task age is unlimited.
1744 #
1745 # If unspecified when the queue is created, Cloud Tasks will pick the
1746 # default.
1747 #
1748 #
1749 # `max_retry_duration` will be truncated to the nearest second.
1750 #
1751 # This field has the same meaning as
1752 # [task_age_limit in
1753 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1754 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
1755 #
1756 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
1757 # first attempt fails, then there will be `max_attempts - 1` retries). Must
1758 # be &gt;= -1.
1759 #
1760 # If unspecified when the queue is created, Cloud Tasks will pick the
1761 # default.
1762 #
1763 # -1 indicates unlimited attempts.
1764 #
1765 # This field has the same meaning as
1766 # [task_retry_limit in
1767 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1768 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
1769 #
1770 # A task&#x27;s retry interval starts at
1771 # min_backoff, then doubles
1772 # `max_doublings` times, then increases linearly, and finally
1773 # retries at intervals of
1774 # max_backoff up to
1775 # max_attempts times.
1776 #
1777 # For example, if min_backoff is 10s,
1778 # max_backoff is 300s, and
1779 # `max_doublings` is 3, then the a task will first be retried in
1780 # 10s. The retry interval will double three times, and then
1781 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1782 # intervals of max_backoff until the
1783 # task has been attempted max_attempts
1784 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1785 # 240s, 300s, 300s, ....
1786 #
1787 # If unspecified when the queue is created, Cloud Tasks will pick the
1788 # default.
1789 #
1790 #
1791 # This field has the same meaning as
1792 # [max_doublings in
1793 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1794 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1795 # min_backoff and
1796 # max_backoff duration after it fails,
1797 # if the queue&#x27;s RetryConfig specifies that the task should be
1798 # retried.
1799 #
1800 # If unspecified when the queue is created, Cloud Tasks will pick the
1801 # default.
1802 #
1803 #
1804 # `min_backoff` will be truncated to the nearest second.
1805 #
1806 # This field has the same meaning as
1807 # [min_backoff_seconds in
1808 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1809 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1810 # min_backoff and
1811 # max_backoff duration after it fails,
1812 # if the queue&#x27;s RetryConfig specifies that the task should be
1813 # retried.
1814 #
1815 # If unspecified when the queue is created, Cloud Tasks will pick the
1816 # default.
1817 #
1818 #
1819 # `max_backoff` will be truncated to the nearest second.
1820 #
1821 # This field has the same meaning as
1822 # [max_backoff_seconds in
1823 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1824 },
1825 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
1826 #
1827 # `state` can only be changed by called
1828 # PauseQueue,
1829 # ResumeQueue, or uploading
1830 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
1831 # UpdateQueue cannot be used to change `state`.
1832 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
1833 # after which it becomes output only.
1834 #
1835 # The queue name.
1836 #
1837 # The queue name must have the following format:
1838 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1839 #
1840 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1841 # hyphens (-), colons (:), or periods (.).
1842 # For more information, see
1843 # [Identifying
1844 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1845 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
1846 # The list of available locations can be obtained by calling
1847 # ListLocations.
1848 # For more information, see https://cloud.google.com/about/locations/.
1849 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1850 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001851 },
1852 ],
1853 }</pre>
1854</div>
1855
1856<div class="method">
1857 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1858 <pre>Retrieves the next page of results.
1859
1860Args:
1861 previous_request: The request for the previous page. (required)
1862 previous_response: The response from the request for the previous page. (required)
1863
1864Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001865 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001866 page. Returns None if there are no more items in the collection.
1867 </pre>
1868</div>
1869
1870<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001871 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001872 <pre>Updates a queue.
1873
1874This method creates the queue if it does not exist and updates
1875the queue if it does exist.
1876
1877Queues created with this method allow tasks to live for a maximum of 31
1878days. After a task is 31 days old, the task will be deleted regardless of whether
1879it was dispatched or not.
1880
1881WARNING: Using this method may have unintended side effects if you are
1882using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
1883Read
1884[Overview of Queue Management and
1885queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
1886this method.
1887
1888Args:
1889 name: string, Caller-specified and required in CreateQueue,
1890after which it becomes output only.
1891
1892The queue name.
1893
1894The queue name must have the following format:
1895`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1896
1897* `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1898 hyphens (-), colons (:), or periods (.).
1899 For more information, see
1900 [Identifying
1901 projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -07001902* `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001903 The list of available locations can be obtained by calling
1904 ListLocations.
1905 For more information, see https://cloud.google.com/about/locations/.
1906* `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1907 hyphens (-). The maximum length is 100 characters. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001908 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001909 The object takes the form of:
1910
1911{ # A queue is a container of related tasks. Queues are configured to manage
1912 # how those tasks are dispatched. Configurable properties include rate limits,
1913 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07001914 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
1915 #
1916 # rate_limits and retry_config are
1917 # related because they both control task attempts. However they control task
1918 # attempts in different ways:
1919 #
1920 # * rate_limits controls the total rate of
1921 # dispatches from a queue (i.e. all traffic dispatched from the
1922 # queue, regardless of whether the dispatch is from a first
1923 # attempt or a retry).
1924 # * retry_config controls what happens to
1925 # particular a task after its first attempt fails. That is,
1926 # retry_config controls task retries (the
1927 # second attempt, third attempt, etc).
1928 #
1929 # The queue&#x27;s actual dispatch rate is the result of:
1930 #
1931 # * Number of tasks in the queue
1932 # * User-specified throttling: rate_limits,
1933 # retry_config, and the
1934 # queue&#x27;s state.
1935 # * System throttling due to `429` (Too Many Requests) or `503` (Service
1936 # Unavailable) responses from the worker, high error rates, or to smooth
1937 # sudden large traffic spikes.
1938 #
1939 # This message determines the maximum rate that tasks can be dispatched by a
1940 # queue, regardless of whether the dispatch is a first task attempt or a retry.
1941 #
1942 # Note: The debugging command, RunTask, will run a task
1943 # even if the queue has reached its RateLimits.
1944 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001945 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001946 # Max burst size limits how fast tasks in queue are processed when
1947 # many tasks are in the queue and the rate is high. This field
1948 # allows the queue to have a high rate so processing starts shortly
1949 # after a task is enqueued, but still limits resource usage when
1950 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001951 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001952 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1953 # algorithm is used to control the rate of task dispatches. Each
1954 # queue has a token bucket that holds tokens, up to the maximum
1955 # specified by `max_burst_size`. Each time a task is dispatched, a
1956 # token is removed from the bucket. Tasks will be dispatched until
1957 # the queue&#x27;s bucket runs out of tokens. The bucket will be
1958 # continuously refilled with new tokens based on
1959 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001960 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001961 # Cloud Tasks will pick the value of `max_burst_size` based on the
1962 # value of
1963 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001964 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001965 # For App Engine queues that were created or updated using
1966 # `queue.yaml/xml`, `max_burst_size` is equal to
1967 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1968 # Since `max_burst_size` is output only, if
1969 # UpdateQueue is called on a queue
1970 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
1971 # on the value of
1972 # max_dispatches_per_second,
1973 # regardless of whether
1974 # max_dispatches_per_second
1975 # is updated.
1976 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
1977 # to be dispatched for this queue. After this threshold has been
1978 # reached, Cloud Tasks stops dispatching tasks until the number of
1979 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001980 #
1981 # If unspecified when the queue is created, Cloud Tasks will pick the
1982 # default.
1983 #
1984 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001985 # The maximum allowed value is 5,000.
1986 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001987 #
1988 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07001989 # [max_concurrent_requests in
1990 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
1991 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001992 #
1993 # If unspecified when the queue is created, Cloud Tasks will pick the
1994 # default.
1995 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001996 # * For App Engine queues, the maximum allowed value
1997 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001998 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001999 #
2000 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002001 # [rate in
2002 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2003 },
2004 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
2005 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2006 # field is unset, then no logs are written.
2007 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2008 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
2009 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2010 # This field may contain any value between 0.0 and 1.0, inclusive.
2011 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002012 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002013 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
2014 # App Engine tasks in this queue.
2015 # Http tasks are not affected by this proto.
2016 #
2017 # The task will be delivered to the App Engine application hostname
2018 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
2019 # The documentation for AppEngineHttpRequest explains how the
2020 # task&#x27;s host URL is constructed.
2021 #
2022 # Using AppEngineHttpQueue requires
2023 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2024 # Google IAM permission for the project
2025 # and the following scope:
2026 #
2027 # `https://www.googleapis.com/auth/cloud-platform`
2028 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
2029 # task-level app_engine_routing.
2030 #
2031 # If set, `app_engine_routing_override` is used for all tasks in
2032 # the queue, no matter what the setting is for the
2033 # task-level app_engine_routing.
2034 #
2035 # Defines routing characteristics specific to App Engine - service, version,
2036 # and instance.
2037 #
2038 # For more information about services, versions, and instances see
2039 # [An Overview of App
2040 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2041 # [Microservices Architecture on Google App
2042 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2043 # [App Engine Standard request
2044 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2045 # and [App Engine Flex request
2046 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2047 &quot;service&quot;: &quot;A String&quot;, # App service.
2048 #
2049 # By default, the task is sent to the service which is the default
2050 # service when the task is attempted.
2051 #
2052 # For some queues or tasks which were created using the App Engine
2053 # Task Queue API, host is not parsable
2054 # into service,
2055 # version, and
2056 # instance. For example, some tasks
2057 # which were created using the App Engine SDK use a custom domain
2058 # name; custom domains are not parsed by Cloud Tasks. If
2059 # host is not parsable, then
2060 # service,
2061 # version, and
2062 # instance are the empty string.
2063 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2064 #
2065 # By default, the task is sent to an instance which is available when
2066 # the task is attempted.
2067 #
2068 # Requests can only be sent to a specific instance if
2069 # [manual scaling is used in App Engine
2070 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2071 # App Engine Flex does not support instances. For more information, see
2072 # [App Engine Standard request
2073 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2074 # and [App Engine Flex request
2075 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2076 &quot;version&quot;: &quot;A String&quot;, # App version.
2077 #
2078 # By default, the task is sent to the version which is the default
2079 # version when the task is attempted.
2080 #
2081 # For some queues or tasks which were created using the App Engine
2082 # Task Queue API, host is not parsable
2083 # into service,
2084 # version, and
2085 # instance. For example, some tasks
2086 # which were created using the App Engine SDK use a custom domain
2087 # name; custom domains are not parsed by Cloud Tasks. If
2088 # host is not parsable, then
2089 # service,
2090 # version, and
2091 # instance are the empty string.
2092 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2093 #
2094 # The host is constructed from the domain name of the app associated with
2095 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2096 # service, version,
2097 # and instance. Tasks which were created using
2098 # the App Engine SDK might have a custom domain name.
2099 #
2100 # For more information, see
2101 # [How Requests are
2102 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2103 },
2104 },
2105 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
2106 #
2107 # All tasks that were created before this time
2108 # were purged.
2109 #
2110 # A queue can be purged using PurgeQueue, the
2111 # [App Engine Task Queue SDK, or the Cloud
2112 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2113 #
2114 # Purge time will be truncated to the nearest microsecond. Purge
2115 # time will be unset if the queue has never been purged.
2116 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
2117 #
2118 # * For tasks created using Cloud Tasks: the queue-level retry settings
2119 # apply to all tasks in the queue that were created using Cloud Tasks.
2120 # Retry settings cannot be set on individual tasks.
2121 # * For tasks created using the App Engine SDK: the queue-level retry
2122 # settings apply to all tasks in the queue which do not have retry settings
2123 # explicitly set on the task and were created by the App Engine SDK. See
2124 # [App Engine
2125 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2126 #
2127 # These settings determine when a failed task attempt is retried.
2128 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2129 # retrying a failed task, measured from when the task was first
2130 # attempted. Once `max_retry_duration` time has passed *and* the
2131 # task has been attempted max_attempts
2132 # times, no further attempts will be made and the task will be
2133 # deleted.
2134 #
2135 # If zero, then the task age is unlimited.
2136 #
2137 # If unspecified when the queue is created, Cloud Tasks will pick the
2138 # default.
2139 #
2140 #
2141 # `max_retry_duration` will be truncated to the nearest second.
2142 #
2143 # This field has the same meaning as
2144 # [task_age_limit in
2145 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2146 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
2147 #
2148 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2149 # first attempt fails, then there will be `max_attempts - 1` retries). Must
2150 # be &gt;= -1.
2151 #
2152 # If unspecified when the queue is created, Cloud Tasks will pick the
2153 # default.
2154 #
2155 # -1 indicates unlimited attempts.
2156 #
2157 # This field has the same meaning as
2158 # [task_retry_limit in
2159 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2160 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2161 #
2162 # A task&#x27;s retry interval starts at
2163 # min_backoff, then doubles
2164 # `max_doublings` times, then increases linearly, and finally
2165 # retries at intervals of
2166 # max_backoff up to
2167 # max_attempts times.
2168 #
2169 # For example, if min_backoff is 10s,
2170 # max_backoff is 300s, and
2171 # `max_doublings` is 3, then the a task will first be retried in
2172 # 10s. The retry interval will double three times, and then
2173 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2174 # intervals of max_backoff until the
2175 # task has been attempted max_attempts
2176 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2177 # 240s, 300s, 300s, ....
2178 #
2179 # If unspecified when the queue is created, Cloud Tasks will pick the
2180 # default.
2181 #
2182 #
2183 # This field has the same meaning as
2184 # [max_doublings in
2185 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2186 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2187 # min_backoff and
2188 # max_backoff duration after it fails,
2189 # if the queue&#x27;s RetryConfig specifies that the task should be
2190 # retried.
2191 #
2192 # If unspecified when the queue is created, Cloud Tasks will pick the
2193 # default.
2194 #
2195 #
2196 # `min_backoff` will be truncated to the nearest second.
2197 #
2198 # This field has the same meaning as
2199 # [min_backoff_seconds in
2200 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2201 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2202 # min_backoff and
2203 # max_backoff duration after it fails,
2204 # if the queue&#x27;s RetryConfig specifies that the task should be
2205 # retried.
2206 #
2207 # If unspecified when the queue is created, Cloud Tasks will pick the
2208 # default.
2209 #
2210 #
2211 # `max_backoff` will be truncated to the nearest second.
2212 #
2213 # This field has the same meaning as
2214 # [max_backoff_seconds in
2215 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2216 },
2217 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2218 #
2219 # `state` can only be changed by called
2220 # PauseQueue,
2221 # ResumeQueue, or uploading
2222 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2223 # UpdateQueue cannot be used to change `state`.
2224 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2225 # after which it becomes output only.
2226 #
2227 # The queue name.
2228 #
2229 # The queue name must have the following format:
2230 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2231 #
2232 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2233 # hyphens (-), colons (:), or periods (.).
2234 # For more information, see
2235 # [Identifying
2236 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2237 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2238 # The list of available locations can be obtained by calling
2239 # ListLocations.
2240 # For more information, see https://cloud.google.com/about/locations/.
2241 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2242 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002243}
2244
2245 updateMask: string, A mask used to specify which fields of the queue are being updated.
2246
2247If empty, then all fields will be updated.
2248 x__xgafv: string, V1 error format.
2249 Allowed values
2250 1 - v1 error format
2251 2 - v2 error format
2252
2253Returns:
2254 An object of the form:
2255
2256 { # A queue is a container of related tasks. Queues are configured to manage
2257 # how those tasks are dispatched. Configurable properties include rate limits,
2258 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07002259 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2260 #
2261 # rate_limits and retry_config are
2262 # related because they both control task attempts. However they control task
2263 # attempts in different ways:
2264 #
2265 # * rate_limits controls the total rate of
2266 # dispatches from a queue (i.e. all traffic dispatched from the
2267 # queue, regardless of whether the dispatch is from a first
2268 # attempt or a retry).
2269 # * retry_config controls what happens to
2270 # particular a task after its first attempt fails. That is,
2271 # retry_config controls task retries (the
2272 # second attempt, third attempt, etc).
2273 #
2274 # The queue&#x27;s actual dispatch rate is the result of:
2275 #
2276 # * Number of tasks in the queue
2277 # * User-specified throttling: rate_limits,
2278 # retry_config, and the
2279 # queue&#x27;s state.
2280 # * System throttling due to `429` (Too Many Requests) or `503` (Service
2281 # Unavailable) responses from the worker, high error rates, or to smooth
2282 # sudden large traffic spikes.
2283 #
2284 # This message determines the maximum rate that tasks can be dispatched by a
2285 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2286 #
2287 # Note: The debugging command, RunTask, will run a task
2288 # even if the queue has reached its RateLimits.
2289 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002290 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002291 # Max burst size limits how fast tasks in queue are processed when
2292 # many tasks are in the queue and the rate is high. This field
2293 # allows the queue to have a high rate so processing starts shortly
2294 # after a task is enqueued, but still limits resource usage when
2295 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002296 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002297 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2298 # algorithm is used to control the rate of task dispatches. Each
2299 # queue has a token bucket that holds tokens, up to the maximum
2300 # specified by `max_burst_size`. Each time a task is dispatched, a
2301 # token is removed from the bucket. Tasks will be dispatched until
2302 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2303 # continuously refilled with new tokens based on
2304 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002305 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002306 # Cloud Tasks will pick the value of `max_burst_size` based on the
2307 # value of
2308 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002309 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002310 # For App Engine queues that were created or updated using
2311 # `queue.yaml/xml`, `max_burst_size` is equal to
2312 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2313 # Since `max_burst_size` is output only, if
2314 # UpdateQueue is called on a queue
2315 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2316 # on the value of
2317 # max_dispatches_per_second,
2318 # regardless of whether
2319 # max_dispatches_per_second
2320 # is updated.
2321 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2322 # to be dispatched for this queue. After this threshold has been
2323 # reached, Cloud Tasks stops dispatching tasks until the number of
2324 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002325 #
2326 # If unspecified when the queue is created, Cloud Tasks will pick the
2327 # default.
2328 #
2329 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002330 # The maximum allowed value is 5,000.
2331 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002332 #
2333 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002334 # [max_concurrent_requests in
2335 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
2336 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002337 #
2338 # If unspecified when the queue is created, Cloud Tasks will pick the
2339 # default.
2340 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002341 # * For App Engine queues, the maximum allowed value
2342 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002343 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002344 #
2345 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002346 # [rate in
2347 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2348 },
2349 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
2350 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2351 # field is unset, then no logs are written.
2352 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2353 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
2354 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2355 # This field may contain any value between 0.0 and 1.0, inclusive.
2356 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002357 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002358 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
2359 # App Engine tasks in this queue.
2360 # Http tasks are not affected by this proto.
2361 #
2362 # The task will be delivered to the App Engine application hostname
2363 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
2364 # The documentation for AppEngineHttpRequest explains how the
2365 # task&#x27;s host URL is constructed.
2366 #
2367 # Using AppEngineHttpQueue requires
2368 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2369 # Google IAM permission for the project
2370 # and the following scope:
2371 #
2372 # `https://www.googleapis.com/auth/cloud-platform`
2373 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
2374 # task-level app_engine_routing.
2375 #
2376 # If set, `app_engine_routing_override` is used for all tasks in
2377 # the queue, no matter what the setting is for the
2378 # task-level app_engine_routing.
2379 #
2380 # Defines routing characteristics specific to App Engine - service, version,
2381 # and instance.
2382 #
2383 # For more information about services, versions, and instances see
2384 # [An Overview of App
2385 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2386 # [Microservices Architecture on Google App
2387 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2388 # [App Engine Standard request
2389 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2390 # and [App Engine Flex request
2391 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2392 &quot;service&quot;: &quot;A String&quot;, # App service.
2393 #
2394 # By default, the task is sent to the service which is the default
2395 # service when the task is attempted.
2396 #
2397 # For some queues or tasks which were created using the App Engine
2398 # Task Queue API, host is not parsable
2399 # into service,
2400 # version, and
2401 # instance. For example, some tasks
2402 # which were created using the App Engine SDK use a custom domain
2403 # name; custom domains are not parsed by Cloud Tasks. If
2404 # host is not parsable, then
2405 # service,
2406 # version, and
2407 # instance are the empty string.
2408 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2409 #
2410 # By default, the task is sent to an instance which is available when
2411 # the task is attempted.
2412 #
2413 # Requests can only be sent to a specific instance if
2414 # [manual scaling is used in App Engine
2415 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2416 # App Engine Flex does not support instances. For more information, see
2417 # [App Engine Standard request
2418 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2419 # and [App Engine Flex request
2420 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2421 &quot;version&quot;: &quot;A String&quot;, # App version.
2422 #
2423 # By default, the task is sent to the version which is the default
2424 # version when the task is attempted.
2425 #
2426 # For some queues or tasks which were created using the App Engine
2427 # Task Queue API, host is not parsable
2428 # into service,
2429 # version, and
2430 # instance. For example, some tasks
2431 # which were created using the App Engine SDK use a custom domain
2432 # name; custom domains are not parsed by Cloud Tasks. If
2433 # host is not parsable, then
2434 # service,
2435 # version, and
2436 # instance are the empty string.
2437 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2438 #
2439 # The host is constructed from the domain name of the app associated with
2440 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2441 # service, version,
2442 # and instance. Tasks which were created using
2443 # the App Engine SDK might have a custom domain name.
2444 #
2445 # For more information, see
2446 # [How Requests are
2447 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2448 },
2449 },
2450 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
2451 #
2452 # All tasks that were created before this time
2453 # were purged.
2454 #
2455 # A queue can be purged using PurgeQueue, the
2456 # [App Engine Task Queue SDK, or the Cloud
2457 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2458 #
2459 # Purge time will be truncated to the nearest microsecond. Purge
2460 # time will be unset if the queue has never been purged.
2461 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
2462 #
2463 # * For tasks created using Cloud Tasks: the queue-level retry settings
2464 # apply to all tasks in the queue that were created using Cloud Tasks.
2465 # Retry settings cannot be set on individual tasks.
2466 # * For tasks created using the App Engine SDK: the queue-level retry
2467 # settings apply to all tasks in the queue which do not have retry settings
2468 # explicitly set on the task and were created by the App Engine SDK. See
2469 # [App Engine
2470 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2471 #
2472 # These settings determine when a failed task attempt is retried.
2473 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2474 # retrying a failed task, measured from when the task was first
2475 # attempted. Once `max_retry_duration` time has passed *and* the
2476 # task has been attempted max_attempts
2477 # times, no further attempts will be made and the task will be
2478 # deleted.
2479 #
2480 # If zero, then the task age is unlimited.
2481 #
2482 # If unspecified when the queue is created, Cloud Tasks will pick the
2483 # default.
2484 #
2485 #
2486 # `max_retry_duration` will be truncated to the nearest second.
2487 #
2488 # This field has the same meaning as
2489 # [task_age_limit in
2490 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2491 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
2492 #
2493 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2494 # first attempt fails, then there will be `max_attempts - 1` retries). Must
2495 # be &gt;= -1.
2496 #
2497 # If unspecified when the queue is created, Cloud Tasks will pick the
2498 # default.
2499 #
2500 # -1 indicates unlimited attempts.
2501 #
2502 # This field has the same meaning as
2503 # [task_retry_limit in
2504 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2505 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2506 #
2507 # A task&#x27;s retry interval starts at
2508 # min_backoff, then doubles
2509 # `max_doublings` times, then increases linearly, and finally
2510 # retries at intervals of
2511 # max_backoff up to
2512 # max_attempts times.
2513 #
2514 # For example, if min_backoff is 10s,
2515 # max_backoff is 300s, and
2516 # `max_doublings` is 3, then the a task will first be retried in
2517 # 10s. The retry interval will double three times, and then
2518 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2519 # intervals of max_backoff until the
2520 # task has been attempted max_attempts
2521 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2522 # 240s, 300s, 300s, ....
2523 #
2524 # If unspecified when the queue is created, Cloud Tasks will pick the
2525 # default.
2526 #
2527 #
2528 # This field has the same meaning as
2529 # [max_doublings in
2530 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2531 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2532 # min_backoff and
2533 # max_backoff duration after it fails,
2534 # if the queue&#x27;s RetryConfig specifies that the task should be
2535 # retried.
2536 #
2537 # If unspecified when the queue is created, Cloud Tasks will pick the
2538 # default.
2539 #
2540 #
2541 # `min_backoff` will be truncated to the nearest second.
2542 #
2543 # This field has the same meaning as
2544 # [min_backoff_seconds in
2545 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2546 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2547 # min_backoff and
2548 # max_backoff duration after it fails,
2549 # if the queue&#x27;s RetryConfig specifies that the task should be
2550 # retried.
2551 #
2552 # If unspecified when the queue is created, Cloud Tasks will pick the
2553 # default.
2554 #
2555 #
2556 # `max_backoff` will be truncated to the nearest second.
2557 #
2558 # This field has the same meaning as
2559 # [max_backoff_seconds in
2560 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2561 },
2562 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2563 #
2564 # `state` can only be changed by called
2565 # PauseQueue,
2566 # ResumeQueue, or uploading
2567 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2568 # UpdateQueue cannot be used to change `state`.
2569 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2570 # after which it becomes output only.
2571 #
2572 # The queue name.
2573 #
2574 # The queue name must have the following format:
2575 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2576 #
2577 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2578 # hyphens (-), colons (:), or periods (.).
2579 # For more information, see
2580 # [Identifying
2581 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2582 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2583 # The list of available locations can be obtained by calling
2584 # ListLocations.
2585 # For more information, see https://cloud.google.com/about/locations/.
2586 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2587 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002588 }</pre>
2589</div>
2590
2591<div class="method">
2592 <code class="details" id="pause">pause(name, body=None, x__xgafv=None)</code>
2593 <pre>Pauses the queue.
2594
2595If a queue is paused then the system will stop dispatching tasks
2596until the queue is resumed via
2597ResumeQueue. Tasks can still be added
2598when the queue is paused. A queue is paused if its
2599state is PAUSED.
2600
2601Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002602 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002603`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
2604 body: object, The request body.
2605 The object takes the form of:
2606
2607{ # Request message for PauseQueue.
2608 }
2609
2610 x__xgafv: string, V1 error format.
2611 Allowed values
2612 1 - v1 error format
2613 2 - v2 error format
2614
2615Returns:
2616 An object of the form:
2617
2618 { # A queue is a container of related tasks. Queues are configured to manage
2619 # how those tasks are dispatched. Configurable properties include rate limits,
2620 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07002621 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2622 #
2623 # rate_limits and retry_config are
2624 # related because they both control task attempts. However they control task
2625 # attempts in different ways:
2626 #
2627 # * rate_limits controls the total rate of
2628 # dispatches from a queue (i.e. all traffic dispatched from the
2629 # queue, regardless of whether the dispatch is from a first
2630 # attempt or a retry).
2631 # * retry_config controls what happens to
2632 # particular a task after its first attempt fails. That is,
2633 # retry_config controls task retries (the
2634 # second attempt, third attempt, etc).
2635 #
2636 # The queue&#x27;s actual dispatch rate is the result of:
2637 #
2638 # * Number of tasks in the queue
2639 # * User-specified throttling: rate_limits,
2640 # retry_config, and the
2641 # queue&#x27;s state.
2642 # * System throttling due to `429` (Too Many Requests) or `503` (Service
2643 # Unavailable) responses from the worker, high error rates, or to smooth
2644 # sudden large traffic spikes.
2645 #
2646 # This message determines the maximum rate that tasks can be dispatched by a
2647 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2648 #
2649 # Note: The debugging command, RunTask, will run a task
2650 # even if the queue has reached its RateLimits.
2651 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002652 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002653 # Max burst size limits how fast tasks in queue are processed when
2654 # many tasks are in the queue and the rate is high. This field
2655 # allows the queue to have a high rate so processing starts shortly
2656 # after a task is enqueued, but still limits resource usage when
2657 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002658 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002659 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2660 # algorithm is used to control the rate of task dispatches. Each
2661 # queue has a token bucket that holds tokens, up to the maximum
2662 # specified by `max_burst_size`. Each time a task is dispatched, a
2663 # token is removed from the bucket. Tasks will be dispatched until
2664 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2665 # continuously refilled with new tokens based on
2666 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002667 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002668 # Cloud Tasks will pick the value of `max_burst_size` based on the
2669 # value of
2670 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002671 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002672 # For App Engine queues that were created or updated using
2673 # `queue.yaml/xml`, `max_burst_size` is equal to
2674 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2675 # Since `max_burst_size` is output only, if
2676 # UpdateQueue is called on a queue
2677 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2678 # on the value of
2679 # max_dispatches_per_second,
2680 # regardless of whether
2681 # max_dispatches_per_second
2682 # is updated.
2683 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2684 # to be dispatched for this queue. After this threshold has been
2685 # reached, Cloud Tasks stops dispatching tasks until the number of
2686 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002687 #
2688 # If unspecified when the queue is created, Cloud Tasks will pick the
2689 # default.
2690 #
2691 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002692 # The maximum allowed value is 5,000.
2693 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002694 #
2695 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002696 # [max_concurrent_requests in
2697 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
2698 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002699 #
2700 # If unspecified when the queue is created, Cloud Tasks will pick the
2701 # default.
2702 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002703 # * For App Engine queues, the maximum allowed value
2704 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002705 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002706 #
2707 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002708 # [rate in
2709 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2710 },
2711 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
2712 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2713 # field is unset, then no logs are written.
2714 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2715 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
2716 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2717 # This field may contain any value between 0.0 and 1.0, inclusive.
2718 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002719 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002720 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
2721 # App Engine tasks in this queue.
2722 # Http tasks are not affected by this proto.
2723 #
2724 # The task will be delivered to the App Engine application hostname
2725 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
2726 # The documentation for AppEngineHttpRequest explains how the
2727 # task&#x27;s host URL is constructed.
2728 #
2729 # Using AppEngineHttpQueue requires
2730 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2731 # Google IAM permission for the project
2732 # and the following scope:
2733 #
2734 # `https://www.googleapis.com/auth/cloud-platform`
2735 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
2736 # task-level app_engine_routing.
2737 #
2738 # If set, `app_engine_routing_override` is used for all tasks in
2739 # the queue, no matter what the setting is for the
2740 # task-level app_engine_routing.
2741 #
2742 # Defines routing characteristics specific to App Engine - service, version,
2743 # and instance.
2744 #
2745 # For more information about services, versions, and instances see
2746 # [An Overview of App
2747 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2748 # [Microservices Architecture on Google App
2749 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2750 # [App Engine Standard request
2751 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2752 # and [App Engine Flex request
2753 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2754 &quot;service&quot;: &quot;A String&quot;, # App service.
2755 #
2756 # By default, the task is sent to the service which is the default
2757 # service when the task is attempted.
2758 #
2759 # For some queues or tasks which were created using the App Engine
2760 # Task Queue API, host is not parsable
2761 # into service,
2762 # version, and
2763 # instance. For example, some tasks
2764 # which were created using the App Engine SDK use a custom domain
2765 # name; custom domains are not parsed by Cloud Tasks. If
2766 # host is not parsable, then
2767 # service,
2768 # version, and
2769 # instance are the empty string.
2770 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2771 #
2772 # By default, the task is sent to an instance which is available when
2773 # the task is attempted.
2774 #
2775 # Requests can only be sent to a specific instance if
2776 # [manual scaling is used in App Engine
2777 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2778 # App Engine Flex does not support instances. For more information, see
2779 # [App Engine Standard request
2780 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2781 # and [App Engine Flex request
2782 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2783 &quot;version&quot;: &quot;A String&quot;, # App version.
2784 #
2785 # By default, the task is sent to the version which is the default
2786 # version when the task is attempted.
2787 #
2788 # For some queues or tasks which were created using the App Engine
2789 # Task Queue API, host is not parsable
2790 # into service,
2791 # version, and
2792 # instance. For example, some tasks
2793 # which were created using the App Engine SDK use a custom domain
2794 # name; custom domains are not parsed by Cloud Tasks. If
2795 # host is not parsable, then
2796 # service,
2797 # version, and
2798 # instance are the empty string.
2799 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2800 #
2801 # The host is constructed from the domain name of the app associated with
2802 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2803 # service, version,
2804 # and instance. Tasks which were created using
2805 # the App Engine SDK might have a custom domain name.
2806 #
2807 # For more information, see
2808 # [How Requests are
2809 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2810 },
2811 },
2812 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
2813 #
2814 # All tasks that were created before this time
2815 # were purged.
2816 #
2817 # A queue can be purged using PurgeQueue, the
2818 # [App Engine Task Queue SDK, or the Cloud
2819 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2820 #
2821 # Purge time will be truncated to the nearest microsecond. Purge
2822 # time will be unset if the queue has never been purged.
2823 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
2824 #
2825 # * For tasks created using Cloud Tasks: the queue-level retry settings
2826 # apply to all tasks in the queue that were created using Cloud Tasks.
2827 # Retry settings cannot be set on individual tasks.
2828 # * For tasks created using the App Engine SDK: the queue-level retry
2829 # settings apply to all tasks in the queue which do not have retry settings
2830 # explicitly set on the task and were created by the App Engine SDK. See
2831 # [App Engine
2832 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2833 #
2834 # These settings determine when a failed task attempt is retried.
2835 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2836 # retrying a failed task, measured from when the task was first
2837 # attempted. Once `max_retry_duration` time has passed *and* the
2838 # task has been attempted max_attempts
2839 # times, no further attempts will be made and the task will be
2840 # deleted.
2841 #
2842 # If zero, then the task age is unlimited.
2843 #
2844 # If unspecified when the queue is created, Cloud Tasks will pick the
2845 # default.
2846 #
2847 #
2848 # `max_retry_duration` will be truncated to the nearest second.
2849 #
2850 # This field has the same meaning as
2851 # [task_age_limit in
2852 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2853 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
2854 #
2855 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2856 # first attempt fails, then there will be `max_attempts - 1` retries). Must
2857 # be &gt;= -1.
2858 #
2859 # If unspecified when the queue is created, Cloud Tasks will pick the
2860 # default.
2861 #
2862 # -1 indicates unlimited attempts.
2863 #
2864 # This field has the same meaning as
2865 # [task_retry_limit in
2866 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2867 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2868 #
2869 # A task&#x27;s retry interval starts at
2870 # min_backoff, then doubles
2871 # `max_doublings` times, then increases linearly, and finally
2872 # retries at intervals of
2873 # max_backoff up to
2874 # max_attempts times.
2875 #
2876 # For example, if min_backoff is 10s,
2877 # max_backoff is 300s, and
2878 # `max_doublings` is 3, then the a task will first be retried in
2879 # 10s. The retry interval will double three times, and then
2880 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2881 # intervals of max_backoff until the
2882 # task has been attempted max_attempts
2883 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2884 # 240s, 300s, 300s, ....
2885 #
2886 # If unspecified when the queue is created, Cloud Tasks will pick the
2887 # default.
2888 #
2889 #
2890 # This field has the same meaning as
2891 # [max_doublings in
2892 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2893 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2894 # min_backoff and
2895 # max_backoff duration after it fails,
2896 # if the queue&#x27;s RetryConfig specifies that the task should be
2897 # retried.
2898 #
2899 # If unspecified when the queue is created, Cloud Tasks will pick the
2900 # default.
2901 #
2902 #
2903 # `min_backoff` will be truncated to the nearest second.
2904 #
2905 # This field has the same meaning as
2906 # [min_backoff_seconds in
2907 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2908 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2909 # min_backoff and
2910 # max_backoff duration after it fails,
2911 # if the queue&#x27;s RetryConfig specifies that the task should be
2912 # retried.
2913 #
2914 # If unspecified when the queue is created, Cloud Tasks will pick the
2915 # default.
2916 #
2917 #
2918 # `max_backoff` will be truncated to the nearest second.
2919 #
2920 # This field has the same meaning as
2921 # [max_backoff_seconds in
2922 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2923 },
2924 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2925 #
2926 # `state` can only be changed by called
2927 # PauseQueue,
2928 # ResumeQueue, or uploading
2929 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2930 # UpdateQueue cannot be used to change `state`.
2931 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2932 # after which it becomes output only.
2933 #
2934 # The queue name.
2935 #
2936 # The queue name must have the following format:
2937 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2938 #
2939 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2940 # hyphens (-), colons (:), or periods (.).
2941 # For more information, see
2942 # [Identifying
2943 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2944 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2945 # The list of available locations can be obtained by calling
2946 # ListLocations.
2947 # For more information, see https://cloud.google.com/about/locations/.
2948 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2949 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002950 }</pre>
2951</div>
2952
2953<div class="method">
2954 <code class="details" id="purge">purge(name, body=None, x__xgafv=None)</code>
2955 <pre>Purges a queue by deleting all of its tasks.
2956
2957All tasks created before this method is called are permanently deleted.
2958
2959Purge operations can take up to one minute to take effect. Tasks
2960might be dispatched before the purge takes effect. A purge is irreversible.
2961
2962Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002963 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002964`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
2965 body: object, The request body.
2966 The object takes the form of:
2967
2968{ # Request message for PurgeQueue.
2969 }
2970
2971 x__xgafv: string, V1 error format.
2972 Allowed values
2973 1 - v1 error format
2974 2 - v2 error format
2975
2976Returns:
2977 An object of the form:
2978
2979 { # A queue is a container of related tasks. Queues are configured to manage
2980 # how those tasks are dispatched. Configurable properties include rate limits,
2981 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07002982 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2983 #
2984 # rate_limits and retry_config are
2985 # related because they both control task attempts. However they control task
2986 # attempts in different ways:
2987 #
2988 # * rate_limits controls the total rate of
2989 # dispatches from a queue (i.e. all traffic dispatched from the
2990 # queue, regardless of whether the dispatch is from a first
2991 # attempt or a retry).
2992 # * retry_config controls what happens to
2993 # particular a task after its first attempt fails. That is,
2994 # retry_config controls task retries (the
2995 # second attempt, third attempt, etc).
2996 #
2997 # The queue&#x27;s actual dispatch rate is the result of:
2998 #
2999 # * Number of tasks in the queue
3000 # * User-specified throttling: rate_limits,
3001 # retry_config, and the
3002 # queue&#x27;s state.
3003 # * System throttling due to `429` (Too Many Requests) or `503` (Service
3004 # Unavailable) responses from the worker, high error rates, or to smooth
3005 # sudden large traffic spikes.
3006 #
3007 # This message determines the maximum rate that tasks can be dispatched by a
3008 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3009 #
3010 # Note: The debugging command, RunTask, will run a task
3011 # even if the queue has reached its RateLimits.
3012 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003013 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003014 # Max burst size limits how fast tasks in queue are processed when
3015 # many tasks are in the queue and the rate is high. This field
3016 # allows the queue to have a high rate so processing starts shortly
3017 # after a task is enqueued, but still limits resource usage when
3018 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003019 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003020 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3021 # algorithm is used to control the rate of task dispatches. Each
3022 # queue has a token bucket that holds tokens, up to the maximum
3023 # specified by `max_burst_size`. Each time a task is dispatched, a
3024 # token is removed from the bucket. Tasks will be dispatched until
3025 # the queue&#x27;s bucket runs out of tokens. The bucket will be
3026 # continuously refilled with new tokens based on
3027 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003028 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003029 # Cloud Tasks will pick the value of `max_burst_size` based on the
3030 # value of
3031 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003032 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003033 # For App Engine queues that were created or updated using
3034 # `queue.yaml/xml`, `max_burst_size` is equal to
3035 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3036 # Since `max_burst_size` is output only, if
3037 # UpdateQueue is called on a queue
3038 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3039 # on the value of
3040 # max_dispatches_per_second,
3041 # regardless of whether
3042 # max_dispatches_per_second
3043 # is updated.
3044 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3045 # to be dispatched for this queue. After this threshold has been
3046 # reached, Cloud Tasks stops dispatching tasks until the number of
3047 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003048 #
3049 # If unspecified when the queue is created, Cloud Tasks will pick the
3050 # default.
3051 #
3052 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003053 # The maximum allowed value is 5,000.
3054 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003055 #
3056 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07003057 # [max_concurrent_requests in
3058 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
3059 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003060 #
3061 # If unspecified when the queue is created, Cloud Tasks will pick the
3062 # default.
3063 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003064 # * For App Engine queues, the maximum allowed value
3065 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003066 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003067 #
3068 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07003069 # [rate in
3070 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
3071 },
3072 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
3073 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
3074 # field is unset, then no logs are written.
3075 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3076 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
3077 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3078 # This field may contain any value between 0.0 and 1.0, inclusive.
3079 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003080 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003081 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
3082 # App Engine tasks in this queue.
3083 # Http tasks are not affected by this proto.
3084 #
3085 # The task will be delivered to the App Engine application hostname
3086 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
3087 # The documentation for AppEngineHttpRequest explains how the
3088 # task&#x27;s host URL is constructed.
3089 #
3090 # Using AppEngineHttpQueue requires
3091 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3092 # Google IAM permission for the project
3093 # and the following scope:
3094 #
3095 # `https://www.googleapis.com/auth/cloud-platform`
3096 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
3097 # task-level app_engine_routing.
3098 #
3099 # If set, `app_engine_routing_override` is used for all tasks in
3100 # the queue, no matter what the setting is for the
3101 # task-level app_engine_routing.
3102 #
3103 # Defines routing characteristics specific to App Engine - service, version,
3104 # and instance.
3105 #
3106 # For more information about services, versions, and instances see
3107 # [An Overview of App
3108 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3109 # [Microservices Architecture on Google App
3110 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3111 # [App Engine Standard request
3112 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3113 # and [App Engine Flex request
3114 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3115 &quot;service&quot;: &quot;A String&quot;, # App service.
3116 #
3117 # By default, the task is sent to the service which is the default
3118 # service when the task is attempted.
3119 #
3120 # For some queues or tasks which were created using the App Engine
3121 # Task Queue API, host is not parsable
3122 # into service,
3123 # version, and
3124 # instance. For example, some tasks
3125 # which were created using the App Engine SDK use a custom domain
3126 # name; custom domains are not parsed by Cloud Tasks. If
3127 # host is not parsable, then
3128 # service,
3129 # version, and
3130 # instance are the empty string.
3131 &quot;instance&quot;: &quot;A String&quot;, # App instance.
3132 #
3133 # By default, the task is sent to an instance which is available when
3134 # the task is attempted.
3135 #
3136 # Requests can only be sent to a specific instance if
3137 # [manual scaling is used in App Engine
3138 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3139 # App Engine Flex does not support instances. For more information, see
3140 # [App Engine Standard request
3141 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3142 # and [App Engine Flex request
3143 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3144 &quot;version&quot;: &quot;A String&quot;, # App version.
3145 #
3146 # By default, the task is sent to the version which is the default
3147 # version when the task is attempted.
3148 #
3149 # For some queues or tasks which were created using the App Engine
3150 # Task Queue API, host is not parsable
3151 # into service,
3152 # version, and
3153 # instance. For example, some tasks
3154 # which were created using the App Engine SDK use a custom domain
3155 # name; custom domains are not parsed by Cloud Tasks. If
3156 # host is not parsable, then
3157 # service,
3158 # version, and
3159 # instance are the empty string.
3160 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
3161 #
3162 # The host is constructed from the domain name of the app associated with
3163 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
3164 # service, version,
3165 # and instance. Tasks which were created using
3166 # the App Engine SDK might have a custom domain name.
3167 #
3168 # For more information, see
3169 # [How Requests are
3170 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3171 },
3172 },
3173 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
3174 #
3175 # All tasks that were created before this time
3176 # were purged.
3177 #
3178 # A queue can be purged using PurgeQueue, the
3179 # [App Engine Task Queue SDK, or the Cloud
3180 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
3181 #
3182 # Purge time will be truncated to the nearest microsecond. Purge
3183 # time will be unset if the queue has never been purged.
3184 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
3185 #
3186 # * For tasks created using Cloud Tasks: the queue-level retry settings
3187 # apply to all tasks in the queue that were created using Cloud Tasks.
3188 # Retry settings cannot be set on individual tasks.
3189 # * For tasks created using the App Engine SDK: the queue-level retry
3190 # settings apply to all tasks in the queue which do not have retry settings
3191 # explicitly set on the task and were created by the App Engine SDK. See
3192 # [App Engine
3193 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3194 #
3195 # These settings determine when a failed task attempt is retried.
3196 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
3197 # retrying a failed task, measured from when the task was first
3198 # attempted. Once `max_retry_duration` time has passed *and* the
3199 # task has been attempted max_attempts
3200 # times, no further attempts will be made and the task will be
3201 # deleted.
3202 #
3203 # If zero, then the task age is unlimited.
3204 #
3205 # If unspecified when the queue is created, Cloud Tasks will pick the
3206 # default.
3207 #
3208 #
3209 # `max_retry_duration` will be truncated to the nearest second.
3210 #
3211 # This field has the same meaning as
3212 # [task_age_limit in
3213 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3214 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
3215 #
3216 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
3217 # first attempt fails, then there will be `max_attempts - 1` retries). Must
3218 # be &gt;= -1.
3219 #
3220 # If unspecified when the queue is created, Cloud Tasks will pick the
3221 # default.
3222 #
3223 # -1 indicates unlimited attempts.
3224 #
3225 # This field has the same meaning as
3226 # [task_retry_limit in
3227 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3228 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
3229 #
3230 # A task&#x27;s retry interval starts at
3231 # min_backoff, then doubles
3232 # `max_doublings` times, then increases linearly, and finally
3233 # retries at intervals of
3234 # max_backoff up to
3235 # max_attempts times.
3236 #
3237 # For example, if min_backoff is 10s,
3238 # max_backoff is 300s, and
3239 # `max_doublings` is 3, then the a task will first be retried in
3240 # 10s. The retry interval will double three times, and then
3241 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3242 # intervals of max_backoff until the
3243 # task has been attempted max_attempts
3244 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3245 # 240s, 300s, 300s, ....
3246 #
3247 # If unspecified when the queue is created, Cloud Tasks will pick the
3248 # default.
3249 #
3250 #
3251 # This field has the same meaning as
3252 # [max_doublings in
3253 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3254 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3255 # min_backoff and
3256 # max_backoff duration after it fails,
3257 # if the queue&#x27;s RetryConfig specifies that the task should be
3258 # retried.
3259 #
3260 # If unspecified when the queue is created, Cloud Tasks will pick the
3261 # default.
3262 #
3263 #
3264 # `min_backoff` will be truncated to the nearest second.
3265 #
3266 # This field has the same meaning as
3267 # [min_backoff_seconds in
3268 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3269 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3270 # min_backoff and
3271 # max_backoff duration after it fails,
3272 # if the queue&#x27;s RetryConfig specifies that the task should be
3273 # retried.
3274 #
3275 # If unspecified when the queue is created, Cloud Tasks will pick the
3276 # default.
3277 #
3278 #
3279 # `max_backoff` will be truncated to the nearest second.
3280 #
3281 # This field has the same meaning as
3282 # [max_backoff_seconds in
3283 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3284 },
3285 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
3286 #
3287 # `state` can only be changed by called
3288 # PauseQueue,
3289 # ResumeQueue, or uploading
3290 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3291 # UpdateQueue cannot be used to change `state`.
3292 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
3293 # after which it becomes output only.
3294 #
3295 # The queue name.
3296 #
3297 # The queue name must have the following format:
3298 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
3299 #
3300 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3301 # hyphens (-), colons (:), or periods (.).
3302 # For more information, see
3303 # [Identifying
3304 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3305 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
3306 # The list of available locations can be obtained by calling
3307 # ListLocations.
3308 # For more information, see https://cloud.google.com/about/locations/.
3309 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3310 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003311 }</pre>
3312</div>
3313
3314<div class="method">
3315 <code class="details" id="resume">resume(name, body=None, x__xgafv=None)</code>
3316 <pre>Resume a queue.
3317
3318This method resumes a queue after it has been
3319PAUSED or
3320DISABLED. The state of a queue is stored
Bu Sun Kim65020912020-05-20 12:08:20 -07003321in the queue&#x27;s state; after calling this method it
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003322will be set to RUNNING.
3323
3324WARNING: Resuming many high-QPS queues at the same time can
3325lead to target overloading. If you are resuming high-QPS
3326queues, follow the 500/50/5 pattern described in
3327[Managing Cloud Tasks Scaling
3328Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
3329
3330Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07003331 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003332`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
3333 body: object, The request body.
3334 The object takes the form of:
3335
3336{ # Request message for ResumeQueue.
3337 }
3338
3339 x__xgafv: string, V1 error format.
3340 Allowed values
3341 1 - v1 error format
3342 2 - v2 error format
3343
3344Returns:
3345 An object of the form:
3346
3347 { # A queue is a container of related tasks. Queues are configured to manage
3348 # how those tasks are dispatched. Configurable properties include rate limits,
3349 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07003350 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
3351 #
3352 # rate_limits and retry_config are
3353 # related because they both control task attempts. However they control task
3354 # attempts in different ways:
3355 #
3356 # * rate_limits controls the total rate of
3357 # dispatches from a queue (i.e. all traffic dispatched from the
3358 # queue, regardless of whether the dispatch is from a first
3359 # attempt or a retry).
3360 # * retry_config controls what happens to
3361 # particular a task after its first attempt fails. That is,
3362 # retry_config controls task retries (the
3363 # second attempt, third attempt, etc).
3364 #
3365 # The queue&#x27;s actual dispatch rate is the result of:
3366 #
3367 # * Number of tasks in the queue
3368 # * User-specified throttling: rate_limits,
3369 # retry_config, and the
3370 # queue&#x27;s state.
3371 # * System throttling due to `429` (Too Many Requests) or `503` (Service
3372 # Unavailable) responses from the worker, high error rates, or to smooth
3373 # sudden large traffic spikes.
3374 #
3375 # This message determines the maximum rate that tasks can be dispatched by a
3376 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3377 #
3378 # Note: The debugging command, RunTask, will run a task
3379 # even if the queue has reached its RateLimits.
3380 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003381 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003382 # Max burst size limits how fast tasks in queue are processed when
3383 # many tasks are in the queue and the rate is high. This field
3384 # allows the queue to have a high rate so processing starts shortly
3385 # after a task is enqueued, but still limits resource usage when
3386 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003387 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003388 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3389 # algorithm is used to control the rate of task dispatches. Each
3390 # queue has a token bucket that holds tokens, up to the maximum
3391 # specified by `max_burst_size`. Each time a task is dispatched, a
3392 # token is removed from the bucket. Tasks will be dispatched until
3393 # the queue&#x27;s bucket runs out of tokens. The bucket will be
3394 # continuously refilled with new tokens based on
3395 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003396 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003397 # Cloud Tasks will pick the value of `max_burst_size` based on the
3398 # value of
3399 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003400 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003401 # For App Engine queues that were created or updated using
3402 # `queue.yaml/xml`, `max_burst_size` is equal to
3403 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3404 # Since `max_burst_size` is output only, if
3405 # UpdateQueue is called on a queue
3406 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3407 # on the value of
3408 # max_dispatches_per_second,
3409 # regardless of whether
3410 # max_dispatches_per_second
3411 # is updated.
3412 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3413 # to be dispatched for this queue. After this threshold has been
3414 # reached, Cloud Tasks stops dispatching tasks until the number of
3415 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003416 #
3417 # If unspecified when the queue is created, Cloud Tasks will pick the
3418 # default.
3419 #
3420 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003421 # The maximum allowed value is 5,000.
3422 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003423 #
3424 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07003425 # [max_concurrent_requests in
3426 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
3427 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003428 #
3429 # If unspecified when the queue is created, Cloud Tasks will pick the
3430 # default.
3431 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003432 # * For App Engine queues, the maximum allowed value
3433 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003434 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003435 #
3436 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07003437 # [rate in
3438 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
3439 },
3440 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
3441 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
3442 # field is unset, then no logs are written.
3443 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3444 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
3445 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3446 # This field may contain any value between 0.0 and 1.0, inclusive.
3447 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003448 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003449 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
3450 # App Engine tasks in this queue.
3451 # Http tasks are not affected by this proto.
3452 #
3453 # The task will be delivered to the App Engine application hostname
3454 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
3455 # The documentation for AppEngineHttpRequest explains how the
3456 # task&#x27;s host URL is constructed.
3457 #
3458 # Using AppEngineHttpQueue requires
3459 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3460 # Google IAM permission for the project
3461 # and the following scope:
3462 #
3463 # `https://www.googleapis.com/auth/cloud-platform`
3464 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
3465 # task-level app_engine_routing.
3466 #
3467 # If set, `app_engine_routing_override` is used for all tasks in
3468 # the queue, no matter what the setting is for the
3469 # task-level app_engine_routing.
3470 #
3471 # Defines routing characteristics specific to App Engine - service, version,
3472 # and instance.
3473 #
3474 # For more information about services, versions, and instances see
3475 # [An Overview of App
3476 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3477 # [Microservices Architecture on Google App
3478 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3479 # [App Engine Standard request
3480 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3481 # and [App Engine Flex request
3482 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3483 &quot;service&quot;: &quot;A String&quot;, # App service.
3484 #
3485 # By default, the task is sent to the service which is the default
3486 # service when the task is attempted.
3487 #
3488 # For some queues or tasks which were created using the App Engine
3489 # Task Queue API, host is not parsable
3490 # into service,
3491 # version, and
3492 # instance. For example, some tasks
3493 # which were created using the App Engine SDK use a custom domain
3494 # name; custom domains are not parsed by Cloud Tasks. If
3495 # host is not parsable, then
3496 # service,
3497 # version, and
3498 # instance are the empty string.
3499 &quot;instance&quot;: &quot;A String&quot;, # App instance.
3500 #
3501 # By default, the task is sent to an instance which is available when
3502 # the task is attempted.
3503 #
3504 # Requests can only be sent to a specific instance if
3505 # [manual scaling is used in App Engine
3506 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3507 # App Engine Flex does not support instances. For more information, see
3508 # [App Engine Standard request
3509 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3510 # and [App Engine Flex request
3511 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3512 &quot;version&quot;: &quot;A String&quot;, # App version.
3513 #
3514 # By default, the task is sent to the version which is the default
3515 # version when the task is attempted.
3516 #
3517 # For some queues or tasks which were created using the App Engine
3518 # Task Queue API, host is not parsable
3519 # into service,
3520 # version, and
3521 # instance. For example, some tasks
3522 # which were created using the App Engine SDK use a custom domain
3523 # name; custom domains are not parsed by Cloud Tasks. If
3524 # host is not parsable, then
3525 # service,
3526 # version, and
3527 # instance are the empty string.
3528 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
3529 #
3530 # The host is constructed from the domain name of the app associated with
3531 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
3532 # service, version,
3533 # and instance. Tasks which were created using
3534 # the App Engine SDK might have a custom domain name.
3535 #
3536 # For more information, see
3537 # [How Requests are
3538 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3539 },
3540 },
3541 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
3542 #
3543 # All tasks that were created before this time
3544 # were purged.
3545 #
3546 # A queue can be purged using PurgeQueue, the
3547 # [App Engine Task Queue SDK, or the Cloud
3548 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
3549 #
3550 # Purge time will be truncated to the nearest microsecond. Purge
3551 # time will be unset if the queue has never been purged.
3552 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
3553 #
3554 # * For tasks created using Cloud Tasks: the queue-level retry settings
3555 # apply to all tasks in the queue that were created using Cloud Tasks.
3556 # Retry settings cannot be set on individual tasks.
3557 # * For tasks created using the App Engine SDK: the queue-level retry
3558 # settings apply to all tasks in the queue which do not have retry settings
3559 # explicitly set on the task and were created by the App Engine SDK. See
3560 # [App Engine
3561 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3562 #
3563 # These settings determine when a failed task attempt is retried.
3564 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
3565 # retrying a failed task, measured from when the task was first
3566 # attempted. Once `max_retry_duration` time has passed *and* the
3567 # task has been attempted max_attempts
3568 # times, no further attempts will be made and the task will be
3569 # deleted.
3570 #
3571 # If zero, then the task age is unlimited.
3572 #
3573 # If unspecified when the queue is created, Cloud Tasks will pick the
3574 # default.
3575 #
3576 #
3577 # `max_retry_duration` will be truncated to the nearest second.
3578 #
3579 # This field has the same meaning as
3580 # [task_age_limit in
3581 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3582 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
3583 #
3584 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
3585 # first attempt fails, then there will be `max_attempts - 1` retries). Must
3586 # be &gt;= -1.
3587 #
3588 # If unspecified when the queue is created, Cloud Tasks will pick the
3589 # default.
3590 #
3591 # -1 indicates unlimited attempts.
3592 #
3593 # This field has the same meaning as
3594 # [task_retry_limit in
3595 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3596 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
3597 #
3598 # A task&#x27;s retry interval starts at
3599 # min_backoff, then doubles
3600 # `max_doublings` times, then increases linearly, and finally
3601 # retries at intervals of
3602 # max_backoff up to
3603 # max_attempts times.
3604 #
3605 # For example, if min_backoff is 10s,
3606 # max_backoff is 300s, and
3607 # `max_doublings` is 3, then the a task will first be retried in
3608 # 10s. The retry interval will double three times, and then
3609 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3610 # intervals of max_backoff until the
3611 # task has been attempted max_attempts
3612 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3613 # 240s, 300s, 300s, ....
3614 #
3615 # If unspecified when the queue is created, Cloud Tasks will pick the
3616 # default.
3617 #
3618 #
3619 # This field has the same meaning as
3620 # [max_doublings in
3621 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3622 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3623 # min_backoff and
3624 # max_backoff duration after it fails,
3625 # if the queue&#x27;s RetryConfig specifies that the task should be
3626 # retried.
3627 #
3628 # If unspecified when the queue is created, Cloud Tasks will pick the
3629 # default.
3630 #
3631 #
3632 # `min_backoff` will be truncated to the nearest second.
3633 #
3634 # This field has the same meaning as
3635 # [min_backoff_seconds in
3636 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3637 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3638 # min_backoff and
3639 # max_backoff duration after it fails,
3640 # if the queue&#x27;s RetryConfig specifies that the task should be
3641 # retried.
3642 #
3643 # If unspecified when the queue is created, Cloud Tasks will pick the
3644 # default.
3645 #
3646 #
3647 # `max_backoff` will be truncated to the nearest second.
3648 #
3649 # This field has the same meaning as
3650 # [max_backoff_seconds in
3651 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3652 },
3653 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
3654 #
3655 # `state` can only be changed by called
3656 # PauseQueue,
3657 # ResumeQueue, or uploading
3658 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3659 # UpdateQueue cannot be used to change `state`.
3660 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
3661 # after which it becomes output only.
3662 #
3663 # The queue name.
3664 #
3665 # The queue name must have the following format:
3666 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
3667 #
3668 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3669 # hyphens (-), colons (:), or periods (.).
3670 # For more information, see
3671 # [Identifying
3672 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3673 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
3674 # The list of available locations can be obtained by calling
3675 # ListLocations.
3676 # For more information, see https://cloud.google.com/about/locations/.
3677 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3678 # hyphens (-). The maximum length is 100 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003679 }</pre>
3680</div>
3681
3682<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003683 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003684 <pre>Sets the access control policy for a Queue. Replaces any existing
3685policy.
3686
3687Note: The Cloud Console does not check queue-level IAM permissions yet.
3688Project-level permissions are required to use the Cloud Console.
3689
3690Authorization requires the following
3691[Google IAM](https://cloud.google.com/iam) permission on the specified
3692resource parent:
3693
3694* `cloudtasks.queues.setIamPolicy`
3695
3696Args:
3697 resource: string, REQUIRED: The resource for which the policy is being specified.
3698See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003699 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003700 The object takes the form of:
3701
3702{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07003703 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003704 # the policy is limited to a few 10s of KB. An empty policy is a
3705 # valid policy but certain Cloud Platform services (such as Projects)
3706 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -07003707 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003708 #
3709 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003710 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
3711 # `members` to a single `role`. Members can be user accounts, service accounts,
3712 # Google groups, and domains (such as G Suite). A `role` is a named list of
3713 # permissions; each `role` can be an IAM predefined role or a user-created
3714 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003715 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003716 # For some types of Google Cloud resources, a `binding` can also specify a
3717 # `condition`, which is a logical expression that allows access to a resource
3718 # only if the expression evaluates to `true`. A condition can add constraints
3719 # based on attributes of the request, the resource, or both. To learn which
3720 # resources support conditions in their IAM policies, see the
3721 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07003722 #
3723 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003724 #
3725 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003726 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003727 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003728 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
3729 # &quot;members&quot;: [
3730 # &quot;user:mike@example.com&quot;,
3731 # &quot;group:admins@example.com&quot;,
3732 # &quot;domain:google.com&quot;,
3733 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003734 # ]
3735 # },
3736 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003737 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
3738 # &quot;members&quot;: [
3739 # &quot;user:eve@example.com&quot;
3740 # ],
3741 # &quot;condition&quot;: {
3742 # &quot;title&quot;: &quot;expirable access&quot;,
3743 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
3744 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07003745 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003746 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07003747 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003748 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
3749 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003750 # }
3751 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003752 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003753 #
3754 # bindings:
3755 # - members:
3756 # - user:mike@example.com
3757 # - group:admins@example.com
3758 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07003759 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
3760 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003761 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07003762 # - user:eve@example.com
3763 # role: roles/resourcemanager.organizationViewer
3764 # condition:
3765 # title: expirable access
3766 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07003767 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07003768 # - etag: BwWWja0YfJA=
3769 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003770 #
3771 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07003772 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07003773 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07003774 # `condition` that determines how and when the `bindings` are applied. Each
3775 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003776 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003777 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
3778 # `members` can have the following values:
3779 #
3780 # * `allUsers`: A special identifier that represents anyone who is
3781 # on the internet; with or without a Google account.
3782 #
3783 # * `allAuthenticatedUsers`: A special identifier that represents anyone
3784 # who is authenticated with a Google account or a service account.
3785 #
3786 # * `user:{emailid}`: An email address that represents a specific Google
3787 # account. For example, `alice@example.com` .
3788 #
3789 #
3790 # * `serviceAccount:{emailid}`: An email address that represents a service
3791 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
3792 #
3793 # * `group:{emailid}`: An email address that represents a Google group.
3794 # For example, `admins@example.com`.
3795 #
3796 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
3797 # identifier) representing a user that has been recently deleted. For
3798 # example, `alice@example.com?uid=123456789012345678901`. If the user is
3799 # recovered, this value reverts to `user:{emailid}` and the recovered user
3800 # retains the role in the binding.
3801 #
3802 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
3803 # unique identifier) representing a service account that has been recently
3804 # deleted. For example,
3805 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
3806 # If the service account is undeleted, this value reverts to
3807 # `serviceAccount:{emailid}` and the undeleted service account retains the
3808 # role in the binding.
3809 #
3810 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
3811 # identifier) representing a Google group that has been recently
3812 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
3813 # the group is recovered, this value reverts to `group:{emailid}` and the
3814 # recovered group retains the role in the binding.
3815 #
3816 #
3817 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
3818 # users of that domain. For example, `google.com` or `example.com`.
3819 #
3820 &quot;A String&quot;,
3821 ],
3822 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
3823 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07003824 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
3825 #
3826 # If the condition evaluates to `true`, then this binding applies to the
3827 # current request.
3828 #
3829 # If the condition evaluates to `false`, then this binding does not apply to
3830 # the current request. However, a different role binding might grant the same
3831 # role to one or more of the members in this binding.
3832 #
3833 # To learn which resources support conditions in their IAM policies, see the
3834 # [IAM
3835 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07003836 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
3837 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003838 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003839 # Example (Comparison):
3840 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003841 # title: &quot;Summary size limit&quot;
3842 # description: &quot;Determines if a summary is less than 100 chars&quot;
3843 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07003844 #
3845 # Example (Equality):
3846 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003847 # title: &quot;Requestor is owner&quot;
3848 # description: &quot;Determines if requestor is the document owner&quot;
3849 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07003850 #
3851 # Example (Logic):
3852 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003853 # title: &quot;Public documents&quot;
3854 # description: &quot;Determine whether the document should be publicly visible&quot;
3855 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07003856 #
3857 # Example (Data Manipulation):
3858 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003859 # title: &quot;Notification string&quot;
3860 # description: &quot;Create a notification string with a timestamp.&quot;
3861 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07003862 #
3863 # The exact variables and functions that may be referenced within an expression
3864 # are determined by the service that evaluates it. See the service
3865 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -07003866 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003867 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07003868 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
Dan O'Mearadd494642020-05-01 07:42:23 -07003869 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07003870 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003871 # its purpose. This can be used e.g. in UIs which allow to enter the
3872 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07003873 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
3874 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003875 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003876 },
3877 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003878 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003879 # prevent simultaneous updates of a policy from overwriting each other.
3880 # It is strongly suggested that systems make use of the `etag` in the
3881 # read-modify-write cycle to perform policy updates in order to avoid race
3882 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
3883 # systems are expected to put that etag in the request to `setIamPolicy` to
3884 # ensure that their change will be applied to the same version of the policy.
3885 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003886 # **Important:** If you use IAM Conditions, you must include the `etag` field
3887 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3888 # you to overwrite a version `3` policy with a version `1` policy, and all of
3889 # the conditions in the version `3` policy are lost.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003890 &quot;version&quot;: 42, # Specifies the format of the policy.
3891 #
3892 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
3893 # are rejected.
3894 #
3895 # Any operation that affects conditional role bindings must specify version
3896 # `3`. This requirement applies to the following operations:
3897 #
3898 # * Getting a policy that includes a conditional role binding
3899 # * Adding a conditional role binding to a policy
3900 # * Changing a conditional role binding in a policy
3901 # * Removing any role binding, with or without a condition, from a policy
3902 # that includes conditions
3903 #
3904 # **Important:** If you use IAM Conditions, you must include the `etag` field
3905 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3906 # you to overwrite a version `3` policy with a version `1` policy, and all of
3907 # the conditions in the version `3` policy are lost.
3908 #
3909 # If a policy does not include any conditions, operations on that policy may
3910 # specify any valid version or leave the field unset.
3911 #
3912 # To learn which resources support conditions in their IAM policies, see the
3913 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003914 },
3915 }
3916
3917 x__xgafv: string, V1 error format.
3918 Allowed values
3919 1 - v1 error format
3920 2 - v2 error format
3921
3922Returns:
3923 An object of the form:
3924
Dan O'Mearadd494642020-05-01 07:42:23 -07003925 { # An Identity and Access Management (IAM) policy, which specifies access
3926 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003927 #
3928 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003929 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
3930 # `members` to a single `role`. Members can be user accounts, service accounts,
3931 # Google groups, and domains (such as G Suite). A `role` is a named list of
3932 # permissions; each `role` can be an IAM predefined role or a user-created
3933 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003934 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003935 # For some types of Google Cloud resources, a `binding` can also specify a
3936 # `condition`, which is a logical expression that allows access to a resource
3937 # only if the expression evaluates to `true`. A condition can add constraints
3938 # based on attributes of the request, the resource, or both. To learn which
3939 # resources support conditions in their IAM policies, see the
3940 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07003941 #
3942 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003943 #
3944 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003945 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003946 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003947 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
3948 # &quot;members&quot;: [
3949 # &quot;user:mike@example.com&quot;,
3950 # &quot;group:admins@example.com&quot;,
3951 # &quot;domain:google.com&quot;,
3952 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003953 # ]
3954 # },
3955 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003956 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
3957 # &quot;members&quot;: [
3958 # &quot;user:eve@example.com&quot;
3959 # ],
3960 # &quot;condition&quot;: {
3961 # &quot;title&quot;: &quot;expirable access&quot;,
3962 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
3963 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07003964 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003965 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07003966 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003967 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
3968 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003969 # }
3970 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003971 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003972 #
3973 # bindings:
3974 # - members:
3975 # - user:mike@example.com
3976 # - group:admins@example.com
3977 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07003978 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
3979 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003980 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07003981 # - user:eve@example.com
3982 # role: roles/resourcemanager.organizationViewer
3983 # condition:
3984 # title: expirable access
3985 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07003986 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07003987 # - etag: BwWWja0YfJA=
3988 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003989 #
3990 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07003991 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07003992 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07003993 # `condition` that determines how and when the `bindings` are applied. Each
3994 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003995 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003996 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
3997 # `members` can have the following values:
3998 #
3999 # * `allUsers`: A special identifier that represents anyone who is
4000 # on the internet; with or without a Google account.
4001 #
4002 # * `allAuthenticatedUsers`: A special identifier that represents anyone
4003 # who is authenticated with a Google account or a service account.
4004 #
4005 # * `user:{emailid}`: An email address that represents a specific Google
4006 # account. For example, `alice@example.com` .
4007 #
4008 #
4009 # * `serviceAccount:{emailid}`: An email address that represents a service
4010 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
4011 #
4012 # * `group:{emailid}`: An email address that represents a Google group.
4013 # For example, `admins@example.com`.
4014 #
4015 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
4016 # identifier) representing a user that has been recently deleted. For
4017 # example, `alice@example.com?uid=123456789012345678901`. If the user is
4018 # recovered, this value reverts to `user:{emailid}` and the recovered user
4019 # retains the role in the binding.
4020 #
4021 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
4022 # unique identifier) representing a service account that has been recently
4023 # deleted. For example,
4024 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
4025 # If the service account is undeleted, this value reverts to
4026 # `serviceAccount:{emailid}` and the undeleted service account retains the
4027 # role in the binding.
4028 #
4029 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
4030 # identifier) representing a Google group that has been recently
4031 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
4032 # the group is recovered, this value reverts to `group:{emailid}` and the
4033 # recovered group retains the role in the binding.
4034 #
4035 #
4036 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
4037 # users of that domain. For example, `google.com` or `example.com`.
4038 #
4039 &quot;A String&quot;,
4040 ],
4041 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
4042 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim65020912020-05-20 12:08:20 -07004043 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
4044 #
4045 # If the condition evaluates to `true`, then this binding applies to the
4046 # current request.
4047 #
4048 # If the condition evaluates to `false`, then this binding does not apply to
4049 # the current request. However, a different role binding might grant the same
4050 # role to one or more of the members in this binding.
4051 #
4052 # To learn which resources support conditions in their IAM policies, see the
4053 # [IAM
4054 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07004055 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
4056 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004057 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004058 # Example (Comparison):
4059 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004060 # title: &quot;Summary size limit&quot;
4061 # description: &quot;Determines if a summary is less than 100 chars&quot;
4062 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004063 #
4064 # Example (Equality):
4065 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004066 # title: &quot;Requestor is owner&quot;
4067 # description: &quot;Determines if requestor is the document owner&quot;
4068 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004069 #
4070 # Example (Logic):
4071 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004072 # title: &quot;Public documents&quot;
4073 # description: &quot;Determine whether the document should be publicly visible&quot;
4074 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004075 #
4076 # Example (Data Manipulation):
4077 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004078 # title: &quot;Notification string&quot;
4079 # description: &quot;Create a notification string with a timestamp.&quot;
4080 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004081 #
4082 # The exact variables and functions that may be referenced within an expression
4083 # are determined by the service that evaluates it. See the service
4084 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -07004085 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004086 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07004087 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
Dan O'Mearadd494642020-05-01 07:42:23 -07004088 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07004089 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004090 # its purpose. This can be used e.g. in UIs which allow to enter the
4091 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07004092 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
4093 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004094 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004095 },
4096 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004097 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004098 # prevent simultaneous updates of a policy from overwriting each other.
4099 # It is strongly suggested that systems make use of the `etag` in the
4100 # read-modify-write cycle to perform policy updates in order to avoid race
4101 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
4102 # systems are expected to put that etag in the request to `setIamPolicy` to
4103 # ensure that their change will be applied to the same version of the policy.
4104 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004105 # **Important:** If you use IAM Conditions, you must include the `etag` field
4106 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4107 # you to overwrite a version `3` policy with a version `1` policy, and all of
4108 # the conditions in the version `3` policy are lost.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004109 &quot;version&quot;: 42, # Specifies the format of the policy.
4110 #
4111 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
4112 # are rejected.
4113 #
4114 # Any operation that affects conditional role bindings must specify version
4115 # `3`. This requirement applies to the following operations:
4116 #
4117 # * Getting a policy that includes a conditional role binding
4118 # * Adding a conditional role binding to a policy
4119 # * Changing a conditional role binding in a policy
4120 # * Removing any role binding, with or without a condition, from a policy
4121 # that includes conditions
4122 #
4123 # **Important:** If you use IAM Conditions, you must include the `etag` field
4124 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4125 # you to overwrite a version `3` policy with a version `1` policy, and all of
4126 # the conditions in the version `3` policy are lost.
4127 #
4128 # If a policy does not include any conditions, operations on that policy may
4129 # specify any valid version or leave the field unset.
4130 #
4131 # To learn which resources support conditions in their IAM policies, see the
4132 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004133 }</pre>
4134</div>
4135
4136<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004137 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004138 <pre>Returns permissions that a caller has on a Queue.
4139If the resource does not exist, this will return an empty set of
4140permissions, not a NOT_FOUND error.
4141
4142Note: This operation is designed to be used for building permission-aware
4143UIs and command-line tools, not for authorization checking. This operation
Bu Sun Kim65020912020-05-20 12:08:20 -07004144may &quot;fail open&quot; without warning.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004145
4146Args:
4147 resource: string, REQUIRED: The resource for which the policy detail is being requested.
4148See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004149 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004150 The object takes the form of:
4151
4152{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07004153 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
4154 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004155 # information see
4156 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07004157 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004158 ],
4159 }
4160
4161 x__xgafv: string, V1 error format.
4162 Allowed values
4163 1 - v1 error format
4164 2 - v2 error format
4165
4166Returns:
4167 An object of the form:
4168
4169 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07004170 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004171 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07004172 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004173 ],
4174 }</pre>
4175</div>
4176
4177</body></html>