blob: ff1a3a220325f21ef57a1a2f7a6a3eafb96339bd [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="cloudtasks_v2beta2.html">Cloud Tasks API</a> . <a href="cloudtasks_v2beta2.projects.html">projects</a> . <a href="cloudtasks_v2beta2.projects.locations.html">locations</a> . <a href="cloudtasks_v2beta2.projects.locations.queues.html">queues</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="cloudtasks_v2beta2.projects.locations.queues.tasks.html">tasks()</a></code>
79</p>
80<p class="firstline">Returns the tasks Resource.</p>
81
82<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070083 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084<p class="firstline">Creates a queue.</p>
85<p class="toc_element">
86 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
87<p class="firstline">Deletes a queue.</p>
88<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070089 <code><a href="#get">get(name, readMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090<p class="firstline">Gets a queue.</p>
91<p class="toc_element">
92 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
93<p class="firstline">Gets the access control policy for a Queue.</p>
94<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -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, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148 #
149 # All tasks that were created before this time
150 # were purged.
151 #
152 # A queue can be purged using PurgeQueue, the
153 # [App Engine Task Queue SDK, or the Cloud
154 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
155 #
156 # Purge time will be truncated to the nearest microsecond. Purge
157 # time will be unset if the queue has never been purged.
Bu Sun Kim65020912020-05-20 12:08:20 -0700158 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
159 #
160 # `state` can only be changed by called
161 # PauseQueue,
162 # ResumeQueue, or uploading
163 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
164 # UpdateQueue cannot be used to change `state`.
165 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700166 #
167 # * For tasks created using Cloud Tasks: the queue-level retry settings
168 # apply to all tasks in the queue that were created using Cloud Tasks.
169 # Retry settings cannot be set on individual tasks.
170 # * For tasks created using the App Engine SDK: the queue-level retry
171 # settings apply to all tasks in the queue which do not have retry settings
172 # explicitly set on the task and were created by the App Engine SDK. See
173 # [App Engine
174 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
175 #
176 # These settings determine how a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
178 # min_backoff and
179 # max_backoff duration after it fails,
180 # if the queue&#x27;s RetryConfig specifies that the task should be
181 # retried.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700182 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700183 # If unspecified when the queue is created, Cloud Tasks will pick the
184 # default.
185 #
186 # This field is output only for pull queues.
187 #
188 #
189 # `min_backoff` will be truncated to the nearest second.
190 #
191 # This field has the same meaning as
192 # [min_backoff_seconds in
193 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
194 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
195 # min_backoff and
196 # max_backoff duration after it fails,
197 # if the queue&#x27;s RetryConfig specifies that the task should be
198 # retried.
199 #
200 # If unspecified when the queue is created, Cloud Tasks will pick the
201 # default.
202 #
203 # This field is output only for pull queues.
204 #
205 #
206 # `max_backoff` will be truncated to the nearest second.
207 #
208 # This field has the same meaning as
209 # [max_backoff_seconds in
210 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
211 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
212 # retrying a failed task, measured from when the task was first
213 # attempted. Once `max_retry_duration` time has passed *and* the
214 # task has been attempted max_attempts
215 # times, no further attempts will be made and the task will be
216 # deleted.
217 #
218 # If zero, then the task age is unlimited.
219 #
220 # If unspecified when the queue is created, Cloud Tasks will pick the
221 # default.
222 #
223 # This field is output only for pull queues.
224 #
225 #
226 # `max_retry_duration` will be truncated to the nearest second.
227 #
228 # This field has the same meaning as
229 # [task_age_limit in
230 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
231 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
232 #
233 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700234 # min_backoff, then doubles
235 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -0700236 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700237 # max_backoff up to
238 # max_attempts times.
239 #
240 # For example, if min_backoff is 10s,
241 # max_backoff is 300s, and
242 # `max_doublings` is 3, then the a task will first be retried in
243 # 10s. The retry interval will double three times, and then
244 # increase linearly by 2^3 * 10s. Finally, the task will retry at
245 # intervals of max_backoff until the
246 # task has been attempted max_attempts
247 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
248 # 240s, 300s, 300s, ....
249 #
250 # If unspecified when the queue is created, Cloud Tasks will pick the
251 # default.
252 #
253 # This field is output only for pull queues.
254 #
255 #
256 # This field has the same meaning as
257 # [max_doublings in
258 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -0700259 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700260 #
261 # Cloud Tasks will attempt the task `max_attempts` times (that
262 # is, if the first attempt fails, then there will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700263 # `max_attempts - 1` retries). Must be &gt; 0.
Bu Sun Kim65020912020-05-20 12:08:20 -0700264 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
265 },
266 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
267 # after which it becomes output only.
268 #
269 # The queue name.
270 #
271 # The queue name must have the following format:
272 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
273 #
274 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
275 # hyphens (-), colons (:), or periods (.).
276 # For more information, see
277 # [Identifying
278 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
279 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
280 # The list of available locations can be obtained by calling
281 # ListLocations.
282 # For more information, see https://cloud.google.com/about/locations/.
283 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
284 # hyphens (-). The maximum length is 100 characters.
285 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
286 #
287 # rate_limits and
288 # retry_config are related because they both
289 # control task attempts however they control how tasks are
290 # attempted in different ways:
291 #
292 # * rate_limits controls the total rate of
293 # dispatches from a queue (i.e. all traffic dispatched from the
294 # queue, regardless of whether the dispatch is from a first
295 # attempt or a retry).
296 # * retry_config controls what happens to
297 # particular a task after its first attempt fails. That is,
298 # retry_config controls task retries (the
299 # second attempt, third attempt, etc).
300 #
301 # This message determines the maximum rate that tasks can be dispatched by a
302 # queue, regardless of whether the dispatch is a first task attempt or a retry.
303 #
304 # Note: The debugging command, RunTask, will run a task
305 # even if the queue has reached its RateLimits.
Bu Sun Kim65020912020-05-20 12:08:20 -0700306 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700307 #
308 # If unspecified when the queue is created, Cloud Tasks will pick the
309 # default.
310 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700311 # * For App Engine queues, the maximum allowed value
312 # is 500.
313 # * This field is output only for pull queues. In addition to the
314 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
315 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700316 #
317 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700318 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700319 # [rate in
320 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
321 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700322 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700323 # Max burst size limits how fast tasks in queue are processed when
324 # many tasks are in the queue and the rate is high. This field
325 # allows the queue to have a high rate so processing starts shortly
326 # after a task is enqueued, but still limits resource usage when
327 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700328 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700329 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
330 # algorithm is used to control the rate of task dispatches. Each
331 # queue has a token bucket that holds tokens, up to the maximum
332 # specified by `max_burst_size`. Each time a task is dispatched, a
333 # token is removed from the bucket. Tasks will be dispatched until
334 # the queue&#x27;s bucket runs out of tokens. The bucket will be
335 # continuously refilled with new tokens based on
336 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700337 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700338 # Cloud Tasks will pick the value of `max_burst_size` based on the
339 # value of
340 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700341 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700342 # For App Engine queues that were created or updated using
343 # `queue.yaml/xml`, `max_burst_size` is equal to
344 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
345 # Since `max_burst_size` is output only, if
346 # UpdateQueue is called on a queue
347 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
348 # on the value of
349 # max_tasks_dispatched_per_second,
350 # regardless of whether
351 # max_tasks_dispatched_per_second
352 # is updated.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700353 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
354 # to be dispatched for this queue. After this threshold has been
355 # reached, Cloud Tasks stops dispatching tasks until the number of
356 # concurrent requests decreases.
357 #
358 # If unspecified when the queue is created, Cloud Tasks will pick the
359 # default.
360 #
361 #
362 # The maximum allowed value is 5,000.
363 #
364 # This field is output only for
365 # pull queues and always -1, which indicates no limit. No other
366 # queue types can have `max_concurrent_tasks` set to -1.
367 #
368 #
369 # This field has the same meaning as
370 # [max_concurrent_requests in
371 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -0700372 },
373 &quot;pullTarget&quot;: { # Pull target. # Pull target.
374 #
375 # A pull queue is a queue that has a PullTarget.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700376 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700377 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
378 #
379 # An App Engine queue is a queue that has an AppEngineHttpTarget.
380 #
381 # The task will be delivered to the App Engine application hostname
382 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
383 # The documentation for AppEngineHttpRequest explains how the
384 # task&#x27;s host URL is constructed.
385 #
386 # Using AppEngineHttpTarget requires
387 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
388 # Google IAM permission for the project
389 # and the following scope:
390 #
391 # `https://www.googleapis.com/auth/cloud-platform`
392 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
393 # task-level app_engine_routing.
394 #
395 # If set, `app_engine_routing_override` is used for all tasks in
396 # the queue, no matter what the setting is for the
397 # task-level app_engine_routing.
398 #
399 # Defines routing characteristics specific to App Engine - service, version,
400 # and instance.
401 #
402 # For more information about services, versions, and instances see
403 # [An Overview of App
404 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
405 # [Microservices Architecture on Google App
406 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
407 # [App Engine Standard request
408 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
409 # and [App Engine Flex request
410 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
411 &quot;instance&quot;: &quot;A String&quot;, # App instance.
412 #
413 # By default, the task is sent to an instance which is available when
414 # the task is attempted.
415 #
416 # Requests can only be sent to a specific instance if
417 # [manual scaling is used in App Engine
418 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
419 # App Engine Flex does not support instances. For more information, see
420 # [App Engine Standard request
421 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
422 # and [App Engine Flex request
423 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
424 &quot;version&quot;: &quot;A String&quot;, # App version.
425 #
426 # By default, the task is sent to the version which is the default
427 # version when the task is attempted.
428 #
429 # For some queues or tasks which were created using the App Engine
430 # Task Queue API, host is not parsable
431 # into service,
432 # version, and
433 # instance. For example, some tasks
434 # which were created using the App Engine SDK use a custom domain
435 # name; custom domains are not parsed by Cloud Tasks. If
436 # host is not parsable, then
437 # service,
438 # version, and
439 # instance are the empty string.
440 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
441 #
442 # For more information, see
443 # [How Requests are
444 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
445 #
446 # The host is constructed as:
447 #
448 #
449 # * `host = [application_domain_name]`&lt;/br&gt;
450 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
451 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
452 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
453 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
454 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
455 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
456 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
457 #
458 # * `application_domain_name` = The domain name of the app, for
459 # example &lt;app-id&gt;.appspot.com, which is associated with the
460 # queue&#x27;s project ID. Some tasks which were created using the App Engine
461 # SDK use a custom domain name.
462 #
463 # * `service =` service
464 #
465 # * `version =` version
466 #
467 # * `version_dot_service =`
468 # version `+ &#x27;.&#x27; +`
469 # service
470 #
471 # * `instance =` instance
472 #
473 # * `instance_dot_service =`
474 # instance `+ &#x27;.&#x27; +`
475 # service
476 #
477 # * `instance_dot_version =`
478 # instance `+ &#x27;.&#x27; +`
479 # version
480 #
481 # * `instance_dot_version_dot_service =`
482 # instance `+ &#x27;.&#x27; +`
483 # version `+ &#x27;.&#x27; +`
484 # service
485 #
486 # If service is empty, then the task will be sent
487 # to the service which is the default service when the task is attempted.
488 #
489 # If version is empty, then the task will be sent
490 # to the version which is the default version when the task is attempted.
491 #
492 # If instance is empty, then the task
493 # will be sent to an instance which is available when the task is
494 # attempted.
495 #
496 # If service,
497 # version, or
498 # instance is invalid, then the task
499 # will be sent to the default version of the default service when
500 # the task is attempted.
501 &quot;service&quot;: &quot;A String&quot;, # App service.
502 #
503 # By default, the task is sent to the service which is the default
504 # service when the task is attempted.
505 #
506 # For some queues or tasks which were created using the App Engine
507 # Task Queue API, host is not parsable
508 # into service,
509 # version, and
510 # instance. For example, some tasks
511 # which were created using the App Engine SDK use a custom domain
512 # name; custom domains are not parsed by Cloud Tasks. If
513 # host is not parsable, then
514 # service,
515 # version, and
516 # instance are the empty string.
517 },
518 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700519}
520
521 x__xgafv: string, V1 error format.
522 Allowed values
523 1 - v1 error format
524 2 - v2 error format
525
526Returns:
527 An object of the form:
528
529 { # A queue is a container of related tasks. Queues are configured to manage
530 # how those tasks are dispatched. Configurable properties include rate limits,
531 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -0700532 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 #
534 # All tasks that were created before this time
535 # were purged.
536 #
537 # A queue can be purged using PurgeQueue, the
538 # [App Engine Task Queue SDK, or the Cloud
539 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
540 #
541 # Purge time will be truncated to the nearest microsecond. Purge
542 # time will be unset if the queue has never been purged.
Bu Sun Kim65020912020-05-20 12:08:20 -0700543 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
544 #
545 # `state` can only be changed by called
546 # PauseQueue,
547 # ResumeQueue, or uploading
548 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
549 # UpdateQueue cannot be used to change `state`.
550 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 #
552 # * For tasks created using Cloud Tasks: the queue-level retry settings
553 # apply to all tasks in the queue that were created using Cloud Tasks.
554 # Retry settings cannot be set on individual tasks.
555 # * For tasks created using the App Engine SDK: the queue-level retry
556 # settings apply to all tasks in the queue which do not have retry settings
557 # explicitly set on the task and were created by the App Engine SDK. See
558 # [App Engine
559 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
560 #
561 # These settings determine how a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -0700562 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
563 # min_backoff and
564 # max_backoff duration after it fails,
565 # if the queue&#x27;s RetryConfig specifies that the task should be
566 # retried.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700567 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700568 # If unspecified when the queue is created, Cloud Tasks will pick the
569 # default.
570 #
571 # This field is output only for pull queues.
572 #
573 #
574 # `min_backoff` will be truncated to the nearest second.
575 #
576 # This field has the same meaning as
577 # [min_backoff_seconds in
578 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
579 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
580 # min_backoff and
581 # max_backoff duration after it fails,
582 # if the queue&#x27;s RetryConfig specifies that the task should be
583 # retried.
584 #
585 # If unspecified when the queue is created, Cloud Tasks will pick the
586 # default.
587 #
588 # This field is output only for pull queues.
589 #
590 #
591 # `max_backoff` will be truncated to the nearest second.
592 #
593 # This field has the same meaning as
594 # [max_backoff_seconds in
595 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
596 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
597 # retrying a failed task, measured from when the task was first
598 # attempted. Once `max_retry_duration` time has passed *and* the
599 # task has been attempted max_attempts
600 # times, no further attempts will be made and the task will be
601 # deleted.
602 #
603 # If zero, then the task age is unlimited.
604 #
605 # If unspecified when the queue is created, Cloud Tasks will pick the
606 # default.
607 #
608 # This field is output only for pull queues.
609 #
610 #
611 # `max_retry_duration` will be truncated to the nearest second.
612 #
613 # This field has the same meaning as
614 # [task_age_limit in
615 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
616 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
617 #
618 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700619 # min_backoff, then doubles
620 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -0700621 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700622 # max_backoff up to
623 # max_attempts times.
624 #
625 # For example, if min_backoff is 10s,
626 # max_backoff is 300s, and
627 # `max_doublings` is 3, then the a task will first be retried in
628 # 10s. The retry interval will double three times, and then
629 # increase linearly by 2^3 * 10s. Finally, the task will retry at
630 # intervals of max_backoff until the
631 # task has been attempted max_attempts
632 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
633 # 240s, 300s, 300s, ....
634 #
635 # If unspecified when the queue is created, Cloud Tasks will pick the
636 # default.
637 #
638 # This field is output only for pull queues.
639 #
640 #
641 # This field has the same meaning as
642 # [max_doublings in
643 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -0700644 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700645 #
646 # Cloud Tasks will attempt the task `max_attempts` times (that
647 # is, if the first attempt fails, then there will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700648 # `max_attempts - 1` retries). Must be &gt; 0.
Bu Sun Kim65020912020-05-20 12:08:20 -0700649 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
650 },
651 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
652 # after which it becomes output only.
653 #
654 # The queue name.
655 #
656 # The queue name must have the following format:
657 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
658 #
659 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
660 # hyphens (-), colons (:), or periods (.).
661 # For more information, see
662 # [Identifying
663 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
664 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
665 # The list of available locations can be obtained by calling
666 # ListLocations.
667 # For more information, see https://cloud.google.com/about/locations/.
668 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
669 # hyphens (-). The maximum length is 100 characters.
670 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
671 #
672 # rate_limits and
673 # retry_config are related because they both
674 # control task attempts however they control how tasks are
675 # attempted in different ways:
676 #
677 # * rate_limits controls the total rate of
678 # dispatches from a queue (i.e. all traffic dispatched from the
679 # queue, regardless of whether the dispatch is from a first
680 # attempt or a retry).
681 # * retry_config controls what happens to
682 # particular a task after its first attempt fails. That is,
683 # retry_config controls task retries (the
684 # second attempt, third attempt, etc).
685 #
686 # This message determines the maximum rate that tasks can be dispatched by a
687 # queue, regardless of whether the dispatch is a first task attempt or a retry.
688 #
689 # Note: The debugging command, RunTask, will run a task
690 # even if the queue has reached its RateLimits.
Bu Sun Kim65020912020-05-20 12:08:20 -0700691 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700692 #
693 # If unspecified when the queue is created, Cloud Tasks will pick the
694 # default.
695 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700696 # * For App Engine queues, the maximum allowed value
697 # is 500.
698 # * This field is output only for pull queues. In addition to the
699 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
700 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700701 #
702 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700703 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700704 # [rate in
705 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
706 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700707 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700708 # Max burst size limits how fast tasks in queue are processed when
709 # many tasks are in the queue and the rate is high. This field
710 # allows the queue to have a high rate so processing starts shortly
711 # after a task is enqueued, but still limits resource usage when
712 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700714 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
715 # algorithm is used to control the rate of task dispatches. Each
716 # queue has a token bucket that holds tokens, up to the maximum
717 # specified by `max_burst_size`. Each time a task is dispatched, a
718 # token is removed from the bucket. Tasks will be dispatched until
719 # the queue&#x27;s bucket runs out of tokens. The bucket will be
720 # continuously refilled with new tokens based on
721 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700722 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700723 # Cloud Tasks will pick the value of `max_burst_size` based on the
724 # value of
725 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700726 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700727 # For App Engine queues that were created or updated using
728 # `queue.yaml/xml`, `max_burst_size` is equal to
729 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
730 # Since `max_burst_size` is output only, if
731 # UpdateQueue is called on a queue
732 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
733 # on the value of
734 # max_tasks_dispatched_per_second,
735 # regardless of whether
736 # max_tasks_dispatched_per_second
737 # is updated.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700738 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
739 # to be dispatched for this queue. After this threshold has been
740 # reached, Cloud Tasks stops dispatching tasks until the number of
741 # concurrent requests decreases.
742 #
743 # If unspecified when the queue is created, Cloud Tasks will pick the
744 # default.
745 #
746 #
747 # The maximum allowed value is 5,000.
748 #
749 # This field is output only for
750 # pull queues and always -1, which indicates no limit. No other
751 # queue types can have `max_concurrent_tasks` set to -1.
752 #
753 #
754 # This field has the same meaning as
755 # [max_concurrent_requests in
756 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -0700757 },
758 &quot;pullTarget&quot;: { # Pull target. # Pull target.
759 #
760 # A pull queue is a queue that has a PullTarget.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700761 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700762 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
763 #
764 # An App Engine queue is a queue that has an AppEngineHttpTarget.
765 #
766 # The task will be delivered to the App Engine application hostname
767 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
768 # The documentation for AppEngineHttpRequest explains how the
769 # task&#x27;s host URL is constructed.
770 #
771 # Using AppEngineHttpTarget requires
772 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
773 # Google IAM permission for the project
774 # and the following scope:
775 #
776 # `https://www.googleapis.com/auth/cloud-platform`
777 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
778 # task-level app_engine_routing.
779 #
780 # If set, `app_engine_routing_override` is used for all tasks in
781 # the queue, no matter what the setting is for the
782 # task-level app_engine_routing.
783 #
784 # Defines routing characteristics specific to App Engine - service, version,
785 # and instance.
786 #
787 # For more information about services, versions, and instances see
788 # [An Overview of App
789 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
790 # [Microservices Architecture on Google App
791 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
792 # [App Engine Standard request
793 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
794 # and [App Engine Flex request
795 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
796 &quot;instance&quot;: &quot;A String&quot;, # App instance.
797 #
798 # By default, the task is sent to an instance which is available when
799 # the task is attempted.
800 #
801 # Requests can only be sent to a specific instance if
802 # [manual scaling is used in App Engine
803 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
804 # App Engine Flex does not support instances. For more information, see
805 # [App Engine Standard request
806 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
807 # and [App Engine Flex request
808 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
809 &quot;version&quot;: &quot;A String&quot;, # App version.
810 #
811 # By default, the task is sent to the version which is the default
812 # version when the task is attempted.
813 #
814 # For some queues or tasks which were created using the App Engine
815 # Task Queue API, host is not parsable
816 # into service,
817 # version, and
818 # instance. For example, some tasks
819 # which were created using the App Engine SDK use a custom domain
820 # name; custom domains are not parsed by Cloud Tasks. If
821 # host is not parsable, then
822 # service,
823 # version, and
824 # instance are the empty string.
825 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
826 #
827 # For more information, see
828 # [How Requests are
829 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
830 #
831 # The host is constructed as:
832 #
833 #
834 # * `host = [application_domain_name]`&lt;/br&gt;
835 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
836 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
837 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
838 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
839 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
840 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
841 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
842 #
843 # * `application_domain_name` = The domain name of the app, for
844 # example &lt;app-id&gt;.appspot.com, which is associated with the
845 # queue&#x27;s project ID. Some tasks which were created using the App Engine
846 # SDK use a custom domain name.
847 #
848 # * `service =` service
849 #
850 # * `version =` version
851 #
852 # * `version_dot_service =`
853 # version `+ &#x27;.&#x27; +`
854 # service
855 #
856 # * `instance =` instance
857 #
858 # * `instance_dot_service =`
859 # instance `+ &#x27;.&#x27; +`
860 # service
861 #
862 # * `instance_dot_version =`
863 # instance `+ &#x27;.&#x27; +`
864 # version
865 #
866 # * `instance_dot_version_dot_service =`
867 # instance `+ &#x27;.&#x27; +`
868 # version `+ &#x27;.&#x27; +`
869 # service
870 #
871 # If service is empty, then the task will be sent
872 # to the service which is the default service when the task is attempted.
873 #
874 # If version is empty, then the task will be sent
875 # to the version which is the default version when the task is attempted.
876 #
877 # If instance is empty, then the task
878 # will be sent to an instance which is available when the task is
879 # attempted.
880 #
881 # If service,
882 # version, or
883 # instance is invalid, then the task
884 # will be sent to the default version of the default service when
885 # the task is attempted.
886 &quot;service&quot;: &quot;A String&quot;, # App service.
887 #
888 # By default, the task is sent to the service which is the default
889 # service when the task is attempted.
890 #
891 # For some queues or tasks which were created using the App Engine
892 # Task Queue API, host is not parsable
893 # into service,
894 # version, and
895 # instance. For example, some tasks
896 # which were created using the App Engine SDK use a custom domain
897 # name; custom domains are not parsed by Cloud Tasks. If
898 # host is not parsable, then
899 # service,
900 # version, and
901 # instance are the empty string.
902 },
903 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700904 }</pre>
905</div>
906
907<div class="method">
908 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
909 <pre>Deletes a queue.
910
911This command will delete the queue even if it has tasks in it.
912
Bu Sun Kim65020912020-05-20 12:08:20 -0700913Note: If you delete a queue, a queue with the same name can&#x27;t be created
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700914for 7 days.
915
916WARNING: Using this method may have unintended side effects if you are
917using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
918Read
919[Overview of Queue Management and
920queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
921this method.
922
923Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700924 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700925`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
926 x__xgafv: string, V1 error format.
927 Allowed values
928 1 - v1 error format
929 2 - v2 error format
930
931Returns:
932 An object of the form:
933
934 { # A generic empty message that you can re-use to avoid defining duplicated
935 # empty messages in your APIs. A typical example is to use it as the request
936 # or the response type of an API method. For instance:
937 #
938 # service Foo {
939 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
940 # }
941 #
942 # The JSON representation for `Empty` is empty JSON object `{}`.
943 }</pre>
944</div>
945
946<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700947 <code class="details" id="get">get(name, readMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700948 <pre>Gets a queue.
949
950Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700951 name: string, Required. The resource name of the queue. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700952`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700953 readMask: string, Optional. Read mask is used for a more granular control over what the API returns. By
954it includes all fields in Queue except for stats.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700955 x__xgafv: string, V1 error format.
956 Allowed values
957 1 - v1 error format
958 2 - v2 error format
959
960Returns:
961 An object of the form:
962
963 { # A queue is a container of related tasks. Queues are configured to manage
964 # how those tasks are dispatched. Configurable properties include rate limits,
965 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -0700966 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700967 #
968 # All tasks that were created before this time
969 # were purged.
970 #
971 # A queue can be purged using PurgeQueue, the
972 # [App Engine Task Queue SDK, or the Cloud
973 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
974 #
975 # Purge time will be truncated to the nearest microsecond. Purge
976 # time will be unset if the queue has never been purged.
Bu Sun Kim65020912020-05-20 12:08:20 -0700977 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
978 #
979 # `state` can only be changed by called
980 # PauseQueue,
981 # ResumeQueue, or uploading
982 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
983 # UpdateQueue cannot be used to change `state`.
984 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700985 #
986 # * For tasks created using Cloud Tasks: the queue-level retry settings
987 # apply to all tasks in the queue that were created using Cloud Tasks.
988 # Retry settings cannot be set on individual tasks.
989 # * For tasks created using the App Engine SDK: the queue-level retry
990 # settings apply to all tasks in the queue which do not have retry settings
991 # explicitly set on the task and were created by the App Engine SDK. See
992 # [App Engine
993 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
994 #
995 # These settings determine how a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -0700996 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
997 # min_backoff and
998 # max_backoff duration after it fails,
999 # if the queue&#x27;s RetryConfig specifies that the task should be
1000 # retried.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001001 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001002 # If unspecified when the queue is created, Cloud Tasks will pick the
1003 # default.
1004 #
1005 # This field is output only for pull queues.
1006 #
1007 #
1008 # `min_backoff` will be truncated to the nearest second.
1009 #
1010 # This field has the same meaning as
1011 # [min_backoff_seconds in
1012 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1013 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1014 # min_backoff and
1015 # max_backoff duration after it fails,
1016 # if the queue&#x27;s RetryConfig specifies that the task should be
1017 # retried.
1018 #
1019 # If unspecified when the queue is created, Cloud Tasks will pick the
1020 # default.
1021 #
1022 # This field is output only for pull queues.
1023 #
1024 #
1025 # `max_backoff` will be truncated to the nearest second.
1026 #
1027 # This field has the same meaning as
1028 # [max_backoff_seconds in
1029 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1030 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
1031 # retrying a failed task, measured from when the task was first
1032 # attempted. Once `max_retry_duration` time has passed *and* the
1033 # task has been attempted max_attempts
1034 # times, no further attempts will be made and the task will be
1035 # deleted.
1036 #
1037 # If zero, then the task age is unlimited.
1038 #
1039 # If unspecified when the queue is created, Cloud Tasks will pick the
1040 # default.
1041 #
1042 # This field is output only for pull queues.
1043 #
1044 #
1045 # `max_retry_duration` will be truncated to the nearest second.
1046 #
1047 # This field has the same meaning as
1048 # [task_age_limit in
1049 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1050 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
1051 #
1052 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001053 # min_backoff, then doubles
1054 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07001055 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001056 # max_backoff up to
1057 # max_attempts times.
1058 #
1059 # For example, if min_backoff is 10s,
1060 # max_backoff is 300s, and
1061 # `max_doublings` is 3, then the a task will first be retried in
1062 # 10s. The retry interval will double three times, and then
1063 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1064 # intervals of max_backoff until the
1065 # task has been attempted max_attempts
1066 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1067 # 240s, 300s, 300s, ....
1068 #
1069 # If unspecified when the queue is created, Cloud Tasks will pick the
1070 # default.
1071 #
1072 # This field is output only for pull queues.
1073 #
1074 #
1075 # This field has the same meaning as
1076 # [max_doublings in
1077 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07001078 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001079 #
1080 # Cloud Tasks will attempt the task `max_attempts` times (that
1081 # is, if the first attempt fails, then there will be
Dan O'Mearadd494642020-05-01 07:42:23 -07001082 # `max_attempts - 1` retries). Must be &gt; 0.
Bu Sun Kim65020912020-05-20 12:08:20 -07001083 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
1084 },
1085 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
1086 # after which it becomes output only.
1087 #
1088 # The queue name.
1089 #
1090 # The queue name must have the following format:
1091 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1092 #
1093 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1094 # hyphens (-), colons (:), or periods (.).
1095 # For more information, see
1096 # [Identifying
1097 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1098 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
1099 # The list of available locations can be obtained by calling
1100 # ListLocations.
1101 # For more information, see https://cloud.google.com/about/locations/.
1102 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1103 # hyphens (-). The maximum length is 100 characters.
1104 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
1105 #
1106 # rate_limits and
1107 # retry_config are related because they both
1108 # control task attempts however they control how tasks are
1109 # attempted in different ways:
1110 #
1111 # * rate_limits controls the total rate of
1112 # dispatches from a queue (i.e. all traffic dispatched from the
1113 # queue, regardless of whether the dispatch is from a first
1114 # attempt or a retry).
1115 # * retry_config controls what happens to
1116 # particular a task after its first attempt fails. That is,
1117 # retry_config controls task retries (the
1118 # second attempt, third attempt, etc).
1119 #
1120 # This message determines the maximum rate that tasks can be dispatched by a
1121 # queue, regardless of whether the dispatch is a first task attempt or a retry.
1122 #
1123 # Note: The debugging command, RunTask, will run a task
1124 # even if the queue has reached its RateLimits.
Bu Sun Kim65020912020-05-20 12:08:20 -07001125 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001126 #
1127 # If unspecified when the queue is created, Cloud Tasks will pick the
1128 # default.
1129 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001130 # * For App Engine queues, the maximum allowed value
1131 # is 500.
1132 # * This field is output only for pull queues. In addition to the
1133 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
1134 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001135 #
1136 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001137 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07001138 # [rate in
1139 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
1140 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001141 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001142 # Max burst size limits how fast tasks in queue are processed when
1143 # many tasks are in the queue and the rate is high. This field
1144 # allows the queue to have a high rate so processing starts shortly
1145 # after a task is enqueued, but still limits resource usage when
1146 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001147 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001148 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1149 # algorithm is used to control the rate of task dispatches. Each
1150 # queue has a token bucket that holds tokens, up to the maximum
1151 # specified by `max_burst_size`. Each time a task is dispatched, a
1152 # token is removed from the bucket. Tasks will be dispatched until
1153 # the queue&#x27;s bucket runs out of tokens. The bucket will be
1154 # continuously refilled with new tokens based on
1155 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001156 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001157 # Cloud Tasks will pick the value of `max_burst_size` based on the
1158 # value of
1159 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001160 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001161 # For App Engine queues that were created or updated using
1162 # `queue.yaml/xml`, `max_burst_size` is equal to
1163 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1164 # Since `max_burst_size` is output only, if
1165 # UpdateQueue is called on a queue
1166 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
1167 # on the value of
1168 # max_tasks_dispatched_per_second,
1169 # regardless of whether
1170 # max_tasks_dispatched_per_second
1171 # is updated.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001172 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
1173 # to be dispatched for this queue. After this threshold has been
1174 # reached, Cloud Tasks stops dispatching tasks until the number of
1175 # concurrent requests decreases.
1176 #
1177 # If unspecified when the queue is created, Cloud Tasks will pick the
1178 # default.
1179 #
1180 #
1181 # The maximum allowed value is 5,000.
1182 #
1183 # This field is output only for
1184 # pull queues and always -1, which indicates no limit. No other
1185 # queue types can have `max_concurrent_tasks` set to -1.
1186 #
1187 #
1188 # This field has the same meaning as
1189 # [max_concurrent_requests in
1190 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -07001191 },
1192 &quot;pullTarget&quot;: { # Pull target. # Pull target.
1193 #
1194 # A pull queue is a queue that has a PullTarget.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001195 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001196 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
1197 #
1198 # An App Engine queue is a queue that has an AppEngineHttpTarget.
1199 #
1200 # The task will be delivered to the App Engine application hostname
1201 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
1202 # The documentation for AppEngineHttpRequest explains how the
1203 # task&#x27;s host URL is constructed.
1204 #
1205 # Using AppEngineHttpTarget requires
1206 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1207 # Google IAM permission for the project
1208 # and the following scope:
1209 #
1210 # `https://www.googleapis.com/auth/cloud-platform`
1211 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
1212 # task-level app_engine_routing.
1213 #
1214 # If set, `app_engine_routing_override` is used for all tasks in
1215 # the queue, no matter what the setting is for the
1216 # task-level app_engine_routing.
1217 #
1218 # Defines routing characteristics specific to App Engine - service, version,
1219 # and instance.
1220 #
1221 # For more information about services, versions, and instances see
1222 # [An Overview of App
1223 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1224 # [Microservices Architecture on Google App
1225 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1226 # [App Engine Standard request
1227 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1228 # and [App Engine Flex request
1229 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1230 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1231 #
1232 # By default, the task is sent to an instance which is available when
1233 # the task is attempted.
1234 #
1235 # Requests can only be sent to a specific instance if
1236 # [manual scaling is used in App Engine
1237 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1238 # App Engine Flex does not support instances. For more information, see
1239 # [App Engine Standard request
1240 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1241 # and [App Engine Flex request
1242 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1243 &quot;version&quot;: &quot;A String&quot;, # App version.
1244 #
1245 # By default, the task is sent to the version which is the default
1246 # version when the task is attempted.
1247 #
1248 # For some queues or tasks which were created using the App Engine
1249 # Task Queue API, host is not parsable
1250 # into service,
1251 # version, and
1252 # instance. For example, some tasks
1253 # which were created using the App Engine SDK use a custom domain
1254 # name; custom domains are not parsed by Cloud Tasks. If
1255 # host is not parsable, then
1256 # service,
1257 # version, and
1258 # instance are the empty string.
1259 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1260 #
1261 # For more information, see
1262 # [How Requests are
1263 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1264 #
1265 # The host is constructed as:
1266 #
1267 #
1268 # * `host = [application_domain_name]`&lt;/br&gt;
1269 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1270 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1271 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1272 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1273 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1274 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1275 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
1276 #
1277 # * `application_domain_name` = The domain name of the app, for
1278 # example &lt;app-id&gt;.appspot.com, which is associated with the
1279 # queue&#x27;s project ID. Some tasks which were created using the App Engine
1280 # SDK use a custom domain name.
1281 #
1282 # * `service =` service
1283 #
1284 # * `version =` version
1285 #
1286 # * `version_dot_service =`
1287 # version `+ &#x27;.&#x27; +`
1288 # service
1289 #
1290 # * `instance =` instance
1291 #
1292 # * `instance_dot_service =`
1293 # instance `+ &#x27;.&#x27; +`
1294 # service
1295 #
1296 # * `instance_dot_version =`
1297 # instance `+ &#x27;.&#x27; +`
1298 # version
1299 #
1300 # * `instance_dot_version_dot_service =`
1301 # instance `+ &#x27;.&#x27; +`
1302 # version `+ &#x27;.&#x27; +`
1303 # service
1304 #
1305 # If service is empty, then the task will be sent
1306 # to the service which is the default service when the task is attempted.
1307 #
1308 # If version is empty, then the task will be sent
1309 # to the version which is the default version when the task is attempted.
1310 #
1311 # If instance is empty, then the task
1312 # will be sent to an instance which is available when the task is
1313 # attempted.
1314 #
1315 # If service,
1316 # version, or
1317 # instance is invalid, then the task
1318 # will be sent to the default version of the default service when
1319 # the task is attempted.
1320 &quot;service&quot;: &quot;A String&quot;, # App service.
1321 #
1322 # By default, the task is sent to the service which is the default
1323 # service when the task is attempted.
1324 #
1325 # For some queues or tasks which were created using the App Engine
1326 # Task Queue API, host is not parsable
1327 # into service,
1328 # version, and
1329 # instance. For example, some tasks
1330 # which were created using the App Engine SDK use a custom domain
1331 # name; custom domains are not parsed by Cloud Tasks. If
1332 # host is not parsable, then
1333 # service,
1334 # version, and
1335 # instance are the empty string.
1336 },
1337 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001338 }</pre>
1339</div>
1340
1341<div class="method">
1342 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
1343 <pre>Gets the access control policy for a Queue.
1344Returns an empty policy if the resource exists and does not have a policy
1345set.
1346
1347Authorization requires the following
1348[Google IAM](https://cloud.google.com/iam) permission on the specified
1349resource parent:
1350
1351* `cloudtasks.queues.getIamPolicy`
1352
1353Args:
1354 resource: string, REQUIRED: The resource for which the policy is being requested.
1355See the operation documentation for the appropriate value for this field. (required)
1356 body: object, The request body.
1357 The object takes the form of:
1358
1359{ # Request message for `GetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001360 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
Dan O'Mearadd494642020-05-01 07:42:23 -07001361 # `GetIamPolicy`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001362 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.
Dan O'Mearadd494642020-05-01 07:42:23 -07001363 #
1364 # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
1365 # rejected.
1366 #
1367 # Requests for policies with any conditional bindings must specify version 3.
1368 # Policies without any conditional bindings may specify any valid value or
1369 # leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -07001370 #
1371 # To learn which resources support conditions in their IAM policies, see the
1372 # [IAM
1373 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001374 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001375 }
1376
1377 x__xgafv: string, V1 error format.
1378 Allowed values
1379 1 - v1 error format
1380 2 - v2 error format
1381
1382Returns:
1383 An object of the form:
1384
Dan O'Mearadd494642020-05-01 07:42:23 -07001385 { # An Identity and Access Management (IAM) policy, which specifies access
1386 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001387 #
1388 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001389 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1390 # `members` to a single `role`. Members can be user accounts, service accounts,
1391 # Google groups, and domains (such as G Suite). A `role` is a named list of
1392 # permissions; each `role` can be an IAM predefined role or a user-created
1393 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001394 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001395 # For some types of Google Cloud resources, a `binding` can also specify a
1396 # `condition`, which is a logical expression that allows access to a resource
1397 # only if the expression evaluates to `true`. A condition can add constraints
1398 # based on attributes of the request, the resource, or both. To learn which
1399 # resources support conditions in their IAM policies, see the
1400 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001401 #
1402 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001403 #
1404 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001405 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001406 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001407 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1408 # &quot;members&quot;: [
1409 # &quot;user:mike@example.com&quot;,
1410 # &quot;group:admins@example.com&quot;,
1411 # &quot;domain:google.com&quot;,
1412 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001413 # ]
1414 # },
1415 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001416 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1417 # &quot;members&quot;: [
1418 # &quot;user:eve@example.com&quot;
1419 # ],
1420 # &quot;condition&quot;: {
1421 # &quot;title&quot;: &quot;expirable access&quot;,
1422 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1423 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001424 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001425 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001426 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001427 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1428 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001429 # }
1430 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001431 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001432 #
1433 # bindings:
1434 # - members:
1435 # - user:mike@example.com
1436 # - group:admins@example.com
1437 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001438 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1439 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001440 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001441 # - user:eve@example.com
1442 # role: roles/resourcemanager.organizationViewer
1443 # condition:
1444 # title: expirable access
1445 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001446 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001447 # - etag: BwWWja0YfJA=
1448 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001449 #
1450 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001451 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001452 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1453 # prevent simultaneous updates of a policy from overwriting each other.
1454 # It is strongly suggested that systems make use of the `etag` in the
1455 # read-modify-write cycle to perform policy updates in order to avoid race
1456 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1457 # systems are expected to put that etag in the request to `setIamPolicy` to
1458 # ensure that their change will be applied to the same version of the policy.
1459 #
1460 # **Important:** If you use IAM Conditions, you must include the `etag` field
1461 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1462 # you to overwrite a version `3` policy with a version `1` policy, and all of
1463 # the conditions in the version `3` policy are lost.
1464 &quot;version&quot;: 42, # Specifies the format of the policy.
1465 #
1466 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1467 # are rejected.
1468 #
1469 # Any operation that affects conditional role bindings must specify version
1470 # `3`. This requirement applies to the following operations:
1471 #
1472 # * Getting a policy that includes a conditional role binding
1473 # * Adding a conditional role binding to a policy
1474 # * Changing a conditional role binding in a policy
1475 # * Removing any role binding, with or without a condition, from a policy
1476 # that includes conditions
1477 #
1478 # **Important:** If you use IAM Conditions, you must include the `etag` field
1479 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1480 # you to overwrite a version `3` policy with a version `1` policy, and all of
1481 # the conditions in the version `3` policy are lost.
1482 #
1483 # If a policy does not include any conditions, operations on that policy may
1484 # specify any valid version or leave the field unset.
1485 #
1486 # To learn which resources support conditions in their IAM policies, see the
1487 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1488 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001489 # `condition` that determines how and when the `bindings` are applied. Each
1490 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001491 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001492 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1493 #
1494 # If the condition evaluates to `true`, then this binding applies to the
1495 # current request.
1496 #
1497 # If the condition evaluates to `false`, then this binding does not apply to
1498 # the current request. However, a different role binding might grant the same
1499 # role to one or more of the members in this binding.
1500 #
1501 # To learn which resources support conditions in their IAM policies, see the
1502 # [IAM
1503 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001504 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1505 # are documented at https://github.com/google/cel-spec.
1506 #
1507 # Example (Comparison):
1508 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001509 # title: &quot;Summary size limit&quot;
1510 # description: &quot;Determines if a summary is less than 100 chars&quot;
1511 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001512 #
1513 # Example (Equality):
1514 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001515 # title: &quot;Requestor is owner&quot;
1516 # description: &quot;Determines if requestor is the document owner&quot;
1517 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001518 #
1519 # Example (Logic):
1520 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001521 # title: &quot;Public documents&quot;
1522 # description: &quot;Determine whether the document should be publicly visible&quot;
1523 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001524 #
1525 # Example (Data Manipulation):
1526 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001527 # title: &quot;Notification string&quot;
1528 # description: &quot;Create a notification string with a timestamp.&quot;
1529 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001530 #
1531 # The exact variables and functions that may be referenced within an expression
1532 # are determined by the service that evaluates it. See the service
1533 # documentation for additional information.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001534 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1535 # describes the expression, e.g. when hovered over it in a UI.
1536 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1537 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07001538 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
Dan O'Mearadd494642020-05-01 07:42:23 -07001539 # its purpose. This can be used e.g. in UIs which allow to enter the
1540 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07001541 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1542 # reporting, e.g. a file name and a position in the file.
Dan O'Mearadd494642020-05-01 07:42:23 -07001543 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001544 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001545 # `members` can have the following values:
1546 #
1547 # * `allUsers`: A special identifier that represents anyone who is
1548 # on the internet; with or without a Google account.
1549 #
1550 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1551 # who is authenticated with a Google account or a service account.
1552 #
1553 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001554 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001555 #
1556 #
1557 # * `serviceAccount:{emailid}`: An email address that represents a service
1558 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1559 #
1560 # * `group:{emailid}`: An email address that represents a Google group.
1561 # For example, `admins@example.com`.
1562 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001563 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1564 # identifier) representing a user that has been recently deleted. For
1565 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1566 # recovered, this value reverts to `user:{emailid}` and the recovered user
1567 # retains the role in the binding.
1568 #
1569 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1570 # unique identifier) representing a service account that has been recently
1571 # deleted. For example,
1572 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1573 # If the service account is undeleted, this value reverts to
1574 # `serviceAccount:{emailid}` and the undeleted service account retains the
1575 # role in the binding.
1576 #
1577 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1578 # identifier) representing a Google group that has been recently
1579 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1580 # the group is recovered, this value reverts to `group:{emailid}` and the
1581 # recovered group retains the role in the binding.
1582 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001583 #
1584 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1585 # users of that domain. For example, `google.com` or `example.com`.
1586 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001587 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001588 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001589 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1590 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001591 },
1592 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001593 }</pre>
1594</div>
1595
1596<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001597 <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 -07001598 <pre>Lists queues.
1599
1600Queues are returned in lexicographical order.
1601
1602Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001603 parent: string, Required. The location name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001604For example: `projects/PROJECT_ID/locations/LOCATION_ID` (required)
1605 pageToken: string, A token identifying the page of results to return.
1606
1607To request the first page results, page_token must be empty. To
1608request the next page of results, page_token must be the value of
1609next_page_token returned
1610from the previous call to ListQueues
1611method. It is an error to switch the value of the
1612filter while iterating through pages.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001613 pageSize: integer, Requested page size.
1614
1615The maximum page size is 9800. If unspecified, the page size will
1616be the maximum. Fewer queues than requested might be returned,
1617even if more queues exist; use the
1618next_page_token in the
1619response to determine if more queues exist.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001620 filter: string, `filter` can be used to specify a subset of queues. Any Queue
1621field can be used as a filter and several operators as supported.
1622For example: `&lt;=, &lt;, &gt;=, &gt;, !=, =, :`. The filter syntax is the same as
1623described in
1624[Stackdriver&#x27;s Advanced Logs
1625Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
1626
1627Sample filter &quot;app_engine_http_target: *&quot;.
1628
1629Note that using filters might cause fewer queues than the
1630requested_page size to be returned.
Bu Sun Kim65020912020-05-20 12:08:20 -07001631 x__xgafv: string, V1 error format.
1632 Allowed values
1633 1 - v1 error format
1634 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001635
1636Returns:
1637 An object of the form:
1638
1639 { # Response message for ListQueues.
Bu Sun Kim65020912020-05-20 12:08:20 -07001640 &quot;queues&quot;: [ # The list of queues.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001641 { # A queue is a container of related tasks. Queues are configured to manage
1642 # how those tasks are dispatched. Configurable properties include rate limits,
1643 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07001644 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001645 #
1646 # All tasks that were created before this time
1647 # were purged.
1648 #
1649 # A queue can be purged using PurgeQueue, the
1650 # [App Engine Task Queue SDK, or the Cloud
1651 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
1652 #
1653 # Purge time will be truncated to the nearest microsecond. Purge
1654 # time will be unset if the queue has never been purged.
Bu Sun Kim65020912020-05-20 12:08:20 -07001655 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
1656 #
1657 # `state` can only be changed by called
1658 # PauseQueue,
1659 # ResumeQueue, or uploading
1660 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
1661 # UpdateQueue cannot be used to change `state`.
1662 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001663 #
1664 # * For tasks created using Cloud Tasks: the queue-level retry settings
1665 # apply to all tasks in the queue that were created using Cloud Tasks.
1666 # Retry settings cannot be set on individual tasks.
1667 # * For tasks created using the App Engine SDK: the queue-level retry
1668 # settings apply to all tasks in the queue which do not have retry settings
1669 # explicitly set on the task and were created by the App Engine SDK. See
1670 # [App Engine
1671 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
1672 #
1673 # These settings determine how a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -07001674 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1675 # min_backoff and
1676 # max_backoff duration after it fails,
1677 # if the queue&#x27;s RetryConfig specifies that the task should be
1678 # retried.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001679 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001680 # If unspecified when the queue is created, Cloud Tasks will pick the
1681 # default.
1682 #
1683 # This field is output only for pull queues.
1684 #
1685 #
1686 # `min_backoff` will be truncated to the nearest second.
1687 #
1688 # This field has the same meaning as
1689 # [min_backoff_seconds in
1690 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1691 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1692 # min_backoff and
1693 # max_backoff duration after it fails,
1694 # if the queue&#x27;s RetryConfig specifies that the task should be
1695 # retried.
1696 #
1697 # If unspecified when the queue is created, Cloud Tasks will pick the
1698 # default.
1699 #
1700 # This field is output only for pull queues.
1701 #
1702 #
1703 # `max_backoff` will be truncated to the nearest second.
1704 #
1705 # This field has the same meaning as
1706 # [max_backoff_seconds in
1707 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1708 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
1709 # retrying a failed task, measured from when the task was first
1710 # attempted. Once `max_retry_duration` time has passed *and* the
1711 # task has been attempted max_attempts
1712 # times, no further attempts will be made and the task will be
1713 # deleted.
1714 #
1715 # If zero, then the task age is unlimited.
1716 #
1717 # If unspecified when the queue is created, Cloud Tasks will pick the
1718 # default.
1719 #
1720 # This field is output only for pull queues.
1721 #
1722 #
1723 # `max_retry_duration` will be truncated to the nearest second.
1724 #
1725 # This field has the same meaning as
1726 # [task_age_limit in
1727 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1728 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
1729 #
1730 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001731 # min_backoff, then doubles
1732 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07001733 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001734 # max_backoff up to
1735 # max_attempts times.
1736 #
1737 # For example, if min_backoff is 10s,
1738 # max_backoff is 300s, and
1739 # `max_doublings` is 3, then the a task will first be retried in
1740 # 10s. The retry interval will double three times, and then
1741 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1742 # intervals of max_backoff until the
1743 # task has been attempted max_attempts
1744 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1745 # 240s, 300s, 300s, ....
1746 #
1747 # If unspecified when the queue is created, Cloud Tasks will pick the
1748 # default.
1749 #
1750 # This field is output only for pull queues.
1751 #
1752 #
1753 # This field has the same meaning as
1754 # [max_doublings in
1755 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07001756 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001757 #
1758 # Cloud Tasks will attempt the task `max_attempts` times (that
1759 # is, if the first attempt fails, then there will be
Dan O'Mearadd494642020-05-01 07:42:23 -07001760 # `max_attempts - 1` retries). Must be &gt; 0.
Bu Sun Kim65020912020-05-20 12:08:20 -07001761 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
1762 },
1763 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
1764 # after which it becomes output only.
1765 #
1766 # The queue name.
1767 #
1768 # The queue name must have the following format:
1769 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1770 #
1771 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1772 # hyphens (-), colons (:), or periods (.).
1773 # For more information, see
1774 # [Identifying
1775 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1776 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
1777 # The list of available locations can be obtained by calling
1778 # ListLocations.
1779 # For more information, see https://cloud.google.com/about/locations/.
1780 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1781 # hyphens (-). The maximum length is 100 characters.
1782 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
1783 #
1784 # rate_limits and
1785 # retry_config are related because they both
1786 # control task attempts however they control how tasks are
1787 # attempted in different ways:
1788 #
1789 # * rate_limits controls the total rate of
1790 # dispatches from a queue (i.e. all traffic dispatched from the
1791 # queue, regardless of whether the dispatch is from a first
1792 # attempt or a retry).
1793 # * retry_config controls what happens to
1794 # particular a task after its first attempt fails. That is,
1795 # retry_config controls task retries (the
1796 # second attempt, third attempt, etc).
1797 #
1798 # This message determines the maximum rate that tasks can be dispatched by a
1799 # queue, regardless of whether the dispatch is a first task attempt or a retry.
1800 #
1801 # Note: The debugging command, RunTask, will run a task
1802 # even if the queue has reached its RateLimits.
Bu Sun Kim65020912020-05-20 12:08:20 -07001803 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001804 #
1805 # If unspecified when the queue is created, Cloud Tasks will pick the
1806 # default.
1807 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001808 # * For App Engine queues, the maximum allowed value
1809 # is 500.
1810 # * This field is output only for pull queues. In addition to the
1811 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
1812 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001813 #
1814 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001815 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07001816 # [rate in
1817 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
1818 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001819 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001820 # Max burst size limits how fast tasks in queue are processed when
1821 # many tasks are in the queue and the rate is high. This field
1822 # allows the queue to have a high rate so processing starts shortly
1823 # after a task is enqueued, but still limits resource usage when
1824 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001825 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001826 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1827 # algorithm is used to control the rate of task dispatches. Each
1828 # queue has a token bucket that holds tokens, up to the maximum
1829 # specified by `max_burst_size`. Each time a task is dispatched, a
1830 # token is removed from the bucket. Tasks will be dispatched until
1831 # the queue&#x27;s bucket runs out of tokens. The bucket will be
1832 # continuously refilled with new tokens based on
1833 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001834 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001835 # Cloud Tasks will pick the value of `max_burst_size` based on the
1836 # value of
1837 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001838 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001839 # For App Engine queues that were created or updated using
1840 # `queue.yaml/xml`, `max_burst_size` is equal to
1841 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1842 # Since `max_burst_size` is output only, if
1843 # UpdateQueue is called on a queue
1844 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
1845 # on the value of
1846 # max_tasks_dispatched_per_second,
1847 # regardless of whether
1848 # max_tasks_dispatched_per_second
1849 # is updated.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001850 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
1851 # to be dispatched for this queue. After this threshold has been
1852 # reached, Cloud Tasks stops dispatching tasks until the number of
1853 # concurrent requests decreases.
1854 #
1855 # If unspecified when the queue is created, Cloud Tasks will pick the
1856 # default.
1857 #
1858 #
1859 # The maximum allowed value is 5,000.
1860 #
1861 # This field is output only for
1862 # pull queues and always -1, which indicates no limit. No other
1863 # queue types can have `max_concurrent_tasks` set to -1.
1864 #
1865 #
1866 # This field has the same meaning as
1867 # [max_concurrent_requests in
1868 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -07001869 },
1870 &quot;pullTarget&quot;: { # Pull target. # Pull target.
1871 #
1872 # A pull queue is a queue that has a PullTarget.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001873 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001874 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
1875 #
1876 # An App Engine queue is a queue that has an AppEngineHttpTarget.
1877 #
1878 # The task will be delivered to the App Engine application hostname
1879 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
1880 # The documentation for AppEngineHttpRequest explains how the
1881 # task&#x27;s host URL is constructed.
1882 #
1883 # Using AppEngineHttpTarget requires
1884 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1885 # Google IAM permission for the project
1886 # and the following scope:
1887 #
1888 # `https://www.googleapis.com/auth/cloud-platform`
1889 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
1890 # task-level app_engine_routing.
1891 #
1892 # If set, `app_engine_routing_override` is used for all tasks in
1893 # the queue, no matter what the setting is for the
1894 # task-level app_engine_routing.
1895 #
1896 # Defines routing characteristics specific to App Engine - service, version,
1897 # and instance.
1898 #
1899 # For more information about services, versions, and instances see
1900 # [An Overview of App
1901 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1902 # [Microservices Architecture on Google App
1903 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1904 # [App Engine Standard request
1905 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1906 # and [App Engine Flex request
1907 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1908 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1909 #
1910 # By default, the task is sent to an instance which is available when
1911 # the task is attempted.
1912 #
1913 # Requests can only be sent to a specific instance if
1914 # [manual scaling is used in App Engine
1915 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1916 # App Engine Flex does not support instances. For more information, see
1917 # [App Engine Standard request
1918 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1919 # and [App Engine Flex request
1920 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1921 &quot;version&quot;: &quot;A String&quot;, # App version.
1922 #
1923 # By default, the task is sent to the version which is the default
1924 # version when the task is attempted.
1925 #
1926 # For some queues or tasks which were created using the App Engine
1927 # Task Queue API, host is not parsable
1928 # into service,
1929 # version, and
1930 # instance. For example, some tasks
1931 # which were created using the App Engine SDK use a custom domain
1932 # name; custom domains are not parsed by Cloud Tasks. If
1933 # host is not parsable, then
1934 # service,
1935 # version, and
1936 # instance are the empty string.
1937 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1938 #
1939 # For more information, see
1940 # [How Requests are
1941 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1942 #
1943 # The host is constructed as:
1944 #
1945 #
1946 # * `host = [application_domain_name]`&lt;/br&gt;
1947 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1948 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1949 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1950 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1951 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1952 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1953 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
1954 #
1955 # * `application_domain_name` = The domain name of the app, for
1956 # example &lt;app-id&gt;.appspot.com, which is associated with the
1957 # queue&#x27;s project ID. Some tasks which were created using the App Engine
1958 # SDK use a custom domain name.
1959 #
1960 # * `service =` service
1961 #
1962 # * `version =` version
1963 #
1964 # * `version_dot_service =`
1965 # version `+ &#x27;.&#x27; +`
1966 # service
1967 #
1968 # * `instance =` instance
1969 #
1970 # * `instance_dot_service =`
1971 # instance `+ &#x27;.&#x27; +`
1972 # service
1973 #
1974 # * `instance_dot_version =`
1975 # instance `+ &#x27;.&#x27; +`
1976 # version
1977 #
1978 # * `instance_dot_version_dot_service =`
1979 # instance `+ &#x27;.&#x27; +`
1980 # version `+ &#x27;.&#x27; +`
1981 # service
1982 #
1983 # If service is empty, then the task will be sent
1984 # to the service which is the default service when the task is attempted.
1985 #
1986 # If version is empty, then the task will be sent
1987 # to the version which is the default version when the task is attempted.
1988 #
1989 # If instance is empty, then the task
1990 # will be sent to an instance which is available when the task is
1991 # attempted.
1992 #
1993 # If service,
1994 # version, or
1995 # instance is invalid, then the task
1996 # will be sent to the default version of the default service when
1997 # the task is attempted.
1998 &quot;service&quot;: &quot;A String&quot;, # App service.
1999 #
2000 # By default, the task is sent to the service which is the default
2001 # service when the task is attempted.
2002 #
2003 # For some queues or tasks which were created using the App Engine
2004 # Task Queue API, host is not parsable
2005 # into service,
2006 # version, and
2007 # instance. For example, some tasks
2008 # which were created using the App Engine SDK use a custom domain
2009 # name; custom domains are not parsed by Cloud Tasks. If
2010 # host is not parsable, then
2011 # service,
2012 # version, and
2013 # instance are the empty string.
2014 },
2015 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002016 },
2017 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002018 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results.
2019 #
2020 # To return the next page of results, call
2021 # ListQueues with this value as the
2022 # page_token.
2023 #
2024 # If the next_page_token is empty, there are no more results.
2025 #
2026 # The page token is valid for only 2 hours.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002027 }</pre>
2028</div>
2029
2030<div class="method">
2031 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
2032 <pre>Retrieves the next page of results.
2033
2034Args:
2035 previous_request: The request for the previous page. (required)
2036 previous_response: The response from the request for the previous page. (required)
2037
2038Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07002039 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002040 page. Returns None if there are no more items in the collection.
2041 </pre>
2042</div>
2043
2044<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002045 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002046 <pre>Updates a queue.
2047
2048This method creates the queue if it does not exist and updates
2049the queue if it does exist.
2050
2051Queues created with this method allow tasks to live for a maximum of 31
2052days. After a task is 31 days old, the task will be deleted regardless of whether
2053it was dispatched or not.
2054
2055WARNING: Using this method may have unintended side effects if you are
2056using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
2057Read
2058[Overview of Queue Management and
2059queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
2060this method.
2061
2062Args:
2063 name: string, Caller-specified and required in CreateQueue,
2064after which it becomes output only.
2065
2066The queue name.
2067
2068The queue name must have the following format:
2069`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2070
2071* `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2072 hyphens (-), colons (:), or periods (.).
2073 For more information, see
2074 [Identifying
2075 projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -07002076* `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002077 The list of available locations can be obtained by calling
2078 ListLocations.
2079 For more information, see https://cloud.google.com/about/locations/.
2080* `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2081 hyphens (-). The maximum length is 100 characters. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002082 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002083 The object takes the form of:
2084
2085{ # A queue is a container of related tasks. Queues are configured to manage
2086 # how those tasks are dispatched. Configurable properties include rate limits,
2087 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07002088 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002089 #
2090 # All tasks that were created before this time
2091 # were purged.
2092 #
2093 # A queue can be purged using PurgeQueue, the
2094 # [App Engine Task Queue SDK, or the Cloud
2095 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2096 #
2097 # Purge time will be truncated to the nearest microsecond. Purge
2098 # time will be unset if the queue has never been purged.
Bu Sun Kim65020912020-05-20 12:08:20 -07002099 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2100 #
2101 # `state` can only be changed by called
2102 # PauseQueue,
2103 # ResumeQueue, or uploading
2104 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2105 # UpdateQueue cannot be used to change `state`.
2106 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002107 #
2108 # * For tasks created using Cloud Tasks: the queue-level retry settings
2109 # apply to all tasks in the queue that were created using Cloud Tasks.
2110 # Retry settings cannot be set on individual tasks.
2111 # * For tasks created using the App Engine SDK: the queue-level retry
2112 # settings apply to all tasks in the queue which do not have retry settings
2113 # explicitly set on the task and were created by the App Engine SDK. See
2114 # [App Engine
2115 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2116 #
2117 # These settings determine how a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -07002118 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2119 # min_backoff and
2120 # max_backoff duration after it fails,
2121 # if the queue&#x27;s RetryConfig specifies that the task should be
2122 # retried.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002123 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002124 # If unspecified when the queue is created, Cloud Tasks will pick the
2125 # default.
2126 #
2127 # This field is output only for pull queues.
2128 #
2129 #
2130 # `min_backoff` will be truncated to the nearest second.
2131 #
2132 # This field has the same meaning as
2133 # [min_backoff_seconds in
2134 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2135 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2136 # min_backoff and
2137 # max_backoff duration after it fails,
2138 # if the queue&#x27;s RetryConfig specifies that the task should be
2139 # retried.
2140 #
2141 # If unspecified when the queue is created, Cloud Tasks will pick the
2142 # default.
2143 #
2144 # This field is output only for pull queues.
2145 #
2146 #
2147 # `max_backoff` will be truncated to the nearest second.
2148 #
2149 # This field has the same meaning as
2150 # [max_backoff_seconds in
2151 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2152 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2153 # retrying a failed task, measured from when the task was first
2154 # attempted. Once `max_retry_duration` time has passed *and* the
2155 # task has been attempted max_attempts
2156 # times, no further attempts will be made and the task will be
2157 # deleted.
2158 #
2159 # If zero, then the task age is unlimited.
2160 #
2161 # If unspecified when the queue is created, Cloud Tasks will pick the
2162 # default.
2163 #
2164 # This field is output only for pull queues.
2165 #
2166 #
2167 # `max_retry_duration` will be truncated to the nearest second.
2168 #
2169 # This field has the same meaning as
2170 # [task_age_limit in
2171 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2172 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2173 #
2174 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002175 # min_backoff, then doubles
2176 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07002177 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002178 # max_backoff up to
2179 # max_attempts times.
2180 #
2181 # For example, if min_backoff is 10s,
2182 # max_backoff is 300s, and
2183 # `max_doublings` is 3, then the a task will first be retried in
2184 # 10s. The retry interval will double three times, and then
2185 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2186 # intervals of max_backoff until the
2187 # task has been attempted max_attempts
2188 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2189 # 240s, 300s, 300s, ....
2190 #
2191 # If unspecified when the queue is created, Cloud Tasks will pick the
2192 # default.
2193 #
2194 # This field is output only for pull queues.
2195 #
2196 #
2197 # This field has the same meaning as
2198 # [max_doublings in
2199 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07002200 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002201 #
2202 # Cloud Tasks will attempt the task `max_attempts` times (that
2203 # is, if the first attempt fails, then there will be
Dan O'Mearadd494642020-05-01 07:42:23 -07002204 # `max_attempts - 1` retries). Must be &gt; 0.
Bu Sun Kim65020912020-05-20 12:08:20 -07002205 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
2206 },
2207 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2208 # after which it becomes output only.
2209 #
2210 # The queue name.
2211 #
2212 # The queue name must have the following format:
2213 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2214 #
2215 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2216 # hyphens (-), colons (:), or periods (.).
2217 # For more information, see
2218 # [Identifying
2219 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2220 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2221 # The list of available locations can be obtained by calling
2222 # ListLocations.
2223 # For more information, see https://cloud.google.com/about/locations/.
2224 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2225 # hyphens (-). The maximum length is 100 characters.
2226 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2227 #
2228 # rate_limits and
2229 # retry_config are related because they both
2230 # control task attempts however they control how tasks are
2231 # attempted in different ways:
2232 #
2233 # * rate_limits controls the total rate of
2234 # dispatches from a queue (i.e. all traffic dispatched from the
2235 # queue, regardless of whether the dispatch is from a first
2236 # attempt or a retry).
2237 # * retry_config controls what happens to
2238 # particular a task after its first attempt fails. That is,
2239 # retry_config controls task retries (the
2240 # second attempt, third attempt, etc).
2241 #
2242 # This message determines the maximum rate that tasks can be dispatched by a
2243 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2244 #
2245 # Note: The debugging command, RunTask, will run a task
2246 # even if the queue has reached its RateLimits.
Bu Sun Kim65020912020-05-20 12:08:20 -07002247 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002248 #
2249 # If unspecified when the queue is created, Cloud Tasks will pick the
2250 # default.
2251 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002252 # * For App Engine queues, the maximum allowed value
2253 # is 500.
2254 # * This field is output only for pull queues. In addition to the
2255 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
2256 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002257 #
2258 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002259 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002260 # [rate in
2261 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2262 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002263 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002264 # Max burst size limits how fast tasks in queue are processed when
2265 # many tasks are in the queue and the rate is high. This field
2266 # allows the queue to have a high rate so processing starts shortly
2267 # after a task is enqueued, but still limits resource usage when
2268 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002269 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002270 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2271 # algorithm is used to control the rate of task dispatches. Each
2272 # queue has a token bucket that holds tokens, up to the maximum
2273 # specified by `max_burst_size`. Each time a task is dispatched, a
2274 # token is removed from the bucket. Tasks will be dispatched until
2275 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2276 # continuously refilled with new tokens based on
2277 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002278 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002279 # Cloud Tasks will pick the value of `max_burst_size` based on the
2280 # value of
2281 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002282 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002283 # For App Engine queues that were created or updated using
2284 # `queue.yaml/xml`, `max_burst_size` is equal to
2285 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2286 # Since `max_burst_size` is output only, if
2287 # UpdateQueue is called on a queue
2288 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2289 # on the value of
2290 # max_tasks_dispatched_per_second,
2291 # regardless of whether
2292 # max_tasks_dispatched_per_second
2293 # is updated.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002294 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2295 # to be dispatched for this queue. After this threshold has been
2296 # reached, Cloud Tasks stops dispatching tasks until the number of
2297 # concurrent requests decreases.
2298 #
2299 # If unspecified when the queue is created, Cloud Tasks will pick the
2300 # default.
2301 #
2302 #
2303 # The maximum allowed value is 5,000.
2304 #
2305 # This field is output only for
2306 # pull queues and always -1, which indicates no limit. No other
2307 # queue types can have `max_concurrent_tasks` set to -1.
2308 #
2309 #
2310 # This field has the same meaning as
2311 # [max_concurrent_requests in
2312 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -07002313 },
2314 &quot;pullTarget&quot;: { # Pull target. # Pull target.
2315 #
2316 # A pull queue is a queue that has a PullTarget.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002317 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002318 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
2319 #
2320 # An App Engine queue is a queue that has an AppEngineHttpTarget.
2321 #
2322 # The task will be delivered to the App Engine application hostname
2323 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
2324 # The documentation for AppEngineHttpRequest explains how the
2325 # task&#x27;s host URL is constructed.
2326 #
2327 # Using AppEngineHttpTarget requires
2328 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2329 # Google IAM permission for the project
2330 # and the following scope:
2331 #
2332 # `https://www.googleapis.com/auth/cloud-platform`
2333 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
2334 # task-level app_engine_routing.
2335 #
2336 # If set, `app_engine_routing_override` is used for all tasks in
2337 # the queue, no matter what the setting is for the
2338 # task-level app_engine_routing.
2339 #
2340 # Defines routing characteristics specific to App Engine - service, version,
2341 # and instance.
2342 #
2343 # For more information about services, versions, and instances see
2344 # [An Overview of App
2345 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2346 # [Microservices Architecture on Google App
2347 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2348 # [App Engine Standard request
2349 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2350 # and [App Engine Flex request
2351 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2352 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2353 #
2354 # By default, the task is sent to an instance which is available when
2355 # the task is attempted.
2356 #
2357 # Requests can only be sent to a specific instance if
2358 # [manual scaling is used in App Engine
2359 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2360 # App Engine Flex does not support instances. For more information, see
2361 # [App Engine Standard request
2362 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2363 # and [App Engine Flex request
2364 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2365 &quot;version&quot;: &quot;A String&quot;, # App version.
2366 #
2367 # By default, the task is sent to the version which is the default
2368 # version when the task is attempted.
2369 #
2370 # For some queues or tasks which were created using the App Engine
2371 # Task Queue API, host is not parsable
2372 # into service,
2373 # version, and
2374 # instance. For example, some tasks
2375 # which were created using the App Engine SDK use a custom domain
2376 # name; custom domains are not parsed by Cloud Tasks. If
2377 # host is not parsable, then
2378 # service,
2379 # version, and
2380 # instance are the empty string.
2381 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2382 #
2383 # For more information, see
2384 # [How Requests are
2385 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2386 #
2387 # The host is constructed as:
2388 #
2389 #
2390 # * `host = [application_domain_name]`&lt;/br&gt;
2391 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2392 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2393 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2394 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2395 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2396 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2397 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
2398 #
2399 # * `application_domain_name` = The domain name of the app, for
2400 # example &lt;app-id&gt;.appspot.com, which is associated with the
2401 # queue&#x27;s project ID. Some tasks which were created using the App Engine
2402 # SDK use a custom domain name.
2403 #
2404 # * `service =` service
2405 #
2406 # * `version =` version
2407 #
2408 # * `version_dot_service =`
2409 # version `+ &#x27;.&#x27; +`
2410 # service
2411 #
2412 # * `instance =` instance
2413 #
2414 # * `instance_dot_service =`
2415 # instance `+ &#x27;.&#x27; +`
2416 # service
2417 #
2418 # * `instance_dot_version =`
2419 # instance `+ &#x27;.&#x27; +`
2420 # version
2421 #
2422 # * `instance_dot_version_dot_service =`
2423 # instance `+ &#x27;.&#x27; +`
2424 # version `+ &#x27;.&#x27; +`
2425 # service
2426 #
2427 # If service is empty, then the task will be sent
2428 # to the service which is the default service when the task is attempted.
2429 #
2430 # If version is empty, then the task will be sent
2431 # to the version which is the default version when the task is attempted.
2432 #
2433 # If instance is empty, then the task
2434 # will be sent to an instance which is available when the task is
2435 # attempted.
2436 #
2437 # If service,
2438 # version, or
2439 # instance is invalid, then the task
2440 # will be sent to the default version of the default service when
2441 # the task is attempted.
2442 &quot;service&quot;: &quot;A String&quot;, # App service.
2443 #
2444 # By default, the task is sent to the service which is the default
2445 # service when the task is attempted.
2446 #
2447 # For some queues or tasks which were created using the App Engine
2448 # Task Queue API, host is not parsable
2449 # into service,
2450 # version, and
2451 # instance. For example, some tasks
2452 # which were created using the App Engine SDK use a custom domain
2453 # name; custom domains are not parsed by Cloud Tasks. If
2454 # host is not parsable, then
2455 # service,
2456 # version, and
2457 # instance are the empty string.
2458 },
2459 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002460}
2461
2462 updateMask: string, A mask used to specify which fields of the queue are being updated.
2463
2464If empty, then all fields will be updated.
2465 x__xgafv: string, V1 error format.
2466 Allowed values
2467 1 - v1 error format
2468 2 - v2 error format
2469
2470Returns:
2471 An object of the form:
2472
2473 { # A queue is a container of related tasks. Queues are configured to manage
2474 # how those tasks are dispatched. Configurable properties include rate limits,
2475 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07002476 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002477 #
2478 # All tasks that were created before this time
2479 # were purged.
2480 #
2481 # A queue can be purged using PurgeQueue, the
2482 # [App Engine Task Queue SDK, or the Cloud
2483 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2484 #
2485 # Purge time will be truncated to the nearest microsecond. Purge
2486 # time will be unset if the queue has never been purged.
Bu Sun Kim65020912020-05-20 12:08:20 -07002487 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2488 #
2489 # `state` can only be changed by called
2490 # PauseQueue,
2491 # ResumeQueue, or uploading
2492 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2493 # UpdateQueue cannot be used to change `state`.
2494 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002495 #
2496 # * For tasks created using Cloud Tasks: the queue-level retry settings
2497 # apply to all tasks in the queue that were created using Cloud Tasks.
2498 # Retry settings cannot be set on individual tasks.
2499 # * For tasks created using the App Engine SDK: the queue-level retry
2500 # settings apply to all tasks in the queue which do not have retry settings
2501 # explicitly set on the task and were created by the App Engine SDK. See
2502 # [App Engine
2503 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2504 #
2505 # These settings determine how a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -07002506 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2507 # min_backoff and
2508 # max_backoff duration after it fails,
2509 # if the queue&#x27;s RetryConfig specifies that the task should be
2510 # retried.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002511 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002512 # If unspecified when the queue is created, Cloud Tasks will pick the
2513 # default.
2514 #
2515 # This field is output only for pull queues.
2516 #
2517 #
2518 # `min_backoff` will be truncated to the nearest second.
2519 #
2520 # This field has the same meaning as
2521 # [min_backoff_seconds in
2522 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2523 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2524 # min_backoff and
2525 # max_backoff duration after it fails,
2526 # if the queue&#x27;s RetryConfig specifies that the task should be
2527 # retried.
2528 #
2529 # If unspecified when the queue is created, Cloud Tasks will pick the
2530 # default.
2531 #
2532 # This field is output only for pull queues.
2533 #
2534 #
2535 # `max_backoff` will be truncated to the nearest second.
2536 #
2537 # This field has the same meaning as
2538 # [max_backoff_seconds in
2539 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2540 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2541 # retrying a failed task, measured from when the task was first
2542 # attempted. Once `max_retry_duration` time has passed *and* the
2543 # task has been attempted max_attempts
2544 # times, no further attempts will be made and the task will be
2545 # deleted.
2546 #
2547 # If zero, then the task age is unlimited.
2548 #
2549 # If unspecified when the queue is created, Cloud Tasks will pick the
2550 # default.
2551 #
2552 # This field is output only for pull queues.
2553 #
2554 #
2555 # `max_retry_duration` will be truncated to the nearest second.
2556 #
2557 # This field has the same meaning as
2558 # [task_age_limit in
2559 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2560 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2561 #
2562 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002563 # min_backoff, then doubles
2564 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07002565 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002566 # max_backoff up to
2567 # max_attempts times.
2568 #
2569 # For example, if min_backoff is 10s,
2570 # max_backoff is 300s, and
2571 # `max_doublings` is 3, then the a task will first be retried in
2572 # 10s. The retry interval will double three times, and then
2573 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2574 # intervals of max_backoff until the
2575 # task has been attempted max_attempts
2576 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2577 # 240s, 300s, 300s, ....
2578 #
2579 # If unspecified when the queue is created, Cloud Tasks will pick the
2580 # default.
2581 #
2582 # This field is output only for pull queues.
2583 #
2584 #
2585 # This field has the same meaning as
2586 # [max_doublings in
2587 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07002588 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002589 #
2590 # Cloud Tasks will attempt the task `max_attempts` times (that
2591 # is, if the first attempt fails, then there will be
Dan O'Mearadd494642020-05-01 07:42:23 -07002592 # `max_attempts - 1` retries). Must be &gt; 0.
Bu Sun Kim65020912020-05-20 12:08:20 -07002593 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
2594 },
2595 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2596 # after which it becomes output only.
2597 #
2598 # The queue name.
2599 #
2600 # The queue name must have the following format:
2601 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2602 #
2603 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2604 # hyphens (-), colons (:), or periods (.).
2605 # For more information, see
2606 # [Identifying
2607 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2608 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2609 # The list of available locations can be obtained by calling
2610 # ListLocations.
2611 # For more information, see https://cloud.google.com/about/locations/.
2612 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2613 # hyphens (-). The maximum length is 100 characters.
2614 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2615 #
2616 # rate_limits and
2617 # retry_config are related because they both
2618 # control task attempts however they control how tasks are
2619 # attempted in different ways:
2620 #
2621 # * rate_limits controls the total rate of
2622 # dispatches from a queue (i.e. all traffic dispatched from the
2623 # queue, regardless of whether the dispatch is from a first
2624 # attempt or a retry).
2625 # * retry_config controls what happens to
2626 # particular a task after its first attempt fails. That is,
2627 # retry_config controls task retries (the
2628 # second attempt, third attempt, etc).
2629 #
2630 # This message determines the maximum rate that tasks can be dispatched by a
2631 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2632 #
2633 # Note: The debugging command, RunTask, will run a task
2634 # even if the queue has reached its RateLimits.
Bu Sun Kim65020912020-05-20 12:08:20 -07002635 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002636 #
2637 # If unspecified when the queue is created, Cloud Tasks will pick the
2638 # default.
2639 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002640 # * For App Engine queues, the maximum allowed value
2641 # is 500.
2642 # * This field is output only for pull queues. In addition to the
2643 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
2644 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002645 #
2646 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002647 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002648 # [rate in
2649 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2650 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002651 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002652 # Max burst size limits how fast tasks in queue are processed when
2653 # many tasks are in the queue and the rate is high. This field
2654 # allows the queue to have a high rate so processing starts shortly
2655 # after a task is enqueued, but still limits resource usage when
2656 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002657 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002658 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2659 # algorithm is used to control the rate of task dispatches. Each
2660 # queue has a token bucket that holds tokens, up to the maximum
2661 # specified by `max_burst_size`. Each time a task is dispatched, a
2662 # token is removed from the bucket. Tasks will be dispatched until
2663 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2664 # continuously refilled with new tokens based on
2665 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002666 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002667 # Cloud Tasks will pick the value of `max_burst_size` based on the
2668 # value of
2669 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002670 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002671 # For App Engine queues that were created or updated using
2672 # `queue.yaml/xml`, `max_burst_size` is equal to
2673 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2674 # Since `max_burst_size` is output only, if
2675 # UpdateQueue is called on a queue
2676 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2677 # on the value of
2678 # max_tasks_dispatched_per_second,
2679 # regardless of whether
2680 # max_tasks_dispatched_per_second
2681 # is updated.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002682 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2683 # to be dispatched for this queue. After this threshold has been
2684 # reached, Cloud Tasks stops dispatching tasks until the number of
2685 # concurrent requests decreases.
2686 #
2687 # If unspecified when the queue is created, Cloud Tasks will pick the
2688 # default.
2689 #
2690 #
2691 # The maximum allowed value is 5,000.
2692 #
2693 # This field is output only for
2694 # pull queues and always -1, which indicates no limit. No other
2695 # queue types can have `max_concurrent_tasks` set to -1.
2696 #
2697 #
2698 # This field has the same meaning as
2699 # [max_concurrent_requests in
2700 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -07002701 },
2702 &quot;pullTarget&quot;: { # Pull target. # Pull target.
2703 #
2704 # A pull queue is a queue that has a PullTarget.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002705 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002706 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
2707 #
2708 # An App Engine queue is a queue that has an AppEngineHttpTarget.
2709 #
2710 # The task will be delivered to the App Engine application hostname
2711 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
2712 # The documentation for AppEngineHttpRequest explains how the
2713 # task&#x27;s host URL is constructed.
2714 #
2715 # Using AppEngineHttpTarget requires
2716 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2717 # Google IAM permission for the project
2718 # and the following scope:
2719 #
2720 # `https://www.googleapis.com/auth/cloud-platform`
2721 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
2722 # task-level app_engine_routing.
2723 #
2724 # If set, `app_engine_routing_override` is used for all tasks in
2725 # the queue, no matter what the setting is for the
2726 # task-level app_engine_routing.
2727 #
2728 # Defines routing characteristics specific to App Engine - service, version,
2729 # and instance.
2730 #
2731 # For more information about services, versions, and instances see
2732 # [An Overview of App
2733 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2734 # [Microservices Architecture on Google App
2735 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2736 # [App Engine Standard request
2737 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2738 # and [App Engine Flex request
2739 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2740 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2741 #
2742 # By default, the task is sent to an instance which is available when
2743 # the task is attempted.
2744 #
2745 # Requests can only be sent to a specific instance if
2746 # [manual scaling is used in App Engine
2747 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2748 # App Engine Flex does not support instances. For more information, see
2749 # [App Engine Standard request
2750 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2751 # and [App Engine Flex request
2752 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2753 &quot;version&quot;: &quot;A String&quot;, # App version.
2754 #
2755 # By default, the task is sent to the version which is the default
2756 # version when the task is attempted.
2757 #
2758 # For some queues or tasks which were created using the App Engine
2759 # Task Queue API, host is not parsable
2760 # into service,
2761 # version, and
2762 # instance. For example, some tasks
2763 # which were created using the App Engine SDK use a custom domain
2764 # name; custom domains are not parsed by Cloud Tasks. If
2765 # host is not parsable, then
2766 # service,
2767 # version, and
2768 # instance are the empty string.
2769 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2770 #
2771 # For more information, see
2772 # [How Requests are
2773 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2774 #
2775 # The host is constructed as:
2776 #
2777 #
2778 # * `host = [application_domain_name]`&lt;/br&gt;
2779 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2780 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2781 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2782 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2783 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2784 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2785 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
2786 #
2787 # * `application_domain_name` = The domain name of the app, for
2788 # example &lt;app-id&gt;.appspot.com, which is associated with the
2789 # queue&#x27;s project ID. Some tasks which were created using the App Engine
2790 # SDK use a custom domain name.
2791 #
2792 # * `service =` service
2793 #
2794 # * `version =` version
2795 #
2796 # * `version_dot_service =`
2797 # version `+ &#x27;.&#x27; +`
2798 # service
2799 #
2800 # * `instance =` instance
2801 #
2802 # * `instance_dot_service =`
2803 # instance `+ &#x27;.&#x27; +`
2804 # service
2805 #
2806 # * `instance_dot_version =`
2807 # instance `+ &#x27;.&#x27; +`
2808 # version
2809 #
2810 # * `instance_dot_version_dot_service =`
2811 # instance `+ &#x27;.&#x27; +`
2812 # version `+ &#x27;.&#x27; +`
2813 # service
2814 #
2815 # If service is empty, then the task will be sent
2816 # to the service which is the default service when the task is attempted.
2817 #
2818 # If version is empty, then the task will be sent
2819 # to the version which is the default version when the task is attempted.
2820 #
2821 # If instance is empty, then the task
2822 # will be sent to an instance which is available when the task is
2823 # attempted.
2824 #
2825 # If service,
2826 # version, or
2827 # instance is invalid, then the task
2828 # will be sent to the default version of the default service when
2829 # the task is attempted.
2830 &quot;service&quot;: &quot;A String&quot;, # App service.
2831 #
2832 # By default, the task is sent to the service which is the default
2833 # service when the task is attempted.
2834 #
2835 # For some queues or tasks which were created using the App Engine
2836 # Task Queue API, host is not parsable
2837 # into service,
2838 # version, and
2839 # instance. For example, some tasks
2840 # which were created using the App Engine SDK use a custom domain
2841 # name; custom domains are not parsed by Cloud Tasks. If
2842 # host is not parsable, then
2843 # service,
2844 # version, and
2845 # instance are the empty string.
2846 },
2847 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002848 }</pre>
2849</div>
2850
2851<div class="method">
2852 <code class="details" id="pause">pause(name, body=None, x__xgafv=None)</code>
2853 <pre>Pauses the queue.
2854
2855If a queue is paused then the system will stop dispatching tasks
2856until the queue is resumed via
2857ResumeQueue. Tasks can still be added
2858when the queue is paused. A queue is paused if its
2859state is PAUSED.
2860
2861Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002862 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002863`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
2864 body: object, The request body.
2865 The object takes the form of:
2866
2867{ # Request message for PauseQueue.
2868 }
2869
2870 x__xgafv: string, V1 error format.
2871 Allowed values
2872 1 - v1 error format
2873 2 - v2 error format
2874
2875Returns:
2876 An object of the form:
2877
2878 { # A queue is a container of related tasks. Queues are configured to manage
2879 # how those tasks are dispatched. Configurable properties include rate limits,
2880 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07002881 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002882 #
2883 # All tasks that were created before this time
2884 # were purged.
2885 #
2886 # A queue can be purged using PurgeQueue, the
2887 # [App Engine Task Queue SDK, or the Cloud
2888 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2889 #
2890 # Purge time will be truncated to the nearest microsecond. Purge
2891 # time will be unset if the queue has never been purged.
Bu Sun Kim65020912020-05-20 12:08:20 -07002892 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2893 #
2894 # `state` can only be changed by called
2895 # PauseQueue,
2896 # ResumeQueue, or uploading
2897 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2898 # UpdateQueue cannot be used to change `state`.
2899 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002900 #
2901 # * For tasks created using Cloud Tasks: the queue-level retry settings
2902 # apply to all tasks in the queue that were created using Cloud Tasks.
2903 # Retry settings cannot be set on individual tasks.
2904 # * For tasks created using the App Engine SDK: the queue-level retry
2905 # settings apply to all tasks in the queue which do not have retry settings
2906 # explicitly set on the task and were created by the App Engine SDK. See
2907 # [App Engine
2908 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2909 #
2910 # These settings determine how a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -07002911 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2912 # min_backoff and
2913 # max_backoff duration after it fails,
2914 # if the queue&#x27;s RetryConfig specifies that the task should be
2915 # retried.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002916 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002917 # If unspecified when the queue is created, Cloud Tasks will pick the
2918 # default.
2919 #
2920 # This field is output only for pull queues.
2921 #
2922 #
2923 # `min_backoff` will be truncated to the nearest second.
2924 #
2925 # This field has the same meaning as
2926 # [min_backoff_seconds in
2927 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2928 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2929 # min_backoff and
2930 # max_backoff duration after it fails,
2931 # if the queue&#x27;s RetryConfig specifies that the task should be
2932 # retried.
2933 #
2934 # If unspecified when the queue is created, Cloud Tasks will pick the
2935 # default.
2936 #
2937 # This field is output only for pull queues.
2938 #
2939 #
2940 # `max_backoff` will be truncated to the nearest second.
2941 #
2942 # This field has the same meaning as
2943 # [max_backoff_seconds in
2944 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2945 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2946 # retrying a failed task, measured from when the task was first
2947 # attempted. Once `max_retry_duration` time has passed *and* the
2948 # task has been attempted max_attempts
2949 # times, no further attempts will be made and the task will be
2950 # deleted.
2951 #
2952 # If zero, then the task age is unlimited.
2953 #
2954 # If unspecified when the queue is created, Cloud Tasks will pick the
2955 # default.
2956 #
2957 # This field is output only for pull queues.
2958 #
2959 #
2960 # `max_retry_duration` will be truncated to the nearest second.
2961 #
2962 # This field has the same meaning as
2963 # [task_age_limit in
2964 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2965 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2966 #
2967 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002968 # min_backoff, then doubles
2969 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07002970 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002971 # max_backoff up to
2972 # max_attempts times.
2973 #
2974 # For example, if min_backoff is 10s,
2975 # max_backoff is 300s, and
2976 # `max_doublings` is 3, then the a task will first be retried in
2977 # 10s. The retry interval will double three times, and then
2978 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2979 # intervals of max_backoff until the
2980 # task has been attempted max_attempts
2981 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2982 # 240s, 300s, 300s, ....
2983 #
2984 # If unspecified when the queue is created, Cloud Tasks will pick the
2985 # default.
2986 #
2987 # This field is output only for pull queues.
2988 #
2989 #
2990 # This field has the same meaning as
2991 # [max_doublings in
2992 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07002993 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002994 #
2995 # Cloud Tasks will attempt the task `max_attempts` times (that
2996 # is, if the first attempt fails, then there will be
Dan O'Mearadd494642020-05-01 07:42:23 -07002997 # `max_attempts - 1` retries). Must be &gt; 0.
Bu Sun Kim65020912020-05-20 12:08:20 -07002998 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
2999 },
3000 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
3001 # after which it becomes output only.
3002 #
3003 # The queue name.
3004 #
3005 # The queue name must have the following format:
3006 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
3007 #
3008 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3009 # hyphens (-), colons (:), or periods (.).
3010 # For more information, see
3011 # [Identifying
3012 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3013 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
3014 # The list of available locations can be obtained by calling
3015 # ListLocations.
3016 # For more information, see https://cloud.google.com/about/locations/.
3017 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3018 # hyphens (-). The maximum length is 100 characters.
3019 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
3020 #
3021 # rate_limits and
3022 # retry_config are related because they both
3023 # control task attempts however they control how tasks are
3024 # attempted in different ways:
3025 #
3026 # * rate_limits controls the total rate of
3027 # dispatches from a queue (i.e. all traffic dispatched from the
3028 # queue, regardless of whether the dispatch is from a first
3029 # attempt or a retry).
3030 # * retry_config controls what happens to
3031 # particular a task after its first attempt fails. That is,
3032 # retry_config controls task retries (the
3033 # second attempt, third attempt, etc).
3034 #
3035 # This message determines the maximum rate that tasks can be dispatched by a
3036 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3037 #
3038 # Note: The debugging command, RunTask, will run a task
3039 # even if the queue has reached its RateLimits.
Bu Sun Kim65020912020-05-20 12:08:20 -07003040 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003041 #
3042 # If unspecified when the queue is created, Cloud Tasks will pick the
3043 # default.
3044 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003045 # * For App Engine queues, the maximum allowed value
3046 # is 500.
3047 # * This field is output only for pull queues. In addition to the
3048 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
3049 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003050 #
3051 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003052 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07003053 # [rate in
3054 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
3055 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003056 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003057 # Max burst size limits how fast tasks in queue are processed when
3058 # many tasks are in the queue and the rate is high. This field
3059 # allows the queue to have a high rate so processing starts shortly
3060 # after a task is enqueued, but still limits resource usage when
3061 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003062 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003063 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3064 # algorithm is used to control the rate of task dispatches. Each
3065 # queue has a token bucket that holds tokens, up to the maximum
3066 # specified by `max_burst_size`. Each time a task is dispatched, a
3067 # token is removed from the bucket. Tasks will be dispatched until
3068 # the queue&#x27;s bucket runs out of tokens. The bucket will be
3069 # continuously refilled with new tokens based on
3070 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003071 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003072 # Cloud Tasks will pick the value of `max_burst_size` based on the
3073 # value of
3074 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003075 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003076 # For App Engine queues that were created or updated using
3077 # `queue.yaml/xml`, `max_burst_size` is equal to
3078 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3079 # Since `max_burst_size` is output only, if
3080 # UpdateQueue is called on a queue
3081 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3082 # on the value of
3083 # max_tasks_dispatched_per_second,
3084 # regardless of whether
3085 # max_tasks_dispatched_per_second
3086 # is updated.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003087 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3088 # to be dispatched for this queue. After this threshold has been
3089 # reached, Cloud Tasks stops dispatching tasks until the number of
3090 # concurrent requests decreases.
3091 #
3092 # If unspecified when the queue is created, Cloud Tasks will pick the
3093 # default.
3094 #
3095 #
3096 # The maximum allowed value is 5,000.
3097 #
3098 # This field is output only for
3099 # pull queues and always -1, which indicates no limit. No other
3100 # queue types can have `max_concurrent_tasks` set to -1.
3101 #
3102 #
3103 # This field has the same meaning as
3104 # [max_concurrent_requests in
3105 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -07003106 },
3107 &quot;pullTarget&quot;: { # Pull target. # Pull target.
3108 #
3109 # A pull queue is a queue that has a PullTarget.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003110 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003111 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
3112 #
3113 # An App Engine queue is a queue that has an AppEngineHttpTarget.
3114 #
3115 # The task will be delivered to the App Engine application hostname
3116 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
3117 # The documentation for AppEngineHttpRequest explains how the
3118 # task&#x27;s host URL is constructed.
3119 #
3120 # Using AppEngineHttpTarget requires
3121 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3122 # Google IAM permission for the project
3123 # and the following scope:
3124 #
3125 # `https://www.googleapis.com/auth/cloud-platform`
3126 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
3127 # task-level app_engine_routing.
3128 #
3129 # If set, `app_engine_routing_override` is used for all tasks in
3130 # the queue, no matter what the setting is for the
3131 # task-level app_engine_routing.
3132 #
3133 # Defines routing characteristics specific to App Engine - service, version,
3134 # and instance.
3135 #
3136 # For more information about services, versions, and instances see
3137 # [An Overview of App
3138 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3139 # [Microservices Architecture on Google App
3140 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3141 # [App Engine Standard request
3142 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3143 # and [App Engine Flex request
3144 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3145 &quot;instance&quot;: &quot;A String&quot;, # App instance.
3146 #
3147 # By default, the task is sent to an instance which is available when
3148 # the task is attempted.
3149 #
3150 # Requests can only be sent to a specific instance if
3151 # [manual scaling is used in App Engine
3152 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3153 # App Engine Flex does not support instances. For more information, see
3154 # [App Engine Standard request
3155 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3156 # and [App Engine Flex request
3157 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3158 &quot;version&quot;: &quot;A String&quot;, # App version.
3159 #
3160 # By default, the task is sent to the version which is the default
3161 # version when the task is attempted.
3162 #
3163 # For some queues or tasks which were created using the App Engine
3164 # Task Queue API, host is not parsable
3165 # into service,
3166 # version, and
3167 # instance. For example, some tasks
3168 # which were created using the App Engine SDK use a custom domain
3169 # name; custom domains are not parsed by Cloud Tasks. If
3170 # host is not parsable, then
3171 # service,
3172 # version, and
3173 # instance are the empty string.
3174 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
3175 #
3176 # For more information, see
3177 # [How Requests are
3178 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3179 #
3180 # The host is constructed as:
3181 #
3182 #
3183 # * `host = [application_domain_name]`&lt;/br&gt;
3184 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3185 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3186 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3187 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3188 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3189 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3190 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
3191 #
3192 # * `application_domain_name` = The domain name of the app, for
3193 # example &lt;app-id&gt;.appspot.com, which is associated with the
3194 # queue&#x27;s project ID. Some tasks which were created using the App Engine
3195 # SDK use a custom domain name.
3196 #
3197 # * `service =` service
3198 #
3199 # * `version =` version
3200 #
3201 # * `version_dot_service =`
3202 # version `+ &#x27;.&#x27; +`
3203 # service
3204 #
3205 # * `instance =` instance
3206 #
3207 # * `instance_dot_service =`
3208 # instance `+ &#x27;.&#x27; +`
3209 # service
3210 #
3211 # * `instance_dot_version =`
3212 # instance `+ &#x27;.&#x27; +`
3213 # version
3214 #
3215 # * `instance_dot_version_dot_service =`
3216 # instance `+ &#x27;.&#x27; +`
3217 # version `+ &#x27;.&#x27; +`
3218 # service
3219 #
3220 # If service is empty, then the task will be sent
3221 # to the service which is the default service when the task is attempted.
3222 #
3223 # If version is empty, then the task will be sent
3224 # to the version which is the default version when the task is attempted.
3225 #
3226 # If instance is empty, then the task
3227 # will be sent to an instance which is available when the task is
3228 # attempted.
3229 #
3230 # If service,
3231 # version, or
3232 # instance is invalid, then the task
3233 # will be sent to the default version of the default service when
3234 # the task is attempted.
3235 &quot;service&quot;: &quot;A String&quot;, # App service.
3236 #
3237 # By default, the task is sent to the service which is the default
3238 # service when the task is attempted.
3239 #
3240 # For some queues or tasks which were created using the App Engine
3241 # Task Queue API, host is not parsable
3242 # into service,
3243 # version, and
3244 # instance. For example, some tasks
3245 # which were created using the App Engine SDK use a custom domain
3246 # name; custom domains are not parsed by Cloud Tasks. If
3247 # host is not parsable, then
3248 # service,
3249 # version, and
3250 # instance are the empty string.
3251 },
3252 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003253 }</pre>
3254</div>
3255
3256<div class="method">
3257 <code class="details" id="purge">purge(name, body=None, x__xgafv=None)</code>
3258 <pre>Purges a queue by deleting all of its tasks.
3259
3260All tasks created before this method is called are permanently deleted.
3261
3262Purge operations can take up to one minute to take effect. Tasks
3263might be dispatched before the purge takes effect. A purge is irreversible.
3264
3265Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07003266 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003267`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
3268 body: object, The request body.
3269 The object takes the form of:
3270
3271{ # Request message for PurgeQueue.
3272 }
3273
3274 x__xgafv: string, V1 error format.
3275 Allowed values
3276 1 - v1 error format
3277 2 - v2 error format
3278
3279Returns:
3280 An object of the form:
3281
3282 { # A queue is a container of related tasks. Queues are configured to manage
3283 # how those tasks are dispatched. Configurable properties include rate limits,
3284 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07003285 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003286 #
3287 # All tasks that were created before this time
3288 # were purged.
3289 #
3290 # A queue can be purged using PurgeQueue, the
3291 # [App Engine Task Queue SDK, or the Cloud
3292 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
3293 #
3294 # Purge time will be truncated to the nearest microsecond. Purge
3295 # time will be unset if the queue has never been purged.
Bu Sun Kim65020912020-05-20 12:08:20 -07003296 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
3297 #
3298 # `state` can only be changed by called
3299 # PauseQueue,
3300 # ResumeQueue, or uploading
3301 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3302 # UpdateQueue cannot be used to change `state`.
3303 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003304 #
3305 # * For tasks created using Cloud Tasks: the queue-level retry settings
3306 # apply to all tasks in the queue that were created using Cloud Tasks.
3307 # Retry settings cannot be set on individual tasks.
3308 # * For tasks created using the App Engine SDK: the queue-level retry
3309 # settings apply to all tasks in the queue which do not have retry settings
3310 # explicitly set on the task and were created by the App Engine SDK. See
3311 # [App Engine
3312 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3313 #
3314 # These settings determine how a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -07003315 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3316 # min_backoff and
3317 # max_backoff duration after it fails,
3318 # if the queue&#x27;s RetryConfig specifies that the task should be
3319 # retried.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003320 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003321 # If unspecified when the queue is created, Cloud Tasks will pick the
3322 # default.
3323 #
3324 # This field is output only for pull queues.
3325 #
3326 #
3327 # `min_backoff` will be truncated to the nearest second.
3328 #
3329 # This field has the same meaning as
3330 # [min_backoff_seconds in
3331 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3332 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3333 # min_backoff and
3334 # max_backoff duration after it fails,
3335 # if the queue&#x27;s RetryConfig specifies that the task should be
3336 # retried.
3337 #
3338 # If unspecified when the queue is created, Cloud Tasks will pick the
3339 # default.
3340 #
3341 # This field is output only for pull queues.
3342 #
3343 #
3344 # `max_backoff` will be truncated to the nearest second.
3345 #
3346 # This field has the same meaning as
3347 # [max_backoff_seconds in
3348 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3349 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
3350 # retrying a failed task, measured from when the task was first
3351 # attempted. Once `max_retry_duration` time has passed *and* the
3352 # task has been attempted max_attempts
3353 # times, no further attempts will be made and the task will be
3354 # deleted.
3355 #
3356 # If zero, then the task age is unlimited.
3357 #
3358 # If unspecified when the queue is created, Cloud Tasks will pick the
3359 # default.
3360 #
3361 # This field is output only for pull queues.
3362 #
3363 #
3364 # `max_retry_duration` will be truncated to the nearest second.
3365 #
3366 # This field has the same meaning as
3367 # [task_age_limit in
3368 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3369 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
3370 #
3371 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003372 # min_backoff, then doubles
3373 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07003374 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003375 # max_backoff up to
3376 # max_attempts times.
3377 #
3378 # For example, if min_backoff is 10s,
3379 # max_backoff is 300s, and
3380 # `max_doublings` is 3, then the a task will first be retried in
3381 # 10s. The retry interval will double three times, and then
3382 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3383 # intervals of max_backoff until the
3384 # task has been attempted max_attempts
3385 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3386 # 240s, 300s, 300s, ....
3387 #
3388 # If unspecified when the queue is created, Cloud Tasks will pick the
3389 # default.
3390 #
3391 # This field is output only for pull queues.
3392 #
3393 #
3394 # This field has the same meaning as
3395 # [max_doublings in
3396 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07003397 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003398 #
3399 # Cloud Tasks will attempt the task `max_attempts` times (that
3400 # is, if the first attempt fails, then there will be
Dan O'Mearadd494642020-05-01 07:42:23 -07003401 # `max_attempts - 1` retries). Must be &gt; 0.
Bu Sun Kim65020912020-05-20 12:08:20 -07003402 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
3403 },
3404 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
3405 # after which it becomes output only.
3406 #
3407 # The queue name.
3408 #
3409 # The queue name must have the following format:
3410 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
3411 #
3412 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3413 # hyphens (-), colons (:), or periods (.).
3414 # For more information, see
3415 # [Identifying
3416 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3417 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
3418 # The list of available locations can be obtained by calling
3419 # ListLocations.
3420 # For more information, see https://cloud.google.com/about/locations/.
3421 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3422 # hyphens (-). The maximum length is 100 characters.
3423 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
3424 #
3425 # rate_limits and
3426 # retry_config are related because they both
3427 # control task attempts however they control how tasks are
3428 # attempted in different ways:
3429 #
3430 # * rate_limits controls the total rate of
3431 # dispatches from a queue (i.e. all traffic dispatched from the
3432 # queue, regardless of whether the dispatch is from a first
3433 # attempt or a retry).
3434 # * retry_config controls what happens to
3435 # particular a task after its first attempt fails. That is,
3436 # retry_config controls task retries (the
3437 # second attempt, third attempt, etc).
3438 #
3439 # This message determines the maximum rate that tasks can be dispatched by a
3440 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3441 #
3442 # Note: The debugging command, RunTask, will run a task
3443 # even if the queue has reached its RateLimits.
Bu Sun Kim65020912020-05-20 12:08:20 -07003444 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003445 #
3446 # If unspecified when the queue is created, Cloud Tasks will pick the
3447 # default.
3448 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003449 # * For App Engine queues, the maximum allowed value
3450 # is 500.
3451 # * This field is output only for pull queues. In addition to the
3452 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
3453 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003454 #
3455 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003456 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07003457 # [rate in
3458 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
3459 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003460 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003461 # Max burst size limits how fast tasks in queue are processed when
3462 # many tasks are in the queue and the rate is high. This field
3463 # allows the queue to have a high rate so processing starts shortly
3464 # after a task is enqueued, but still limits resource usage when
3465 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003466 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003467 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3468 # algorithm is used to control the rate of task dispatches. Each
3469 # queue has a token bucket that holds tokens, up to the maximum
3470 # specified by `max_burst_size`. Each time a task is dispatched, a
3471 # token is removed from the bucket. Tasks will be dispatched until
3472 # the queue&#x27;s bucket runs out of tokens. The bucket will be
3473 # continuously refilled with new tokens based on
3474 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003475 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003476 # Cloud Tasks will pick the value of `max_burst_size` based on the
3477 # value of
3478 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003479 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003480 # For App Engine queues that were created or updated using
3481 # `queue.yaml/xml`, `max_burst_size` is equal to
3482 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3483 # Since `max_burst_size` is output only, if
3484 # UpdateQueue is called on a queue
3485 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3486 # on the value of
3487 # max_tasks_dispatched_per_second,
3488 # regardless of whether
3489 # max_tasks_dispatched_per_second
3490 # is updated.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003491 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3492 # to be dispatched for this queue. After this threshold has been
3493 # reached, Cloud Tasks stops dispatching tasks until the number of
3494 # concurrent requests decreases.
3495 #
3496 # If unspecified when the queue is created, Cloud Tasks will pick the
3497 # default.
3498 #
3499 #
3500 # The maximum allowed value is 5,000.
3501 #
3502 # This field is output only for
3503 # pull queues and always -1, which indicates no limit. No other
3504 # queue types can have `max_concurrent_tasks` set to -1.
3505 #
3506 #
3507 # This field has the same meaning as
3508 # [max_concurrent_requests in
3509 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -07003510 },
3511 &quot;pullTarget&quot;: { # Pull target. # Pull target.
3512 #
3513 # A pull queue is a queue that has a PullTarget.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003514 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003515 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
3516 #
3517 # An App Engine queue is a queue that has an AppEngineHttpTarget.
3518 #
3519 # The task will be delivered to the App Engine application hostname
3520 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
3521 # The documentation for AppEngineHttpRequest explains how the
3522 # task&#x27;s host URL is constructed.
3523 #
3524 # Using AppEngineHttpTarget requires
3525 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3526 # Google IAM permission for the project
3527 # and the following scope:
3528 #
3529 # `https://www.googleapis.com/auth/cloud-platform`
3530 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
3531 # task-level app_engine_routing.
3532 #
3533 # If set, `app_engine_routing_override` is used for all tasks in
3534 # the queue, no matter what the setting is for the
3535 # task-level app_engine_routing.
3536 #
3537 # Defines routing characteristics specific to App Engine - service, version,
3538 # and instance.
3539 #
3540 # For more information about services, versions, and instances see
3541 # [An Overview of App
3542 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3543 # [Microservices Architecture on Google App
3544 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3545 # [App Engine Standard request
3546 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3547 # and [App Engine Flex request
3548 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3549 &quot;instance&quot;: &quot;A String&quot;, # App instance.
3550 #
3551 # By default, the task is sent to an instance which is available when
3552 # the task is attempted.
3553 #
3554 # Requests can only be sent to a specific instance if
3555 # [manual scaling is used in App Engine
3556 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3557 # App Engine Flex does not support instances. For more information, see
3558 # [App Engine Standard request
3559 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3560 # and [App Engine Flex request
3561 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3562 &quot;version&quot;: &quot;A String&quot;, # App version.
3563 #
3564 # By default, the task is sent to the version which is the default
3565 # version when the task is attempted.
3566 #
3567 # For some queues or tasks which were created using the App Engine
3568 # Task Queue API, host is not parsable
3569 # into service,
3570 # version, and
3571 # instance. For example, some tasks
3572 # which were created using the App Engine SDK use a custom domain
3573 # name; custom domains are not parsed by Cloud Tasks. If
3574 # host is not parsable, then
3575 # service,
3576 # version, and
3577 # instance are the empty string.
3578 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
3579 #
3580 # For more information, see
3581 # [How Requests are
3582 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3583 #
3584 # The host is constructed as:
3585 #
3586 #
3587 # * `host = [application_domain_name]`&lt;/br&gt;
3588 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3589 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3590 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3591 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3592 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3593 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3594 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
3595 #
3596 # * `application_domain_name` = The domain name of the app, for
3597 # example &lt;app-id&gt;.appspot.com, which is associated with the
3598 # queue&#x27;s project ID. Some tasks which were created using the App Engine
3599 # SDK use a custom domain name.
3600 #
3601 # * `service =` service
3602 #
3603 # * `version =` version
3604 #
3605 # * `version_dot_service =`
3606 # version `+ &#x27;.&#x27; +`
3607 # service
3608 #
3609 # * `instance =` instance
3610 #
3611 # * `instance_dot_service =`
3612 # instance `+ &#x27;.&#x27; +`
3613 # service
3614 #
3615 # * `instance_dot_version =`
3616 # instance `+ &#x27;.&#x27; +`
3617 # version
3618 #
3619 # * `instance_dot_version_dot_service =`
3620 # instance `+ &#x27;.&#x27; +`
3621 # version `+ &#x27;.&#x27; +`
3622 # service
3623 #
3624 # If service is empty, then the task will be sent
3625 # to the service which is the default service when the task is attempted.
3626 #
3627 # If version is empty, then the task will be sent
3628 # to the version which is the default version when the task is attempted.
3629 #
3630 # If instance is empty, then the task
3631 # will be sent to an instance which is available when the task is
3632 # attempted.
3633 #
3634 # If service,
3635 # version, or
3636 # instance is invalid, then the task
3637 # will be sent to the default version of the default service when
3638 # the task is attempted.
3639 &quot;service&quot;: &quot;A String&quot;, # App service.
3640 #
3641 # By default, the task is sent to the service which is the default
3642 # service when the task is attempted.
3643 #
3644 # For some queues or tasks which were created using the App Engine
3645 # Task Queue API, host is not parsable
3646 # into service,
3647 # version, and
3648 # instance. For example, some tasks
3649 # which were created using the App Engine SDK use a custom domain
3650 # name; custom domains are not parsed by Cloud Tasks. If
3651 # host is not parsable, then
3652 # service,
3653 # version, and
3654 # instance are the empty string.
3655 },
3656 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003657 }</pre>
3658</div>
3659
3660<div class="method">
3661 <code class="details" id="resume">resume(name, body=None, x__xgafv=None)</code>
3662 <pre>Resume a queue.
3663
3664This method resumes a queue after it has been
3665PAUSED or
3666DISABLED. The state of a queue is stored
Bu Sun Kim65020912020-05-20 12:08:20 -07003667in the queue&#x27;s state; after calling this method it
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003668will be set to RUNNING.
3669
3670WARNING: Resuming many high-QPS queues at the same time can
3671lead to target overloading. If you are resuming high-QPS
3672queues, follow the 500/50/5 pattern described in
3673[Managing Cloud Tasks Scaling
3674Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
3675
3676Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07003677 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003678`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
3679 body: object, The request body.
3680 The object takes the form of:
3681
3682{ # Request message for ResumeQueue.
3683 }
3684
3685 x__xgafv: string, V1 error format.
3686 Allowed values
3687 1 - v1 error format
3688 2 - v2 error format
3689
3690Returns:
3691 An object of the form:
3692
3693 { # A queue is a container of related tasks. Queues are configured to manage
3694 # how those tasks are dispatched. Configurable properties include rate limits,
3695 # retry options, target types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07003696 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003697 #
3698 # All tasks that were created before this time
3699 # were purged.
3700 #
3701 # A queue can be purged using PurgeQueue, the
3702 # [App Engine Task Queue SDK, or the Cloud
3703 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
3704 #
3705 # Purge time will be truncated to the nearest microsecond. Purge
3706 # time will be unset if the queue has never been purged.
Bu Sun Kim65020912020-05-20 12:08:20 -07003707 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
3708 #
3709 # `state` can only be changed by called
3710 # PauseQueue,
3711 # ResumeQueue, or uploading
3712 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3713 # UpdateQueue cannot be used to change `state`.
3714 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003715 #
3716 # * For tasks created using Cloud Tasks: the queue-level retry settings
3717 # apply to all tasks in the queue that were created using Cloud Tasks.
3718 # Retry settings cannot be set on individual tasks.
3719 # * For tasks created using the App Engine SDK: the queue-level retry
3720 # settings apply to all tasks in the queue which do not have retry settings
3721 # explicitly set on the task and were created by the App Engine SDK. See
3722 # [App Engine
3723 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3724 #
3725 # These settings determine how a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -07003726 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3727 # min_backoff and
3728 # max_backoff duration after it fails,
3729 # if the queue&#x27;s RetryConfig specifies that the task should be
3730 # retried.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003731 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003732 # If unspecified when the queue is created, Cloud Tasks will pick the
3733 # default.
3734 #
3735 # This field is output only for pull queues.
3736 #
3737 #
3738 # `min_backoff` will be truncated to the nearest second.
3739 #
3740 # This field has the same meaning as
3741 # [min_backoff_seconds in
3742 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3743 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3744 # min_backoff and
3745 # max_backoff duration after it fails,
3746 # if the queue&#x27;s RetryConfig specifies that the task should be
3747 # retried.
3748 #
3749 # If unspecified when the queue is created, Cloud Tasks will pick the
3750 # default.
3751 #
3752 # This field is output only for pull queues.
3753 #
3754 #
3755 # `max_backoff` will be truncated to the nearest second.
3756 #
3757 # This field has the same meaning as
3758 # [max_backoff_seconds in
3759 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3760 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
3761 # retrying a failed task, measured from when the task was first
3762 # attempted. Once `max_retry_duration` time has passed *and* the
3763 # task has been attempted max_attempts
3764 # times, no further attempts will be made and the task will be
3765 # deleted.
3766 #
3767 # If zero, then the task age is unlimited.
3768 #
3769 # If unspecified when the queue is created, Cloud Tasks will pick the
3770 # default.
3771 #
3772 # This field is output only for pull queues.
3773 #
3774 #
3775 # `max_retry_duration` will be truncated to the nearest second.
3776 #
3777 # This field has the same meaning as
3778 # [task_age_limit in
3779 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3780 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
3781 #
3782 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003783 # min_backoff, then doubles
3784 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07003785 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003786 # max_backoff up to
3787 # max_attempts times.
3788 #
3789 # For example, if min_backoff is 10s,
3790 # max_backoff is 300s, and
3791 # `max_doublings` is 3, then the a task will first be retried in
3792 # 10s. The retry interval will double three times, and then
3793 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3794 # intervals of max_backoff until the
3795 # task has been attempted max_attempts
3796 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3797 # 240s, 300s, 300s, ....
3798 #
3799 # If unspecified when the queue is created, Cloud Tasks will pick the
3800 # default.
3801 #
3802 # This field is output only for pull queues.
3803 #
3804 #
3805 # This field has the same meaning as
3806 # [max_doublings in
3807 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07003808 &quot;maxAttempts&quot;: 42, # The maximum number of attempts for a task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003809 #
3810 # Cloud Tasks will attempt the task `max_attempts` times (that
3811 # is, if the first attempt fails, then there will be
Dan O'Mearadd494642020-05-01 07:42:23 -07003812 # `max_attempts - 1` retries). Must be &gt; 0.
Bu Sun Kim65020912020-05-20 12:08:20 -07003813 &quot;unlimitedAttempts&quot;: True or False, # If true, then the number of attempts is unlimited.
3814 },
3815 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
3816 # after which it becomes output only.
3817 #
3818 # The queue name.
3819 #
3820 # The queue name must have the following format:
3821 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
3822 #
3823 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3824 # hyphens (-), colons (:), or periods (.).
3825 # For more information, see
3826 # [Identifying
3827 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3828 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
3829 # The list of available locations can be obtained by calling
3830 # ListLocations.
3831 # For more information, see https://cloud.google.com/about/locations/.
3832 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3833 # hyphens (-). The maximum length is 100 characters.
3834 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
3835 #
3836 # rate_limits and
3837 # retry_config are related because they both
3838 # control task attempts however they control how tasks are
3839 # attempted in different ways:
3840 #
3841 # * rate_limits controls the total rate of
3842 # dispatches from a queue (i.e. all traffic dispatched from the
3843 # queue, regardless of whether the dispatch is from a first
3844 # attempt or a retry).
3845 # * retry_config controls what happens to
3846 # particular a task after its first attempt fails. That is,
3847 # retry_config controls task retries (the
3848 # second attempt, third attempt, etc).
3849 #
3850 # This message determines the maximum rate that tasks can be dispatched by a
3851 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3852 #
3853 # Note: The debugging command, RunTask, will run a task
3854 # even if the queue has reached its RateLimits.
Bu Sun Kim65020912020-05-20 12:08:20 -07003855 &quot;maxTasksDispatchedPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003856 #
3857 # If unspecified when the queue is created, Cloud Tasks will pick the
3858 # default.
3859 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003860 # * For App Engine queues, the maximum allowed value
3861 # is 500.
3862 # * This field is output only for pull queues. In addition to the
3863 # `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
3864 # LeaseTasks requests are allowed per pull queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003865 #
3866 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003867 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07003868 # [rate in
3869 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
3870 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003871 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003872 # Max burst size limits how fast tasks in queue are processed when
3873 # many tasks are in the queue and the rate is high. This field
3874 # allows the queue to have a high rate so processing starts shortly
3875 # after a task is enqueued, but still limits resource usage when
3876 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003877 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003878 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3879 # algorithm is used to control the rate of task dispatches. Each
3880 # queue has a token bucket that holds tokens, up to the maximum
3881 # specified by `max_burst_size`. Each time a task is dispatched, a
3882 # token is removed from the bucket. Tasks will be dispatched until
3883 # the queue&#x27;s bucket runs out of tokens. The bucket will be
3884 # continuously refilled with new tokens based on
3885 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003886 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003887 # Cloud Tasks will pick the value of `max_burst_size` based on the
3888 # value of
3889 # max_tasks_dispatched_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003890 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003891 # For App Engine queues that were created or updated using
3892 # `queue.yaml/xml`, `max_burst_size` is equal to
3893 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3894 # Since `max_burst_size` is output only, if
3895 # UpdateQueue is called on a queue
3896 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3897 # on the value of
3898 # max_tasks_dispatched_per_second,
3899 # regardless of whether
3900 # max_tasks_dispatched_per_second
3901 # is updated.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003902 &quot;maxConcurrentTasks&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3903 # to be dispatched for this queue. After this threshold has been
3904 # reached, Cloud Tasks stops dispatching tasks until the number of
3905 # concurrent requests decreases.
3906 #
3907 # If unspecified when the queue is created, Cloud Tasks will pick the
3908 # default.
3909 #
3910 #
3911 # The maximum allowed value is 5,000.
3912 #
3913 # This field is output only for
3914 # pull queues and always -1, which indicates no limit. No other
3915 # queue types can have `max_concurrent_tasks` set to -1.
3916 #
3917 #
3918 # This field has the same meaning as
3919 # [max_concurrent_requests in
3920 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
Bu Sun Kim65020912020-05-20 12:08:20 -07003921 },
3922 &quot;pullTarget&quot;: { # Pull target. # Pull target.
3923 #
3924 # A pull queue is a queue that has a PullTarget.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003925 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003926 &quot;appEngineHttpTarget&quot;: { # App Engine HTTP target. # App Engine HTTP target.
3927 #
3928 # An App Engine queue is a queue that has an AppEngineHttpTarget.
3929 #
3930 # The task will be delivered to the App Engine application hostname
3931 # specified by its AppEngineHttpTarget and AppEngineHttpRequest.
3932 # The documentation for AppEngineHttpRequest explains how the
3933 # task&#x27;s host URL is constructed.
3934 #
3935 # Using AppEngineHttpTarget requires
3936 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3937 # Google IAM permission for the project
3938 # and the following scope:
3939 #
3940 # `https://www.googleapis.com/auth/cloud-platform`
3941 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
3942 # task-level app_engine_routing.
3943 #
3944 # If set, `app_engine_routing_override` is used for all tasks in
3945 # the queue, no matter what the setting is for the
3946 # task-level app_engine_routing.
3947 #
3948 # Defines routing characteristics specific to App Engine - service, version,
3949 # and instance.
3950 #
3951 # For more information about services, versions, and instances see
3952 # [An Overview of App
3953 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3954 # [Microservices Architecture on Google App
3955 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3956 # [App Engine Standard request
3957 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3958 # and [App Engine Flex request
3959 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3960 &quot;instance&quot;: &quot;A String&quot;, # App instance.
3961 #
3962 # By default, the task is sent to an instance which is available when
3963 # the task is attempted.
3964 #
3965 # Requests can only be sent to a specific instance if
3966 # [manual scaling is used in App Engine
3967 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3968 # App Engine Flex does not support instances. For more information, see
3969 # [App Engine Standard request
3970 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3971 # and [App Engine Flex request
3972 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3973 &quot;version&quot;: &quot;A String&quot;, # App version.
3974 #
3975 # By default, the task is sent to the version which is the default
3976 # version when the task is attempted.
3977 #
3978 # For some queues or tasks which were created using the App Engine
3979 # Task Queue API, host is not parsable
3980 # into service,
3981 # version, and
3982 # instance. For example, some tasks
3983 # which were created using the App Engine SDK use a custom domain
3984 # name; custom domains are not parsed by Cloud Tasks. If
3985 # host is not parsable, then
3986 # service,
3987 # version, and
3988 # instance are the empty string.
3989 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
3990 #
3991 # For more information, see
3992 # [How Requests are
3993 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3994 #
3995 # The host is constructed as:
3996 #
3997 #
3998 # * `host = [application_domain_name]`&lt;/br&gt;
3999 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
4000 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
4001 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
4002 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
4003 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
4004 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
4005 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
4006 #
4007 # * `application_domain_name` = The domain name of the app, for
4008 # example &lt;app-id&gt;.appspot.com, which is associated with the
4009 # queue&#x27;s project ID. Some tasks which were created using the App Engine
4010 # SDK use a custom domain name.
4011 #
4012 # * `service =` service
4013 #
4014 # * `version =` version
4015 #
4016 # * `version_dot_service =`
4017 # version `+ &#x27;.&#x27; +`
4018 # service
4019 #
4020 # * `instance =` instance
4021 #
4022 # * `instance_dot_service =`
4023 # instance `+ &#x27;.&#x27; +`
4024 # service
4025 #
4026 # * `instance_dot_version =`
4027 # instance `+ &#x27;.&#x27; +`
4028 # version
4029 #
4030 # * `instance_dot_version_dot_service =`
4031 # instance `+ &#x27;.&#x27; +`
4032 # version `+ &#x27;.&#x27; +`
4033 # service
4034 #
4035 # If service is empty, then the task will be sent
4036 # to the service which is the default service when the task is attempted.
4037 #
4038 # If version is empty, then the task will be sent
4039 # to the version which is the default version when the task is attempted.
4040 #
4041 # If instance is empty, then the task
4042 # will be sent to an instance which is available when the task is
4043 # attempted.
4044 #
4045 # If service,
4046 # version, or
4047 # instance is invalid, then the task
4048 # will be sent to the default version of the default service when
4049 # the task is attempted.
4050 &quot;service&quot;: &quot;A String&quot;, # App service.
4051 #
4052 # By default, the task is sent to the service which is the default
4053 # service when the task is attempted.
4054 #
4055 # For some queues or tasks which were created using the App Engine
4056 # Task Queue API, host is not parsable
4057 # into service,
4058 # version, and
4059 # instance. For example, some tasks
4060 # which were created using the App Engine SDK use a custom domain
4061 # name; custom domains are not parsed by Cloud Tasks. If
4062 # host is not parsable, then
4063 # service,
4064 # version, and
4065 # instance are the empty string.
4066 },
4067 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004068 }</pre>
4069</div>
4070
4071<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004072 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004073 <pre>Sets the access control policy for a Queue. Replaces any existing
4074policy.
4075
4076Note: The Cloud Console does not check queue-level IAM permissions yet.
4077Project-level permissions are required to use the Cloud Console.
4078
4079Authorization requires the following
4080[Google IAM](https://cloud.google.com/iam) permission on the specified
4081resource parent:
4082
4083* `cloudtasks.queues.setIamPolicy`
4084
4085Args:
4086 resource: string, REQUIRED: The resource for which the policy is being specified.
4087See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004088 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004089 The object takes the form of:
4090
4091{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07004092 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004093 # the policy is limited to a few 10s of KB. An empty policy is a
4094 # valid policy but certain Cloud Platform services (such as Projects)
4095 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -07004096 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004097 #
4098 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004099 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
4100 # `members` to a single `role`. Members can be user accounts, service accounts,
4101 # Google groups, and domains (such as G Suite). A `role` is a named list of
4102 # permissions; each `role` can be an IAM predefined role or a user-created
4103 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004104 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004105 # For some types of Google Cloud resources, a `binding` can also specify a
4106 # `condition`, which is a logical expression that allows access to a resource
4107 # only if the expression evaluates to `true`. A condition can add constraints
4108 # based on attributes of the request, the resource, or both. To learn which
4109 # resources support conditions in their IAM policies, see the
4110 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07004111 #
4112 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004113 #
4114 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07004115 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004116 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07004117 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
4118 # &quot;members&quot;: [
4119 # &quot;user:mike@example.com&quot;,
4120 # &quot;group:admins@example.com&quot;,
4121 # &quot;domain:google.com&quot;,
4122 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004123 # ]
4124 # },
4125 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07004126 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
4127 # &quot;members&quot;: [
4128 # &quot;user:eve@example.com&quot;
4129 # ],
4130 # &quot;condition&quot;: {
4131 # &quot;title&quot;: &quot;expirable access&quot;,
4132 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
4133 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07004134 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004135 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07004136 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004137 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
4138 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004139 # }
4140 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004141 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004142 #
4143 # bindings:
4144 # - members:
4145 # - user:mike@example.com
4146 # - group:admins@example.com
4147 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07004148 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
4149 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004150 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07004151 # - user:eve@example.com
4152 # role: roles/resourcemanager.organizationViewer
4153 # condition:
4154 # title: expirable access
4155 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07004156 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07004157 # - etag: BwWWja0YfJA=
4158 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004159 #
4160 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07004161 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07004162 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
4163 # prevent simultaneous updates of a policy from overwriting each other.
4164 # It is strongly suggested that systems make use of the `etag` in the
4165 # read-modify-write cycle to perform policy updates in order to avoid race
4166 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
4167 # systems are expected to put that etag in the request to `setIamPolicy` to
4168 # ensure that their change will be applied to the same version of the policy.
4169 #
4170 # **Important:** If you use IAM Conditions, you must include the `etag` field
4171 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4172 # you to overwrite a version `3` policy with a version `1` policy, and all of
4173 # the conditions in the version `3` policy are lost.
4174 &quot;version&quot;: 42, # Specifies the format of the policy.
4175 #
4176 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
4177 # are rejected.
4178 #
4179 # Any operation that affects conditional role bindings must specify version
4180 # `3`. This requirement applies to the following operations:
4181 #
4182 # * Getting a policy that includes a conditional role binding
4183 # * Adding a conditional role binding to a policy
4184 # * Changing a conditional role binding in a policy
4185 # * Removing any role binding, with or without a condition, from a policy
4186 # that includes conditions
4187 #
4188 # **Important:** If you use IAM Conditions, you must include the `etag` field
4189 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4190 # you to overwrite a version `3` policy with a version `1` policy, and all of
4191 # the conditions in the version `3` policy are lost.
4192 #
4193 # If a policy does not include any conditions, operations on that policy may
4194 # specify any valid version or leave the field unset.
4195 #
4196 # To learn which resources support conditions in their IAM policies, see the
4197 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4198 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07004199 # `condition` that determines how and when the `bindings` are applied. Each
4200 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004201 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07004202 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
4203 #
4204 # If the condition evaluates to `true`, then this binding applies to the
4205 # current request.
4206 #
4207 # If the condition evaluates to `false`, then this binding does not apply to
4208 # the current request. However, a different role binding might grant the same
4209 # role to one or more of the members in this binding.
4210 #
4211 # To learn which resources support conditions in their IAM policies, see the
4212 # [IAM
4213 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07004214 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
4215 # are documented at https://github.com/google/cel-spec.
4216 #
4217 # Example (Comparison):
4218 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004219 # title: &quot;Summary size limit&quot;
4220 # description: &quot;Determines if a summary is less than 100 chars&quot;
4221 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004222 #
4223 # Example (Equality):
4224 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004225 # title: &quot;Requestor is owner&quot;
4226 # description: &quot;Determines if requestor is the document owner&quot;
4227 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004228 #
4229 # Example (Logic):
4230 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004231 # title: &quot;Public documents&quot;
4232 # description: &quot;Determine whether the document should be publicly visible&quot;
4233 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004234 #
4235 # Example (Data Manipulation):
4236 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004237 # title: &quot;Notification string&quot;
4238 # description: &quot;Create a notification string with a timestamp.&quot;
4239 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004240 #
4241 # The exact variables and functions that may be referenced within an expression
4242 # are determined by the service that evaluates it. See the service
4243 # documentation for additional information.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004244 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
4245 # describes the expression, e.g. when hovered over it in a UI.
4246 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
4247 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07004248 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
Dan O'Mearadd494642020-05-01 07:42:23 -07004249 # its purpose. This can be used e.g. in UIs which allow to enter the
4250 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07004251 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
4252 # reporting, e.g. a file name and a position in the file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004253 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004254 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004255 # `members` can have the following values:
4256 #
4257 # * `allUsers`: A special identifier that represents anyone who is
4258 # on the internet; with or without a Google account.
4259 #
4260 # * `allAuthenticatedUsers`: A special identifier that represents anyone
4261 # who is authenticated with a Google account or a service account.
4262 #
4263 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07004264 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004265 #
4266 #
4267 # * `serviceAccount:{emailid}`: An email address that represents a service
4268 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
4269 #
4270 # * `group:{emailid}`: An email address that represents a Google group.
4271 # For example, `admins@example.com`.
4272 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004273 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
4274 # identifier) representing a user that has been recently deleted. For
4275 # example, `alice@example.com?uid=123456789012345678901`. If the user is
4276 # recovered, this value reverts to `user:{emailid}` and the recovered user
4277 # retains the role in the binding.
4278 #
4279 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
4280 # unique identifier) representing a service account that has been recently
4281 # deleted. For example,
4282 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
4283 # If the service account is undeleted, this value reverts to
4284 # `serviceAccount:{emailid}` and the undeleted service account retains the
4285 # role in the binding.
4286 #
4287 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
4288 # identifier) representing a Google group that has been recently
4289 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
4290 # the group is recovered, this value reverts to `group:{emailid}` and the
4291 # recovered group retains the role in the binding.
4292 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004293 #
4294 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
4295 # users of that domain. For example, `google.com` or `example.com`.
4296 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004297 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004298 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004299 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
4300 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004301 },
4302 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004303 },
4304 }
4305
4306 x__xgafv: string, V1 error format.
4307 Allowed values
4308 1 - v1 error format
4309 2 - v2 error format
4310
4311Returns:
4312 An object of the form:
4313
Dan O'Mearadd494642020-05-01 07:42:23 -07004314 { # An Identity and Access Management (IAM) policy, which specifies access
4315 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004316 #
4317 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004318 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
4319 # `members` to a single `role`. Members can be user accounts, service accounts,
4320 # Google groups, and domains (such as G Suite). A `role` is a named list of
4321 # permissions; each `role` can be an IAM predefined role or a user-created
4322 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004323 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004324 # For some types of Google Cloud resources, a `binding` can also specify a
4325 # `condition`, which is a logical expression that allows access to a resource
4326 # only if the expression evaluates to `true`. A condition can add constraints
4327 # based on attributes of the request, the resource, or both. To learn which
4328 # resources support conditions in their IAM policies, see the
4329 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07004330 #
4331 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004332 #
4333 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07004334 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004335 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07004336 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
4337 # &quot;members&quot;: [
4338 # &quot;user:mike@example.com&quot;,
4339 # &quot;group:admins@example.com&quot;,
4340 # &quot;domain:google.com&quot;,
4341 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004342 # ]
4343 # },
4344 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07004345 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
4346 # &quot;members&quot;: [
4347 # &quot;user:eve@example.com&quot;
4348 # ],
4349 # &quot;condition&quot;: {
4350 # &quot;title&quot;: &quot;expirable access&quot;,
4351 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
4352 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07004353 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004354 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07004355 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004356 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
4357 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004358 # }
4359 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004360 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004361 #
4362 # bindings:
4363 # - members:
4364 # - user:mike@example.com
4365 # - group:admins@example.com
4366 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07004367 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
4368 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004369 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07004370 # - user:eve@example.com
4371 # role: roles/resourcemanager.organizationViewer
4372 # condition:
4373 # title: expirable access
4374 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07004375 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07004376 # - etag: BwWWja0YfJA=
4377 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004378 #
4379 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07004380 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07004381 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
4382 # prevent simultaneous updates of a policy from overwriting each other.
4383 # It is strongly suggested that systems make use of the `etag` in the
4384 # read-modify-write cycle to perform policy updates in order to avoid race
4385 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
4386 # systems are expected to put that etag in the request to `setIamPolicy` to
4387 # ensure that their change will be applied to the same version of the policy.
4388 #
4389 # **Important:** If you use IAM Conditions, you must include the `etag` field
4390 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4391 # you to overwrite a version `3` policy with a version `1` policy, and all of
4392 # the conditions in the version `3` policy are lost.
4393 &quot;version&quot;: 42, # Specifies the format of the policy.
4394 #
4395 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
4396 # are rejected.
4397 #
4398 # Any operation that affects conditional role bindings must specify version
4399 # `3`. This requirement applies to the following operations:
4400 #
4401 # * Getting a policy that includes a conditional role binding
4402 # * Adding a conditional role binding to a policy
4403 # * Changing a conditional role binding in a policy
4404 # * Removing any role binding, with or without a condition, from a policy
4405 # that includes conditions
4406 #
4407 # **Important:** If you use IAM Conditions, you must include the `etag` field
4408 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4409 # you to overwrite a version `3` policy with a version `1` policy, and all of
4410 # the conditions in the version `3` policy are lost.
4411 #
4412 # If a policy does not include any conditions, operations on that policy may
4413 # specify any valid version or leave the field unset.
4414 #
4415 # To learn which resources support conditions in their IAM policies, see the
4416 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4417 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07004418 # `condition` that determines how and when the `bindings` are applied. Each
4419 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004420 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07004421 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
4422 #
4423 # If the condition evaluates to `true`, then this binding applies to the
4424 # current request.
4425 #
4426 # If the condition evaluates to `false`, then this binding does not apply to
4427 # the current request. However, a different role binding might grant the same
4428 # role to one or more of the members in this binding.
4429 #
4430 # To learn which resources support conditions in their IAM policies, see the
4431 # [IAM
4432 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07004433 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
4434 # are documented at https://github.com/google/cel-spec.
4435 #
4436 # Example (Comparison):
4437 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004438 # title: &quot;Summary size limit&quot;
4439 # description: &quot;Determines if a summary is less than 100 chars&quot;
4440 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004441 #
4442 # Example (Equality):
4443 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004444 # title: &quot;Requestor is owner&quot;
4445 # description: &quot;Determines if requestor is the document owner&quot;
4446 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004447 #
4448 # Example (Logic):
4449 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004450 # title: &quot;Public documents&quot;
4451 # description: &quot;Determine whether the document should be publicly visible&quot;
4452 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004453 #
4454 # Example (Data Manipulation):
4455 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004456 # title: &quot;Notification string&quot;
4457 # description: &quot;Create a notification string with a timestamp.&quot;
4458 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004459 #
4460 # The exact variables and functions that may be referenced within an expression
4461 # are determined by the service that evaluates it. See the service
4462 # documentation for additional information.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004463 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
4464 # describes the expression, e.g. when hovered over it in a UI.
4465 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
4466 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07004467 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
Dan O'Mearadd494642020-05-01 07:42:23 -07004468 # its purpose. This can be used e.g. in UIs which allow to enter the
4469 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07004470 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
4471 # reporting, e.g. a file name and a position in the file.
Dan O'Mearadd494642020-05-01 07:42:23 -07004472 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004473 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004474 # `members` can have the following values:
4475 #
4476 # * `allUsers`: A special identifier that represents anyone who is
4477 # on the internet; with or without a Google account.
4478 #
4479 # * `allAuthenticatedUsers`: A special identifier that represents anyone
4480 # who is authenticated with a Google account or a service account.
4481 #
4482 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07004483 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004484 #
4485 #
4486 # * `serviceAccount:{emailid}`: An email address that represents a service
4487 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
4488 #
4489 # * `group:{emailid}`: An email address that represents a Google group.
4490 # For example, `admins@example.com`.
4491 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004492 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
4493 # identifier) representing a user that has been recently deleted. For
4494 # example, `alice@example.com?uid=123456789012345678901`. If the user is
4495 # recovered, this value reverts to `user:{emailid}` and the recovered user
4496 # retains the role in the binding.
4497 #
4498 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
4499 # unique identifier) representing a service account that has been recently
4500 # deleted. For example,
4501 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
4502 # If the service account is undeleted, this value reverts to
4503 # `serviceAccount:{emailid}` and the undeleted service account retains the
4504 # role in the binding.
4505 #
4506 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
4507 # identifier) representing a Google group that has been recently
4508 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
4509 # the group is recovered, this value reverts to `group:{emailid}` and the
4510 # recovered group retains the role in the binding.
4511 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004512 #
4513 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
4514 # users of that domain. For example, `google.com` or `example.com`.
4515 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004516 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004517 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004518 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
4519 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004520 },
4521 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004522 }</pre>
4523</div>
4524
4525<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004526 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004527 <pre>Returns permissions that a caller has on a Queue.
4528If the resource does not exist, this will return an empty set of
4529permissions, not a NOT_FOUND error.
4530
4531Note: This operation is designed to be used for building permission-aware
4532UIs and command-line tools, not for authorization checking. This operation
Bu Sun Kim65020912020-05-20 12:08:20 -07004533may &quot;fail open&quot; without warning.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004534
4535Args:
4536 resource: string, REQUIRED: The resource for which the policy detail is being requested.
4537See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004538 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004539 The object takes the form of:
4540
4541{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07004542 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
4543 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004544 # information see
4545 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07004546 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004547 ],
4548 }
4549
4550 x__xgafv: string, V1 error format.
4551 Allowed values
4552 1 - v1 error format
4553 2 - v2 error format
4554
4555Returns:
4556 An object of the form:
4557
4558 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07004559 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004560 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07004561 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004562 ],
4563 }</pre>
4564</div>
4565
4566</body></html>