blob: cdee38210e308612aaffe41713d85cc783d1bab0 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="cloudtasks_v2beta3.html">Cloud Tasks API</a> . <a href="cloudtasks_v2beta3.projects.html">projects</a> . <a href="cloudtasks_v2beta3.projects.locations.html">locations</a> . <a href="cloudtasks_v2beta3.projects.locations.queues.html">queues</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="cloudtasks_v2beta3.projects.locations.queues.tasks.html">tasks()</a></code>
79</p>
80<p class="firstline">Returns the tasks Resource.</p>
81
82<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070083 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084<p class="firstline">Creates a queue.</p>
85<p class="toc_element">
86 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
87<p class="firstline">Deletes a queue.</p>
88<p class="toc_element">
89 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
90<p class="firstline">Gets a queue.</p>
91<p class="toc_element">
92 <code><a href="#getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
93<p class="firstline">Gets the access control policy for a Queue.</p>
94<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070095 <code><a href="#list">list(parent, pageToken=None, pageSize=None, filter=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096<p class="firstline">Lists queues.</p>
97<p class="toc_element">
98 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
99<p class="firstline">Retrieves the next page of results.</p>
100<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700101 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102<p class="firstline">Updates a queue.</p>
103<p class="toc_element">
104 <code><a href="#pause">pause(name, body=None, x__xgafv=None)</a></code></p>
105<p class="firstline">Pauses the queue.</p>
106<p class="toc_element">
107 <code><a href="#purge">purge(name, body=None, x__xgafv=None)</a></code></p>
108<p class="firstline">Purges a queue by deleting all of its tasks.</p>
109<p class="toc_element">
110 <code><a href="#resume">resume(name, body=None, x__xgafv=None)</a></code></p>
111<p class="firstline">Resume a queue.</p>
112<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700113 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700114<p class="firstline">Sets the access control policy for a Queue. Replaces any existing</p>
115<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700116 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700117<p class="firstline">Returns permissions that a caller has on a Queue.</p>
118<h3>Method Details</h3>
119<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700121 <pre>Creates a queue.
122
123Queues created with this method allow tasks to live for a maximum of 31
124days. After a task is 31 days old, the task will be deleted regardless of whether
125it was dispatched or not.
126
127WARNING: Using this method may have unintended side effects if you are
128using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
129Read
130[Overview of Queue Management and
131queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
132this method.
133
134Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 parent: string, Required. The location name in which the queue will be created.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136For example: `projects/PROJECT_ID/locations/LOCATION_ID`
137
138The list of allowed locations can be obtained by calling Cloud
Bu Sun Kim65020912020-05-20 12:08:20 -0700139Tasks&#x27; implementation of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700140ListLocations. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 The object takes the form of:
143
144{ # A queue is a container of related tasks. Queues are configured to manage
145 # how those tasks are dispatched. Configurable properties include rate limits,
146 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148 # App Engine tasks in this queue.
149 # Http tasks are not affected by this proto.
150 #
151 # The task will be delivered to the App Engine application hostname
152 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
153 # The documentation for AppEngineHttpRequest explains how the
Bu Sun Kim65020912020-05-20 12:08:20 -0700154 # task&#x27;s host URL is constructed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700155 #
156 # Using AppEngineHttpQueue requires
157 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
158 # Google IAM permission for the project
159 # and the following scope:
160 #
161 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -0700162 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 # task-level app_engine_routing.
164 #
165 # If set, `app_engine_routing_override` is used for all tasks in
166 # the queue, no matter what the setting is for the
167 # task-level app_engine_routing.
168 #
169 # Defines routing characteristics specific to App Engine - service, version,
170 # and instance.
171 #
172 # For more information about services, versions, and instances see
173 # [An Overview of App
174 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
175 # [Microservices Architecture on Google App
176 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
177 # [App Engine Standard request
178 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
179 # and [App Engine Flex request
180 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -0700181 &quot;version&quot;: &quot;A String&quot;, # App version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700182 #
183 # By default, the task is sent to the version which is the default
184 # version when the task is attempted.
185 #
186 # For some queues or tasks which were created using the App Engine
187 # Task Queue API, host is not parsable
188 # into service,
189 # version, and
190 # instance. For example, some tasks
191 # which were created using the App Engine SDK use a custom domain
192 # name; custom domains are not parsed by Cloud Tasks. If
193 # host is not parsable, then
194 # service,
195 # version, and
196 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -0700197 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
198 #
199 # The host is constructed from the domain name of the app associated with
200 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
201 # service, version,
202 # and instance. Tasks which were created using
203 # the App Engine SDK might have a custom domain name.
204 #
205 # For more information, see
206 # [How Requests are
207 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
208 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700209 #
210 # By default, the task is sent to the service which is the default
211 # service when the task is attempted.
212 #
213 # For some queues or tasks which were created using the App Engine
214 # Task Queue API, host is not parsable
215 # into service,
216 # version, and
217 # instance. For example, some tasks
218 # which were created using the App Engine SDK use a custom domain
219 # name; custom domains are not parsed by Cloud Tasks. If
220 # host is not parsable, then
221 # service,
222 # version, and
223 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -0700224 &quot;instance&quot;: &quot;A String&quot;, # App instance.
225 #
226 # By default, the task is sent to an instance which is available when
227 # the task is attempted.
228 #
229 # Requests can only be sent to a specific instance if
230 # [manual scaling is used in App Engine
231 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
232 # App Engine Flex does not support instances. For more information, see
233 # [App Engine Standard request
234 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
235 # and [App Engine Flex request
236 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700237 },
238 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700239 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
240 #
241 # All tasks that were created before this time
242 # were purged.
243 #
244 # A queue can be purged using PurgeQueue, the
245 # [App Engine Task Queue SDK, or the Cloud
246 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
247 #
248 # Purge time will be truncated to the nearest microsecond. Purge
249 # time will be unset if the queue has never been purged.
250 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700251 #
252 # * For tasks created using Cloud Tasks: the queue-level retry settings
253 # apply to all tasks in the queue that were created using Cloud Tasks.
254 # Retry settings cannot be set on individual tasks.
255 # * For tasks created using the App Engine SDK: the queue-level retry
256 # settings apply to all tasks in the queue which do not have retry settings
257 # explicitly set on the task and were created by the App Engine SDK. See
258 # [App Engine
259 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
260 #
261 # These settings determine when a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -0700262 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
263 # min_backoff and
264 # max_backoff duration after it fails,
265 # if the queue&#x27;s RetryConfig specifies that the task should be
266 # retried.
267 #
268 # If unspecified when the queue is created, Cloud Tasks will pick the
269 # default.
270 #
271 #
272 # `min_backoff` will be truncated to the nearest second.
273 #
274 # This field has the same meaning as
275 # [min_backoff_seconds in
276 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
277 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
278 # min_backoff and
279 # max_backoff duration after it fails,
280 # if the queue&#x27;s RetryConfig specifies that the task should be
281 # retried.
282 #
283 # If unspecified when the queue is created, Cloud Tasks will pick the
284 # default.
285 #
286 #
287 # `max_backoff` will be truncated to the nearest second.
288 #
289 # This field has the same meaning as
290 # [max_backoff_seconds in
291 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
292 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700293 # retrying a failed task, measured from when the task was first
294 # attempted. Once `max_retry_duration` time has passed *and* the
295 # task has been attempted max_attempts
296 # times, no further attempts will be made and the task will be
297 # deleted.
298 #
299 # If zero, then the task age is unlimited.
300 #
301 # If unspecified when the queue is created, Cloud Tasks will pick the
302 # default.
303 #
304 #
305 # `max_retry_duration` will be truncated to the nearest second.
306 #
307 # This field has the same meaning as
308 # [task_age_limit in
309 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -0700310 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700311 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700312 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
313 # first attempt fails, then there will be `max_attempts - 1` retries). Must
314 # be &gt;= -1.
315 #
316 # If unspecified when the queue is created, Cloud Tasks will pick the
317 # default.
318 #
319 # -1 indicates unlimited attempts.
320 #
321 # This field has the same meaning as
322 # [task_retry_limit in
323 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
324 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
325 #
326 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700327 # min_backoff, then doubles
328 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -0700329 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700330 # max_backoff up to
331 # max_attempts times.
332 #
333 # For example, if min_backoff is 10s,
334 # max_backoff is 300s, and
335 # `max_doublings` is 3, then the a task will first be retried in
336 # 10s. The retry interval will double three times, and then
337 # increase linearly by 2^3 * 10s. Finally, the task will retry at
338 # intervals of max_backoff until the
339 # task has been attempted max_attempts
340 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
341 # 240s, 300s, 300s, ....
342 #
343 # If unspecified when the queue is created, Cloud Tasks will pick the
344 # default.
345 #
346 #
347 # This field has the same meaning as
348 # [max_doublings in
349 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -0700350 },
351 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
352 #
353 # `state` can only be changed by called
354 # PauseQueue,
355 # ResumeQueue, or uploading
356 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
357 # UpdateQueue cannot be used to change `state`.
358 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
359 # after which it becomes output only.
360 #
361 # The queue name.
362 #
363 # The queue name must have the following format:
364 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
365 #
366 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
367 # hyphens (-), colons (:), or periods (.).
368 # For more information, see
369 # [Identifying
370 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
371 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
372 # The list of available locations can be obtained by calling
373 # ListLocations.
374 # For more information, see https://cloud.google.com/about/locations/.
375 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
376 # hyphens (-). The maximum length is 100 characters.
377 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
378 #
379 # rate_limits and retry_config are
380 # related because they both control task attempts. However they control task
381 # attempts in different ways:
382 #
383 # * rate_limits controls the total rate of
384 # dispatches from a queue (i.e. all traffic dispatched from the
385 # queue, regardless of whether the dispatch is from a first
386 # attempt or a retry).
387 # * retry_config controls what happens to
388 # particular a task after its first attempt fails. That is,
389 # retry_config controls task retries (the
390 # second attempt, third attempt, etc).
391 #
392 # The queue&#x27;s actual dispatch rate is the result of:
393 #
394 # * Number of tasks in the queue
395 # * User-specified throttling: rate_limits,
396 # retry_config, and the
397 # queue&#x27;s state.
398 # * System throttling due to `429` (Too Many Requests) or `503` (Service
399 # Unavailable) responses from the worker, high error rates, or to smooth
400 # sudden large traffic spikes.
401 #
402 # This message determines the maximum rate that tasks can be dispatched by a
403 # queue, regardless of whether the dispatch is a first task attempt or a retry.
404 #
405 # Note: The debugging command, RunTask, will run a task
406 # even if the queue has reached its RateLimits.
407 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700408 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700409 # Max burst size limits how fast tasks in queue are processed when
410 # many tasks are in the queue and the rate is high. This field
411 # allows the queue to have a high rate so processing starts shortly
412 # after a task is enqueued, but still limits resource usage when
413 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700414 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700415 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
416 # algorithm is used to control the rate of task dispatches. Each
417 # queue has a token bucket that holds tokens, up to the maximum
418 # specified by `max_burst_size`. Each time a task is dispatched, a
419 # token is removed from the bucket. Tasks will be dispatched until
420 # the queue&#x27;s bucket runs out of tokens. The bucket will be
421 # continuously refilled with new tokens based on
422 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700423 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700424 # Cloud Tasks will pick the value of `max_burst_size` based on the
425 # value of
426 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700427 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700428 # For App Engine queues that were created or updated using
429 # `queue.yaml/xml`, `max_burst_size` is equal to
430 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
431 # Since `max_burst_size` is output only, if
432 # UpdateQueue is called on a queue
433 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
434 # on the value of
435 # max_dispatches_per_second,
436 # regardless of whether
437 # max_dispatches_per_second
438 # is updated.
439 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
440 # to be dispatched for this queue. After this threshold has been
441 # reached, Cloud Tasks stops dispatching tasks until the number of
442 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700443 #
444 # If unspecified when the queue is created, Cloud Tasks will pick the
445 # default.
446 #
447 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700448 # The maximum allowed value is 5,000.
449 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700450 #
451 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700452 # [max_concurrent_requests in
453 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
454 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700455 #
456 # If unspecified when the queue is created, Cloud Tasks will pick the
457 # default.
458 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700459 # * For App Engine queues, the maximum allowed value
460 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700461 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700462 #
463 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700464 # [rate in
465 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
466 },
467 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
468 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
469 # field is unset, then no logs are written.
470 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
471 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
472 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
473 # This field may contain any value between 0.0 and 1.0, inclusive.
474 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700475 },
476}
477
478 x__xgafv: string, V1 error format.
479 Allowed values
480 1 - v1 error format
481 2 - v2 error format
482
483Returns:
484 An object of the form:
485
486 { # A queue is a container of related tasks. Queues are configured to manage
487 # how those tasks are dispatched. Configurable properties include rate limits,
488 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -0700489 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700490 # App Engine tasks in this queue.
491 # Http tasks are not affected by this proto.
492 #
493 # The task will be delivered to the App Engine application hostname
494 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
495 # The documentation for AppEngineHttpRequest explains how the
Bu Sun Kim65020912020-05-20 12:08:20 -0700496 # task&#x27;s host URL is constructed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700497 #
498 # Using AppEngineHttpQueue requires
499 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
500 # Google IAM permission for the project
501 # and the following scope:
502 #
503 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -0700504 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700505 # task-level app_engine_routing.
506 #
507 # If set, `app_engine_routing_override` is used for all tasks in
508 # the queue, no matter what the setting is for the
509 # task-level app_engine_routing.
510 #
511 # Defines routing characteristics specific to App Engine - service, version,
512 # and instance.
513 #
514 # For more information about services, versions, and instances see
515 # [An Overview of App
516 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
517 # [Microservices Architecture on Google App
518 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
519 # [App Engine Standard request
520 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
521 # and [App Engine Flex request
522 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -0700523 &quot;version&quot;: &quot;A String&quot;, # App version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700524 #
525 # By default, the task is sent to the version which is the default
526 # version when the task is attempted.
527 #
528 # For some queues or tasks which were created using the App Engine
529 # Task Queue API, host is not parsable
530 # into service,
531 # version, and
532 # instance. For example, some tasks
533 # which were created using the App Engine SDK use a custom domain
534 # name; custom domains are not parsed by Cloud Tasks. If
535 # host is not parsable, then
536 # service,
537 # version, and
538 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -0700539 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
540 #
541 # The host is constructed from the domain name of the app associated with
542 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
543 # service, version,
544 # and instance. Tasks which were created using
545 # the App Engine SDK might have a custom domain name.
546 #
547 # For more information, see
548 # [How Requests are
549 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
550 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 #
552 # By default, the task is sent to the service which is the default
553 # service when the task is attempted.
554 #
555 # For some queues or tasks which were created using the App Engine
556 # Task Queue API, host is not parsable
557 # into service,
558 # version, and
559 # instance. For example, some tasks
560 # which were created using the App Engine SDK use a custom domain
561 # name; custom domains are not parsed by Cloud Tasks. If
562 # host is not parsable, then
563 # service,
564 # version, and
565 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -0700566 &quot;instance&quot;: &quot;A String&quot;, # App instance.
567 #
568 # By default, the task is sent to an instance which is available when
569 # the task is attempted.
570 #
571 # Requests can only be sent to a specific instance if
572 # [manual scaling is used in App Engine
573 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
574 # App Engine Flex does not support instances. For more information, see
575 # [App Engine Standard request
576 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
577 # and [App Engine Flex request
578 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700579 },
580 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700581 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
582 #
583 # All tasks that were created before this time
584 # were purged.
585 #
586 # A queue can be purged using PurgeQueue, the
587 # [App Engine Task Queue SDK, or the Cloud
588 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
589 #
590 # Purge time will be truncated to the nearest microsecond. Purge
591 # time will be unset if the queue has never been purged.
592 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700593 #
594 # * For tasks created using Cloud Tasks: the queue-level retry settings
595 # apply to all tasks in the queue that were created using Cloud Tasks.
596 # Retry settings cannot be set on individual tasks.
597 # * For tasks created using the App Engine SDK: the queue-level retry
598 # settings apply to all tasks in the queue which do not have retry settings
599 # explicitly set on the task and were created by the App Engine SDK. See
600 # [App Engine
601 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
602 #
603 # These settings determine when a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -0700604 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
605 # min_backoff and
606 # max_backoff duration after it fails,
607 # if the queue&#x27;s RetryConfig specifies that the task should be
608 # retried.
609 #
610 # If unspecified when the queue is created, Cloud Tasks will pick the
611 # default.
612 #
613 #
614 # `min_backoff` will be truncated to the nearest second.
615 #
616 # This field has the same meaning as
617 # [min_backoff_seconds in
618 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
619 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
620 # min_backoff and
621 # max_backoff duration after it fails,
622 # if the queue&#x27;s RetryConfig specifies that the task should be
623 # retried.
624 #
625 # If unspecified when the queue is created, Cloud Tasks will pick the
626 # default.
627 #
628 #
629 # `max_backoff` will be truncated to the nearest second.
630 #
631 # This field has the same meaning as
632 # [max_backoff_seconds in
633 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
634 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700635 # retrying a failed task, measured from when the task was first
636 # attempted. Once `max_retry_duration` time has passed *and* the
637 # task has been attempted max_attempts
638 # times, no further attempts will be made and the task will be
639 # deleted.
640 #
641 # If zero, then the task age is unlimited.
642 #
643 # If unspecified when the queue is created, Cloud Tasks will pick the
644 # default.
645 #
646 #
647 # `max_retry_duration` will be truncated to the nearest second.
648 #
649 # This field has the same meaning as
650 # [task_age_limit in
651 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -0700652 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700653 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700654 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
655 # first attempt fails, then there will be `max_attempts - 1` retries). Must
656 # be &gt;= -1.
657 #
658 # If unspecified when the queue is created, Cloud Tasks will pick the
659 # default.
660 #
661 # -1 indicates unlimited attempts.
662 #
663 # This field has the same meaning as
664 # [task_retry_limit in
665 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
666 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
667 #
668 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700669 # min_backoff, then doubles
670 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -0700671 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700672 # max_backoff up to
673 # max_attempts times.
674 #
675 # For example, if min_backoff is 10s,
676 # max_backoff is 300s, and
677 # `max_doublings` is 3, then the a task will first be retried in
678 # 10s. The retry interval will double three times, and then
679 # increase linearly by 2^3 * 10s. Finally, the task will retry at
680 # intervals of max_backoff until the
681 # task has been attempted max_attempts
682 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
683 # 240s, 300s, 300s, ....
684 #
685 # If unspecified when the queue is created, Cloud Tasks will pick the
686 # default.
687 #
688 #
689 # This field has the same meaning as
690 # [max_doublings in
691 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -0700692 },
693 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
694 #
695 # `state` can only be changed by called
696 # PauseQueue,
697 # ResumeQueue, or uploading
698 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
699 # UpdateQueue cannot be used to change `state`.
700 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
701 # after which it becomes output only.
702 #
703 # The queue name.
704 #
705 # The queue name must have the following format:
706 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
707 #
708 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
709 # hyphens (-), colons (:), or periods (.).
710 # For more information, see
711 # [Identifying
712 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
713 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
714 # The list of available locations can be obtained by calling
715 # ListLocations.
716 # For more information, see https://cloud.google.com/about/locations/.
717 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
718 # hyphens (-). The maximum length is 100 characters.
719 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
720 #
721 # rate_limits and retry_config are
722 # related because they both control task attempts. However they control task
723 # attempts in different ways:
724 #
725 # * rate_limits controls the total rate of
726 # dispatches from a queue (i.e. all traffic dispatched from the
727 # queue, regardless of whether the dispatch is from a first
728 # attempt or a retry).
729 # * retry_config controls what happens to
730 # particular a task after its first attempt fails. That is,
731 # retry_config controls task retries (the
732 # second attempt, third attempt, etc).
733 #
734 # The queue&#x27;s actual dispatch rate is the result of:
735 #
736 # * Number of tasks in the queue
737 # * User-specified throttling: rate_limits,
738 # retry_config, and the
739 # queue&#x27;s state.
740 # * System throttling due to `429` (Too Many Requests) or `503` (Service
741 # Unavailable) responses from the worker, high error rates, or to smooth
742 # sudden large traffic spikes.
743 #
744 # This message determines the maximum rate that tasks can be dispatched by a
745 # queue, regardless of whether the dispatch is a first task attempt or a retry.
746 #
747 # Note: The debugging command, RunTask, will run a task
748 # even if the queue has reached its RateLimits.
749 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700750 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700751 # Max burst size limits how fast tasks in queue are processed when
752 # many tasks are in the queue and the rate is high. This field
753 # allows the queue to have a high rate so processing starts shortly
754 # after a task is enqueued, but still limits resource usage when
755 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700756 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700757 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
758 # algorithm is used to control the rate of task dispatches. Each
759 # queue has a token bucket that holds tokens, up to the maximum
760 # specified by `max_burst_size`. Each time a task is dispatched, a
761 # token is removed from the bucket. Tasks will be dispatched until
762 # the queue&#x27;s bucket runs out of tokens. The bucket will be
763 # continuously refilled with new tokens based on
764 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700765 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700766 # Cloud Tasks will pick the value of `max_burst_size` based on the
767 # value of
768 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700769 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700770 # For App Engine queues that were created or updated using
771 # `queue.yaml/xml`, `max_burst_size` is equal to
772 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
773 # Since `max_burst_size` is output only, if
774 # UpdateQueue is called on a queue
775 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
776 # on the value of
777 # max_dispatches_per_second,
778 # regardless of whether
779 # max_dispatches_per_second
780 # is updated.
781 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
782 # to be dispatched for this queue. After this threshold has been
783 # reached, Cloud Tasks stops dispatching tasks until the number of
784 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700785 #
786 # If unspecified when the queue is created, Cloud Tasks will pick the
787 # default.
788 #
789 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700790 # The maximum allowed value is 5,000.
791 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700792 #
793 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700794 # [max_concurrent_requests in
795 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
796 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700797 #
798 # If unspecified when the queue is created, Cloud Tasks will pick the
799 # default.
800 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700801 # * For App Engine queues, the maximum allowed value
802 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700803 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700804 #
805 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700806 # [rate in
807 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
808 },
809 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
810 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
811 # field is unset, then no logs are written.
812 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
813 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
814 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
815 # This field may contain any value between 0.0 and 1.0, inclusive.
816 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700817 },
818 }</pre>
819</div>
820
821<div class="method">
822 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
823 <pre>Deletes a queue.
824
825This command will delete the queue even if it has tasks in it.
826
Bu Sun Kim65020912020-05-20 12:08:20 -0700827Note: If you delete a queue, a queue with the same name can&#x27;t be created
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700828for 7 days.
829
830WARNING: Using this method may have unintended side effects if you are
831using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
832Read
833[Overview of Queue Management and
834queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
835this method.
836
837Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700838 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700839`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
840 x__xgafv: string, V1 error format.
841 Allowed values
842 1 - v1 error format
843 2 - v2 error format
844
845Returns:
846 An object of the form:
847
848 { # A generic empty message that you can re-use to avoid defining duplicated
849 # empty messages in your APIs. A typical example is to use it as the request
850 # or the response type of an API method. For instance:
851 #
852 # service Foo {
853 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
854 # }
855 #
856 # The JSON representation for `Empty` is empty JSON object `{}`.
857 }</pre>
858</div>
859
860<div class="method">
861 <code class="details" id="get">get(name, x__xgafv=None)</code>
862 <pre>Gets a queue.
863
864Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700865 name: string, Required. The resource name of the queue. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700866`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
867 x__xgafv: string, V1 error format.
868 Allowed values
869 1 - v1 error format
870 2 - v2 error format
871
872Returns:
873 An object of the form:
874
875 { # A queue is a container of related tasks. Queues are configured to manage
876 # how those tasks are dispatched. Configurable properties include rate limits,
877 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -0700878 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700879 # App Engine tasks in this queue.
880 # Http tasks are not affected by this proto.
881 #
882 # The task will be delivered to the App Engine application hostname
883 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
884 # The documentation for AppEngineHttpRequest explains how the
Bu Sun Kim65020912020-05-20 12:08:20 -0700885 # task&#x27;s host URL is constructed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700886 #
887 # Using AppEngineHttpQueue requires
888 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
889 # Google IAM permission for the project
890 # and the following scope:
891 #
892 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -0700893 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700894 # task-level app_engine_routing.
895 #
896 # If set, `app_engine_routing_override` is used for all tasks in
897 # the queue, no matter what the setting is for the
898 # task-level app_engine_routing.
899 #
900 # Defines routing characteristics specific to App Engine - service, version,
901 # and instance.
902 #
903 # For more information about services, versions, and instances see
904 # [An Overview of App
905 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
906 # [Microservices Architecture on Google App
907 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
908 # [App Engine Standard request
909 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
910 # and [App Engine Flex request
911 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -0700912 &quot;version&quot;: &quot;A String&quot;, # App version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700913 #
914 # By default, the task is sent to the version which is the default
915 # version when the task is attempted.
916 #
917 # For some queues or tasks which were created using the App Engine
918 # Task Queue API, host is not parsable
919 # into service,
920 # version, and
921 # instance. For example, some tasks
922 # which were created using the App Engine SDK use a custom domain
923 # name; custom domains are not parsed by Cloud Tasks. If
924 # host is not parsable, then
925 # service,
926 # version, and
927 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -0700928 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
929 #
930 # The host is constructed from the domain name of the app associated with
931 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
932 # service, version,
933 # and instance. Tasks which were created using
934 # the App Engine SDK might have a custom domain name.
935 #
936 # For more information, see
937 # [How Requests are
938 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
939 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700940 #
941 # By default, the task is sent to the service which is the default
942 # service when the task is attempted.
943 #
944 # For some queues or tasks which were created using the App Engine
945 # Task Queue API, host is not parsable
946 # into service,
947 # version, and
948 # instance. For example, some tasks
949 # which were created using the App Engine SDK use a custom domain
950 # name; custom domains are not parsed by Cloud Tasks. If
951 # host is not parsable, then
952 # service,
953 # version, and
954 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -0700955 &quot;instance&quot;: &quot;A String&quot;, # App instance.
956 #
957 # By default, the task is sent to an instance which is available when
958 # the task is attempted.
959 #
960 # Requests can only be sent to a specific instance if
961 # [manual scaling is used in App Engine
962 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
963 # App Engine Flex does not support instances. For more information, see
964 # [App Engine Standard request
965 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
966 # and [App Engine Flex request
967 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700968 },
969 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700970 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
971 #
972 # All tasks that were created before this time
973 # were purged.
974 #
975 # A queue can be purged using PurgeQueue, the
976 # [App Engine Task Queue SDK, or the Cloud
977 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
978 #
979 # Purge time will be truncated to the nearest microsecond. Purge
980 # time will be unset if the queue has never been purged.
981 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700982 #
983 # * For tasks created using Cloud Tasks: the queue-level retry settings
984 # apply to all tasks in the queue that were created using Cloud Tasks.
985 # Retry settings cannot be set on individual tasks.
986 # * For tasks created using the App Engine SDK: the queue-level retry
987 # settings apply to all tasks in the queue which do not have retry settings
988 # explicitly set on the task and were created by the App Engine SDK. See
989 # [App Engine
990 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
991 #
992 # These settings determine when a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -0700993 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
994 # min_backoff and
995 # max_backoff duration after it fails,
996 # if the queue&#x27;s RetryConfig specifies that the task should be
997 # retried.
998 #
999 # If unspecified when the queue is created, Cloud Tasks will pick the
1000 # default.
1001 #
1002 #
1003 # `min_backoff` will be truncated to the nearest second.
1004 #
1005 # This field has the same meaning as
1006 # [min_backoff_seconds in
1007 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1008 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1009 # min_backoff and
1010 # max_backoff duration after it fails,
1011 # if the queue&#x27;s RetryConfig specifies that the task should be
1012 # retried.
1013 #
1014 # If unspecified when the queue is created, Cloud Tasks will pick the
1015 # default.
1016 #
1017 #
1018 # `max_backoff` will be truncated to the nearest second.
1019 #
1020 # This field has the same meaning as
1021 # [max_backoff_seconds in
1022 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1023 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001024 # retrying a failed task, measured from when the task was first
1025 # attempted. Once `max_retry_duration` time has passed *and* the
1026 # task has been attempted max_attempts
1027 # times, no further attempts will be made and the task will be
1028 # deleted.
1029 #
1030 # If zero, then the task age is unlimited.
1031 #
1032 # If unspecified when the queue is created, Cloud Tasks will pick the
1033 # default.
1034 #
1035 #
1036 # `max_retry_duration` will be truncated to the nearest second.
1037 #
1038 # This field has the same meaning as
1039 # [task_age_limit in
1040 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07001041 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001042 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001043 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
1044 # first attempt fails, then there will be `max_attempts - 1` retries). Must
1045 # be &gt;= -1.
1046 #
1047 # If unspecified when the queue is created, Cloud Tasks will pick the
1048 # default.
1049 #
1050 # -1 indicates unlimited attempts.
1051 #
1052 # This field has the same meaning as
1053 # [task_retry_limit in
1054 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1055 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
1056 #
1057 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001058 # min_backoff, then doubles
1059 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07001060 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001061 # max_backoff up to
1062 # max_attempts times.
1063 #
1064 # For example, if min_backoff is 10s,
1065 # max_backoff is 300s, and
1066 # `max_doublings` is 3, then the a task will first be retried in
1067 # 10s. The retry interval will double three times, and then
1068 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1069 # intervals of max_backoff until the
1070 # task has been attempted max_attempts
1071 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1072 # 240s, 300s, 300s, ....
1073 #
1074 # If unspecified when the queue is created, Cloud Tasks will pick the
1075 # default.
1076 #
1077 #
1078 # This field has the same meaning as
1079 # [max_doublings in
1080 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07001081 },
1082 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
1083 #
1084 # `state` can only be changed by called
1085 # PauseQueue,
1086 # ResumeQueue, or uploading
1087 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
1088 # UpdateQueue cannot be used to change `state`.
1089 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
1090 # after which it becomes output only.
1091 #
1092 # The queue name.
1093 #
1094 # The queue name must have the following format:
1095 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1096 #
1097 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1098 # hyphens (-), colons (:), or periods (.).
1099 # For more information, see
1100 # [Identifying
1101 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1102 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
1103 # The list of available locations can be obtained by calling
1104 # ListLocations.
1105 # For more information, see https://cloud.google.com/about/locations/.
1106 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1107 # hyphens (-). The maximum length is 100 characters.
1108 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
1109 #
1110 # rate_limits and retry_config are
1111 # related because they both control task attempts. However they control task
1112 # attempts in different ways:
1113 #
1114 # * rate_limits controls the total rate of
1115 # dispatches from a queue (i.e. all traffic dispatched from the
1116 # queue, regardless of whether the dispatch is from a first
1117 # attempt or a retry).
1118 # * retry_config controls what happens to
1119 # particular a task after its first attempt fails. That is,
1120 # retry_config controls task retries (the
1121 # second attempt, third attempt, etc).
1122 #
1123 # The queue&#x27;s actual dispatch rate is the result of:
1124 #
1125 # * Number of tasks in the queue
1126 # * User-specified throttling: rate_limits,
1127 # retry_config, and the
1128 # queue&#x27;s state.
1129 # * System throttling due to `429` (Too Many Requests) or `503` (Service
1130 # Unavailable) responses from the worker, high error rates, or to smooth
1131 # sudden large traffic spikes.
1132 #
1133 # This message determines the maximum rate that tasks can be dispatched by a
1134 # queue, regardless of whether the dispatch is a first task attempt or a retry.
1135 #
1136 # Note: The debugging command, RunTask, will run a task
1137 # even if the queue has reached its RateLimits.
1138 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001139 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001140 # Max burst size limits how fast tasks in queue are processed when
1141 # many tasks are in the queue and the rate is high. This field
1142 # allows the queue to have a high rate so processing starts shortly
1143 # after a task is enqueued, but still limits resource usage when
1144 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001145 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001146 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1147 # algorithm is used to control the rate of task dispatches. Each
1148 # queue has a token bucket that holds tokens, up to the maximum
1149 # specified by `max_burst_size`. Each time a task is dispatched, a
1150 # token is removed from the bucket. Tasks will be dispatched until
1151 # the queue&#x27;s bucket runs out of tokens. The bucket will be
1152 # continuously refilled with new tokens based on
1153 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001154 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001155 # Cloud Tasks will pick the value of `max_burst_size` based on the
1156 # value of
1157 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001158 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001159 # For App Engine queues that were created or updated using
1160 # `queue.yaml/xml`, `max_burst_size` is equal to
1161 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1162 # Since `max_burst_size` is output only, if
1163 # UpdateQueue is called on a queue
1164 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
1165 # on the value of
1166 # max_dispatches_per_second,
1167 # regardless of whether
1168 # max_dispatches_per_second
1169 # is updated.
1170 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
1171 # to be dispatched for this queue. After this threshold has been
1172 # reached, Cloud Tasks stops dispatching tasks until the number of
1173 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001174 #
1175 # If unspecified when the queue is created, Cloud Tasks will pick the
1176 # default.
1177 #
1178 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001179 # The maximum allowed value is 5,000.
1180 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001181 #
1182 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07001183 # [max_concurrent_requests in
1184 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
1185 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001186 #
1187 # If unspecified when the queue is created, Cloud Tasks will pick the
1188 # default.
1189 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001190 # * For App Engine queues, the maximum allowed value
1191 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001192 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001193 #
1194 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07001195 # [rate in
1196 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
1197 },
1198 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
1199 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
1200 # field is unset, then no logs are written.
1201 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1202 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
1203 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1204 # This field may contain any value between 0.0 and 1.0, inclusive.
1205 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001206 },
1207 }</pre>
1208</div>
1209
1210<div class="method">
1211 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
1212 <pre>Gets the access control policy for a Queue.
1213Returns an empty policy if the resource exists and does not have a policy
1214set.
1215
1216Authorization requires the following
1217[Google IAM](https://cloud.google.com/iam) permission on the specified
1218resource parent:
1219
1220* `cloudtasks.queues.getIamPolicy`
1221
1222Args:
1223 resource: string, REQUIRED: The resource for which the policy is being requested.
1224See the operation documentation for the appropriate value for this field. (required)
1225 body: object, The request body.
1226 The object takes the form of:
1227
1228{ # Request message for `GetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001229 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
Dan O'Mearadd494642020-05-01 07:42:23 -07001230 # `GetIamPolicy`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001231 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.
Dan O'Mearadd494642020-05-01 07:42:23 -07001232 #
1233 # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
1234 # rejected.
1235 #
1236 # Requests for policies with any conditional bindings must specify version 3.
1237 # Policies without any conditional bindings may specify any valid value or
1238 # leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -07001239 #
1240 # To learn which resources support conditions in their IAM policies, see the
1241 # [IAM
1242 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001243 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001244 }
1245
1246 x__xgafv: string, V1 error format.
1247 Allowed values
1248 1 - v1 error format
1249 2 - v2 error format
1250
1251Returns:
1252 An object of the form:
1253
Dan O'Mearadd494642020-05-01 07:42:23 -07001254 { # An Identity and Access Management (IAM) policy, which specifies access
1255 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001256 #
1257 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001258 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1259 # `members` to a single `role`. Members can be user accounts, service accounts,
1260 # Google groups, and domains (such as G Suite). A `role` is a named list of
1261 # permissions; each `role` can be an IAM predefined role or a user-created
1262 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001263 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001264 # For some types of Google Cloud resources, a `binding` can also specify a
1265 # `condition`, which is a logical expression that allows access to a resource
1266 # only if the expression evaluates to `true`. A condition can add constraints
1267 # based on attributes of the request, the resource, or both. To learn which
1268 # resources support conditions in their IAM policies, see the
1269 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001270 #
1271 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001272 #
1273 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001274 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001275 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001276 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1277 # &quot;members&quot;: [
1278 # &quot;user:mike@example.com&quot;,
1279 # &quot;group:admins@example.com&quot;,
1280 # &quot;domain:google.com&quot;,
1281 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001282 # ]
1283 # },
1284 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001285 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1286 # &quot;members&quot;: [
1287 # &quot;user:eve@example.com&quot;
1288 # ],
1289 # &quot;condition&quot;: {
1290 # &quot;title&quot;: &quot;expirable access&quot;,
1291 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1292 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001293 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001294 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001295 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001296 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1297 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001298 # }
1299 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001300 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001301 #
1302 # bindings:
1303 # - members:
1304 # - user:mike@example.com
1305 # - group:admins@example.com
1306 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001307 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1308 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001309 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001310 # - user:eve@example.com
1311 # role: roles/resourcemanager.organizationViewer
1312 # condition:
1313 # title: expirable access
1314 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001315 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001316 # - etag: BwWWja0YfJA=
1317 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001318 #
1319 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001320 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001321 &quot;version&quot;: 42, # Specifies the format of the policy.
1322 #
1323 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1324 # are rejected.
1325 #
1326 # Any operation that affects conditional role bindings must specify version
1327 # `3`. This requirement applies to the following operations:
1328 #
1329 # * Getting a policy that includes a conditional role binding
1330 # * Adding a conditional role binding to a policy
1331 # * Changing a conditional role binding in a policy
1332 # * Removing any role binding, with or without a condition, from a policy
1333 # that includes conditions
1334 #
1335 # **Important:** If you use IAM Conditions, you must include the `etag` field
1336 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1337 # you to overwrite a version `3` policy with a version `1` policy, and all of
1338 # the conditions in the version `3` policy are lost.
1339 #
1340 # If a policy does not include any conditions, operations on that policy may
1341 # specify any valid version or leave the field unset.
1342 #
1343 # To learn which resources support conditions in their IAM policies, see the
1344 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1345 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001346 # `condition` that determines how and when the `bindings` are applied. Each
1347 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001348 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001349 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1350 #
1351 # If the condition evaluates to `true`, then this binding applies to the
1352 # current request.
1353 #
1354 # If the condition evaluates to `false`, then this binding does not apply to
1355 # the current request. However, a different role binding might grant the same
1356 # role to one or more of the members in this binding.
1357 #
1358 # To learn which resources support conditions in their IAM policies, see the
1359 # [IAM
1360 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001361 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1362 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001363 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001364 # Example (Comparison):
1365 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001366 # title: &quot;Summary size limit&quot;
1367 # description: &quot;Determines if a summary is less than 100 chars&quot;
1368 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001369 #
1370 # Example (Equality):
1371 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001372 # title: &quot;Requestor is owner&quot;
1373 # description: &quot;Determines if requestor is the document owner&quot;
1374 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001375 #
1376 # Example (Logic):
1377 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001378 # title: &quot;Public documents&quot;
1379 # description: &quot;Determine whether the document should be publicly visible&quot;
1380 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001381 #
1382 # Example (Data Manipulation):
1383 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001384 # title: &quot;Notification string&quot;
1385 # description: &quot;Create a notification string with a timestamp.&quot;
1386 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001387 #
1388 # The exact variables and functions that may be referenced within an expression
1389 # are determined by the service that evaluates it. See the service
1390 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001391 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001392 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07001393 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
Dan O'Mearadd494642020-05-01 07:42:23 -07001394 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07001395 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001396 # its purpose. This can be used e.g. in UIs which allow to enter the
1397 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07001398 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1399 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001400 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001401 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001402 # `members` can have the following values:
1403 #
1404 # * `allUsers`: A special identifier that represents anyone who is
1405 # on the internet; with or without a Google account.
1406 #
1407 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1408 # who is authenticated with a Google account or a service account.
1409 #
1410 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001411 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001412 #
1413 #
1414 # * `serviceAccount:{emailid}`: An email address that represents a service
1415 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1416 #
1417 # * `group:{emailid}`: An email address that represents a Google group.
1418 # For example, `admins@example.com`.
1419 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001420 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1421 # identifier) representing a user that has been recently deleted. For
1422 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1423 # recovered, this value reverts to `user:{emailid}` and the recovered user
1424 # retains the role in the binding.
1425 #
1426 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1427 # unique identifier) representing a service account that has been recently
1428 # deleted. For example,
1429 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1430 # If the service account is undeleted, this value reverts to
1431 # `serviceAccount:{emailid}` and the undeleted service account retains the
1432 # role in the binding.
1433 #
1434 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1435 # identifier) representing a Google group that has been recently
1436 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1437 # the group is recovered, this value reverts to `group:{emailid}` and the
1438 # recovered group retains the role in the binding.
1439 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001440 #
1441 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1442 # users of that domain. For example, `google.com` or `example.com`.
1443 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001444 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001445 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001446 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1447 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001448 },
1449 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001450 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001451 # prevent simultaneous updates of a policy from overwriting each other.
1452 # It is strongly suggested that systems make use of the `etag` in the
1453 # read-modify-write cycle to perform policy updates in order to avoid race
1454 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1455 # systems are expected to put that etag in the request to `setIamPolicy` to
1456 # ensure that their change will be applied to the same version of the policy.
1457 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001458 # **Important:** If you use IAM Conditions, you must include the `etag` field
1459 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1460 # you to overwrite a version `3` policy with a version `1` policy, and all of
1461 # the conditions in the version `3` policy are lost.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001462 }</pre>
1463</div>
1464
1465<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001466 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, filter=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001467 <pre>Lists queues.
1468
1469Queues are returned in lexicographical order.
1470
1471Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001472 parent: string, Required. The location name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001473For example: `projects/PROJECT_ID/locations/LOCATION_ID` (required)
1474 pageToken: string, A token identifying the page of results to return.
1475
1476To request the first page results, page_token must be empty. To
1477request the next page of results, page_token must be the value of
1478next_page_token returned
1479from the previous call to ListQueues
1480method. It is an error to switch the value of the
1481filter while iterating through pages.
Bu Sun Kim65020912020-05-20 12:08:20 -07001482 pageSize: integer, Requested page size.
1483
1484The maximum page size is 9800. If unspecified, the page size will
1485be the maximum. Fewer queues than requested might be returned,
1486even if more queues exist; use the
1487next_page_token in the
1488response to determine if more queues exist.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001489 filter: string, `filter` can be used to specify a subset of queues. Any Queue
1490field can be used as a filter and several operators as supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07001491For example: `&lt;=, &lt;, &gt;=, &gt;, !=, =, :`. The filter syntax is the same as
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492described in
Bu Sun Kim65020912020-05-20 12:08:20 -07001493[Stackdriver&#x27;s Advanced Logs
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001494Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
1495
Bu Sun Kim65020912020-05-20 12:08:20 -07001496Sample filter &quot;state: PAUSED&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001497
1498Note that using filters might cause fewer queues than the
1499requested page_size to be returned.
Bu Sun Kim65020912020-05-20 12:08:20 -07001500 x__xgafv: string, V1 error format.
1501 Allowed values
1502 1 - v1 error format
1503 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001504
1505Returns:
1506 An object of the form:
1507
1508 { # Response message for ListQueues.
Bu Sun Kim65020912020-05-20 12:08:20 -07001509 &quot;queues&quot;: [ # The list of queues.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001510 { # A queue is a container of related tasks. Queues are configured to manage
1511 # how those tasks are dispatched. Configurable properties include rate limits,
1512 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07001513 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001514 # App Engine tasks in this queue.
1515 # Http tasks are not affected by this proto.
1516 #
1517 # The task will be delivered to the App Engine application hostname
1518 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
1519 # The documentation for AppEngineHttpRequest explains how the
Bu Sun Kim65020912020-05-20 12:08:20 -07001520 # task&#x27;s host URL is constructed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001521 #
1522 # Using AppEngineHttpQueue requires
1523 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1524 # Google IAM permission for the project
1525 # and the following scope:
1526 #
1527 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -07001528 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001529 # task-level app_engine_routing.
1530 #
1531 # If set, `app_engine_routing_override` is used for all tasks in
1532 # the queue, no matter what the setting is for the
1533 # task-level app_engine_routing.
1534 #
1535 # Defines routing characteristics specific to App Engine - service, version,
1536 # and instance.
1537 #
1538 # For more information about services, versions, and instances see
1539 # [An Overview of App
1540 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1541 # [Microservices Architecture on Google App
1542 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1543 # [App Engine Standard request
1544 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1545 # and [App Engine Flex request
1546 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -07001547 &quot;version&quot;: &quot;A String&quot;, # App version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001548 #
1549 # By default, the task is sent to the version which is the default
1550 # version when the task is attempted.
1551 #
1552 # For some queues or tasks which were created using the App Engine
1553 # Task Queue API, host is not parsable
1554 # into service,
1555 # version, and
1556 # instance. For example, some tasks
1557 # which were created using the App Engine SDK use a custom domain
1558 # name; custom domains are not parsed by Cloud Tasks. If
1559 # host is not parsable, then
1560 # service,
1561 # version, and
1562 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07001563 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1564 #
1565 # The host is constructed from the domain name of the app associated with
1566 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1567 # service, version,
1568 # and instance. Tasks which were created using
1569 # the App Engine SDK might have a custom domain name.
1570 #
1571 # For more information, see
1572 # [How Requests are
1573 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1574 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001575 #
1576 # By default, the task is sent to the service which is the default
1577 # service when the task is attempted.
1578 #
1579 # For some queues or tasks which were created using the App Engine
1580 # Task Queue API, host is not parsable
1581 # into service,
1582 # version, and
1583 # instance. For example, some tasks
1584 # which were created using the App Engine SDK use a custom domain
1585 # name; custom domains are not parsed by Cloud Tasks. If
1586 # host is not parsable, then
1587 # service,
1588 # version, and
1589 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07001590 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1591 #
1592 # By default, the task is sent to an instance which is available when
1593 # the task is attempted.
1594 #
1595 # Requests can only be sent to a specific instance if
1596 # [manual scaling is used in App Engine
1597 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1598 # App Engine Flex does not support instances. For more information, see
1599 # [App Engine Standard request
1600 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1601 # and [App Engine Flex request
1602 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001603 },
1604 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001605 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
1606 #
1607 # All tasks that were created before this time
1608 # were purged.
1609 #
1610 # A queue can be purged using PurgeQueue, the
1611 # [App Engine Task Queue SDK, or the Cloud
1612 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
1613 #
1614 # Purge time will be truncated to the nearest microsecond. Purge
1615 # time will be unset if the queue has never been purged.
1616 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001617 #
1618 # * For tasks created using Cloud Tasks: the queue-level retry settings
1619 # apply to all tasks in the queue that were created using Cloud Tasks.
1620 # Retry settings cannot be set on individual tasks.
1621 # * For tasks created using the App Engine SDK: the queue-level retry
1622 # settings apply to all tasks in the queue which do not have retry settings
1623 # explicitly set on the task and were created by the App Engine SDK. See
1624 # [App Engine
1625 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
1626 #
1627 # These settings determine when a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -07001628 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1629 # min_backoff and
1630 # max_backoff duration after it fails,
1631 # if the queue&#x27;s RetryConfig specifies that the task should be
1632 # retried.
1633 #
1634 # If unspecified when the queue is created, Cloud Tasks will pick the
1635 # default.
1636 #
1637 #
1638 # `min_backoff` will be truncated to the nearest second.
1639 #
1640 # This field has the same meaning as
1641 # [min_backoff_seconds in
1642 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1643 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1644 # min_backoff and
1645 # max_backoff duration after it fails,
1646 # if the queue&#x27;s RetryConfig specifies that the task should be
1647 # retried.
1648 #
1649 # If unspecified when the queue is created, Cloud Tasks will pick the
1650 # default.
1651 #
1652 #
1653 # `max_backoff` will be truncated to the nearest second.
1654 #
1655 # This field has the same meaning as
1656 # [max_backoff_seconds in
1657 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1658 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001659 # retrying a failed task, measured from when the task was first
1660 # attempted. Once `max_retry_duration` time has passed *and* the
1661 # task has been attempted max_attempts
1662 # times, no further attempts will be made and the task will be
1663 # deleted.
1664 #
1665 # If zero, then the task age is unlimited.
1666 #
1667 # If unspecified when the queue is created, Cloud Tasks will pick the
1668 # default.
1669 #
1670 #
1671 # `max_retry_duration` will be truncated to the nearest second.
1672 #
1673 # This field has the same meaning as
1674 # [task_age_limit in
1675 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07001676 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001677 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001678 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
1679 # first attempt fails, then there will be `max_attempts - 1` retries). Must
1680 # be &gt;= -1.
1681 #
1682 # If unspecified when the queue is created, Cloud Tasks will pick the
1683 # default.
1684 #
1685 # -1 indicates unlimited attempts.
1686 #
1687 # This field has the same meaning as
1688 # [task_retry_limit in
1689 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1690 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
1691 #
1692 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001693 # min_backoff, then doubles
1694 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07001695 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001696 # max_backoff up to
1697 # max_attempts times.
1698 #
1699 # For example, if min_backoff is 10s,
1700 # max_backoff is 300s, and
1701 # `max_doublings` is 3, then the a task will first be retried in
1702 # 10s. The retry interval will double three times, and then
1703 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1704 # intervals of max_backoff until the
1705 # task has been attempted max_attempts
1706 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1707 # 240s, 300s, 300s, ....
1708 #
1709 # If unspecified when the queue is created, Cloud Tasks will pick the
1710 # default.
1711 #
1712 #
1713 # This field has the same meaning as
1714 # [max_doublings in
1715 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07001716 },
1717 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
1718 #
1719 # `state` can only be changed by called
1720 # PauseQueue,
1721 # ResumeQueue, or uploading
1722 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
1723 # UpdateQueue cannot be used to change `state`.
1724 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
1725 # after which it becomes output only.
1726 #
1727 # The queue name.
1728 #
1729 # The queue name must have the following format:
1730 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1731 #
1732 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1733 # hyphens (-), colons (:), or periods (.).
1734 # For more information, see
1735 # [Identifying
1736 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1737 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
1738 # The list of available locations can be obtained by calling
1739 # ListLocations.
1740 # For more information, see https://cloud.google.com/about/locations/.
1741 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1742 # hyphens (-). The maximum length is 100 characters.
1743 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
1744 #
1745 # rate_limits and retry_config are
1746 # related because they both control task attempts. However they control task
1747 # attempts in different ways:
1748 #
1749 # * rate_limits controls the total rate of
1750 # dispatches from a queue (i.e. all traffic dispatched from the
1751 # queue, regardless of whether the dispatch is from a first
1752 # attempt or a retry).
1753 # * retry_config controls what happens to
1754 # particular a task after its first attempt fails. That is,
1755 # retry_config controls task retries (the
1756 # second attempt, third attempt, etc).
1757 #
1758 # The queue&#x27;s actual dispatch rate is the result of:
1759 #
1760 # * Number of tasks in the queue
1761 # * User-specified throttling: rate_limits,
1762 # retry_config, and the
1763 # queue&#x27;s state.
1764 # * System throttling due to `429` (Too Many Requests) or `503` (Service
1765 # Unavailable) responses from the worker, high error rates, or to smooth
1766 # sudden large traffic spikes.
1767 #
1768 # This message determines the maximum rate that tasks can be dispatched by a
1769 # queue, regardless of whether the dispatch is a first task attempt or a retry.
1770 #
1771 # Note: The debugging command, RunTask, will run a task
1772 # even if the queue has reached its RateLimits.
1773 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001774 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001775 # Max burst size limits how fast tasks in queue are processed when
1776 # many tasks are in the queue and the rate is high. This field
1777 # allows the queue to have a high rate so processing starts shortly
1778 # after a task is enqueued, but still limits resource usage when
1779 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001780 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001781 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1782 # algorithm is used to control the rate of task dispatches. Each
1783 # queue has a token bucket that holds tokens, up to the maximum
1784 # specified by `max_burst_size`. Each time a task is dispatched, a
1785 # token is removed from the bucket. Tasks will be dispatched until
1786 # the queue&#x27;s bucket runs out of tokens. The bucket will be
1787 # continuously refilled with new tokens based on
1788 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001789 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001790 # Cloud Tasks will pick the value of `max_burst_size` based on the
1791 # value of
1792 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001793 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001794 # For App Engine queues that were created or updated using
1795 # `queue.yaml/xml`, `max_burst_size` is equal to
1796 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1797 # Since `max_burst_size` is output only, if
1798 # UpdateQueue is called on a queue
1799 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
1800 # on the value of
1801 # max_dispatches_per_second,
1802 # regardless of whether
1803 # max_dispatches_per_second
1804 # is updated.
1805 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
1806 # to be dispatched for this queue. After this threshold has been
1807 # reached, Cloud Tasks stops dispatching tasks until the number of
1808 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001809 #
1810 # If unspecified when the queue is created, Cloud Tasks will pick the
1811 # default.
1812 #
1813 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001814 # The maximum allowed value is 5,000.
1815 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001816 #
1817 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07001818 # [max_concurrent_requests in
1819 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
1820 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001821 #
1822 # If unspecified when the queue is created, Cloud Tasks will pick the
1823 # default.
1824 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001825 # * For App Engine queues, the maximum allowed value
1826 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001827 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001828 #
1829 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07001830 # [rate in
1831 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
1832 },
1833 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
1834 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
1835 # field is unset, then no logs are written.
1836 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1837 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
1838 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1839 # This field may contain any value between 0.0 and 1.0, inclusive.
1840 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001841 },
1842 },
1843 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001844 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results.
1845 #
1846 # To return the next page of results, call
1847 # ListQueues with this value as the
1848 # page_token.
1849 #
1850 # If the next_page_token is empty, there are no more results.
1851 #
1852 # The page token is valid for only 2 hours.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001853 }</pre>
1854</div>
1855
1856<div class="method">
1857 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1858 <pre>Retrieves the next page of results.
1859
1860Args:
1861 previous_request: The request for the previous page. (required)
1862 previous_response: The response from the request for the previous page. (required)
1863
1864Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001865 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001866 page. Returns None if there are no more items in the collection.
1867 </pre>
1868</div>
1869
1870<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001871 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001872 <pre>Updates a queue.
1873
1874This method creates the queue if it does not exist and updates
1875the queue if it does exist.
1876
1877Queues created with this method allow tasks to live for a maximum of 31
1878days. After a task is 31 days old, the task will be deleted regardless of whether
1879it was dispatched or not.
1880
1881WARNING: Using this method may have unintended side effects if you are
1882using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
1883Read
1884[Overview of Queue Management and
1885queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
1886this method.
1887
1888Args:
1889 name: string, Caller-specified and required in CreateQueue,
1890after which it becomes output only.
1891
1892The queue name.
1893
1894The queue name must have the following format:
1895`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1896
1897* `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1898 hyphens (-), colons (:), or periods (.).
1899 For more information, see
1900 [Identifying
1901 projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -07001902* `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001903 The list of available locations can be obtained by calling
1904 ListLocations.
1905 For more information, see https://cloud.google.com/about/locations/.
1906* `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1907 hyphens (-). The maximum length is 100 characters. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001908 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001909 The object takes the form of:
1910
1911{ # A queue is a container of related tasks. Queues are configured to manage
1912 # how those tasks are dispatched. Configurable properties include rate limits,
1913 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07001914 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001915 # App Engine tasks in this queue.
1916 # Http tasks are not affected by this proto.
1917 #
1918 # The task will be delivered to the App Engine application hostname
1919 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
1920 # The documentation for AppEngineHttpRequest explains how the
Bu Sun Kim65020912020-05-20 12:08:20 -07001921 # task&#x27;s host URL is constructed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001922 #
1923 # Using AppEngineHttpQueue requires
1924 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1925 # Google IAM permission for the project
1926 # and the following scope:
1927 #
1928 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -07001929 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001930 # task-level app_engine_routing.
1931 #
1932 # If set, `app_engine_routing_override` is used for all tasks in
1933 # the queue, no matter what the setting is for the
1934 # task-level app_engine_routing.
1935 #
1936 # Defines routing characteristics specific to App Engine - service, version,
1937 # and instance.
1938 #
1939 # For more information about services, versions, and instances see
1940 # [An Overview of App
1941 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1942 # [Microservices Architecture on Google App
1943 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1944 # [App Engine Standard request
1945 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1946 # and [App Engine Flex request
1947 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -07001948 &quot;version&quot;: &quot;A String&quot;, # App version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001949 #
1950 # By default, the task is sent to the version which is the default
1951 # version when the task is attempted.
1952 #
1953 # For some queues or tasks which were created using the App Engine
1954 # Task Queue API, host is not parsable
1955 # into service,
1956 # version, and
1957 # instance. For example, some tasks
1958 # which were created using the App Engine SDK use a custom domain
1959 # name; custom domains are not parsed by Cloud Tasks. If
1960 # host is not parsable, then
1961 # service,
1962 # version, and
1963 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07001964 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1965 #
1966 # The host is constructed from the domain name of the app associated with
1967 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1968 # service, version,
1969 # and instance. Tasks which were created using
1970 # the App Engine SDK might have a custom domain name.
1971 #
1972 # For more information, see
1973 # [How Requests are
1974 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1975 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001976 #
1977 # By default, the task is sent to the service which is the default
1978 # service when the task is attempted.
1979 #
1980 # For some queues or tasks which were created using the App Engine
1981 # Task Queue API, host is not parsable
1982 # into service,
1983 # version, and
1984 # instance. For example, some tasks
1985 # which were created using the App Engine SDK use a custom domain
1986 # name; custom domains are not parsed by Cloud Tasks. If
1987 # host is not parsable, then
1988 # service,
1989 # version, and
1990 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07001991 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1992 #
1993 # By default, the task is sent to an instance which is available when
1994 # the task is attempted.
1995 #
1996 # Requests can only be sent to a specific instance if
1997 # [manual scaling is used in App Engine
1998 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1999 # App Engine Flex does not support instances. For more information, see
2000 # [App Engine Standard request
2001 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2002 # and [App Engine Flex request
2003 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002004 },
2005 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002006 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
2007 #
2008 # All tasks that were created before this time
2009 # were purged.
2010 #
2011 # A queue can be purged using PurgeQueue, the
2012 # [App Engine Task Queue SDK, or the Cloud
2013 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2014 #
2015 # Purge time will be truncated to the nearest microsecond. Purge
2016 # time will be unset if the queue has never been purged.
2017 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002018 #
2019 # * For tasks created using Cloud Tasks: the queue-level retry settings
2020 # apply to all tasks in the queue that were created using Cloud Tasks.
2021 # Retry settings cannot be set on individual tasks.
2022 # * For tasks created using the App Engine SDK: the queue-level retry
2023 # settings apply to all tasks in the queue which do not have retry settings
2024 # explicitly set on the task and were created by the App Engine SDK. See
2025 # [App Engine
2026 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2027 #
2028 # These settings determine when a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -07002029 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2030 # min_backoff and
2031 # max_backoff duration after it fails,
2032 # if the queue&#x27;s RetryConfig specifies that the task should be
2033 # retried.
2034 #
2035 # If unspecified when the queue is created, Cloud Tasks will pick the
2036 # default.
2037 #
2038 #
2039 # `min_backoff` will be truncated to the nearest second.
2040 #
2041 # This field has the same meaning as
2042 # [min_backoff_seconds in
2043 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2044 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2045 # min_backoff and
2046 # max_backoff duration after it fails,
2047 # if the queue&#x27;s RetryConfig specifies that the task should be
2048 # retried.
2049 #
2050 # If unspecified when the queue is created, Cloud Tasks will pick the
2051 # default.
2052 #
2053 #
2054 # `max_backoff` will be truncated to the nearest second.
2055 #
2056 # This field has the same meaning as
2057 # [max_backoff_seconds in
2058 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2059 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002060 # retrying a failed task, measured from when the task was first
2061 # attempted. Once `max_retry_duration` time has passed *and* the
2062 # task has been attempted max_attempts
2063 # times, no further attempts will be made and the task will be
2064 # deleted.
2065 #
2066 # If zero, then the task age is unlimited.
2067 #
2068 # If unspecified when the queue is created, Cloud Tasks will pick the
2069 # default.
2070 #
2071 #
2072 # `max_retry_duration` will be truncated to the nearest second.
2073 #
2074 # This field has the same meaning as
2075 # [task_age_limit in
2076 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07002077 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002078 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002079 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2080 # first attempt fails, then there will be `max_attempts - 1` retries). Must
2081 # be &gt;= -1.
2082 #
2083 # If unspecified when the queue is created, Cloud Tasks will pick the
2084 # default.
2085 #
2086 # -1 indicates unlimited attempts.
2087 #
2088 # This field has the same meaning as
2089 # [task_retry_limit in
2090 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2091 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2092 #
2093 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002094 # min_backoff, then doubles
2095 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07002096 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002097 # max_backoff up to
2098 # max_attempts times.
2099 #
2100 # For example, if min_backoff is 10s,
2101 # max_backoff is 300s, and
2102 # `max_doublings` is 3, then the a task will first be retried in
2103 # 10s. The retry interval will double three times, and then
2104 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2105 # intervals of max_backoff until the
2106 # task has been attempted max_attempts
2107 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2108 # 240s, 300s, 300s, ....
2109 #
2110 # If unspecified when the queue is created, Cloud Tasks will pick the
2111 # default.
2112 #
2113 #
2114 # This field has the same meaning as
2115 # [max_doublings in
2116 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07002117 },
2118 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2119 #
2120 # `state` can only be changed by called
2121 # PauseQueue,
2122 # ResumeQueue, or uploading
2123 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2124 # UpdateQueue cannot be used to change `state`.
2125 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2126 # after which it becomes output only.
2127 #
2128 # The queue name.
2129 #
2130 # The queue name must have the following format:
2131 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2132 #
2133 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2134 # hyphens (-), colons (:), or periods (.).
2135 # For more information, see
2136 # [Identifying
2137 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2138 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2139 # The list of available locations can be obtained by calling
2140 # ListLocations.
2141 # For more information, see https://cloud.google.com/about/locations/.
2142 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2143 # hyphens (-). The maximum length is 100 characters.
2144 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2145 #
2146 # rate_limits and retry_config are
2147 # related because they both control task attempts. However they control task
2148 # attempts in different ways:
2149 #
2150 # * rate_limits controls the total rate of
2151 # dispatches from a queue (i.e. all traffic dispatched from the
2152 # queue, regardless of whether the dispatch is from a first
2153 # attempt or a retry).
2154 # * retry_config controls what happens to
2155 # particular a task after its first attempt fails. That is,
2156 # retry_config controls task retries (the
2157 # second attempt, third attempt, etc).
2158 #
2159 # The queue&#x27;s actual dispatch rate is the result of:
2160 #
2161 # * Number of tasks in the queue
2162 # * User-specified throttling: rate_limits,
2163 # retry_config, and the
2164 # queue&#x27;s state.
2165 # * System throttling due to `429` (Too Many Requests) or `503` (Service
2166 # Unavailable) responses from the worker, high error rates, or to smooth
2167 # sudden large traffic spikes.
2168 #
2169 # This message determines the maximum rate that tasks can be dispatched by a
2170 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2171 #
2172 # Note: The debugging command, RunTask, will run a task
2173 # even if the queue has reached its RateLimits.
2174 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002175 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002176 # Max burst size limits how fast tasks in queue are processed when
2177 # many tasks are in the queue and the rate is high. This field
2178 # allows the queue to have a high rate so processing starts shortly
2179 # after a task is enqueued, but still limits resource usage when
2180 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002181 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002182 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2183 # algorithm is used to control the rate of task dispatches. Each
2184 # queue has a token bucket that holds tokens, up to the maximum
2185 # specified by `max_burst_size`. Each time a task is dispatched, a
2186 # token is removed from the bucket. Tasks will be dispatched until
2187 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2188 # continuously refilled with new tokens based on
2189 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002190 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002191 # Cloud Tasks will pick the value of `max_burst_size` based on the
2192 # value of
2193 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002194 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002195 # For App Engine queues that were created or updated using
2196 # `queue.yaml/xml`, `max_burst_size` is equal to
2197 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2198 # Since `max_burst_size` is output only, if
2199 # UpdateQueue is called on a queue
2200 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2201 # on the value of
2202 # max_dispatches_per_second,
2203 # regardless of whether
2204 # max_dispatches_per_second
2205 # is updated.
2206 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2207 # to be dispatched for this queue. After this threshold has been
2208 # reached, Cloud Tasks stops dispatching tasks until the number of
2209 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002210 #
2211 # If unspecified when the queue is created, Cloud Tasks will pick the
2212 # default.
2213 #
2214 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002215 # The maximum allowed value is 5,000.
2216 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002217 #
2218 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002219 # [max_concurrent_requests in
2220 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
2221 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002222 #
2223 # If unspecified when the queue is created, Cloud Tasks will pick the
2224 # default.
2225 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002226 # * For App Engine queues, the maximum allowed value
2227 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002228 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002229 #
2230 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002231 # [rate in
2232 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2233 },
2234 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
2235 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2236 # field is unset, then no logs are written.
2237 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2238 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
2239 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2240 # This field may contain any value between 0.0 and 1.0, inclusive.
2241 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002242 },
2243}
2244
2245 updateMask: string, A mask used to specify which fields of the queue are being updated.
2246
2247If empty, then all fields will be updated.
2248 x__xgafv: string, V1 error format.
2249 Allowed values
2250 1 - v1 error format
2251 2 - v2 error format
2252
2253Returns:
2254 An object of the form:
2255
2256 { # A queue is a container of related tasks. Queues are configured to manage
2257 # how those tasks are dispatched. Configurable properties include rate limits,
2258 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07002259 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002260 # App Engine tasks in this queue.
2261 # Http tasks are not affected by this proto.
2262 #
2263 # The task will be delivered to the App Engine application hostname
2264 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
2265 # The documentation for AppEngineHttpRequest explains how the
Bu Sun Kim65020912020-05-20 12:08:20 -07002266 # task&#x27;s host URL is constructed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002267 #
2268 # Using AppEngineHttpQueue requires
2269 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2270 # Google IAM permission for the project
2271 # and the following scope:
2272 #
2273 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -07002274 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002275 # task-level app_engine_routing.
2276 #
2277 # If set, `app_engine_routing_override` is used for all tasks in
2278 # the queue, no matter what the setting is for the
2279 # task-level app_engine_routing.
2280 #
2281 # Defines routing characteristics specific to App Engine - service, version,
2282 # and instance.
2283 #
2284 # For more information about services, versions, and instances see
2285 # [An Overview of App
2286 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2287 # [Microservices Architecture on Google App
2288 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2289 # [App Engine Standard request
2290 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2291 # and [App Engine Flex request
2292 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -07002293 &quot;version&quot;: &quot;A String&quot;, # App version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002294 #
2295 # By default, the task is sent to the version which is the default
2296 # version when the task is attempted.
2297 #
2298 # For some queues or tasks which were created using the App Engine
2299 # Task Queue API, host is not parsable
2300 # into service,
2301 # version, and
2302 # instance. For example, some tasks
2303 # which were created using the App Engine SDK use a custom domain
2304 # name; custom domains are not parsed by Cloud Tasks. If
2305 # host is not parsable, then
2306 # service,
2307 # version, and
2308 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07002309 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2310 #
2311 # The host is constructed from the domain name of the app associated with
2312 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2313 # service, version,
2314 # and instance. Tasks which were created using
2315 # the App Engine SDK might have a custom domain name.
2316 #
2317 # For more information, see
2318 # [How Requests are
2319 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2320 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002321 #
2322 # By default, the task is sent to the service which is the default
2323 # service when the task is attempted.
2324 #
2325 # For some queues or tasks which were created using the App Engine
2326 # Task Queue API, host is not parsable
2327 # into service,
2328 # version, and
2329 # instance. For example, some tasks
2330 # which were created using the App Engine SDK use a custom domain
2331 # name; custom domains are not parsed by Cloud Tasks. If
2332 # host is not parsable, then
2333 # service,
2334 # version, and
2335 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07002336 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2337 #
2338 # By default, the task is sent to an instance which is available when
2339 # the task is attempted.
2340 #
2341 # Requests can only be sent to a specific instance if
2342 # [manual scaling is used in App Engine
2343 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2344 # App Engine Flex does not support instances. For more information, see
2345 # [App Engine Standard request
2346 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2347 # and [App Engine Flex request
2348 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002349 },
2350 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002351 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
2352 #
2353 # All tasks that were created before this time
2354 # were purged.
2355 #
2356 # A queue can be purged using PurgeQueue, the
2357 # [App Engine Task Queue SDK, or the Cloud
2358 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2359 #
2360 # Purge time will be truncated to the nearest microsecond. Purge
2361 # time will be unset if the queue has never been purged.
2362 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002363 #
2364 # * For tasks created using Cloud Tasks: the queue-level retry settings
2365 # apply to all tasks in the queue that were created using Cloud Tasks.
2366 # Retry settings cannot be set on individual tasks.
2367 # * For tasks created using the App Engine SDK: the queue-level retry
2368 # settings apply to all tasks in the queue which do not have retry settings
2369 # explicitly set on the task and were created by the App Engine SDK. See
2370 # [App Engine
2371 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2372 #
2373 # These settings determine when a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -07002374 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2375 # min_backoff and
2376 # max_backoff duration after it fails,
2377 # if the queue&#x27;s RetryConfig specifies that the task should be
2378 # retried.
2379 #
2380 # If unspecified when the queue is created, Cloud Tasks will pick the
2381 # default.
2382 #
2383 #
2384 # `min_backoff` will be truncated to the nearest second.
2385 #
2386 # This field has the same meaning as
2387 # [min_backoff_seconds in
2388 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2389 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2390 # min_backoff and
2391 # max_backoff duration after it fails,
2392 # if the queue&#x27;s RetryConfig specifies that the task should be
2393 # retried.
2394 #
2395 # If unspecified when the queue is created, Cloud Tasks will pick the
2396 # default.
2397 #
2398 #
2399 # `max_backoff` will be truncated to the nearest second.
2400 #
2401 # This field has the same meaning as
2402 # [max_backoff_seconds in
2403 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2404 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002405 # retrying a failed task, measured from when the task was first
2406 # attempted. Once `max_retry_duration` time has passed *and* the
2407 # task has been attempted max_attempts
2408 # times, no further attempts will be made and the task will be
2409 # deleted.
2410 #
2411 # If zero, then the task age is unlimited.
2412 #
2413 # If unspecified when the queue is created, Cloud Tasks will pick the
2414 # default.
2415 #
2416 #
2417 # `max_retry_duration` will be truncated to the nearest second.
2418 #
2419 # This field has the same meaning as
2420 # [task_age_limit in
2421 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07002422 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002423 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002424 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2425 # first attempt fails, then there will be `max_attempts - 1` retries). Must
2426 # be &gt;= -1.
2427 #
2428 # If unspecified when the queue is created, Cloud Tasks will pick the
2429 # default.
2430 #
2431 # -1 indicates unlimited attempts.
2432 #
2433 # This field has the same meaning as
2434 # [task_retry_limit in
2435 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2436 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2437 #
2438 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002439 # min_backoff, then doubles
2440 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07002441 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002442 # max_backoff up to
2443 # max_attempts times.
2444 #
2445 # For example, if min_backoff is 10s,
2446 # max_backoff is 300s, and
2447 # `max_doublings` is 3, then the a task will first be retried in
2448 # 10s. The retry interval will double three times, and then
2449 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2450 # intervals of max_backoff until the
2451 # task has been attempted max_attempts
2452 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2453 # 240s, 300s, 300s, ....
2454 #
2455 # If unspecified when the queue is created, Cloud Tasks will pick the
2456 # default.
2457 #
2458 #
2459 # This field has the same meaning as
2460 # [max_doublings in
2461 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07002462 },
2463 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2464 #
2465 # `state` can only be changed by called
2466 # PauseQueue,
2467 # ResumeQueue, or uploading
2468 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2469 # UpdateQueue cannot be used to change `state`.
2470 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2471 # after which it becomes output only.
2472 #
2473 # The queue name.
2474 #
2475 # The queue name must have the following format:
2476 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2477 #
2478 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2479 # hyphens (-), colons (:), or periods (.).
2480 # For more information, see
2481 # [Identifying
2482 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2483 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2484 # The list of available locations can be obtained by calling
2485 # ListLocations.
2486 # For more information, see https://cloud.google.com/about/locations/.
2487 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2488 # hyphens (-). The maximum length is 100 characters.
2489 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2490 #
2491 # rate_limits and retry_config are
2492 # related because they both control task attempts. However they control task
2493 # attempts in different ways:
2494 #
2495 # * rate_limits controls the total rate of
2496 # dispatches from a queue (i.e. all traffic dispatched from the
2497 # queue, regardless of whether the dispatch is from a first
2498 # attempt or a retry).
2499 # * retry_config controls what happens to
2500 # particular a task after its first attempt fails. That is,
2501 # retry_config controls task retries (the
2502 # second attempt, third attempt, etc).
2503 #
2504 # The queue&#x27;s actual dispatch rate is the result of:
2505 #
2506 # * Number of tasks in the queue
2507 # * User-specified throttling: rate_limits,
2508 # retry_config, and the
2509 # queue&#x27;s state.
2510 # * System throttling due to `429` (Too Many Requests) or `503` (Service
2511 # Unavailable) responses from the worker, high error rates, or to smooth
2512 # sudden large traffic spikes.
2513 #
2514 # This message determines the maximum rate that tasks can be dispatched by a
2515 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2516 #
2517 # Note: The debugging command, RunTask, will run a task
2518 # even if the queue has reached its RateLimits.
2519 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002520 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002521 # Max burst size limits how fast tasks in queue are processed when
2522 # many tasks are in the queue and the rate is high. This field
2523 # allows the queue to have a high rate so processing starts shortly
2524 # after a task is enqueued, but still limits resource usage when
2525 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002526 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002527 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2528 # algorithm is used to control the rate of task dispatches. Each
2529 # queue has a token bucket that holds tokens, up to the maximum
2530 # specified by `max_burst_size`. Each time a task is dispatched, a
2531 # token is removed from the bucket. Tasks will be dispatched until
2532 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2533 # continuously refilled with new tokens based on
2534 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002535 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002536 # Cloud Tasks will pick the value of `max_burst_size` based on the
2537 # value of
2538 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002539 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002540 # For App Engine queues that were created or updated using
2541 # `queue.yaml/xml`, `max_burst_size` is equal to
2542 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2543 # Since `max_burst_size` is output only, if
2544 # UpdateQueue is called on a queue
2545 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2546 # on the value of
2547 # max_dispatches_per_second,
2548 # regardless of whether
2549 # max_dispatches_per_second
2550 # is updated.
2551 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2552 # to be dispatched for this queue. After this threshold has been
2553 # reached, Cloud Tasks stops dispatching tasks until the number of
2554 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002555 #
2556 # If unspecified when the queue is created, Cloud Tasks will pick the
2557 # default.
2558 #
2559 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002560 # The maximum allowed value is 5,000.
2561 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002562 #
2563 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002564 # [max_concurrent_requests in
2565 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
2566 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002567 #
2568 # If unspecified when the queue is created, Cloud Tasks will pick the
2569 # default.
2570 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002571 # * For App Engine queues, the maximum allowed value
2572 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002573 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002574 #
2575 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002576 # [rate in
2577 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2578 },
2579 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
2580 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2581 # field is unset, then no logs are written.
2582 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2583 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
2584 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2585 # This field may contain any value between 0.0 and 1.0, inclusive.
2586 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002587 },
2588 }</pre>
2589</div>
2590
2591<div class="method">
2592 <code class="details" id="pause">pause(name, body=None, x__xgafv=None)</code>
2593 <pre>Pauses the queue.
2594
2595If a queue is paused then the system will stop dispatching tasks
2596until the queue is resumed via
2597ResumeQueue. Tasks can still be added
2598when the queue is paused. A queue is paused if its
2599state is PAUSED.
2600
2601Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002602 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002603`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
2604 body: object, The request body.
2605 The object takes the form of:
2606
2607{ # Request message for PauseQueue.
2608 }
2609
2610 x__xgafv: string, V1 error format.
2611 Allowed values
2612 1 - v1 error format
2613 2 - v2 error format
2614
2615Returns:
2616 An object of the form:
2617
2618 { # A queue is a container of related tasks. Queues are configured to manage
2619 # how those tasks are dispatched. Configurable properties include rate limits,
2620 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07002621 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002622 # App Engine tasks in this queue.
2623 # Http tasks are not affected by this proto.
2624 #
2625 # The task will be delivered to the App Engine application hostname
2626 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
2627 # The documentation for AppEngineHttpRequest explains how the
Bu Sun Kim65020912020-05-20 12:08:20 -07002628 # task&#x27;s host URL is constructed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002629 #
2630 # Using AppEngineHttpQueue requires
2631 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2632 # Google IAM permission for the project
2633 # and the following scope:
2634 #
2635 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -07002636 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002637 # task-level app_engine_routing.
2638 #
2639 # If set, `app_engine_routing_override` is used for all tasks in
2640 # the queue, no matter what the setting is for the
2641 # task-level app_engine_routing.
2642 #
2643 # Defines routing characteristics specific to App Engine - service, version,
2644 # and instance.
2645 #
2646 # For more information about services, versions, and instances see
2647 # [An Overview of App
2648 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2649 # [Microservices Architecture on Google App
2650 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2651 # [App Engine Standard request
2652 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2653 # and [App Engine Flex request
2654 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -07002655 &quot;version&quot;: &quot;A String&quot;, # App version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002656 #
2657 # By default, the task is sent to the version which is the default
2658 # version when the task is attempted.
2659 #
2660 # For some queues or tasks which were created using the App Engine
2661 # Task Queue API, host is not parsable
2662 # into service,
2663 # version, and
2664 # instance. For example, some tasks
2665 # which were created using the App Engine SDK use a custom domain
2666 # name; custom domains are not parsed by Cloud Tasks. If
2667 # host is not parsable, then
2668 # service,
2669 # version, and
2670 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07002671 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2672 #
2673 # The host is constructed from the domain name of the app associated with
2674 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2675 # service, version,
2676 # and instance. Tasks which were created using
2677 # the App Engine SDK might have a custom domain name.
2678 #
2679 # For more information, see
2680 # [How Requests are
2681 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2682 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002683 #
2684 # By default, the task is sent to the service which is the default
2685 # service when the task is attempted.
2686 #
2687 # For some queues or tasks which were created using the App Engine
2688 # Task Queue API, host is not parsable
2689 # into service,
2690 # version, and
2691 # instance. For example, some tasks
2692 # which were created using the App Engine SDK use a custom domain
2693 # name; custom domains are not parsed by Cloud Tasks. If
2694 # host is not parsable, then
2695 # service,
2696 # version, and
2697 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07002698 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2699 #
2700 # By default, the task is sent to an instance which is available when
2701 # the task is attempted.
2702 #
2703 # Requests can only be sent to a specific instance if
2704 # [manual scaling is used in App Engine
2705 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2706 # App Engine Flex does not support instances. For more information, see
2707 # [App Engine Standard request
2708 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2709 # and [App Engine Flex request
2710 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002711 },
2712 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002713 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
2714 #
2715 # All tasks that were created before this time
2716 # were purged.
2717 #
2718 # A queue can be purged using PurgeQueue, the
2719 # [App Engine Task Queue SDK, or the Cloud
2720 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2721 #
2722 # Purge time will be truncated to the nearest microsecond. Purge
2723 # time will be unset if the queue has never been purged.
2724 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002725 #
2726 # * For tasks created using Cloud Tasks: the queue-level retry settings
2727 # apply to all tasks in the queue that were created using Cloud Tasks.
2728 # Retry settings cannot be set on individual tasks.
2729 # * For tasks created using the App Engine SDK: the queue-level retry
2730 # settings apply to all tasks in the queue which do not have retry settings
2731 # explicitly set on the task and were created by the App Engine SDK. See
2732 # [App Engine
2733 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2734 #
2735 # These settings determine when a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -07002736 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2737 # min_backoff and
2738 # max_backoff duration after it fails,
2739 # if the queue&#x27;s RetryConfig specifies that the task should be
2740 # retried.
2741 #
2742 # If unspecified when the queue is created, Cloud Tasks will pick the
2743 # default.
2744 #
2745 #
2746 # `min_backoff` will be truncated to the nearest second.
2747 #
2748 # This field has the same meaning as
2749 # [min_backoff_seconds in
2750 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2751 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2752 # min_backoff and
2753 # max_backoff duration after it fails,
2754 # if the queue&#x27;s RetryConfig specifies that the task should be
2755 # retried.
2756 #
2757 # If unspecified when the queue is created, Cloud Tasks will pick the
2758 # default.
2759 #
2760 #
2761 # `max_backoff` will be truncated to the nearest second.
2762 #
2763 # This field has the same meaning as
2764 # [max_backoff_seconds in
2765 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2766 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002767 # retrying a failed task, measured from when the task was first
2768 # attempted. Once `max_retry_duration` time has passed *and* the
2769 # task has been attempted max_attempts
2770 # times, no further attempts will be made and the task will be
2771 # deleted.
2772 #
2773 # If zero, then the task age is unlimited.
2774 #
2775 # If unspecified when the queue is created, Cloud Tasks will pick the
2776 # default.
2777 #
2778 #
2779 # `max_retry_duration` will be truncated to the nearest second.
2780 #
2781 # This field has the same meaning as
2782 # [task_age_limit in
2783 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07002784 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002785 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002786 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2787 # first attempt fails, then there will be `max_attempts - 1` retries). Must
2788 # be &gt;= -1.
2789 #
2790 # If unspecified when the queue is created, Cloud Tasks will pick the
2791 # default.
2792 #
2793 # -1 indicates unlimited attempts.
2794 #
2795 # This field has the same meaning as
2796 # [task_retry_limit in
2797 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2798 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2799 #
2800 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002801 # min_backoff, then doubles
2802 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07002803 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002804 # max_backoff up to
2805 # max_attempts times.
2806 #
2807 # For example, if min_backoff is 10s,
2808 # max_backoff is 300s, and
2809 # `max_doublings` is 3, then the a task will first be retried in
2810 # 10s. The retry interval will double three times, and then
2811 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2812 # intervals of max_backoff until the
2813 # task has been attempted max_attempts
2814 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2815 # 240s, 300s, 300s, ....
2816 #
2817 # If unspecified when the queue is created, Cloud Tasks will pick the
2818 # default.
2819 #
2820 #
2821 # This field has the same meaning as
2822 # [max_doublings in
2823 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07002824 },
2825 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2826 #
2827 # `state` can only be changed by called
2828 # PauseQueue,
2829 # ResumeQueue, or uploading
2830 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2831 # UpdateQueue cannot be used to change `state`.
2832 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2833 # after which it becomes output only.
2834 #
2835 # The queue name.
2836 #
2837 # The queue name must have the following format:
2838 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
2839 #
2840 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2841 # hyphens (-), colons (:), or periods (.).
2842 # For more information, see
2843 # [Identifying
2844 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2845 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2846 # The list of available locations can be obtained by calling
2847 # ListLocations.
2848 # For more information, see https://cloud.google.com/about/locations/.
2849 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2850 # hyphens (-). The maximum length is 100 characters.
2851 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2852 #
2853 # rate_limits and retry_config are
2854 # related because they both control task attempts. However they control task
2855 # attempts in different ways:
2856 #
2857 # * rate_limits controls the total rate of
2858 # dispatches from a queue (i.e. all traffic dispatched from the
2859 # queue, regardless of whether the dispatch is from a first
2860 # attempt or a retry).
2861 # * retry_config controls what happens to
2862 # particular a task after its first attempt fails. That is,
2863 # retry_config controls task retries (the
2864 # second attempt, third attempt, etc).
2865 #
2866 # The queue&#x27;s actual dispatch rate is the result of:
2867 #
2868 # * Number of tasks in the queue
2869 # * User-specified throttling: rate_limits,
2870 # retry_config, and the
2871 # queue&#x27;s state.
2872 # * System throttling due to `429` (Too Many Requests) or `503` (Service
2873 # Unavailable) responses from the worker, high error rates, or to smooth
2874 # sudden large traffic spikes.
2875 #
2876 # This message determines the maximum rate that tasks can be dispatched by a
2877 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2878 #
2879 # Note: The debugging command, RunTask, will run a task
2880 # even if the queue has reached its RateLimits.
2881 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002882 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002883 # Max burst size limits how fast tasks in queue are processed when
2884 # many tasks are in the queue and the rate is high. This field
2885 # allows the queue to have a high rate so processing starts shortly
2886 # after a task is enqueued, but still limits resource usage when
2887 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002888 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002889 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2890 # algorithm is used to control the rate of task dispatches. Each
2891 # queue has a token bucket that holds tokens, up to the maximum
2892 # specified by `max_burst_size`. Each time a task is dispatched, a
2893 # token is removed from the bucket. Tasks will be dispatched until
2894 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2895 # continuously refilled with new tokens based on
2896 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002897 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002898 # Cloud Tasks will pick the value of `max_burst_size` based on the
2899 # value of
2900 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002901 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002902 # For App Engine queues that were created or updated using
2903 # `queue.yaml/xml`, `max_burst_size` is equal to
2904 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2905 # Since `max_burst_size` is output only, if
2906 # UpdateQueue is called on a queue
2907 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2908 # on the value of
2909 # max_dispatches_per_second,
2910 # regardless of whether
2911 # max_dispatches_per_second
2912 # is updated.
2913 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2914 # to be dispatched for this queue. After this threshold has been
2915 # reached, Cloud Tasks stops dispatching tasks until the number of
2916 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002917 #
2918 # If unspecified when the queue is created, Cloud Tasks will pick the
2919 # default.
2920 #
2921 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002922 # The maximum allowed value is 5,000.
2923 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002924 #
2925 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002926 # [max_concurrent_requests in
2927 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
2928 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002929 #
2930 # If unspecified when the queue is created, Cloud Tasks will pick the
2931 # default.
2932 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002933 # * For App Engine queues, the maximum allowed value
2934 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002935 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002936 #
2937 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002938 # [rate in
2939 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2940 },
2941 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
2942 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2943 # field is unset, then no logs are written.
2944 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2945 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
2946 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2947 # This field may contain any value between 0.0 and 1.0, inclusive.
2948 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002949 },
2950 }</pre>
2951</div>
2952
2953<div class="method">
2954 <code class="details" id="purge">purge(name, body=None, x__xgafv=None)</code>
2955 <pre>Purges a queue by deleting all of its tasks.
2956
2957All tasks created before this method is called are permanently deleted.
2958
2959Purge operations can take up to one minute to take effect. Tasks
2960might be dispatched before the purge takes effect. A purge is irreversible.
2961
2962Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002963 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002964`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
2965 body: object, The request body.
2966 The object takes the form of:
2967
2968{ # Request message for PurgeQueue.
2969 }
2970
2971 x__xgafv: string, V1 error format.
2972 Allowed values
2973 1 - v1 error format
2974 2 - v2 error format
2975
2976Returns:
2977 An object of the form:
2978
2979 { # A queue is a container of related tasks. Queues are configured to manage
2980 # how those tasks are dispatched. Configurable properties include rate limits,
2981 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07002982 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002983 # App Engine tasks in this queue.
2984 # Http tasks are not affected by this proto.
2985 #
2986 # The task will be delivered to the App Engine application hostname
2987 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
2988 # The documentation for AppEngineHttpRequest explains how the
Bu Sun Kim65020912020-05-20 12:08:20 -07002989 # task&#x27;s host URL is constructed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002990 #
2991 # Using AppEngineHttpQueue requires
2992 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2993 # Google IAM permission for the project
2994 # and the following scope:
2995 #
2996 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -07002997 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002998 # task-level app_engine_routing.
2999 #
3000 # If set, `app_engine_routing_override` is used for all tasks in
3001 # the queue, no matter what the setting is for the
3002 # task-level app_engine_routing.
3003 #
3004 # Defines routing characteristics specific to App Engine - service, version,
3005 # and instance.
3006 #
3007 # For more information about services, versions, and instances see
3008 # [An Overview of App
3009 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3010 # [Microservices Architecture on Google App
3011 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3012 # [App Engine Standard request
3013 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3014 # and [App Engine Flex request
3015 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -07003016 &quot;version&quot;: &quot;A String&quot;, # App version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003017 #
3018 # By default, the task is sent to the version which is the default
3019 # version when the task is attempted.
3020 #
3021 # For some queues or tasks which were created using the App Engine
3022 # Task Queue API, host is not parsable
3023 # into service,
3024 # version, and
3025 # instance. For example, some tasks
3026 # which were created using the App Engine SDK use a custom domain
3027 # name; custom domains are not parsed by Cloud Tasks. If
3028 # host is not parsable, then
3029 # service,
3030 # version, and
3031 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07003032 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
3033 #
3034 # The host is constructed from the domain name of the app associated with
3035 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
3036 # service, version,
3037 # and instance. Tasks which were created using
3038 # the App Engine SDK might have a custom domain name.
3039 #
3040 # For more information, see
3041 # [How Requests are
3042 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3043 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003044 #
3045 # By default, the task is sent to the service which is the default
3046 # service when the task is attempted.
3047 #
3048 # For some queues or tasks which were created using the App Engine
3049 # Task Queue API, host is not parsable
3050 # into service,
3051 # version, and
3052 # instance. For example, some tasks
3053 # which were created using the App Engine SDK use a custom domain
3054 # name; custom domains are not parsed by Cloud Tasks. If
3055 # host is not parsable, then
3056 # service,
3057 # version, and
3058 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07003059 &quot;instance&quot;: &quot;A String&quot;, # App instance.
3060 #
3061 # By default, the task is sent to an instance which is available when
3062 # the task is attempted.
3063 #
3064 # Requests can only be sent to a specific instance if
3065 # [manual scaling is used in App Engine
3066 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3067 # App Engine Flex does not support instances. For more information, see
3068 # [App Engine Standard request
3069 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3070 # and [App Engine Flex request
3071 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003072 },
3073 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003074 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
3075 #
3076 # All tasks that were created before this time
3077 # were purged.
3078 #
3079 # A queue can be purged using PurgeQueue, the
3080 # [App Engine Task Queue SDK, or the Cloud
3081 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
3082 #
3083 # Purge time will be truncated to the nearest microsecond. Purge
3084 # time will be unset if the queue has never been purged.
3085 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003086 #
3087 # * For tasks created using Cloud Tasks: the queue-level retry settings
3088 # apply to all tasks in the queue that were created using Cloud Tasks.
3089 # Retry settings cannot be set on individual tasks.
3090 # * For tasks created using the App Engine SDK: the queue-level retry
3091 # settings apply to all tasks in the queue which do not have retry settings
3092 # explicitly set on the task and were created by the App Engine SDK. See
3093 # [App Engine
3094 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3095 #
3096 # These settings determine when a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -07003097 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3098 # min_backoff and
3099 # max_backoff duration after it fails,
3100 # if the queue&#x27;s RetryConfig specifies that the task should be
3101 # retried.
3102 #
3103 # If unspecified when the queue is created, Cloud Tasks will pick the
3104 # default.
3105 #
3106 #
3107 # `min_backoff` will be truncated to the nearest second.
3108 #
3109 # This field has the same meaning as
3110 # [min_backoff_seconds in
3111 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3112 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3113 # min_backoff and
3114 # max_backoff duration after it fails,
3115 # if the queue&#x27;s RetryConfig specifies that the task should be
3116 # retried.
3117 #
3118 # If unspecified when the queue is created, Cloud Tasks will pick the
3119 # default.
3120 #
3121 #
3122 # `max_backoff` will be truncated to the nearest second.
3123 #
3124 # This field has the same meaning as
3125 # [max_backoff_seconds in
3126 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3127 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003128 # retrying a failed task, measured from when the task was first
3129 # attempted. Once `max_retry_duration` time has passed *and* the
3130 # task has been attempted max_attempts
3131 # times, no further attempts will be made and the task will be
3132 # deleted.
3133 #
3134 # If zero, then the task age is unlimited.
3135 #
3136 # If unspecified when the queue is created, Cloud Tasks will pick the
3137 # default.
3138 #
3139 #
3140 # `max_retry_duration` will be truncated to the nearest second.
3141 #
3142 # This field has the same meaning as
3143 # [task_age_limit in
3144 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07003145 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003146 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003147 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
3148 # first attempt fails, then there will be `max_attempts - 1` retries). Must
3149 # be &gt;= -1.
3150 #
3151 # If unspecified when the queue is created, Cloud Tasks will pick the
3152 # default.
3153 #
3154 # -1 indicates unlimited attempts.
3155 #
3156 # This field has the same meaning as
3157 # [task_retry_limit in
3158 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3159 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
3160 #
3161 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003162 # min_backoff, then doubles
3163 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07003164 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003165 # max_backoff up to
3166 # max_attempts times.
3167 #
3168 # For example, if min_backoff is 10s,
3169 # max_backoff is 300s, and
3170 # `max_doublings` is 3, then the a task will first be retried in
3171 # 10s. The retry interval will double three times, and then
3172 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3173 # intervals of max_backoff until the
3174 # task has been attempted max_attempts
3175 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3176 # 240s, 300s, 300s, ....
3177 #
3178 # If unspecified when the queue is created, Cloud Tasks will pick the
3179 # default.
3180 #
3181 #
3182 # This field has the same meaning as
3183 # [max_doublings in
3184 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07003185 },
3186 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
3187 #
3188 # `state` can only be changed by called
3189 # PauseQueue,
3190 # ResumeQueue, or uploading
3191 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3192 # UpdateQueue cannot be used to change `state`.
3193 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
3194 # after which it becomes output only.
3195 #
3196 # The queue name.
3197 #
3198 # The queue name must have the following format:
3199 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
3200 #
3201 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3202 # hyphens (-), colons (:), or periods (.).
3203 # For more information, see
3204 # [Identifying
3205 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3206 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
3207 # The list of available locations can be obtained by calling
3208 # ListLocations.
3209 # For more information, see https://cloud.google.com/about/locations/.
3210 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3211 # hyphens (-). The maximum length is 100 characters.
3212 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
3213 #
3214 # rate_limits and retry_config are
3215 # related because they both control task attempts. However they control task
3216 # attempts in different ways:
3217 #
3218 # * rate_limits controls the total rate of
3219 # dispatches from a queue (i.e. all traffic dispatched from the
3220 # queue, regardless of whether the dispatch is from a first
3221 # attempt or a retry).
3222 # * retry_config controls what happens to
3223 # particular a task after its first attempt fails. That is,
3224 # retry_config controls task retries (the
3225 # second attempt, third attempt, etc).
3226 #
3227 # The queue&#x27;s actual dispatch rate is the result of:
3228 #
3229 # * Number of tasks in the queue
3230 # * User-specified throttling: rate_limits,
3231 # retry_config, and the
3232 # queue&#x27;s state.
3233 # * System throttling due to `429` (Too Many Requests) or `503` (Service
3234 # Unavailable) responses from the worker, high error rates, or to smooth
3235 # sudden large traffic spikes.
3236 #
3237 # This message determines the maximum rate that tasks can be dispatched by a
3238 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3239 #
3240 # Note: The debugging command, RunTask, will run a task
3241 # even if the queue has reached its RateLimits.
3242 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003243 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003244 # Max burst size limits how fast tasks in queue are processed when
3245 # many tasks are in the queue and the rate is high. This field
3246 # allows the queue to have a high rate so processing starts shortly
3247 # after a task is enqueued, but still limits resource usage when
3248 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003249 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003250 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3251 # algorithm is used to control the rate of task dispatches. Each
3252 # queue has a token bucket that holds tokens, up to the maximum
3253 # specified by `max_burst_size`. Each time a task is dispatched, a
3254 # token is removed from the bucket. Tasks will be dispatched until
3255 # the queue&#x27;s bucket runs out of tokens. The bucket will be
3256 # continuously refilled with new tokens based on
3257 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003258 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003259 # Cloud Tasks will pick the value of `max_burst_size` based on the
3260 # value of
3261 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003262 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003263 # For App Engine queues that were created or updated using
3264 # `queue.yaml/xml`, `max_burst_size` is equal to
3265 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3266 # Since `max_burst_size` is output only, if
3267 # UpdateQueue is called on a queue
3268 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3269 # on the value of
3270 # max_dispatches_per_second,
3271 # regardless of whether
3272 # max_dispatches_per_second
3273 # is updated.
3274 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3275 # to be dispatched for this queue. After this threshold has been
3276 # reached, Cloud Tasks stops dispatching tasks until the number of
3277 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003278 #
3279 # If unspecified when the queue is created, Cloud Tasks will pick the
3280 # default.
3281 #
3282 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003283 # The maximum allowed value is 5,000.
3284 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003285 #
3286 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07003287 # [max_concurrent_requests in
3288 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
3289 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003290 #
3291 # If unspecified when the queue is created, Cloud Tasks will pick the
3292 # default.
3293 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003294 # * For App Engine queues, the maximum allowed value
3295 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003296 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003297 #
3298 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07003299 # [rate in
3300 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
3301 },
3302 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
3303 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
3304 # field is unset, then no logs are written.
3305 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3306 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
3307 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3308 # This field may contain any value between 0.0 and 1.0, inclusive.
3309 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003310 },
3311 }</pre>
3312</div>
3313
3314<div class="method">
3315 <code class="details" id="resume">resume(name, body=None, x__xgafv=None)</code>
3316 <pre>Resume a queue.
3317
3318This method resumes a queue after it has been
3319PAUSED or
3320DISABLED. The state of a queue is stored
Bu Sun Kim65020912020-05-20 12:08:20 -07003321in the queue&#x27;s state; after calling this method it
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003322will be set to RUNNING.
3323
3324WARNING: Resuming many high-QPS queues at the same time can
3325lead to target overloading. If you are resuming high-QPS
3326queues, follow the 500/50/5 pattern described in
3327[Managing Cloud Tasks Scaling
3328Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
3329
3330Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07003331 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003332`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
3333 body: object, The request body.
3334 The object takes the form of:
3335
3336{ # Request message for ResumeQueue.
3337 }
3338
3339 x__xgafv: string, V1 error format.
3340 Allowed values
3341 1 - v1 error format
3342 2 - v2 error format
3343
3344Returns:
3345 An object of the form:
3346
3347 { # A queue is a container of related tasks. Queues are configured to manage
3348 # how those tasks are dispatched. Configurable properties include rate limits,
3349 # retry options, queue types, and others.
Bu Sun Kim65020912020-05-20 12:08:20 -07003350 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003351 # App Engine tasks in this queue.
3352 # Http tasks are not affected by this proto.
3353 #
3354 # The task will be delivered to the App Engine application hostname
3355 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
3356 # The documentation for AppEngineHttpRequest explains how the
Bu Sun Kim65020912020-05-20 12:08:20 -07003357 # task&#x27;s host URL is constructed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003358 #
3359 # Using AppEngineHttpQueue requires
3360 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3361 # Google IAM permission for the project
3362 # and the following scope:
3363 #
3364 # `https://www.googleapis.com/auth/cloud-platform`
Bu Sun Kim65020912020-05-20 12:08:20 -07003365 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003366 # task-level app_engine_routing.
3367 #
3368 # If set, `app_engine_routing_override` is used for all tasks in
3369 # the queue, no matter what the setting is for the
3370 # task-level app_engine_routing.
3371 #
3372 # Defines routing characteristics specific to App Engine - service, version,
3373 # and instance.
3374 #
3375 # For more information about services, versions, and instances see
3376 # [An Overview of App
3377 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3378 # [Microservices Architecture on Google App
3379 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3380 # [App Engine Standard request
3381 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3382 # and [App Engine Flex request
3383 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim65020912020-05-20 12:08:20 -07003384 &quot;version&quot;: &quot;A String&quot;, # App version.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003385 #
3386 # By default, the task is sent to the version which is the default
3387 # version when the task is attempted.
3388 #
3389 # For some queues or tasks which were created using the App Engine
3390 # Task Queue API, host is not parsable
3391 # into service,
3392 # version, and
3393 # instance. For example, some tasks
3394 # which were created using the App Engine SDK use a custom domain
3395 # name; custom domains are not parsed by Cloud Tasks. If
3396 # host is not parsable, then
3397 # service,
3398 # version, and
3399 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07003400 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
3401 #
3402 # The host is constructed from the domain name of the app associated with
3403 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
3404 # service, version,
3405 # and instance. Tasks which were created using
3406 # the App Engine SDK might have a custom domain name.
3407 #
3408 # For more information, see
3409 # [How Requests are
3410 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3411 &quot;service&quot;: &quot;A String&quot;, # App service.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003412 #
3413 # By default, the task is sent to the service which is the default
3414 # service when the task is attempted.
3415 #
3416 # For some queues or tasks which were created using the App Engine
3417 # Task Queue API, host is not parsable
3418 # into service,
3419 # version, and
3420 # instance. For example, some tasks
3421 # which were created using the App Engine SDK use a custom domain
3422 # name; custom domains are not parsed by Cloud Tasks. If
3423 # host is not parsable, then
3424 # service,
3425 # version, and
3426 # instance are the empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -07003427 &quot;instance&quot;: &quot;A String&quot;, # App instance.
3428 #
3429 # By default, the task is sent to an instance which is available when
3430 # the task is attempted.
3431 #
3432 # Requests can only be sent to a specific instance if
3433 # [manual scaling is used in App Engine
3434 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3435 # App Engine Flex does not support instances. For more information, see
3436 # [App Engine Standard request
3437 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3438 # and [App Engine Flex request
3439 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003440 },
3441 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003442 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
3443 #
3444 # All tasks that were created before this time
3445 # were purged.
3446 #
3447 # A queue can be purged using PurgeQueue, the
3448 # [App Engine Task Queue SDK, or the Cloud
3449 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
3450 #
3451 # Purge time will be truncated to the nearest microsecond. Purge
3452 # time will be unset if the queue has never been purged.
3453 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003454 #
3455 # * For tasks created using Cloud Tasks: the queue-level retry settings
3456 # apply to all tasks in the queue that were created using Cloud Tasks.
3457 # Retry settings cannot be set on individual tasks.
3458 # * For tasks created using the App Engine SDK: the queue-level retry
3459 # settings apply to all tasks in the queue which do not have retry settings
3460 # explicitly set on the task and were created by the App Engine SDK. See
3461 # [App Engine
3462 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3463 #
3464 # These settings determine when a failed task attempt is retried.
Bu Sun Kim65020912020-05-20 12:08:20 -07003465 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3466 # min_backoff and
3467 # max_backoff duration after it fails,
3468 # if the queue&#x27;s RetryConfig specifies that the task should be
3469 # retried.
3470 #
3471 # If unspecified when the queue is created, Cloud Tasks will pick the
3472 # default.
3473 #
3474 #
3475 # `min_backoff` will be truncated to the nearest second.
3476 #
3477 # This field has the same meaning as
3478 # [min_backoff_seconds in
3479 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3480 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3481 # min_backoff and
3482 # max_backoff duration after it fails,
3483 # if the queue&#x27;s RetryConfig specifies that the task should be
3484 # retried.
3485 #
3486 # If unspecified when the queue is created, Cloud Tasks will pick the
3487 # default.
3488 #
3489 #
3490 # `max_backoff` will be truncated to the nearest second.
3491 #
3492 # This field has the same meaning as
3493 # [max_backoff_seconds in
3494 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3495 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003496 # retrying a failed task, measured from when the task was first
3497 # attempted. Once `max_retry_duration` time has passed *and* the
3498 # task has been attempted max_attempts
3499 # times, no further attempts will be made and the task will be
3500 # deleted.
3501 #
3502 # If zero, then the task age is unlimited.
3503 #
3504 # If unspecified when the queue is created, Cloud Tasks will pick the
3505 # default.
3506 #
3507 #
3508 # `max_retry_duration` will be truncated to the nearest second.
3509 #
3510 # This field has the same meaning as
3511 # [task_age_limit in
3512 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07003513 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003514 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003515 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
3516 # first attempt fails, then there will be `max_attempts - 1` retries). Must
3517 # be &gt;= -1.
3518 #
3519 # If unspecified when the queue is created, Cloud Tasks will pick the
3520 # default.
3521 #
3522 # -1 indicates unlimited attempts.
3523 #
3524 # This field has the same meaning as
3525 # [task_retry_limit in
3526 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3527 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
3528 #
3529 # A task&#x27;s retry interval starts at
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003530 # min_backoff, then doubles
3531 # `max_doublings` times, then increases linearly, and finally
Dan O'Mearadd494642020-05-01 07:42:23 -07003532 # retries at intervals of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003533 # max_backoff up to
3534 # max_attempts times.
3535 #
3536 # For example, if min_backoff is 10s,
3537 # max_backoff is 300s, and
3538 # `max_doublings` is 3, then the a task will first be retried in
3539 # 10s. The retry interval will double three times, and then
3540 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3541 # intervals of max_backoff until the
3542 # task has been attempted max_attempts
3543 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3544 # 240s, 300s, 300s, ....
3545 #
3546 # If unspecified when the queue is created, Cloud Tasks will pick the
3547 # default.
3548 #
3549 #
3550 # This field has the same meaning as
3551 # [max_doublings in
3552 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kim65020912020-05-20 12:08:20 -07003553 },
3554 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
3555 #
3556 # `state` can only be changed by called
3557 # PauseQueue,
3558 # ResumeQueue, or uploading
3559 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3560 # UpdateQueue cannot be used to change `state`.
3561 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
3562 # after which it becomes output only.
3563 #
3564 # The queue name.
3565 #
3566 # The queue name must have the following format:
3567 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
3568 #
3569 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3570 # hyphens (-), colons (:), or periods (.).
3571 # For more information, see
3572 # [Identifying
3573 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3574 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
3575 # The list of available locations can be obtained by calling
3576 # ListLocations.
3577 # For more information, see https://cloud.google.com/about/locations/.
3578 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3579 # hyphens (-). The maximum length is 100 characters.
3580 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
3581 #
3582 # rate_limits and retry_config are
3583 # related because they both control task attempts. However they control task
3584 # attempts in different ways:
3585 #
3586 # * rate_limits controls the total rate of
3587 # dispatches from a queue (i.e. all traffic dispatched from the
3588 # queue, regardless of whether the dispatch is from a first
3589 # attempt or a retry).
3590 # * retry_config controls what happens to
3591 # particular a task after its first attempt fails. That is,
3592 # retry_config controls task retries (the
3593 # second attempt, third attempt, etc).
3594 #
3595 # The queue&#x27;s actual dispatch rate is the result of:
3596 #
3597 # * Number of tasks in the queue
3598 # * User-specified throttling: rate_limits,
3599 # retry_config, and the
3600 # queue&#x27;s state.
3601 # * System throttling due to `429` (Too Many Requests) or `503` (Service
3602 # Unavailable) responses from the worker, high error rates, or to smooth
3603 # sudden large traffic spikes.
3604 #
3605 # This message determines the maximum rate that tasks can be dispatched by a
3606 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3607 #
3608 # Note: The debugging command, RunTask, will run a task
3609 # even if the queue has reached its RateLimits.
3610 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003611 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003612 # Max burst size limits how fast tasks in queue are processed when
3613 # many tasks are in the queue and the rate is high. This field
3614 # allows the queue to have a high rate so processing starts shortly
3615 # after a task is enqueued, but still limits resource usage when
3616 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003617 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003618 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3619 # algorithm is used to control the rate of task dispatches. Each
3620 # queue has a token bucket that holds tokens, up to the maximum
3621 # specified by `max_burst_size`. Each time a task is dispatched, a
3622 # token is removed from the bucket. Tasks will be dispatched until
3623 # the queue&#x27;s bucket runs out of tokens. The bucket will be
3624 # continuously refilled with new tokens based on
3625 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003626 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003627 # Cloud Tasks will pick the value of `max_burst_size` based on the
3628 # value of
3629 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003630 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003631 # For App Engine queues that were created or updated using
3632 # `queue.yaml/xml`, `max_burst_size` is equal to
3633 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3634 # Since `max_burst_size` is output only, if
3635 # UpdateQueue is called on a queue
3636 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3637 # on the value of
3638 # max_dispatches_per_second,
3639 # regardless of whether
3640 # max_dispatches_per_second
3641 # is updated.
3642 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3643 # to be dispatched for this queue. After this threshold has been
3644 # reached, Cloud Tasks stops dispatching tasks until the number of
3645 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003646 #
3647 # If unspecified when the queue is created, Cloud Tasks will pick the
3648 # default.
3649 #
3650 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003651 # The maximum allowed value is 5,000.
3652 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003653 #
3654 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07003655 # [max_concurrent_requests in
3656 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
3657 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003658 #
3659 # If unspecified when the queue is created, Cloud Tasks will pick the
3660 # default.
3661 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003662 # * For App Engine queues, the maximum allowed value
3663 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003664 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003665 #
3666 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07003667 # [rate in
3668 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
3669 },
3670 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
3671 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
3672 # field is unset, then no logs are written.
3673 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3674 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
3675 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3676 # This field may contain any value between 0.0 and 1.0, inclusive.
3677 # 0.0 is the default and means that no operations are logged.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003678 },
3679 }</pre>
3680</div>
3681
3682<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003683 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003684 <pre>Sets the access control policy for a Queue. Replaces any existing
3685policy.
3686
3687Note: The Cloud Console does not check queue-level IAM permissions yet.
3688Project-level permissions are required to use the Cloud Console.
3689
3690Authorization requires the following
3691[Google IAM](https://cloud.google.com/iam) permission on the specified
3692resource parent:
3693
3694* `cloudtasks.queues.setIamPolicy`
3695
3696Args:
3697 resource: string, REQUIRED: The resource for which the policy is being specified.
3698See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003699 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003700 The object takes the form of:
3701
3702{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07003703 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003704 # the policy is limited to a few 10s of KB. An empty policy is a
3705 # valid policy but certain Cloud Platform services (such as Projects)
3706 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -07003707 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003708 #
3709 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003710 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
3711 # `members` to a single `role`. Members can be user accounts, service accounts,
3712 # Google groups, and domains (such as G Suite). A `role` is a named list of
3713 # permissions; each `role` can be an IAM predefined role or a user-created
3714 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003715 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003716 # For some types of Google Cloud resources, a `binding` can also specify a
3717 # `condition`, which is a logical expression that allows access to a resource
3718 # only if the expression evaluates to `true`. A condition can add constraints
3719 # based on attributes of the request, the resource, or both. To learn which
3720 # resources support conditions in their IAM policies, see the
3721 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07003722 #
3723 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003724 #
3725 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003726 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003727 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003728 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
3729 # &quot;members&quot;: [
3730 # &quot;user:mike@example.com&quot;,
3731 # &quot;group:admins@example.com&quot;,
3732 # &quot;domain:google.com&quot;,
3733 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003734 # ]
3735 # },
3736 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003737 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
3738 # &quot;members&quot;: [
3739 # &quot;user:eve@example.com&quot;
3740 # ],
3741 # &quot;condition&quot;: {
3742 # &quot;title&quot;: &quot;expirable access&quot;,
3743 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
3744 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07003745 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003746 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07003747 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003748 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
3749 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003750 # }
3751 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003752 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003753 #
3754 # bindings:
3755 # - members:
3756 # - user:mike@example.com
3757 # - group:admins@example.com
3758 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07003759 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
3760 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003761 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07003762 # - user:eve@example.com
3763 # role: roles/resourcemanager.organizationViewer
3764 # condition:
3765 # title: expirable access
3766 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07003767 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07003768 # - etag: BwWWja0YfJA=
3769 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003770 #
3771 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07003772 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07003773 &quot;version&quot;: 42, # Specifies the format of the policy.
3774 #
3775 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
3776 # are rejected.
3777 #
3778 # Any operation that affects conditional role bindings must specify version
3779 # `3`. This requirement applies to the following operations:
3780 #
3781 # * Getting a policy that includes a conditional role binding
3782 # * Adding a conditional role binding to a policy
3783 # * Changing a conditional role binding in a policy
3784 # * Removing any role binding, with or without a condition, from a policy
3785 # that includes conditions
3786 #
3787 # **Important:** If you use IAM Conditions, you must include the `etag` field
3788 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3789 # you to overwrite a version `3` policy with a version `1` policy, and all of
3790 # the conditions in the version `3` policy are lost.
3791 #
3792 # If a policy does not include any conditions, operations on that policy may
3793 # specify any valid version or leave the field unset.
3794 #
3795 # To learn which resources support conditions in their IAM policies, see the
3796 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
3797 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07003798 # `condition` that determines how and when the `bindings` are applied. Each
3799 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003800 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07003801 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
3802 #
3803 # If the condition evaluates to `true`, then this binding applies to the
3804 # current request.
3805 #
3806 # If the condition evaluates to `false`, then this binding does not apply to
3807 # the current request. However, a different role binding might grant the same
3808 # role to one or more of the members in this binding.
3809 #
3810 # To learn which resources support conditions in their IAM policies, see the
3811 # [IAM
3812 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07003813 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
3814 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003815 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003816 # Example (Comparison):
3817 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003818 # title: &quot;Summary size limit&quot;
3819 # description: &quot;Determines if a summary is less than 100 chars&quot;
3820 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07003821 #
3822 # Example (Equality):
3823 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003824 # title: &quot;Requestor is owner&quot;
3825 # description: &quot;Determines if requestor is the document owner&quot;
3826 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07003827 #
3828 # Example (Logic):
3829 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003830 # title: &quot;Public documents&quot;
3831 # description: &quot;Determine whether the document should be publicly visible&quot;
3832 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07003833 #
3834 # Example (Data Manipulation):
3835 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003836 # title: &quot;Notification string&quot;
3837 # description: &quot;Create a notification string with a timestamp.&quot;
3838 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07003839 #
3840 # The exact variables and functions that may be referenced within an expression
3841 # are determined by the service that evaluates it. See the service
3842 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -07003843 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003844 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07003845 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
Dan O'Mearadd494642020-05-01 07:42:23 -07003846 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07003847 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003848 # its purpose. This can be used e.g. in UIs which allow to enter the
3849 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07003850 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
3851 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003852 },
Bu Sun Kim65020912020-05-20 12:08:20 -07003853 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003854 # `members` can have the following values:
3855 #
3856 # * `allUsers`: A special identifier that represents anyone who is
3857 # on the internet; with or without a Google account.
3858 #
3859 # * `allAuthenticatedUsers`: A special identifier that represents anyone
3860 # who is authenticated with a Google account or a service account.
3861 #
3862 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07003863 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003864 #
3865 #
3866 # * `serviceAccount:{emailid}`: An email address that represents a service
3867 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
3868 #
3869 # * `group:{emailid}`: An email address that represents a Google group.
3870 # For example, `admins@example.com`.
3871 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003872 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
3873 # identifier) representing a user that has been recently deleted. For
3874 # example, `alice@example.com?uid=123456789012345678901`. If the user is
3875 # recovered, this value reverts to `user:{emailid}` and the recovered user
3876 # retains the role in the binding.
3877 #
3878 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
3879 # unique identifier) representing a service account that has been recently
3880 # deleted. For example,
3881 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
3882 # If the service account is undeleted, this value reverts to
3883 # `serviceAccount:{emailid}` and the undeleted service account retains the
3884 # role in the binding.
3885 #
3886 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
3887 # identifier) representing a Google group that has been recently
3888 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
3889 # the group is recovered, this value reverts to `group:{emailid}` and the
3890 # recovered group retains the role in the binding.
3891 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003892 #
3893 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
3894 # users of that domain. For example, `google.com` or `example.com`.
3895 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003896 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003897 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003898 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
3899 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003900 },
3901 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003902 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003903 # prevent simultaneous updates of a policy from overwriting each other.
3904 # It is strongly suggested that systems make use of the `etag` in the
3905 # read-modify-write cycle to perform policy updates in order to avoid race
3906 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
3907 # systems are expected to put that etag in the request to `setIamPolicy` to
3908 # ensure that their change will be applied to the same version of the policy.
3909 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003910 # **Important:** If you use IAM Conditions, you must include the `etag` field
3911 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3912 # you to overwrite a version `3` policy with a version `1` policy, and all of
3913 # the conditions in the version `3` policy are lost.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003914 },
3915 }
3916
3917 x__xgafv: string, V1 error format.
3918 Allowed values
3919 1 - v1 error format
3920 2 - v2 error format
3921
3922Returns:
3923 An object of the form:
3924
Dan O'Mearadd494642020-05-01 07:42:23 -07003925 { # An Identity and Access Management (IAM) policy, which specifies access
3926 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003927 #
3928 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003929 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
3930 # `members` to a single `role`. Members can be user accounts, service accounts,
3931 # Google groups, and domains (such as G Suite). A `role` is a named list of
3932 # permissions; each `role` can be an IAM predefined role or a user-created
3933 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003934 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003935 # For some types of Google Cloud resources, a `binding` can also specify a
3936 # `condition`, which is a logical expression that allows access to a resource
3937 # only if the expression evaluates to `true`. A condition can add constraints
3938 # based on attributes of the request, the resource, or both. To learn which
3939 # resources support conditions in their IAM policies, see the
3940 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07003941 #
3942 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003943 #
3944 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003945 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003946 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003947 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
3948 # &quot;members&quot;: [
3949 # &quot;user:mike@example.com&quot;,
3950 # &quot;group:admins@example.com&quot;,
3951 # &quot;domain:google.com&quot;,
3952 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003953 # ]
3954 # },
3955 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003956 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
3957 # &quot;members&quot;: [
3958 # &quot;user:eve@example.com&quot;
3959 # ],
3960 # &quot;condition&quot;: {
3961 # &quot;title&quot;: &quot;expirable access&quot;,
3962 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
3963 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07003964 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003965 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07003966 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003967 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
3968 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003969 # }
3970 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003971 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003972 #
3973 # bindings:
3974 # - members:
3975 # - user:mike@example.com
3976 # - group:admins@example.com
3977 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07003978 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
3979 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003980 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07003981 # - user:eve@example.com
3982 # role: roles/resourcemanager.organizationViewer
3983 # condition:
3984 # title: expirable access
3985 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07003986 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07003987 # - etag: BwWWja0YfJA=
3988 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003989 #
3990 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07003991 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07003992 &quot;version&quot;: 42, # Specifies the format of the policy.
3993 #
3994 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
3995 # are rejected.
3996 #
3997 # Any operation that affects conditional role bindings must specify version
3998 # `3`. This requirement applies to the following operations:
3999 #
4000 # * Getting a policy that includes a conditional role binding
4001 # * Adding a conditional role binding to a policy
4002 # * Changing a conditional role binding in a policy
4003 # * Removing any role binding, with or without a condition, from a policy
4004 # that includes conditions
4005 #
4006 # **Important:** If you use IAM Conditions, you must include the `etag` field
4007 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4008 # you to overwrite a version `3` policy with a version `1` policy, and all of
4009 # the conditions in the version `3` policy are lost.
4010 #
4011 # If a policy does not include any conditions, operations on that policy may
4012 # specify any valid version or leave the field unset.
4013 #
4014 # To learn which resources support conditions in their IAM policies, see the
4015 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
4016 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07004017 # `condition` that determines how and when the `bindings` are applied. Each
4018 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004019 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07004020 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
4021 #
4022 # If the condition evaluates to `true`, then this binding applies to the
4023 # current request.
4024 #
4025 # If the condition evaluates to `false`, then this binding does not apply to
4026 # the current request. However, a different role binding might grant the same
4027 # role to one or more of the members in this binding.
4028 #
4029 # To learn which resources support conditions in their IAM policies, see the
4030 # [IAM
4031 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07004032 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
4033 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004034 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004035 # Example (Comparison):
4036 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004037 # title: &quot;Summary size limit&quot;
4038 # description: &quot;Determines if a summary is less than 100 chars&quot;
4039 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004040 #
4041 # Example (Equality):
4042 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004043 # title: &quot;Requestor is owner&quot;
4044 # description: &quot;Determines if requestor is the document owner&quot;
4045 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004046 #
4047 # Example (Logic):
4048 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004049 # title: &quot;Public documents&quot;
4050 # description: &quot;Determine whether the document should be publicly visible&quot;
4051 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004052 #
4053 # Example (Data Manipulation):
4054 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004055 # title: &quot;Notification string&quot;
4056 # description: &quot;Create a notification string with a timestamp.&quot;
4057 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004058 #
4059 # The exact variables and functions that may be referenced within an expression
4060 # are determined by the service that evaluates it. See the service
4061 # documentation for additional information.
Bu Sun Kim65020912020-05-20 12:08:20 -07004062 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004063 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07004064 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
Dan O'Mearadd494642020-05-01 07:42:23 -07004065 # syntax.
Bu Sun Kim65020912020-05-20 12:08:20 -07004066 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004067 # its purpose. This can be used e.g. in UIs which allow to enter the
4068 # expression.
Bu Sun Kim65020912020-05-20 12:08:20 -07004069 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
4070 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004071 },
Bu Sun Kim65020912020-05-20 12:08:20 -07004072 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004073 # `members` can have the following values:
4074 #
4075 # * `allUsers`: A special identifier that represents anyone who is
4076 # on the internet; with or without a Google account.
4077 #
4078 # * `allAuthenticatedUsers`: A special identifier that represents anyone
4079 # who is authenticated with a Google account or a service account.
4080 #
4081 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07004082 # account. For example, `alice@example.com` .
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004083 #
4084 #
4085 # * `serviceAccount:{emailid}`: An email address that represents a service
4086 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
4087 #
4088 # * `group:{emailid}`: An email address that represents a Google group.
4089 # For example, `admins@example.com`.
4090 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004091 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
4092 # identifier) representing a user that has been recently deleted. For
4093 # example, `alice@example.com?uid=123456789012345678901`. If the user is
4094 # recovered, this value reverts to `user:{emailid}` and the recovered user
4095 # retains the role in the binding.
4096 #
4097 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
4098 # unique identifier) representing a service account that has been recently
4099 # deleted. For example,
4100 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
4101 # If the service account is undeleted, this value reverts to
4102 # `serviceAccount:{emailid}` and the undeleted service account retains the
4103 # role in the binding.
4104 #
4105 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
4106 # identifier) representing a Google group that has been recently
4107 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
4108 # the group is recovered, this value reverts to `group:{emailid}` and the
4109 # recovered group retains the role in the binding.
4110 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004111 #
4112 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
4113 # users of that domain. For example, `google.com` or `example.com`.
4114 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004115 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004116 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004117 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
4118 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004119 },
4120 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004121 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004122 # prevent simultaneous updates of a policy from overwriting each other.
4123 # It is strongly suggested that systems make use of the `etag` in the
4124 # read-modify-write cycle to perform policy updates in order to avoid race
4125 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
4126 # systems are expected to put that etag in the request to `setIamPolicy` to
4127 # ensure that their change will be applied to the same version of the policy.
4128 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004129 # **Important:** If you use IAM Conditions, you must include the `etag` field
4130 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4131 # you to overwrite a version `3` policy with a version `1` policy, and all of
4132 # the conditions in the version `3` policy are lost.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004133 }</pre>
4134</div>
4135
4136<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004137 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004138 <pre>Returns permissions that a caller has on a Queue.
4139If the resource does not exist, this will return an empty set of
4140permissions, not a NOT_FOUND error.
4141
4142Note: This operation is designed to be used for building permission-aware
4143UIs and command-line tools, not for authorization checking. This operation
Bu Sun Kim65020912020-05-20 12:08:20 -07004144may &quot;fail open&quot; without warning.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004145
4146Args:
4147 resource: string, REQUIRED: The resource for which the policy detail is being requested.
4148See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004149 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004150 The object takes the form of:
4151
4152{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07004153 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
4154 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004155 # information see
4156 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07004157 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004158 ],
4159 }
4160
4161 x__xgafv: string, V1 error format.
4162 Allowed values
4163 1 - v1 error format
4164 2 - v2 error format
4165
4166Returns:
4167 An object of the form:
4168
4169 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07004170 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004171 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07004172 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004173 ],
4174 }</pre>
4175</div>
4176
4177</body></html>