blob: f73df1b49f77aec93b7d52a4bf09a513e30d44d9 [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 Kimd059ad82020-07-22 17:02:09 -070095 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=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 Kimd059ad82020-07-22 17:02:09 -0700147 &quot;type&quot;: &quot;A String&quot;, # Immutable. The type of a queue (push or pull).
148 #
149 # `Queue.type` is an immutable property of the queue that is set at the queue
150 # creation time. When left unspecified, the default value of `PUSH` is
151 # selected.
152 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
153 #
154 # All tasks that were created before this time
155 # were purged.
156 #
157 # A queue can be purged using PurgeQueue, the
158 # [App Engine Task Queue SDK, or the Cloud
159 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
160 #
161 # Purge time will be truncated to the nearest microsecond. Purge
162 # time will be unset if the queue has never been purged.
163 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
164 #
165 # `state` can only be changed by called
166 # PauseQueue,
167 # ResumeQueue, or uploading
168 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
169 # UpdateQueue cannot be used to change `state`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700170 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
171 #
172 # rate_limits and retry_config are
173 # related because they both control task attempts. However they control task
174 # attempts in different ways:
175 #
176 # * rate_limits controls the total rate of
177 # dispatches from a queue (i.e. all traffic dispatched from the
178 # queue, regardless of whether the dispatch is from a first
179 # attempt or a retry).
180 # * retry_config controls what happens to
181 # particular a task after its first attempt fails. That is,
182 # retry_config controls task retries (the
183 # second attempt, third attempt, etc).
184 #
185 # The queue&#x27;s actual dispatch rate is the result of:
186 #
187 # * Number of tasks in the queue
188 # * User-specified throttling: rate_limits,
189 # retry_config, and the
190 # queue&#x27;s state.
191 # * System throttling due to `429` (Too Many Requests) or `503` (Service
192 # Unavailable) responses from the worker, high error rates, or to smooth
193 # sudden large traffic spikes.
194 #
195 # This message determines the maximum rate that tasks can be dispatched by a
196 # queue, regardless of whether the dispatch is a first task attempt or a retry.
197 #
198 # Note: The debugging command, RunTask, will run a task
199 # even if the queue has reached its RateLimits.
200 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700201 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700202 # Max burst size limits how fast tasks in queue are processed when
203 # many tasks are in the queue and the rate is high. This field
204 # allows the queue to have a high rate so processing starts shortly
205 # after a task is enqueued, but still limits resource usage when
206 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700207 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700208 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
209 # algorithm is used to control the rate of task dispatches. Each
210 # queue has a token bucket that holds tokens, up to the maximum
211 # specified by `max_burst_size`. Each time a task is dispatched, a
212 # token is removed from the bucket. Tasks will be dispatched until
213 # the queue&#x27;s bucket runs out of tokens. The bucket will be
214 # continuously refilled with new tokens based on
215 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700216 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700217 # Cloud Tasks will pick the value of `max_burst_size` based on the
218 # value of
219 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700221 # For App Engine queues that were created or updated using
222 # `queue.yaml/xml`, `max_burst_size` is equal to
223 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
224 # Since `max_burst_size` is output only, if
225 # UpdateQueue is called on a queue
226 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
227 # on the value of
228 # max_dispatches_per_second,
229 # regardless of whether
230 # max_dispatches_per_second
231 # is updated.
232 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
233 # to be dispatched for this queue. After this threshold has been
234 # reached, Cloud Tasks stops dispatching tasks until the number of
235 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700236 #
237 # If unspecified when the queue is created, Cloud Tasks will pick the
238 # default.
239 #
240 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700241 # The maximum allowed value is 5,000.
242 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700243 #
244 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700245 # [max_concurrent_requests in
246 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
247 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700248 #
249 # If unspecified when the queue is created, Cloud Tasks will pick the
250 # default.
251 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700252 # * For App Engine queues, the maximum allowed value
253 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700255 #
256 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700257 # [rate in
258 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
259 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700260 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
261 # App Engine tasks in this queue.
262 # Http tasks are not affected by this proto.
263 #
264 # The task will be delivered to the App Engine application hostname
265 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
266 # The documentation for AppEngineHttpRequest explains how the
267 # task&#x27;s host URL is constructed.
268 #
269 # Using AppEngineHttpQueue requires
270 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
271 # Google IAM permission for the project
272 # and the following scope:
273 #
274 # `https://www.googleapis.com/auth/cloud-platform`
275 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
276 # task-level app_engine_routing.
277 #
278 # If set, `app_engine_routing_override` is used for all tasks in
279 # the queue, no matter what the setting is for the
280 # task-level app_engine_routing.
281 #
282 # Defines routing characteristics specific to App Engine - service, version,
283 # and instance.
284 #
285 # For more information about services, versions, and instances see
286 # [An Overview of App
287 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
288 # [Microservices Architecture on Google App
289 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
290 # [App Engine Standard request
291 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
292 # and [App Engine Flex request
293 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700294 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
295 #
296 # The host is constructed from the domain name of the app associated with
297 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
298 # service, version,
299 # and instance. Tasks which were created using
300 # the App Engine SDK might have a custom domain name.
301 #
302 # For more information, see
303 # [How Requests are
304 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
305 &quot;instance&quot;: &quot;A String&quot;, # App instance.
306 #
307 # By default, the task is sent to an instance which is available when
308 # the task is attempted.
309 #
310 # Requests can only be sent to a specific instance if
311 # [manual scaling is used in App Engine
312 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
313 # App Engine Flex does not support instances. For more information, see
314 # [App Engine Standard request
315 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
316 # and [App Engine Flex request
317 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700318 &quot;service&quot;: &quot;A String&quot;, # App service.
319 #
320 # By default, the task is sent to the service which is the default
321 # service when the task is attempted.
322 #
323 # For some queues or tasks which were created using the App Engine
324 # Task Queue API, host is not parsable
325 # into service,
326 # version, and
327 # instance. For example, some tasks
328 # which were created using the App Engine SDK use a custom domain
329 # name; custom domains are not parsed by Cloud Tasks. If
330 # host is not parsable, then
331 # service,
332 # version, and
333 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700334 &quot;version&quot;: &quot;A String&quot;, # App version.
335 #
336 # By default, the task is sent to the version which is the default
337 # version when the task is attempted.
338 #
339 # For some queues or tasks which were created using the App Engine
340 # Task Queue API, host is not parsable
341 # into service,
342 # version, and
343 # instance. For example, some tasks
344 # which were created using the App Engine SDK use a custom domain
345 # name; custom domains are not parsed by Cloud Tasks. If
346 # host is not parsable, then
347 # service,
348 # version, and
349 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700350 },
351 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700352 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
353 # after which it becomes output only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700354 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700355 # The queue name.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700356 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700357 # The queue name must have the following format:
358 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700359 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700360 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
361 # hyphens (-), colons (:), or periods (.).
362 # For more information, see
363 # [Identifying
364 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
365 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
366 # The list of available locations can be obtained by calling
367 # ListLocations.
368 # For more information, see https://cloud.google.com/about/locations/.
369 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
370 # hyphens (-). The maximum length is 100 characters.
371 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
372 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
373 # field is unset, then no logs are written.
374 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
375 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
376 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
377 # This field may contain any value between 0.0 and 1.0, inclusive.
378 # 0.0 is the default and means that no operations are logged.
379 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700380 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
381 #
382 # * For tasks created using Cloud Tasks: the queue-level retry settings
383 # apply to all tasks in the queue that were created using Cloud Tasks.
384 # Retry settings cannot be set on individual tasks.
385 # * For tasks created using the App Engine SDK: the queue-level retry
386 # settings apply to all tasks in the queue which do not have retry settings
387 # explicitly set on the task and were created by the App Engine SDK. See
388 # [App Engine
389 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
390 #
391 # These settings determine when a failed task attempt is retried.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700392 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
393 # min_backoff and
394 # max_backoff duration after it fails,
395 # if the queue&#x27;s RetryConfig specifies that the task should be
396 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700397 #
398 # If unspecified when the queue is created, Cloud Tasks will pick the
399 # default.
400 #
401 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700402 # `max_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700403 #
404 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700405 # [max_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700406 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700407 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
408 # min_backoff and
409 # max_backoff duration after it fails,
410 # if the queue&#x27;s RetryConfig specifies that the task should be
411 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700412 #
413 # If unspecified when the queue is created, Cloud Tasks will pick the
414 # default.
415 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700416 #
417 # `min_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700418 #
419 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700420 # [min_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700421 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
422 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
423 #
424 # A task&#x27;s retry interval starts at
425 # min_backoff, then doubles
426 # `max_doublings` times, then increases linearly, and finally
427 # retries at intervals of
428 # max_backoff up to
429 # max_attempts times.
430 #
431 # For example, if min_backoff is 10s,
432 # max_backoff is 300s, and
433 # `max_doublings` is 3, then the a task will first be retried in
434 # 10s. The retry interval will double three times, and then
435 # increase linearly by 2^3 * 10s. Finally, the task will retry at
436 # intervals of max_backoff until the
437 # task has been attempted max_attempts
438 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
439 # 240s, 300s, 300s, ....
440 #
441 # If unspecified when the queue is created, Cloud Tasks will pick the
442 # default.
443 #
444 #
445 # This field has the same meaning as
446 # [max_doublings in
447 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700448 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
449 #
450 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
451 # first attempt fails, then there will be `max_attempts - 1` retries). Must
452 # be &gt;= -1.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700453 #
454 # If unspecified when the queue is created, Cloud Tasks will pick the
455 # default.
456 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700457 # -1 indicates unlimited attempts.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700458 #
459 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700460 # [task_retry_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700461 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700462 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
463 # retrying a failed task, measured from when the task was first
464 # attempted. Once `max_retry_duration` time has passed *and* the
465 # task has been attempted max_attempts
466 # times, no further attempts will be made and the task will be
467 # deleted.
468 #
469 # If zero, then the task age is unlimited.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700470 #
471 # If unspecified when the queue is created, Cloud Tasks will pick the
472 # default.
473 #
474 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700475 # `max_retry_duration` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700476 #
477 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700478 # [task_age_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700479 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
480 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700481}
482
483 x__xgafv: string, V1 error format.
484 Allowed values
485 1 - v1 error format
486 2 - v2 error format
487
488Returns:
489 An object of the form:
490
491 { # A queue is a container of related tasks. Queues are configured to manage
492 # how those tasks are dispatched. Configurable properties include rate limits,
493 # retry options, queue types, and others.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700494 &quot;type&quot;: &quot;A String&quot;, # Immutable. The type of a queue (push or pull).
495 #
496 # `Queue.type` is an immutable property of the queue that is set at the queue
497 # creation time. When left unspecified, the default value of `PUSH` is
498 # selected.
499 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
500 #
501 # All tasks that were created before this time
502 # were purged.
503 #
504 # A queue can be purged using PurgeQueue, the
505 # [App Engine Task Queue SDK, or the Cloud
506 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
507 #
508 # Purge time will be truncated to the nearest microsecond. Purge
509 # time will be unset if the queue has never been purged.
510 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
511 #
512 # `state` can only be changed by called
513 # PauseQueue,
514 # ResumeQueue, or uploading
515 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
516 # UpdateQueue cannot be used to change `state`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700517 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
518 #
519 # rate_limits and retry_config are
520 # related because they both control task attempts. However they control task
521 # attempts in different ways:
522 #
523 # * rate_limits controls the total rate of
524 # dispatches from a queue (i.e. all traffic dispatched from the
525 # queue, regardless of whether the dispatch is from a first
526 # attempt or a retry).
527 # * retry_config controls what happens to
528 # particular a task after its first attempt fails. That is,
529 # retry_config controls task retries (the
530 # second attempt, third attempt, etc).
531 #
532 # The queue&#x27;s actual dispatch rate is the result of:
533 #
534 # * Number of tasks in the queue
535 # * User-specified throttling: rate_limits,
536 # retry_config, and the
537 # queue&#x27;s state.
538 # * System throttling due to `429` (Too Many Requests) or `503` (Service
539 # Unavailable) responses from the worker, high error rates, or to smooth
540 # sudden large traffic spikes.
541 #
542 # This message determines the maximum rate that tasks can be dispatched by a
543 # queue, regardless of whether the dispatch is a first task attempt or a retry.
544 #
545 # Note: The debugging command, RunTask, will run a task
546 # even if the queue has reached its RateLimits.
547 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700548 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700549 # Max burst size limits how fast tasks in queue are processed when
550 # many tasks are in the queue and the rate is high. This field
551 # allows the queue to have a high rate so processing starts shortly
552 # after a task is enqueued, but still limits resource usage when
553 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700554 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700555 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
556 # algorithm is used to control the rate of task dispatches. Each
557 # queue has a token bucket that holds tokens, up to the maximum
558 # specified by `max_burst_size`. Each time a task is dispatched, a
559 # token is removed from the bucket. Tasks will be dispatched until
560 # the queue&#x27;s bucket runs out of tokens. The bucket will be
561 # continuously refilled with new tokens based on
562 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700563 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700564 # Cloud Tasks will pick the value of `max_burst_size` based on the
565 # value of
566 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700567 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700568 # For App Engine queues that were created or updated using
569 # `queue.yaml/xml`, `max_burst_size` is equal to
570 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
571 # Since `max_burst_size` is output only, if
572 # UpdateQueue is called on a queue
573 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
574 # on the value of
575 # max_dispatches_per_second,
576 # regardless of whether
577 # max_dispatches_per_second
578 # is updated.
579 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
580 # to be dispatched for this queue. After this threshold has been
581 # reached, Cloud Tasks stops dispatching tasks until the number of
582 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 #
584 # If unspecified when the queue is created, Cloud Tasks will pick the
585 # default.
586 #
587 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700588 # The maximum allowed value is 5,000.
589 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700590 #
591 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700592 # [max_concurrent_requests in
593 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
594 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700595 #
596 # If unspecified when the queue is created, Cloud Tasks will pick the
597 # default.
598 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700599 # * For App Engine queues, the maximum allowed value
600 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700601 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700602 #
603 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700604 # [rate in
605 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
606 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700607 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
608 # App Engine tasks in this queue.
609 # Http tasks are not affected by this proto.
610 #
611 # The task will be delivered to the App Engine application hostname
612 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
613 # The documentation for AppEngineHttpRequest explains how the
614 # task&#x27;s host URL is constructed.
615 #
616 # Using AppEngineHttpQueue requires
617 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
618 # Google IAM permission for the project
619 # and the following scope:
620 #
621 # `https://www.googleapis.com/auth/cloud-platform`
622 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
623 # task-level app_engine_routing.
624 #
625 # If set, `app_engine_routing_override` is used for all tasks in
626 # the queue, no matter what the setting is for the
627 # task-level app_engine_routing.
628 #
629 # Defines routing characteristics specific to App Engine - service, version,
630 # and instance.
631 #
632 # For more information about services, versions, and instances see
633 # [An Overview of App
634 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
635 # [Microservices Architecture on Google App
636 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
637 # [App Engine Standard request
638 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
639 # and [App Engine Flex request
640 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700641 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
642 #
643 # The host is constructed from the domain name of the app associated with
644 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
645 # service, version,
646 # and instance. Tasks which were created using
647 # the App Engine SDK might have a custom domain name.
648 #
649 # For more information, see
650 # [How Requests are
651 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
652 &quot;instance&quot;: &quot;A String&quot;, # App instance.
653 #
654 # By default, the task is sent to an instance which is available when
655 # the task is attempted.
656 #
657 # Requests can only be sent to a specific instance if
658 # [manual scaling is used in App Engine
659 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
660 # App Engine Flex does not support instances. For more information, see
661 # [App Engine Standard request
662 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
663 # and [App Engine Flex request
664 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700665 &quot;service&quot;: &quot;A String&quot;, # App service.
666 #
667 # By default, the task is sent to the service which is the default
668 # service when the task is attempted.
669 #
670 # For some queues or tasks which were created using the App Engine
671 # Task Queue API, host is not parsable
672 # into service,
673 # version, and
674 # instance. For example, some tasks
675 # which were created using the App Engine SDK use a custom domain
676 # name; custom domains are not parsed by Cloud Tasks. If
677 # host is not parsable, then
678 # service,
679 # version, and
680 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700681 &quot;version&quot;: &quot;A String&quot;, # App version.
682 #
683 # By default, the task is sent to the version which is the default
684 # version when the task is attempted.
685 #
686 # For some queues or tasks which were created using the App Engine
687 # Task Queue API, host is not parsable
688 # into service,
689 # version, and
690 # instance. For example, some tasks
691 # which were created using the App Engine SDK use a custom domain
692 # name; custom domains are not parsed by Cloud Tasks. If
693 # host is not parsable, then
694 # service,
695 # version, and
696 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700697 },
698 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700699 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
700 # after which it becomes output only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700701 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700702 # The queue name.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700703 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700704 # The queue name must have the following format:
705 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700706 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700707 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
708 # hyphens (-), colons (:), or periods (.).
709 # For more information, see
710 # [Identifying
711 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
712 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
713 # The list of available locations can be obtained by calling
714 # ListLocations.
715 # For more information, see https://cloud.google.com/about/locations/.
716 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
717 # hyphens (-). The maximum length is 100 characters.
718 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
719 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
720 # field is unset, then no logs are written.
721 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
722 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
723 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
724 # This field may contain any value between 0.0 and 1.0, inclusive.
725 # 0.0 is the default and means that no operations are logged.
726 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700727 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
728 #
729 # * For tasks created using Cloud Tasks: the queue-level retry settings
730 # apply to all tasks in the queue that were created using Cloud Tasks.
731 # Retry settings cannot be set on individual tasks.
732 # * For tasks created using the App Engine SDK: the queue-level retry
733 # settings apply to all tasks in the queue which do not have retry settings
734 # explicitly set on the task and were created by the App Engine SDK. See
735 # [App Engine
736 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
737 #
738 # These settings determine when a failed task attempt is retried.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700739 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
740 # min_backoff and
741 # max_backoff duration after it fails,
742 # if the queue&#x27;s RetryConfig specifies that the task should be
743 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700744 #
745 # If unspecified when the queue is created, Cloud Tasks will pick the
746 # default.
747 #
748 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700749 # `max_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700750 #
751 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700752 # [max_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700753 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700754 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
755 # min_backoff and
756 # max_backoff duration after it fails,
757 # if the queue&#x27;s RetryConfig specifies that the task should be
758 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700759 #
760 # If unspecified when the queue is created, Cloud Tasks will pick the
761 # default.
762 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700763 #
764 # `min_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700765 #
766 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700767 # [min_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700768 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
769 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
770 #
771 # A task&#x27;s retry interval starts at
772 # min_backoff, then doubles
773 # `max_doublings` times, then increases linearly, and finally
774 # retries at intervals of
775 # max_backoff up to
776 # max_attempts times.
777 #
778 # For example, if min_backoff is 10s,
779 # max_backoff is 300s, and
780 # `max_doublings` is 3, then the a task will first be retried in
781 # 10s. The retry interval will double three times, and then
782 # increase linearly by 2^3 * 10s. Finally, the task will retry at
783 # intervals of max_backoff until the
784 # task has been attempted max_attempts
785 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
786 # 240s, 300s, 300s, ....
787 #
788 # If unspecified when the queue is created, Cloud Tasks will pick the
789 # default.
790 #
791 #
792 # This field has the same meaning as
793 # [max_doublings in
794 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700795 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
796 #
797 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
798 # first attempt fails, then there will be `max_attempts - 1` retries). Must
799 # be &gt;= -1.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700800 #
801 # If unspecified when the queue is created, Cloud Tasks will pick the
802 # default.
803 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700804 # -1 indicates unlimited attempts.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700805 #
806 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700807 # [task_retry_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700808 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700809 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
810 # retrying a failed task, measured from when the task was first
811 # attempted. Once `max_retry_duration` time has passed *and* the
812 # task has been attempted max_attempts
813 # times, no further attempts will be made and the task will be
814 # deleted.
815 #
816 # If zero, then the task age is unlimited.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700817 #
818 # If unspecified when the queue is created, Cloud Tasks will pick the
819 # default.
820 #
821 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700822 # `max_retry_duration` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700823 #
824 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700825 # [task_age_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700826 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
827 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700828 }</pre>
829</div>
830
831<div class="method">
832 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
833 <pre>Deletes a queue.
834
835This command will delete the queue even if it has tasks in it.
836
Bu Sun Kim65020912020-05-20 12:08:20 -0700837Note: If you delete a queue, a queue with the same name can&#x27;t be created
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700838for 7 days.
839
840WARNING: Using this method may have unintended side effects if you are
841using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
842Read
843[Overview of Queue Management and
844queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
845this method.
846
847Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700848 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700849`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
850 x__xgafv: string, V1 error format.
851 Allowed values
852 1 - v1 error format
853 2 - v2 error format
854
855Returns:
856 An object of the form:
857
858 { # A generic empty message that you can re-use to avoid defining duplicated
859 # empty messages in your APIs. A typical example is to use it as the request
860 # or the response type of an API method. For instance:
861 #
862 # service Foo {
863 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
864 # }
865 #
866 # The JSON representation for `Empty` is empty JSON object `{}`.
867 }</pre>
868</div>
869
870<div class="method">
871 <code class="details" id="get">get(name, x__xgafv=None)</code>
872 <pre>Gets a queue.
873
874Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700875 name: string, Required. The resource name of the queue. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700876`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required)
877 x__xgafv: string, V1 error format.
878 Allowed values
879 1 - v1 error format
880 2 - v2 error format
881
882Returns:
883 An object of the form:
884
885 { # A queue is a container of related tasks. Queues are configured to manage
886 # how those tasks are dispatched. Configurable properties include rate limits,
887 # retry options, queue types, and others.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700888 &quot;type&quot;: &quot;A String&quot;, # Immutable. The type of a queue (push or pull).
889 #
890 # `Queue.type` is an immutable property of the queue that is set at the queue
891 # creation time. When left unspecified, the default value of `PUSH` is
892 # selected.
893 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
894 #
895 # All tasks that were created before this time
896 # were purged.
897 #
898 # A queue can be purged using PurgeQueue, the
899 # [App Engine Task Queue SDK, or the Cloud
900 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
901 #
902 # Purge time will be truncated to the nearest microsecond. Purge
903 # time will be unset if the queue has never been purged.
904 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
905 #
906 # `state` can only be changed by called
907 # PauseQueue,
908 # ResumeQueue, or uploading
909 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
910 # UpdateQueue cannot be used to change `state`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700911 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
912 #
913 # rate_limits and retry_config are
914 # related because they both control task attempts. However they control task
915 # attempts in different ways:
916 #
917 # * rate_limits controls the total rate of
918 # dispatches from a queue (i.e. all traffic dispatched from the
919 # queue, regardless of whether the dispatch is from a first
920 # attempt or a retry).
921 # * retry_config controls what happens to
922 # particular a task after its first attempt fails. That is,
923 # retry_config controls task retries (the
924 # second attempt, third attempt, etc).
925 #
926 # The queue&#x27;s actual dispatch rate is the result of:
927 #
928 # * Number of tasks in the queue
929 # * User-specified throttling: rate_limits,
930 # retry_config, and the
931 # queue&#x27;s state.
932 # * System throttling due to `429` (Too Many Requests) or `503` (Service
933 # Unavailable) responses from the worker, high error rates, or to smooth
934 # sudden large traffic spikes.
935 #
936 # This message determines the maximum rate that tasks can be dispatched by a
937 # queue, regardless of whether the dispatch is a first task attempt or a retry.
938 #
939 # Note: The debugging command, RunTask, will run a task
940 # even if the queue has reached its RateLimits.
941 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700942 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700943 # Max burst size limits how fast tasks in queue are processed when
944 # many tasks are in the queue and the rate is high. This field
945 # allows the queue to have a high rate so processing starts shortly
946 # after a task is enqueued, but still limits resource usage when
947 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700948 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700949 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
950 # algorithm is used to control the rate of task dispatches. Each
951 # queue has a token bucket that holds tokens, up to the maximum
952 # specified by `max_burst_size`. Each time a task is dispatched, a
953 # token is removed from the bucket. Tasks will be dispatched until
954 # the queue&#x27;s bucket runs out of tokens. The bucket will be
955 # continuously refilled with new tokens based on
956 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700957 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700958 # Cloud Tasks will pick the value of `max_burst_size` based on the
959 # value of
960 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700961 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700962 # For App Engine queues that were created or updated using
963 # `queue.yaml/xml`, `max_burst_size` is equal to
964 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
965 # Since `max_burst_size` is output only, if
966 # UpdateQueue is called on a queue
967 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
968 # on the value of
969 # max_dispatches_per_second,
970 # regardless of whether
971 # max_dispatches_per_second
972 # is updated.
973 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
974 # to be dispatched for this queue. After this threshold has been
975 # reached, Cloud Tasks stops dispatching tasks until the number of
976 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700977 #
978 # If unspecified when the queue is created, Cloud Tasks will pick the
979 # default.
980 #
981 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700982 # The maximum allowed value is 5,000.
983 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700984 #
985 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700986 # [max_concurrent_requests in
987 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
988 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700989 #
990 # If unspecified when the queue is created, Cloud Tasks will pick the
991 # default.
992 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700993 # * For App Engine queues, the maximum allowed value
994 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700995 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700996 #
997 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -0700998 # [rate in
999 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
1000 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001001 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
1002 # App Engine tasks in this queue.
1003 # Http tasks are not affected by this proto.
1004 #
1005 # The task will be delivered to the App Engine application hostname
1006 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
1007 # The documentation for AppEngineHttpRequest explains how the
1008 # task&#x27;s host URL is constructed.
1009 #
1010 # Using AppEngineHttpQueue requires
1011 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1012 # Google IAM permission for the project
1013 # and the following scope:
1014 #
1015 # `https://www.googleapis.com/auth/cloud-platform`
1016 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
1017 # task-level app_engine_routing.
1018 #
1019 # If set, `app_engine_routing_override` is used for all tasks in
1020 # the queue, no matter what the setting is for the
1021 # task-level app_engine_routing.
1022 #
1023 # Defines routing characteristics specific to App Engine - service, version,
1024 # and instance.
1025 #
1026 # For more information about services, versions, and instances see
1027 # [An Overview of App
1028 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1029 # [Microservices Architecture on Google App
1030 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1031 # [App Engine Standard request
1032 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1033 # and [App Engine Flex request
1034 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001035 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1036 #
1037 # The host is constructed from the domain name of the app associated with
1038 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1039 # service, version,
1040 # and instance. Tasks which were created using
1041 # the App Engine SDK might have a custom domain name.
1042 #
1043 # For more information, see
1044 # [How Requests are
1045 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1046 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1047 #
1048 # By default, the task is sent to an instance which is available when
1049 # the task is attempted.
1050 #
1051 # Requests can only be sent to a specific instance if
1052 # [manual scaling is used in App Engine
1053 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1054 # App Engine Flex does not support instances. For more information, see
1055 # [App Engine Standard request
1056 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1057 # and [App Engine Flex request
1058 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001059 &quot;service&quot;: &quot;A String&quot;, # App service.
1060 #
1061 # By default, the task is sent to the service which is the default
1062 # service when the task is attempted.
1063 #
1064 # For some queues or tasks which were created using the App Engine
1065 # Task Queue API, host is not parsable
1066 # into service,
1067 # version, and
1068 # instance. For example, some tasks
1069 # which were created using the App Engine SDK use a custom domain
1070 # name; custom domains are not parsed by Cloud Tasks. If
1071 # host is not parsable, then
1072 # service,
1073 # version, and
1074 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001075 &quot;version&quot;: &quot;A String&quot;, # App version.
1076 #
1077 # By default, the task is sent to the version which is the default
1078 # version when the task is attempted.
1079 #
1080 # For some queues or tasks which were created using the App Engine
1081 # Task Queue API, host is not parsable
1082 # into service,
1083 # version, and
1084 # instance. For example, some tasks
1085 # which were created using the App Engine SDK use a custom domain
1086 # name; custom domains are not parsed by Cloud Tasks. If
1087 # host is not parsable, then
1088 # service,
1089 # version, and
1090 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001091 },
1092 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001093 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
1094 # after which it becomes output only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001095 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001096 # The queue name.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001097 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001098 # The queue name must have the following format:
1099 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001100 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001101 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1102 # hyphens (-), colons (:), or periods (.).
1103 # For more information, see
1104 # [Identifying
1105 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1106 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
1107 # The list of available locations can be obtained by calling
1108 # ListLocations.
1109 # For more information, see https://cloud.google.com/about/locations/.
1110 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1111 # hyphens (-). The maximum length is 100 characters.
1112 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
1113 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
1114 # field is unset, then no logs are written.
1115 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1116 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
1117 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1118 # This field may contain any value between 0.0 and 1.0, inclusive.
1119 # 0.0 is the default and means that no operations are logged.
1120 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001121 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
1122 #
1123 # * For tasks created using Cloud Tasks: the queue-level retry settings
1124 # apply to all tasks in the queue that were created using Cloud Tasks.
1125 # Retry settings cannot be set on individual tasks.
1126 # * For tasks created using the App Engine SDK: the queue-level retry
1127 # settings apply to all tasks in the queue which do not have retry settings
1128 # explicitly set on the task and were created by the App Engine SDK. See
1129 # [App Engine
1130 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
1131 #
1132 # These settings determine when a failed task attempt is retried.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001133 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1134 # min_backoff and
1135 # max_backoff duration after it fails,
1136 # if the queue&#x27;s RetryConfig specifies that the task should be
1137 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001138 #
1139 # If unspecified when the queue is created, Cloud Tasks will pick the
1140 # default.
1141 #
1142 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001143 # `max_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001144 #
1145 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001146 # [max_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001147 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001148 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1149 # min_backoff and
1150 # max_backoff duration after it fails,
1151 # if the queue&#x27;s RetryConfig specifies that the task should be
1152 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001153 #
1154 # If unspecified when the queue is created, Cloud Tasks will pick the
1155 # default.
1156 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001157 #
1158 # `min_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001159 #
1160 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001161 # [min_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001162 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1163 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
1164 #
1165 # A task&#x27;s retry interval starts at
1166 # min_backoff, then doubles
1167 # `max_doublings` times, then increases linearly, and finally
1168 # retries at intervals of
1169 # max_backoff up to
1170 # max_attempts times.
1171 #
1172 # For example, if min_backoff is 10s,
1173 # max_backoff is 300s, and
1174 # `max_doublings` is 3, then the a task will first be retried in
1175 # 10s. The retry interval will double three times, and then
1176 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1177 # intervals of max_backoff until the
1178 # task has been attempted max_attempts
1179 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1180 # 240s, 300s, 300s, ....
1181 #
1182 # If unspecified when the queue is created, Cloud Tasks will pick the
1183 # default.
1184 #
1185 #
1186 # This field has the same meaning as
1187 # [max_doublings in
1188 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001189 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
1190 #
1191 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
1192 # first attempt fails, then there will be `max_attempts - 1` retries). Must
1193 # be &gt;= -1.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001194 #
1195 # If unspecified when the queue is created, Cloud Tasks will pick the
1196 # default.
1197 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001198 # -1 indicates unlimited attempts.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001199 #
1200 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001201 # [task_retry_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001202 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001203 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
1204 # retrying a failed task, measured from when the task was first
1205 # attempted. Once `max_retry_duration` time has passed *and* the
1206 # task has been attempted max_attempts
1207 # times, no further attempts will be made and the task will be
1208 # deleted.
1209 #
1210 # If zero, then the task age is unlimited.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001211 #
1212 # If unspecified when the queue is created, Cloud Tasks will pick the
1213 # default.
1214 #
1215 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001216 # `max_retry_duration` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001217 #
1218 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001219 # [task_age_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001220 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1221 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001222 }</pre>
1223</div>
1224
1225<div class="method">
1226 <code class="details" id="getIamPolicy">getIamPolicy(resource, body=None, x__xgafv=None)</code>
1227 <pre>Gets the access control policy for a Queue.
1228Returns an empty policy if the resource exists and does not have a policy
1229set.
1230
1231Authorization requires the following
1232[Google IAM](https://cloud.google.com/iam) permission on the specified
1233resource parent:
1234
1235* `cloudtasks.queues.getIamPolicy`
1236
1237Args:
1238 resource: string, REQUIRED: The resource for which the policy is being requested.
1239See the operation documentation for the appropriate value for this field. (required)
1240 body: object, The request body.
1241 The object takes the form of:
1242
1243{ # Request message for `GetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001244 &quot;options&quot;: { # Encapsulates settings provided to GetIamPolicy. # OPTIONAL: A `GetPolicyOptions` object for specifying options to
Dan O'Mearadd494642020-05-01 07:42:23 -07001245 # `GetIamPolicy`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001246 &quot;requestedPolicyVersion&quot;: 42, # Optional. The policy format version to be returned.
Dan O'Mearadd494642020-05-01 07:42:23 -07001247 #
1248 # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
1249 # rejected.
1250 #
1251 # Requests for policies with any conditional bindings must specify version 3.
1252 # Policies without any conditional bindings may specify any valid value or
1253 # leave the field unset.
Bu Sun Kim65020912020-05-20 12:08:20 -07001254 #
1255 # To learn which resources support conditions in their IAM policies, see the
1256 # [IAM
1257 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001258 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001259 }
1260
1261 x__xgafv: string, V1 error format.
1262 Allowed values
1263 1 - v1 error format
1264 2 - v2 error format
1265
1266Returns:
1267 An object of the form:
1268
Dan O'Mearadd494642020-05-01 07:42:23 -07001269 { # An Identity and Access Management (IAM) policy, which specifies access
1270 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001271 #
1272 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001273 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1274 # `members` to a single `role`. Members can be user accounts, service accounts,
1275 # Google groups, and domains (such as G Suite). A `role` is a named list of
1276 # permissions; each `role` can be an IAM predefined role or a user-created
1277 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001278 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001279 # For some types of Google Cloud resources, a `binding` can also specify a
1280 # `condition`, which is a logical expression that allows access to a resource
1281 # only if the expression evaluates to `true`. A condition can add constraints
1282 # based on attributes of the request, the resource, or both. To learn which
1283 # resources support conditions in their IAM policies, see the
1284 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001285 #
1286 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001287 #
1288 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001289 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001290 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001291 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1292 # &quot;members&quot;: [
1293 # &quot;user:mike@example.com&quot;,
1294 # &quot;group:admins@example.com&quot;,
1295 # &quot;domain:google.com&quot;,
1296 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001297 # ]
1298 # },
1299 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001300 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
1301 # &quot;members&quot;: [
1302 # &quot;user:eve@example.com&quot;
1303 # ],
1304 # &quot;condition&quot;: {
1305 # &quot;title&quot;: &quot;expirable access&quot;,
1306 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1307 # &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 -07001308 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001309 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001310 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001311 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1312 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001313 # }
1314 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001315 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001316 #
1317 # bindings:
1318 # - members:
1319 # - user:mike@example.com
1320 # - group:admins@example.com
1321 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001322 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1323 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001324 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001325 # - user:eve@example.com
1326 # role: roles/resourcemanager.organizationViewer
1327 # condition:
1328 # title: expirable access
1329 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001330 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001331 # - etag: BwWWja0YfJA=
1332 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001333 #
1334 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001335 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001336 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001337 # `condition` that determines how and when the `bindings` are applied. Each
1338 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001339 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001340 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
1341 # `members` can have the following values:
1342 #
1343 # * `allUsers`: A special identifier that represents anyone who is
1344 # on the internet; with or without a Google account.
1345 #
1346 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1347 # who is authenticated with a Google account or a service account.
1348 #
1349 # * `user:{emailid}`: An email address that represents a specific Google
1350 # account. For example, `alice@example.com` .
1351 #
1352 #
1353 # * `serviceAccount:{emailid}`: An email address that represents a service
1354 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1355 #
1356 # * `group:{emailid}`: An email address that represents a Google group.
1357 # For example, `admins@example.com`.
1358 #
1359 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1360 # identifier) representing a user that has been recently deleted. For
1361 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1362 # recovered, this value reverts to `user:{emailid}` and the recovered user
1363 # retains the role in the binding.
1364 #
1365 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1366 # unique identifier) representing a service account that has been recently
1367 # deleted. For example,
1368 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1369 # If the service account is undeleted, this value reverts to
1370 # `serviceAccount:{emailid}` and the undeleted service account retains the
1371 # role in the binding.
1372 #
1373 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1374 # identifier) representing a Google group that has been recently
1375 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1376 # the group is recovered, this value reverts to `group:{emailid}` and the
1377 # recovered group retains the role in the binding.
1378 #
1379 #
1380 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
1381 # users of that domain. For example, `google.com` or `example.com`.
1382 #
1383 &quot;A String&quot;,
1384 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001385 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1386 #
1387 # If the condition evaluates to `true`, then this binding applies to the
1388 # current request.
1389 #
1390 # If the condition evaluates to `false`, then this binding does not apply to
1391 # the current request. However, a different role binding might grant the same
1392 # role to one or more of the members in this binding.
1393 #
1394 # To learn which resources support conditions in their IAM policies, see the
1395 # [IAM
1396 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001397 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1398 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001399 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001400 # Example (Comparison):
1401 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001402 # title: &quot;Summary size limit&quot;
1403 # description: &quot;Determines if a summary is less than 100 chars&quot;
1404 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001405 #
1406 # Example (Equality):
1407 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001408 # title: &quot;Requestor is owner&quot;
1409 # description: &quot;Determines if requestor is the document owner&quot;
1410 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001411 #
1412 # Example (Logic):
1413 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001414 # title: &quot;Public documents&quot;
1415 # description: &quot;Determine whether the document should be publicly visible&quot;
1416 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001417 #
1418 # Example (Data Manipulation):
1419 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001420 # title: &quot;Notification string&quot;
1421 # description: &quot;Create a notification string with a timestamp.&quot;
1422 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07001423 #
1424 # The exact variables and functions that may be referenced within an expression
1425 # are determined by the service that evaluates it. See the service
1426 # documentation for additional information.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001427 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1428 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07001429 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
Dan O'Mearadd494642020-05-01 07:42:23 -07001430 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001431 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1432 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07001433 &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 -07001434 # its purpose. This can be used e.g. in UIs which allow to enter the
1435 # expression.
1436 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001437 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1438 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001439 },
1440 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001441 &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 -07001442 # prevent simultaneous updates of a policy from overwriting each other.
1443 # It is strongly suggested that systems make use of the `etag` in the
1444 # read-modify-write cycle to perform policy updates in order to avoid race
1445 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1446 # systems are expected to put that etag in the request to `setIamPolicy` to
1447 # ensure that their change will be applied to the same version of the policy.
1448 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001449 # **Important:** If you use IAM Conditions, you must include the `etag` field
1450 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1451 # you to overwrite a version `3` policy with a version `1` policy, and all of
1452 # the conditions in the version `3` policy are lost.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001453 &quot;version&quot;: 42, # Specifies the format of the policy.
1454 #
1455 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1456 # are rejected.
1457 #
1458 # Any operation that affects conditional role bindings must specify version
1459 # `3`. This requirement applies to the following operations:
1460 #
1461 # * Getting a policy that includes a conditional role binding
1462 # * Adding a conditional role binding to a policy
1463 # * Changing a conditional role binding in a policy
1464 # * Removing any role binding, with or without a condition, from a policy
1465 # that includes conditions
1466 #
1467 # **Important:** If you use IAM Conditions, you must include the `etag` field
1468 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1469 # you to overwrite a version `3` policy with a version `1` policy, and all of
1470 # the conditions in the version `3` policy are lost.
1471 #
1472 # If a policy does not include any conditions, operations on that policy may
1473 # specify any valid version or leave the field unset.
1474 #
1475 # To learn which resources support conditions in their IAM policies, see the
1476 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001477 }</pre>
1478</div>
1479
1480<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001481 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001482 <pre>Lists queues.
1483
1484Queues are returned in lexicographical order.
1485
1486Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001487 parent: string, Required. The location name.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001488For example: `projects/PROJECT_ID/locations/LOCATION_ID` (required)
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 Kimd059ad82020-07-22 17:02:09 -07001500 pageSize: integer, Requested page size.
1501
1502The maximum page size is 9800. If unspecified, the page size will
1503be the maximum. Fewer queues than requested might be returned,
1504even if more queues exist; use the
1505next_page_token in the
1506response to determine if more queues exist.
1507 pageToken: string, A token identifying the page of results to return.
1508
1509To request the first page results, page_token must be empty. To
1510request the next page of results, page_token must be the value of
1511next_page_token returned
1512from the previous call to ListQueues
1513method. It is an error to switch the value of the
1514filter while iterating through pages.
Bu Sun Kim65020912020-05-20 12:08:20 -07001515 x__xgafv: string, V1 error format.
1516 Allowed values
1517 1 - v1 error format
1518 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001519
1520Returns:
1521 An object of the form:
1522
1523 { # Response message for ListQueues.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001524 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results.
1525 #
1526 # To return the next page of results, call
1527 # ListQueues with this value as the
1528 # page_token.
1529 #
1530 # If the next_page_token is empty, there are no more results.
1531 #
1532 # The page token is valid for only 2 hours.
Bu Sun Kim65020912020-05-20 12:08:20 -07001533 &quot;queues&quot;: [ # The list of queues.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001534 { # A queue is a container of related tasks. Queues are configured to manage
1535 # how those tasks are dispatched. Configurable properties include rate limits,
1536 # retry options, queue types, and others.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001537 &quot;type&quot;: &quot;A String&quot;, # Immutable. The type of a queue (push or pull).
1538 #
1539 # `Queue.type` is an immutable property of the queue that is set at the queue
1540 # creation time. When left unspecified, the default value of `PUSH` is
1541 # selected.
1542 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
1543 #
1544 # All tasks that were created before this time
1545 # were purged.
1546 #
1547 # A queue can be purged using PurgeQueue, the
1548 # [App Engine Task Queue SDK, or the Cloud
1549 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
1550 #
1551 # Purge time will be truncated to the nearest microsecond. Purge
1552 # time will be unset if the queue has never been purged.
1553 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
1554 #
1555 # `state` can only be changed by called
1556 # PauseQueue,
1557 # ResumeQueue, or uploading
1558 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
1559 # UpdateQueue cannot be used to change `state`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001560 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
1561 #
1562 # rate_limits and retry_config are
1563 # related because they both control task attempts. However they control task
1564 # attempts in different ways:
1565 #
1566 # * rate_limits controls the total rate of
1567 # dispatches from a queue (i.e. all traffic dispatched from the
1568 # queue, regardless of whether the dispatch is from a first
1569 # attempt or a retry).
1570 # * retry_config controls what happens to
1571 # particular a task after its first attempt fails. That is,
1572 # retry_config controls task retries (the
1573 # second attempt, third attempt, etc).
1574 #
1575 # The queue&#x27;s actual dispatch rate is the result of:
1576 #
1577 # * Number of tasks in the queue
1578 # * User-specified throttling: rate_limits,
1579 # retry_config, and the
1580 # queue&#x27;s state.
1581 # * System throttling due to `429` (Too Many Requests) or `503` (Service
1582 # Unavailable) responses from the worker, high error rates, or to smooth
1583 # sudden large traffic spikes.
1584 #
1585 # This message determines the maximum rate that tasks can be dispatched by a
1586 # queue, regardless of whether the dispatch is a first task attempt or a retry.
1587 #
1588 # Note: The debugging command, RunTask, will run a task
1589 # even if the queue has reached its RateLimits.
1590 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001591 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001592 # Max burst size limits how fast tasks in queue are processed when
1593 # many tasks are in the queue and the rate is high. This field
1594 # allows the queue to have a high rate so processing starts shortly
1595 # after a task is enqueued, but still limits resource usage when
1596 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001597 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001598 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1599 # algorithm is used to control the rate of task dispatches. Each
1600 # queue has a token bucket that holds tokens, up to the maximum
1601 # specified by `max_burst_size`. Each time a task is dispatched, a
1602 # token is removed from the bucket. Tasks will be dispatched until
1603 # the queue&#x27;s bucket runs out of tokens. The bucket will be
1604 # continuously refilled with new tokens based on
1605 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001606 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001607 # Cloud Tasks will pick the value of `max_burst_size` based on the
1608 # value of
1609 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001610 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001611 # For App Engine queues that were created or updated using
1612 # `queue.yaml/xml`, `max_burst_size` is equal to
1613 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1614 # Since `max_burst_size` is output only, if
1615 # UpdateQueue is called on a queue
1616 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
1617 # on the value of
1618 # max_dispatches_per_second,
1619 # regardless of whether
1620 # max_dispatches_per_second
1621 # is updated.
1622 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
1623 # to be dispatched for this queue. After this threshold has been
1624 # reached, Cloud Tasks stops dispatching tasks until the number of
1625 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001626 #
1627 # If unspecified when the queue is created, Cloud Tasks will pick the
1628 # default.
1629 #
1630 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001631 # The maximum allowed value is 5,000.
1632 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001633 #
1634 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07001635 # [max_concurrent_requests in
1636 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
1637 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001638 #
1639 # If unspecified when the queue is created, Cloud Tasks will pick the
1640 # default.
1641 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001642 # * For App Engine queues, the maximum allowed value
1643 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001644 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001645 #
1646 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07001647 # [rate in
1648 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
1649 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001650 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
1651 # App Engine tasks in this queue.
1652 # Http tasks are not affected by this proto.
1653 #
1654 # The task will be delivered to the App Engine application hostname
1655 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
1656 # The documentation for AppEngineHttpRequest explains how the
1657 # task&#x27;s host URL is constructed.
1658 #
1659 # Using AppEngineHttpQueue requires
1660 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
1661 # Google IAM permission for the project
1662 # and the following scope:
1663 #
1664 # `https://www.googleapis.com/auth/cloud-platform`
1665 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
1666 # task-level app_engine_routing.
1667 #
1668 # If set, `app_engine_routing_override` is used for all tasks in
1669 # the queue, no matter what the setting is for the
1670 # task-level app_engine_routing.
1671 #
1672 # Defines routing characteristics specific to App Engine - service, version,
1673 # and instance.
1674 #
1675 # For more information about services, versions, and instances see
1676 # [An Overview of App
1677 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1678 # [Microservices Architecture on Google App
1679 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1680 # [App Engine Standard request
1681 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1682 # and [App Engine Flex request
1683 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001684 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
1685 #
1686 # The host is constructed from the domain name of the app associated with
1687 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
1688 # service, version,
1689 # and instance. Tasks which were created using
1690 # the App Engine SDK might have a custom domain name.
1691 #
1692 # For more information, see
1693 # [How Requests are
1694 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1695 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1696 #
1697 # By default, the task is sent to an instance which is available when
1698 # the task is attempted.
1699 #
1700 # Requests can only be sent to a specific instance if
1701 # [manual scaling is used in App Engine
1702 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1703 # App Engine Flex does not support instances. For more information, see
1704 # [App Engine Standard request
1705 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1706 # and [App Engine Flex request
1707 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001708 &quot;service&quot;: &quot;A String&quot;, # App service.
1709 #
1710 # By default, the task is sent to the service which is the default
1711 # service when the task is attempted.
1712 #
1713 # For some queues or tasks which were created using the App Engine
1714 # Task Queue API, host is not parsable
1715 # into service,
1716 # version, and
1717 # instance. For example, some tasks
1718 # which were created using the App Engine SDK use a custom domain
1719 # name; custom domains are not parsed by Cloud Tasks. If
1720 # host is not parsable, then
1721 # service,
1722 # version, and
1723 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001724 &quot;version&quot;: &quot;A String&quot;, # App version.
1725 #
1726 # By default, the task is sent to the version which is the default
1727 # version when the task is attempted.
1728 #
1729 # For some queues or tasks which were created using the App Engine
1730 # Task Queue API, host is not parsable
1731 # into service,
1732 # version, and
1733 # instance. For example, some tasks
1734 # which were created using the App Engine SDK use a custom domain
1735 # name; custom domains are not parsed by Cloud Tasks. If
1736 # host is not parsable, then
1737 # service,
1738 # version, and
1739 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001740 },
1741 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001742 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
1743 # after which it becomes output only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001744 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001745 # The queue name.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001746 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001747 # The queue name must have the following format:
1748 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001749 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001750 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1751 # hyphens (-), colons (:), or periods (.).
1752 # For more information, see
1753 # [Identifying
1754 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1755 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
1756 # The list of available locations can be obtained by calling
1757 # ListLocations.
1758 # For more information, see https://cloud.google.com/about/locations/.
1759 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1760 # hyphens (-). The maximum length is 100 characters.
1761 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
1762 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
1763 # field is unset, then no logs are written.
1764 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1765 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
1766 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
1767 # This field may contain any value between 0.0 and 1.0, inclusive.
1768 # 0.0 is the default and means that no operations are logged.
1769 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001770 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
1771 #
1772 # * For tasks created using Cloud Tasks: the queue-level retry settings
1773 # apply to all tasks in the queue that were created using Cloud Tasks.
1774 # Retry settings cannot be set on individual tasks.
1775 # * For tasks created using the App Engine SDK: the queue-level retry
1776 # settings apply to all tasks in the queue which do not have retry settings
1777 # explicitly set on the task and were created by the App Engine SDK. See
1778 # [App Engine
1779 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
1780 #
1781 # These settings determine when a failed task attempt is retried.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001782 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1783 # min_backoff and
1784 # max_backoff duration after it fails,
1785 # if the queue&#x27;s RetryConfig specifies that the task should be
1786 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001787 #
1788 # If unspecified when the queue is created, Cloud Tasks will pick the
1789 # default.
1790 #
1791 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001792 # `max_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001793 #
1794 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001795 # [max_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001796 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001797 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
1798 # min_backoff and
1799 # max_backoff duration after it fails,
1800 # if the queue&#x27;s RetryConfig specifies that the task should be
1801 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001802 #
1803 # If unspecified when the queue is created, Cloud Tasks will pick the
1804 # default.
1805 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001806 #
1807 # `min_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001808 #
1809 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001810 # [min_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001811 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1812 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
1813 #
1814 # A task&#x27;s retry interval starts at
1815 # min_backoff, then doubles
1816 # `max_doublings` times, then increases linearly, and finally
1817 # retries at intervals of
1818 # max_backoff up to
1819 # max_attempts times.
1820 #
1821 # For example, if min_backoff is 10s,
1822 # max_backoff is 300s, and
1823 # `max_doublings` is 3, then the a task will first be retried in
1824 # 10s. The retry interval will double three times, and then
1825 # increase linearly by 2^3 * 10s. Finally, the task will retry at
1826 # intervals of max_backoff until the
1827 # task has been attempted max_attempts
1828 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
1829 # 240s, 300s, 300s, ....
1830 #
1831 # If unspecified when the queue is created, Cloud Tasks will pick the
1832 # default.
1833 #
1834 #
1835 # This field has the same meaning as
1836 # [max_doublings in
1837 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001838 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
1839 #
1840 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
1841 # first attempt fails, then there will be `max_attempts - 1` retries). Must
1842 # be &gt;= -1.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001843 #
1844 # If unspecified when the queue is created, Cloud Tasks will pick the
1845 # default.
1846 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001847 # -1 indicates unlimited attempts.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001848 #
1849 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001850 # [task_retry_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001851 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001852 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
1853 # retrying a failed task, measured from when the task was first
1854 # attempted. Once `max_retry_duration` time has passed *and* the
1855 # task has been attempted max_attempts
1856 # times, no further attempts will be made and the task will be
1857 # deleted.
1858 #
1859 # If zero, then the task age is unlimited.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001860 #
1861 # If unspecified when the queue is created, Cloud Tasks will pick the
1862 # default.
1863 #
1864 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001865 # `max_retry_duration` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001866 #
1867 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001868 # [task_age_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001869 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1870 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001871 },
1872 ],
1873 }</pre>
1874</div>
1875
1876<div class="method">
1877 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1878 <pre>Retrieves the next page of results.
1879
1880Args:
1881 previous_request: The request for the previous page. (required)
1882 previous_response: The response from the request for the previous page. (required)
1883
1884Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001885 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001886 page. Returns None if there are no more items in the collection.
1887 </pre>
1888</div>
1889
1890<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001891 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001892 <pre>Updates a queue.
1893
1894This method creates the queue if it does not exist and updates
1895the queue if it does exist.
1896
1897Queues created with this method allow tasks to live for a maximum of 31
1898days. After a task is 31 days old, the task will be deleted regardless of whether
1899it was dispatched or not.
1900
1901WARNING: Using this method may have unintended side effects if you are
1902using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
1903Read
1904[Overview of Queue Management and
1905queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
1906this method.
1907
1908Args:
1909 name: string, Caller-specified and required in CreateQueue,
1910after which it becomes output only.
1911
1912The queue name.
1913
1914The queue name must have the following format:
1915`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
1916
1917* `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1918 hyphens (-), colons (:), or periods (.).
1919 For more information, see
1920 [Identifying
1921 projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
Bu Sun Kim65020912020-05-20 12:08:20 -07001922* `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001923 The list of available locations can be obtained by calling
1924 ListLocations.
1925 For more information, see https://cloud.google.com/about/locations/.
1926* `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1927 hyphens (-). The maximum length is 100 characters. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001928 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001929 The object takes the form of:
1930
1931{ # A queue is a container of related tasks. Queues are configured to manage
1932 # how those tasks are dispatched. Configurable properties include rate limits,
1933 # retry options, queue types, and others.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001934 &quot;type&quot;: &quot;A String&quot;, # Immutable. The type of a queue (push or pull).
1935 #
1936 # `Queue.type` is an immutable property of the queue that is set at the queue
1937 # creation time. When left unspecified, the default value of `PUSH` is
1938 # selected.
1939 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
1940 #
1941 # All tasks that were created before this time
1942 # were purged.
1943 #
1944 # A queue can be purged using PurgeQueue, the
1945 # [App Engine Task Queue SDK, or the Cloud
1946 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
1947 #
1948 # Purge time will be truncated to the nearest microsecond. Purge
1949 # time will be unset if the queue has never been purged.
1950 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
1951 #
1952 # `state` can only be changed by called
1953 # PauseQueue,
1954 # ResumeQueue, or uploading
1955 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
1956 # UpdateQueue cannot be used to change `state`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001957 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
1958 #
1959 # rate_limits and retry_config are
1960 # related because they both control task attempts. However they control task
1961 # attempts in different ways:
1962 #
1963 # * rate_limits controls the total rate of
1964 # dispatches from a queue (i.e. all traffic dispatched from the
1965 # queue, regardless of whether the dispatch is from a first
1966 # attempt or a retry).
1967 # * retry_config controls what happens to
1968 # particular a task after its first attempt fails. That is,
1969 # retry_config controls task retries (the
1970 # second attempt, third attempt, etc).
1971 #
1972 # The queue&#x27;s actual dispatch rate is the result of:
1973 #
1974 # * Number of tasks in the queue
1975 # * User-specified throttling: rate_limits,
1976 # retry_config, and the
1977 # queue&#x27;s state.
1978 # * System throttling due to `429` (Too Many Requests) or `503` (Service
1979 # Unavailable) responses from the worker, high error rates, or to smooth
1980 # sudden large traffic spikes.
1981 #
1982 # This message determines the maximum rate that tasks can be dispatched by a
1983 # queue, regardless of whether the dispatch is a first task attempt or a retry.
1984 #
1985 # Note: The debugging command, RunTask, will run a task
1986 # even if the queue has reached its RateLimits.
1987 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001988 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001989 # Max burst size limits how fast tasks in queue are processed when
1990 # many tasks are in the queue and the rate is high. This field
1991 # allows the queue to have a high rate so processing starts shortly
1992 # after a task is enqueued, but still limits resource usage when
1993 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001994 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001995 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
1996 # algorithm is used to control the rate of task dispatches. Each
1997 # queue has a token bucket that holds tokens, up to the maximum
1998 # specified by `max_burst_size`. Each time a task is dispatched, a
1999 # token is removed from the bucket. Tasks will be dispatched until
2000 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2001 # continuously refilled with new tokens based on
2002 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002003 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002004 # Cloud Tasks will pick the value of `max_burst_size` based on the
2005 # value of
2006 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002007 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002008 # For App Engine queues that were created or updated using
2009 # `queue.yaml/xml`, `max_burst_size` is equal to
2010 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2011 # Since `max_burst_size` is output only, if
2012 # UpdateQueue is called on a queue
2013 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2014 # on the value of
2015 # max_dispatches_per_second,
2016 # regardless of whether
2017 # max_dispatches_per_second
2018 # is updated.
2019 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2020 # to be dispatched for this queue. After this threshold has been
2021 # reached, Cloud Tasks stops dispatching tasks until the number of
2022 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002023 #
2024 # If unspecified when the queue is created, Cloud Tasks will pick the
2025 # default.
2026 #
2027 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002028 # The maximum allowed value is 5,000.
2029 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002030 #
2031 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002032 # [max_concurrent_requests in
2033 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
2034 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002035 #
2036 # If unspecified when the queue is created, Cloud Tasks will pick the
2037 # default.
2038 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002039 # * For App Engine queues, the maximum allowed value
2040 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002041 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002042 #
2043 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002044 # [rate in
2045 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2046 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002047 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
2048 # App Engine tasks in this queue.
2049 # Http tasks are not affected by this proto.
2050 #
2051 # The task will be delivered to the App Engine application hostname
2052 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
2053 # The documentation for AppEngineHttpRequest explains how the
2054 # task&#x27;s host URL is constructed.
2055 #
2056 # Using AppEngineHttpQueue requires
2057 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2058 # Google IAM permission for the project
2059 # and the following scope:
2060 #
2061 # `https://www.googleapis.com/auth/cloud-platform`
2062 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
2063 # task-level app_engine_routing.
2064 #
2065 # If set, `app_engine_routing_override` is used for all tasks in
2066 # the queue, no matter what the setting is for the
2067 # task-level app_engine_routing.
2068 #
2069 # Defines routing characteristics specific to App Engine - service, version,
2070 # and instance.
2071 #
2072 # For more information about services, versions, and instances see
2073 # [An Overview of App
2074 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2075 # [Microservices Architecture on Google App
2076 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2077 # [App Engine Standard request
2078 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2079 # and [App Engine Flex request
2080 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002081 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2082 #
2083 # The host is constructed from the domain name of the app associated with
2084 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2085 # service, version,
2086 # and instance. Tasks which were created using
2087 # the App Engine SDK might have a custom domain name.
2088 #
2089 # For more information, see
2090 # [How Requests are
2091 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2092 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2093 #
2094 # By default, the task is sent to an instance which is available when
2095 # the task is attempted.
2096 #
2097 # Requests can only be sent to a specific instance if
2098 # [manual scaling is used in App Engine
2099 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2100 # App Engine Flex does not support instances. For more information, see
2101 # [App Engine Standard request
2102 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2103 # and [App Engine Flex request
2104 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002105 &quot;service&quot;: &quot;A String&quot;, # App service.
2106 #
2107 # By default, the task is sent to the service which is the default
2108 # service when the task is attempted.
2109 #
2110 # For some queues or tasks which were created using the App Engine
2111 # Task Queue API, host is not parsable
2112 # into service,
2113 # version, and
2114 # instance. For example, some tasks
2115 # which were created using the App Engine SDK use a custom domain
2116 # name; custom domains are not parsed by Cloud Tasks. If
2117 # host is not parsable, then
2118 # service,
2119 # version, and
2120 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002121 &quot;version&quot;: &quot;A String&quot;, # App version.
2122 #
2123 # By default, the task is sent to the version which is the default
2124 # version when the task is attempted.
2125 #
2126 # For some queues or tasks which were created using the App Engine
2127 # Task Queue API, host is not parsable
2128 # into service,
2129 # version, and
2130 # instance. For example, some tasks
2131 # which were created using the App Engine SDK use a custom domain
2132 # name; custom domains are not parsed by Cloud Tasks. If
2133 # host is not parsable, then
2134 # service,
2135 # version, and
2136 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002137 },
2138 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002139 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2140 # after which it becomes output only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002141 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002142 # The queue name.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002143 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002144 # The queue name must have the following format:
2145 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002146 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002147 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2148 # hyphens (-), colons (:), or periods (.).
2149 # For more information, see
2150 # [Identifying
2151 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2152 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2153 # The list of available locations can be obtained by calling
2154 # ListLocations.
2155 # For more information, see https://cloud.google.com/about/locations/.
2156 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2157 # hyphens (-). The maximum length is 100 characters.
2158 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
2159 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2160 # field is unset, then no logs are written.
2161 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2162 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
2163 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2164 # This field may contain any value between 0.0 and 1.0, inclusive.
2165 # 0.0 is the default and means that no operations are logged.
2166 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002167 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
2168 #
2169 # * For tasks created using Cloud Tasks: the queue-level retry settings
2170 # apply to all tasks in the queue that were created using Cloud Tasks.
2171 # Retry settings cannot be set on individual tasks.
2172 # * For tasks created using the App Engine SDK: the queue-level retry
2173 # settings apply to all tasks in the queue which do not have retry settings
2174 # explicitly set on the task and were created by the App Engine SDK. See
2175 # [App Engine
2176 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2177 #
2178 # These settings determine when a failed task attempt is retried.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002179 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2180 # min_backoff and
2181 # max_backoff duration after it fails,
2182 # if the queue&#x27;s RetryConfig specifies that the task should be
2183 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002184 #
2185 # If unspecified when the queue is created, Cloud Tasks will pick the
2186 # default.
2187 #
2188 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002189 # `max_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002190 #
2191 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002192 # [max_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002193 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002194 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2195 # min_backoff and
2196 # max_backoff duration after it fails,
2197 # if the queue&#x27;s RetryConfig specifies that the task should be
2198 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002199 #
2200 # If unspecified when the queue is created, Cloud Tasks will pick the
2201 # default.
2202 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002203 #
2204 # `min_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002205 #
2206 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002207 # [min_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002208 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2209 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2210 #
2211 # A task&#x27;s retry interval starts at
2212 # min_backoff, then doubles
2213 # `max_doublings` times, then increases linearly, and finally
2214 # retries at intervals of
2215 # max_backoff up to
2216 # max_attempts times.
2217 #
2218 # For example, if min_backoff is 10s,
2219 # max_backoff is 300s, and
2220 # `max_doublings` is 3, then the a task will first be retried in
2221 # 10s. The retry interval will double three times, and then
2222 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2223 # intervals of max_backoff until the
2224 # task has been attempted max_attempts
2225 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2226 # 240s, 300s, 300s, ....
2227 #
2228 # If unspecified when the queue is created, Cloud Tasks will pick the
2229 # default.
2230 #
2231 #
2232 # This field has the same meaning as
2233 # [max_doublings in
2234 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002235 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
2236 #
2237 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2238 # first attempt fails, then there will be `max_attempts - 1` retries). Must
2239 # be &gt;= -1.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002240 #
2241 # If unspecified when the queue is created, Cloud Tasks will pick the
2242 # default.
2243 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002244 # -1 indicates unlimited attempts.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002245 #
2246 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002247 # [task_retry_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002248 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002249 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2250 # retrying a failed task, measured from when the task was first
2251 # attempted. Once `max_retry_duration` time has passed *and* the
2252 # task has been attempted max_attempts
2253 # times, no further attempts will be made and the task will be
2254 # deleted.
2255 #
2256 # If zero, then the task age is unlimited.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002257 #
2258 # If unspecified when the queue is created, Cloud Tasks will pick the
2259 # default.
2260 #
2261 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002262 # `max_retry_duration` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002263 #
2264 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002265 # [task_age_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002266 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2267 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002268}
2269
2270 updateMask: string, A mask used to specify which fields of the queue are being updated.
2271
2272If empty, then all fields will be updated.
2273 x__xgafv: string, V1 error format.
2274 Allowed values
2275 1 - v1 error format
2276 2 - v2 error format
2277
2278Returns:
2279 An object of the form:
2280
2281 { # A queue is a container of related tasks. Queues are configured to manage
2282 # how those tasks are dispatched. Configurable properties include rate limits,
2283 # retry options, queue types, and others.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002284 &quot;type&quot;: &quot;A String&quot;, # Immutable. The type of a queue (push or pull).
2285 #
2286 # `Queue.type` is an immutable property of the queue that is set at the queue
2287 # creation time. When left unspecified, the default value of `PUSH` is
2288 # selected.
2289 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
2290 #
2291 # All tasks that were created before this time
2292 # were purged.
2293 #
2294 # A queue can be purged using PurgeQueue, the
2295 # [App Engine Task Queue SDK, or the Cloud
2296 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2297 #
2298 # Purge time will be truncated to the nearest microsecond. Purge
2299 # time will be unset if the queue has never been purged.
2300 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2301 #
2302 # `state` can only be changed by called
2303 # PauseQueue,
2304 # ResumeQueue, or uploading
2305 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2306 # UpdateQueue cannot be used to change `state`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002307 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2308 #
2309 # rate_limits and retry_config are
2310 # related because they both control task attempts. However they control task
2311 # attempts in different ways:
2312 #
2313 # * rate_limits controls the total rate of
2314 # dispatches from a queue (i.e. all traffic dispatched from the
2315 # queue, regardless of whether the dispatch is from a first
2316 # attempt or a retry).
2317 # * retry_config controls what happens to
2318 # particular a task after its first attempt fails. That is,
2319 # retry_config controls task retries (the
2320 # second attempt, third attempt, etc).
2321 #
2322 # The queue&#x27;s actual dispatch rate is the result of:
2323 #
2324 # * Number of tasks in the queue
2325 # * User-specified throttling: rate_limits,
2326 # retry_config, and the
2327 # queue&#x27;s state.
2328 # * System throttling due to `429` (Too Many Requests) or `503` (Service
2329 # Unavailable) responses from the worker, high error rates, or to smooth
2330 # sudden large traffic spikes.
2331 #
2332 # This message determines the maximum rate that tasks can be dispatched by a
2333 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2334 #
2335 # Note: The debugging command, RunTask, will run a task
2336 # even if the queue has reached its RateLimits.
2337 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002338 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002339 # Max burst size limits how fast tasks in queue are processed when
2340 # many tasks are in the queue and the rate is high. This field
2341 # allows the queue to have a high rate so processing starts shortly
2342 # after a task is enqueued, but still limits resource usage when
2343 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002344 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002345 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2346 # algorithm is used to control the rate of task dispatches. Each
2347 # queue has a token bucket that holds tokens, up to the maximum
2348 # specified by `max_burst_size`. Each time a task is dispatched, a
2349 # token is removed from the bucket. Tasks will be dispatched until
2350 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2351 # continuously refilled with new tokens based on
2352 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002353 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002354 # Cloud Tasks will pick the value of `max_burst_size` based on the
2355 # value of
2356 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002357 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002358 # For App Engine queues that were created or updated using
2359 # `queue.yaml/xml`, `max_burst_size` is equal to
2360 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2361 # Since `max_burst_size` is output only, if
2362 # UpdateQueue is called on a queue
2363 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2364 # on the value of
2365 # max_dispatches_per_second,
2366 # regardless of whether
2367 # max_dispatches_per_second
2368 # is updated.
2369 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2370 # to be dispatched for this queue. After this threshold has been
2371 # reached, Cloud Tasks stops dispatching tasks until the number of
2372 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002373 #
2374 # If unspecified when the queue is created, Cloud Tasks will pick the
2375 # default.
2376 #
2377 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002378 # The maximum allowed value is 5,000.
2379 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002380 #
2381 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002382 # [max_concurrent_requests in
2383 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
2384 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002385 #
2386 # If unspecified when the queue is created, Cloud Tasks will pick the
2387 # default.
2388 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002389 # * For App Engine queues, the maximum allowed value
2390 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002391 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002392 #
2393 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002394 # [rate in
2395 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2396 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002397 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
2398 # App Engine tasks in this queue.
2399 # Http tasks are not affected by this proto.
2400 #
2401 # The task will be delivered to the App Engine application hostname
2402 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
2403 # The documentation for AppEngineHttpRequest explains how the
2404 # task&#x27;s host URL is constructed.
2405 #
2406 # Using AppEngineHttpQueue requires
2407 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2408 # Google IAM permission for the project
2409 # and the following scope:
2410 #
2411 # `https://www.googleapis.com/auth/cloud-platform`
2412 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
2413 # task-level app_engine_routing.
2414 #
2415 # If set, `app_engine_routing_override` is used for all tasks in
2416 # the queue, no matter what the setting is for the
2417 # task-level app_engine_routing.
2418 #
2419 # Defines routing characteristics specific to App Engine - service, version,
2420 # and instance.
2421 #
2422 # For more information about services, versions, and instances see
2423 # [An Overview of App
2424 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2425 # [Microservices Architecture on Google App
2426 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2427 # [App Engine Standard request
2428 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2429 # and [App Engine Flex request
2430 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002431 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2432 #
2433 # The host is constructed from the domain name of the app associated with
2434 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2435 # service, version,
2436 # and instance. Tasks which were created using
2437 # the App Engine SDK might have a custom domain name.
2438 #
2439 # For more information, see
2440 # [How Requests are
2441 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2442 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2443 #
2444 # By default, the task is sent to an instance which is available when
2445 # the task is attempted.
2446 #
2447 # Requests can only be sent to a specific instance if
2448 # [manual scaling is used in App Engine
2449 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2450 # App Engine Flex does not support instances. For more information, see
2451 # [App Engine Standard request
2452 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2453 # and [App Engine Flex request
2454 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002455 &quot;service&quot;: &quot;A String&quot;, # App service.
2456 #
2457 # By default, the task is sent to the service which is the default
2458 # service when the task is attempted.
2459 #
2460 # For some queues or tasks which were created using the App Engine
2461 # Task Queue API, host is not parsable
2462 # into service,
2463 # version, and
2464 # instance. For example, some tasks
2465 # which were created using the App Engine SDK use a custom domain
2466 # name; custom domains are not parsed by Cloud Tasks. If
2467 # host is not parsable, then
2468 # service,
2469 # version, and
2470 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002471 &quot;version&quot;: &quot;A String&quot;, # App version.
2472 #
2473 # By default, the task is sent to the version which is the default
2474 # version when the task is attempted.
2475 #
2476 # For some queues or tasks which were created using the App Engine
2477 # Task Queue API, host is not parsable
2478 # into service,
2479 # version, and
2480 # instance. For example, some tasks
2481 # which were created using the App Engine SDK use a custom domain
2482 # name; custom domains are not parsed by Cloud Tasks. If
2483 # host is not parsable, then
2484 # service,
2485 # version, and
2486 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002487 },
2488 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002489 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2490 # after which it becomes output only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002491 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002492 # The queue name.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002493 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002494 # The queue name must have the following format:
2495 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002496 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002497 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2498 # hyphens (-), colons (:), or periods (.).
2499 # For more information, see
2500 # [Identifying
2501 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2502 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2503 # The list of available locations can be obtained by calling
2504 # ListLocations.
2505 # For more information, see https://cloud.google.com/about/locations/.
2506 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2507 # hyphens (-). The maximum length is 100 characters.
2508 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
2509 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2510 # field is unset, then no logs are written.
2511 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2512 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
2513 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2514 # This field may contain any value between 0.0 and 1.0, inclusive.
2515 # 0.0 is the default and means that no operations are logged.
2516 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002517 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
2518 #
2519 # * For tasks created using Cloud Tasks: the queue-level retry settings
2520 # apply to all tasks in the queue that were created using Cloud Tasks.
2521 # Retry settings cannot be set on individual tasks.
2522 # * For tasks created using the App Engine SDK: the queue-level retry
2523 # settings apply to all tasks in the queue which do not have retry settings
2524 # explicitly set on the task and were created by the App Engine SDK. See
2525 # [App Engine
2526 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2527 #
2528 # These settings determine when a failed task attempt is retried.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002529 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2530 # min_backoff and
2531 # max_backoff duration after it fails,
2532 # if the queue&#x27;s RetryConfig specifies that the task should be
2533 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002534 #
2535 # If unspecified when the queue is created, Cloud Tasks will pick the
2536 # default.
2537 #
2538 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002539 # `max_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002540 #
2541 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002542 # [max_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002543 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002544 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2545 # min_backoff and
2546 # max_backoff duration after it fails,
2547 # if the queue&#x27;s RetryConfig specifies that the task should be
2548 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002549 #
2550 # If unspecified when the queue is created, Cloud Tasks will pick the
2551 # default.
2552 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002553 #
2554 # `min_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002555 #
2556 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002557 # [min_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002558 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2559 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2560 #
2561 # A task&#x27;s retry interval starts at
2562 # min_backoff, then doubles
2563 # `max_doublings` times, then increases linearly, and finally
2564 # retries at intervals of
2565 # max_backoff up to
2566 # max_attempts times.
2567 #
2568 # For example, if min_backoff is 10s,
2569 # max_backoff is 300s, and
2570 # `max_doublings` is 3, then the a task will first be retried in
2571 # 10s. The retry interval will double three times, and then
2572 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2573 # intervals of max_backoff until the
2574 # task has been attempted max_attempts
2575 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2576 # 240s, 300s, 300s, ....
2577 #
2578 # If unspecified when the queue is created, Cloud Tasks will pick the
2579 # default.
2580 #
2581 #
2582 # This field has the same meaning as
2583 # [max_doublings in
2584 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002585 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
2586 #
2587 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2588 # first attempt fails, then there will be `max_attempts - 1` retries). Must
2589 # be &gt;= -1.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002590 #
2591 # If unspecified when the queue is created, Cloud Tasks will pick the
2592 # default.
2593 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002594 # -1 indicates unlimited attempts.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002595 #
2596 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002597 # [task_retry_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002598 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002599 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2600 # retrying a failed task, measured from when the task was first
2601 # attempted. Once `max_retry_duration` time has passed *and* the
2602 # task has been attempted max_attempts
2603 # times, no further attempts will be made and the task will be
2604 # deleted.
2605 #
2606 # If zero, then the task age is unlimited.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002607 #
2608 # If unspecified when the queue is created, Cloud Tasks will pick the
2609 # default.
2610 #
2611 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002612 # `max_retry_duration` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002613 #
2614 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002615 # [task_age_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002616 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2617 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002618 }</pre>
2619</div>
2620
2621<div class="method">
2622 <code class="details" id="pause">pause(name, body=None, x__xgafv=None)</code>
2623 <pre>Pauses the queue.
2624
2625If a queue is paused then the system will stop dispatching tasks
2626until the queue is resumed via
2627ResumeQueue. Tasks can still be added
2628when the queue is paused. A queue is paused if its
2629state is PAUSED.
2630
2631Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002632 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002633`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
2634 body: object, The request body.
2635 The object takes the form of:
2636
2637{ # Request message for PauseQueue.
2638 }
2639
2640 x__xgafv: string, V1 error format.
2641 Allowed values
2642 1 - v1 error format
2643 2 - v2 error format
2644
2645Returns:
2646 An object of the form:
2647
2648 { # A queue is a container of related tasks. Queues are configured to manage
2649 # how those tasks are dispatched. Configurable properties include rate limits,
2650 # retry options, queue types, and others.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002651 &quot;type&quot;: &quot;A String&quot;, # Immutable. The type of a queue (push or pull).
2652 #
2653 # `Queue.type` is an immutable property of the queue that is set at the queue
2654 # creation time. When left unspecified, the default value of `PUSH` is
2655 # selected.
2656 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
2657 #
2658 # All tasks that were created before this time
2659 # were purged.
2660 #
2661 # A queue can be purged using PurgeQueue, the
2662 # [App Engine Task Queue SDK, or the Cloud
2663 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
2664 #
2665 # Purge time will be truncated to the nearest microsecond. Purge
2666 # time will be unset if the queue has never been purged.
2667 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
2668 #
2669 # `state` can only be changed by called
2670 # PauseQueue,
2671 # ResumeQueue, or uploading
2672 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
2673 # UpdateQueue cannot be used to change `state`.
Bu Sun Kim65020912020-05-20 12:08:20 -07002674 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
2675 #
2676 # rate_limits and retry_config are
2677 # related because they both control task attempts. However they control task
2678 # attempts in different ways:
2679 #
2680 # * rate_limits controls the total rate of
2681 # dispatches from a queue (i.e. all traffic dispatched from the
2682 # queue, regardless of whether the dispatch is from a first
2683 # attempt or a retry).
2684 # * retry_config controls what happens to
2685 # particular a task after its first attempt fails. That is,
2686 # retry_config controls task retries (the
2687 # second attempt, third attempt, etc).
2688 #
2689 # The queue&#x27;s actual dispatch rate is the result of:
2690 #
2691 # * Number of tasks in the queue
2692 # * User-specified throttling: rate_limits,
2693 # retry_config, and the
2694 # queue&#x27;s state.
2695 # * System throttling due to `429` (Too Many Requests) or `503` (Service
2696 # Unavailable) responses from the worker, high error rates, or to smooth
2697 # sudden large traffic spikes.
2698 #
2699 # This message determines the maximum rate that tasks can be dispatched by a
2700 # queue, regardless of whether the dispatch is a first task attempt or a retry.
2701 #
2702 # Note: The debugging command, RunTask, will run a task
2703 # even if the queue has reached its RateLimits.
2704 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002705 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002706 # Max burst size limits how fast tasks in queue are processed when
2707 # many tasks are in the queue and the rate is high. This field
2708 # allows the queue to have a high rate so processing starts shortly
2709 # after a task is enqueued, but still limits resource usage when
2710 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002711 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002712 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
2713 # algorithm is used to control the rate of task dispatches. Each
2714 # queue has a token bucket that holds tokens, up to the maximum
2715 # specified by `max_burst_size`. Each time a task is dispatched, a
2716 # token is removed from the bucket. Tasks will be dispatched until
2717 # the queue&#x27;s bucket runs out of tokens. The bucket will be
2718 # continuously refilled with new tokens based on
2719 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002720 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002721 # Cloud Tasks will pick the value of `max_burst_size` based on the
2722 # value of
2723 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002724 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002725 # For App Engine queues that were created or updated using
2726 # `queue.yaml/xml`, `max_burst_size` is equal to
2727 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
2728 # Since `max_burst_size` is output only, if
2729 # UpdateQueue is called on a queue
2730 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
2731 # on the value of
2732 # max_dispatches_per_second,
2733 # regardless of whether
2734 # max_dispatches_per_second
2735 # is updated.
2736 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
2737 # to be dispatched for this queue. After this threshold has been
2738 # reached, Cloud Tasks stops dispatching tasks until the number of
2739 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002740 #
2741 # If unspecified when the queue is created, Cloud Tasks will pick the
2742 # default.
2743 #
2744 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002745 # The maximum allowed value is 5,000.
2746 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002747 #
2748 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002749 # [max_concurrent_requests in
2750 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
2751 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002752 #
2753 # If unspecified when the queue is created, Cloud Tasks will pick the
2754 # default.
2755 #
Bu Sun Kim65020912020-05-20 12:08:20 -07002756 # * For App Engine queues, the maximum allowed value
2757 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002758 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002759 #
2760 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07002761 # [rate in
2762 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
2763 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002764 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
2765 # App Engine tasks in this queue.
2766 # Http tasks are not affected by this proto.
2767 #
2768 # The task will be delivered to the App Engine application hostname
2769 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
2770 # The documentation for AppEngineHttpRequest explains how the
2771 # task&#x27;s host URL is constructed.
2772 #
2773 # Using AppEngineHttpQueue requires
2774 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
2775 # Google IAM permission for the project
2776 # and the following scope:
2777 #
2778 # `https://www.googleapis.com/auth/cloud-platform`
2779 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
2780 # task-level app_engine_routing.
2781 #
2782 # If set, `app_engine_routing_override` is used for all tasks in
2783 # the queue, no matter what the setting is for the
2784 # task-level app_engine_routing.
2785 #
2786 # Defines routing characteristics specific to App Engine - service, version,
2787 # and instance.
2788 #
2789 # For more information about services, versions, and instances see
2790 # [An Overview of App
2791 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2792 # [Microservices Architecture on Google App
2793 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2794 # [App Engine Standard request
2795 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2796 # and [App Engine Flex request
2797 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002798 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
2799 #
2800 # The host is constructed from the domain name of the app associated with
2801 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
2802 # service, version,
2803 # and instance. Tasks which were created using
2804 # the App Engine SDK might have a custom domain name.
2805 #
2806 # For more information, see
2807 # [How Requests are
2808 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2809 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2810 #
2811 # By default, the task is sent to an instance which is available when
2812 # the task is attempted.
2813 #
2814 # Requests can only be sent to a specific instance if
2815 # [manual scaling is used in App Engine
2816 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2817 # App Engine Flex does not support instances. For more information, see
2818 # [App Engine Standard request
2819 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2820 # and [App Engine Flex request
2821 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002822 &quot;service&quot;: &quot;A String&quot;, # App service.
2823 #
2824 # By default, the task is sent to the service which is the default
2825 # service when the task is attempted.
2826 #
2827 # For some queues or tasks which were created using the App Engine
2828 # Task Queue API, host is not parsable
2829 # into service,
2830 # version, and
2831 # instance. For example, some tasks
2832 # which were created using the App Engine SDK use a custom domain
2833 # name; custom domains are not parsed by Cloud Tasks. If
2834 # host is not parsable, then
2835 # service,
2836 # version, and
2837 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002838 &quot;version&quot;: &quot;A String&quot;, # App version.
2839 #
2840 # By default, the task is sent to the version which is the default
2841 # version when the task is attempted.
2842 #
2843 # For some queues or tasks which were created using the App Engine
2844 # Task Queue API, host is not parsable
2845 # into service,
2846 # version, and
2847 # instance. For example, some tasks
2848 # which were created using the App Engine SDK use a custom domain
2849 # name; custom domains are not parsed by Cloud Tasks. If
2850 # host is not parsable, then
2851 # service,
2852 # version, and
2853 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002854 },
2855 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002856 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
2857 # after which it becomes output only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002858 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002859 # The queue name.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002860 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002861 # The queue name must have the following format:
2862 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002863 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002864 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2865 # hyphens (-), colons (:), or periods (.).
2866 # For more information, see
2867 # [Identifying
2868 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2869 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
2870 # The list of available locations can be obtained by calling
2871 # ListLocations.
2872 # For more information, see https://cloud.google.com/about/locations/.
2873 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
2874 # hyphens (-). The maximum length is 100 characters.
2875 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
2876 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
2877 # field is unset, then no logs are written.
2878 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2879 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
2880 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
2881 # This field may contain any value between 0.0 and 1.0, inclusive.
2882 # 0.0 is the default and means that no operations are logged.
2883 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002884 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
2885 #
2886 # * For tasks created using Cloud Tasks: the queue-level retry settings
2887 # apply to all tasks in the queue that were created using Cloud Tasks.
2888 # Retry settings cannot be set on individual tasks.
2889 # * For tasks created using the App Engine SDK: the queue-level retry
2890 # settings apply to all tasks in the queue which do not have retry settings
2891 # explicitly set on the task and were created by the App Engine SDK. See
2892 # [App Engine
2893 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
2894 #
2895 # These settings determine when a failed task attempt is retried.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002896 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2897 # min_backoff and
2898 # max_backoff duration after it fails,
2899 # if the queue&#x27;s RetryConfig specifies that the task should be
2900 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002901 #
2902 # If unspecified when the queue is created, Cloud Tasks will pick the
2903 # default.
2904 #
2905 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002906 # `max_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002907 #
2908 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002909 # [max_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002910 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002911 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
2912 # min_backoff and
2913 # max_backoff duration after it fails,
2914 # if the queue&#x27;s RetryConfig specifies that the task should be
2915 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002916 #
2917 # If unspecified when the queue is created, Cloud Tasks will pick the
2918 # default.
2919 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002920 #
2921 # `min_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002922 #
2923 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002924 # [min_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002925 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2926 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2927 #
2928 # A task&#x27;s retry interval starts at
2929 # min_backoff, then doubles
2930 # `max_doublings` times, then increases linearly, and finally
2931 # retries at intervals of
2932 # max_backoff up to
2933 # max_attempts times.
2934 #
2935 # For example, if min_backoff is 10s,
2936 # max_backoff is 300s, and
2937 # `max_doublings` is 3, then the a task will first be retried in
2938 # 10s. The retry interval will double three times, and then
2939 # increase linearly by 2^3 * 10s. Finally, the task will retry at
2940 # intervals of max_backoff until the
2941 # task has been attempted max_attempts
2942 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
2943 # 240s, 300s, 300s, ....
2944 #
2945 # If unspecified when the queue is created, Cloud Tasks will pick the
2946 # default.
2947 #
2948 #
2949 # This field has the same meaning as
2950 # [max_doublings in
2951 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002952 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
2953 #
2954 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
2955 # first attempt fails, then there will be `max_attempts - 1` retries). Must
2956 # be &gt;= -1.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002957 #
2958 # If unspecified when the queue is created, Cloud Tasks will pick the
2959 # default.
2960 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002961 # -1 indicates unlimited attempts.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002962 #
2963 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002964 # [task_retry_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002965 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002966 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
2967 # retrying a failed task, measured from when the task was first
2968 # attempted. Once `max_retry_duration` time has passed *and* the
2969 # task has been attempted max_attempts
2970 # times, no further attempts will be made and the task will be
2971 # deleted.
2972 #
2973 # If zero, then the task age is unlimited.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002974 #
2975 # If unspecified when the queue is created, Cloud Tasks will pick the
2976 # default.
2977 #
2978 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002979 # `max_retry_duration` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002980 #
2981 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002982 # [task_age_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002983 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
2984 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002985 }</pre>
2986</div>
2987
2988<div class="method">
2989 <code class="details" id="purge">purge(name, body=None, x__xgafv=None)</code>
2990 <pre>Purges a queue by deleting all of its tasks.
2991
2992All tasks created before this method is called are permanently deleted.
2993
2994Purge operations can take up to one minute to take effect. Tasks
2995might be dispatched before the purge takes effect. A purge is irreversible.
2996
2997Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07002998 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002999`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
3000 body: object, The request body.
3001 The object takes the form of:
3002
3003{ # Request message for PurgeQueue.
3004 }
3005
3006 x__xgafv: string, V1 error format.
3007 Allowed values
3008 1 - v1 error format
3009 2 - v2 error format
3010
3011Returns:
3012 An object of the form:
3013
3014 { # A queue is a container of related tasks. Queues are configured to manage
3015 # how those tasks are dispatched. Configurable properties include rate limits,
3016 # retry options, queue types, and others.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003017 &quot;type&quot;: &quot;A String&quot;, # Immutable. The type of a queue (push or pull).
3018 #
3019 # `Queue.type` is an immutable property of the queue that is set at the queue
3020 # creation time. When left unspecified, the default value of `PUSH` is
3021 # selected.
3022 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
3023 #
3024 # All tasks that were created before this time
3025 # were purged.
3026 #
3027 # A queue can be purged using PurgeQueue, the
3028 # [App Engine Task Queue SDK, or the Cloud
3029 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
3030 #
3031 # Purge time will be truncated to the nearest microsecond. Purge
3032 # time will be unset if the queue has never been purged.
3033 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
3034 #
3035 # `state` can only be changed by called
3036 # PauseQueue,
3037 # ResumeQueue, or uploading
3038 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3039 # UpdateQueue cannot be used to change `state`.
Bu Sun Kim65020912020-05-20 12:08:20 -07003040 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
3041 #
3042 # rate_limits and retry_config are
3043 # related because they both control task attempts. However they control task
3044 # attempts in different ways:
3045 #
3046 # * rate_limits controls the total rate of
3047 # dispatches from a queue (i.e. all traffic dispatched from the
3048 # queue, regardless of whether the dispatch is from a first
3049 # attempt or a retry).
3050 # * retry_config controls what happens to
3051 # particular a task after its first attempt fails. That is,
3052 # retry_config controls task retries (the
3053 # second attempt, third attempt, etc).
3054 #
3055 # The queue&#x27;s actual dispatch rate is the result of:
3056 #
3057 # * Number of tasks in the queue
3058 # * User-specified throttling: rate_limits,
3059 # retry_config, and the
3060 # queue&#x27;s state.
3061 # * System throttling due to `429` (Too Many Requests) or `503` (Service
3062 # Unavailable) responses from the worker, high error rates, or to smooth
3063 # sudden large traffic spikes.
3064 #
3065 # This message determines the maximum rate that tasks can be dispatched by a
3066 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3067 #
3068 # Note: The debugging command, RunTask, will run a task
3069 # even if the queue has reached its RateLimits.
3070 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003071 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003072 # Max burst size limits how fast tasks in queue are processed when
3073 # many tasks are in the queue and the rate is high. This field
3074 # allows the queue to have a high rate so processing starts shortly
3075 # after a task is enqueued, but still limits resource usage when
3076 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003077 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003078 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3079 # algorithm is used to control the rate of task dispatches. Each
3080 # queue has a token bucket that holds tokens, up to the maximum
3081 # specified by `max_burst_size`. Each time a task is dispatched, a
3082 # token is removed from the bucket. Tasks will be dispatched until
3083 # the queue&#x27;s bucket runs out of tokens. The bucket will be
3084 # continuously refilled with new tokens based on
3085 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003086 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003087 # Cloud Tasks will pick the value of `max_burst_size` based on the
3088 # value of
3089 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003090 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003091 # For App Engine queues that were created or updated using
3092 # `queue.yaml/xml`, `max_burst_size` is equal to
3093 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3094 # Since `max_burst_size` is output only, if
3095 # UpdateQueue is called on a queue
3096 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3097 # on the value of
3098 # max_dispatches_per_second,
3099 # regardless of whether
3100 # max_dispatches_per_second
3101 # is updated.
3102 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3103 # to be dispatched for this queue. After this threshold has been
3104 # reached, Cloud Tasks stops dispatching tasks until the number of
3105 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003106 #
3107 # If unspecified when the queue is created, Cloud Tasks will pick the
3108 # default.
3109 #
3110 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003111 # The maximum allowed value is 5,000.
3112 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003113 #
3114 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07003115 # [max_concurrent_requests in
3116 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
3117 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003118 #
3119 # If unspecified when the queue is created, Cloud Tasks will pick the
3120 # default.
3121 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003122 # * For App Engine queues, the maximum allowed value
3123 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003124 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003125 #
3126 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07003127 # [rate in
3128 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
3129 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003130 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
3131 # App Engine tasks in this queue.
3132 # Http tasks are not affected by this proto.
3133 #
3134 # The task will be delivered to the App Engine application hostname
3135 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
3136 # The documentation for AppEngineHttpRequest explains how the
3137 # task&#x27;s host URL is constructed.
3138 #
3139 # Using AppEngineHttpQueue requires
3140 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3141 # Google IAM permission for the project
3142 # and the following scope:
3143 #
3144 # `https://www.googleapis.com/auth/cloud-platform`
3145 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
3146 # task-level app_engine_routing.
3147 #
3148 # If set, `app_engine_routing_override` is used for all tasks in
3149 # the queue, no matter what the setting is for the
3150 # task-level app_engine_routing.
3151 #
3152 # Defines routing characteristics specific to App Engine - service, version,
3153 # and instance.
3154 #
3155 # For more information about services, versions, and instances see
3156 # [An Overview of App
3157 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3158 # [Microservices Architecture on Google App
3159 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3160 # [App Engine Standard request
3161 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3162 # and [App Engine Flex request
3163 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003164 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
3165 #
3166 # The host is constructed from the domain name of the app associated with
3167 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
3168 # service, version,
3169 # and instance. Tasks which were created using
3170 # the App Engine SDK might have a custom domain name.
3171 #
3172 # For more information, see
3173 # [How Requests are
3174 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3175 &quot;instance&quot;: &quot;A String&quot;, # App instance.
3176 #
3177 # By default, the task is sent to an instance which is available when
3178 # the task is attempted.
3179 #
3180 # Requests can only be sent to a specific instance if
3181 # [manual scaling is used in App Engine
3182 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3183 # App Engine Flex does not support instances. For more information, see
3184 # [App Engine Standard request
3185 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3186 # and [App Engine Flex request
3187 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003188 &quot;service&quot;: &quot;A String&quot;, # App service.
3189 #
3190 # By default, the task is sent to the service which is the default
3191 # service when the task is attempted.
3192 #
3193 # For some queues or tasks which were created using the App Engine
3194 # Task Queue API, host is not parsable
3195 # into service,
3196 # version, and
3197 # instance. For example, some tasks
3198 # which were created using the App Engine SDK use a custom domain
3199 # name; custom domains are not parsed by Cloud Tasks. If
3200 # host is not parsable, then
3201 # service,
3202 # version, and
3203 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003204 &quot;version&quot;: &quot;A String&quot;, # App version.
3205 #
3206 # By default, the task is sent to the version which is the default
3207 # version when the task is attempted.
3208 #
3209 # For some queues or tasks which were created using the App Engine
3210 # Task Queue API, host is not parsable
3211 # into service,
3212 # version, and
3213 # instance. For example, some tasks
3214 # which were created using the App Engine SDK use a custom domain
3215 # name; custom domains are not parsed by Cloud Tasks. If
3216 # host is not parsable, then
3217 # service,
3218 # version, and
3219 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003220 },
3221 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003222 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
3223 # after which it becomes output only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003224 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003225 # The queue name.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003226 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003227 # The queue name must have the following format:
3228 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003229 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003230 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3231 # hyphens (-), colons (:), or periods (.).
3232 # For more information, see
3233 # [Identifying
3234 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3235 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
3236 # The list of available locations can be obtained by calling
3237 # ListLocations.
3238 # For more information, see https://cloud.google.com/about/locations/.
3239 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3240 # hyphens (-). The maximum length is 100 characters.
3241 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
3242 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
3243 # field is unset, then no logs are written.
3244 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3245 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
3246 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3247 # This field may contain any value between 0.0 and 1.0, inclusive.
3248 # 0.0 is the default and means that no operations are logged.
3249 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003250 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
3251 #
3252 # * For tasks created using Cloud Tasks: the queue-level retry settings
3253 # apply to all tasks in the queue that were created using Cloud Tasks.
3254 # Retry settings cannot be set on individual tasks.
3255 # * For tasks created using the App Engine SDK: the queue-level retry
3256 # settings apply to all tasks in the queue which do not have retry settings
3257 # explicitly set on the task and were created by the App Engine SDK. See
3258 # [App Engine
3259 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3260 #
3261 # These settings determine when a failed task attempt is retried.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003262 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3263 # min_backoff and
3264 # max_backoff duration after it fails,
3265 # if the queue&#x27;s RetryConfig specifies that the task should be
3266 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003267 #
3268 # If unspecified when the queue is created, Cloud Tasks will pick the
3269 # default.
3270 #
3271 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003272 # `max_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003273 #
3274 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003275 # [max_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003276 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003277 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3278 # min_backoff and
3279 # max_backoff duration after it fails,
3280 # if the queue&#x27;s RetryConfig specifies that the task should be
3281 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003282 #
3283 # If unspecified when the queue is created, Cloud Tasks will pick the
3284 # default.
3285 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003286 #
3287 # `min_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003288 #
3289 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003290 # [min_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003291 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3292 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
3293 #
3294 # A task&#x27;s retry interval starts at
3295 # min_backoff, then doubles
3296 # `max_doublings` times, then increases linearly, and finally
3297 # retries at intervals of
3298 # max_backoff up to
3299 # max_attempts times.
3300 #
3301 # For example, if min_backoff is 10s,
3302 # max_backoff is 300s, and
3303 # `max_doublings` is 3, then the a task will first be retried in
3304 # 10s. The retry interval will double three times, and then
3305 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3306 # intervals of max_backoff until the
3307 # task has been attempted max_attempts
3308 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3309 # 240s, 300s, 300s, ....
3310 #
3311 # If unspecified when the queue is created, Cloud Tasks will pick the
3312 # default.
3313 #
3314 #
3315 # This field has the same meaning as
3316 # [max_doublings in
3317 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003318 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
3319 #
3320 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
3321 # first attempt fails, then there will be `max_attempts - 1` retries). Must
3322 # be &gt;= -1.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003323 #
3324 # If unspecified when the queue is created, Cloud Tasks will pick the
3325 # default.
3326 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003327 # -1 indicates unlimited attempts.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003328 #
3329 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003330 # [task_retry_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003331 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003332 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
3333 # retrying a failed task, measured from when the task was first
3334 # attempted. Once `max_retry_duration` time has passed *and* the
3335 # task has been attempted max_attempts
3336 # times, no further attempts will be made and the task will be
3337 # deleted.
3338 #
3339 # If zero, then the task age is unlimited.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003340 #
3341 # If unspecified when the queue is created, Cloud Tasks will pick the
3342 # default.
3343 #
3344 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003345 # `max_retry_duration` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003346 #
3347 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003348 # [task_age_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003349 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3350 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003351 }</pre>
3352</div>
3353
3354<div class="method">
3355 <code class="details" id="resume">resume(name, body=None, x__xgafv=None)</code>
3356 <pre>Resume a queue.
3357
3358This method resumes a queue after it has been
3359PAUSED or
3360DISABLED. The state of a queue is stored
Bu Sun Kim65020912020-05-20 12:08:20 -07003361in the queue&#x27;s state; after calling this method it
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003362will be set to RUNNING.
3363
3364WARNING: Resuming many high-QPS queues at the same time can
3365lead to target overloading. If you are resuming high-QPS
3366queues, follow the 500/50/5 pattern described in
3367[Managing Cloud Tasks Scaling
3368Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
3369
3370Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07003371 name: string, Required. The queue name. For example:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003372`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` (required)
3373 body: object, The request body.
3374 The object takes the form of:
3375
3376{ # Request message for ResumeQueue.
3377 }
3378
3379 x__xgafv: string, V1 error format.
3380 Allowed values
3381 1 - v1 error format
3382 2 - v2 error format
3383
3384Returns:
3385 An object of the form:
3386
3387 { # A queue is a container of related tasks. Queues are configured to manage
3388 # how those tasks are dispatched. Configurable properties include rate limits,
3389 # retry options, queue types, and others.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003390 &quot;type&quot;: &quot;A String&quot;, # Immutable. The type of a queue (push or pull).
3391 #
3392 # `Queue.type` is an immutable property of the queue that is set at the queue
3393 # creation time. When left unspecified, the default value of `PUSH` is
3394 # selected.
3395 &quot;purgeTime&quot;: &quot;A String&quot;, # Output only. The last time this queue was purged.
3396 #
3397 # All tasks that were created before this time
3398 # were purged.
3399 #
3400 # A queue can be purged using PurgeQueue, the
3401 # [App Engine Task Queue SDK, or the Cloud
3402 # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
3403 #
3404 # Purge time will be truncated to the nearest microsecond. Purge
3405 # time will be unset if the queue has never been purged.
3406 &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the queue.
3407 #
3408 # `state` can only be changed by called
3409 # PauseQueue,
3410 # ResumeQueue, or uploading
3411 # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
3412 # UpdateQueue cannot be used to change `state`.
Bu Sun Kim65020912020-05-20 12:08:20 -07003413 &quot;rateLimits&quot;: { # Rate limits. # Rate limits for task dispatches.
3414 #
3415 # rate_limits and retry_config are
3416 # related because they both control task attempts. However they control task
3417 # attempts in different ways:
3418 #
3419 # * rate_limits controls the total rate of
3420 # dispatches from a queue (i.e. all traffic dispatched from the
3421 # queue, regardless of whether the dispatch is from a first
3422 # attempt or a retry).
3423 # * retry_config controls what happens to
3424 # particular a task after its first attempt fails. That is,
3425 # retry_config controls task retries (the
3426 # second attempt, third attempt, etc).
3427 #
3428 # The queue&#x27;s actual dispatch rate is the result of:
3429 #
3430 # * Number of tasks in the queue
3431 # * User-specified throttling: rate_limits,
3432 # retry_config, and the
3433 # queue&#x27;s state.
3434 # * System throttling due to `429` (Too Many Requests) or `503` (Service
3435 # Unavailable) responses from the worker, high error rates, or to smooth
3436 # sudden large traffic spikes.
3437 #
3438 # This message determines the maximum rate that tasks can be dispatched by a
3439 # queue, regardless of whether the dispatch is a first task attempt or a retry.
3440 #
3441 # Note: The debugging command, RunTask, will run a task
3442 # even if the queue has reached its RateLimits.
3443 &quot;maxBurstSize&quot;: 42, # Output only. The max burst size.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003444 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003445 # Max burst size limits how fast tasks in queue are processed when
3446 # many tasks are in the queue and the rate is high. This field
3447 # allows the queue to have a high rate so processing starts shortly
3448 # after a task is enqueued, but still limits resource usage when
3449 # many tasks are enqueued in a short period of time.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003450 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003451 # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
3452 # algorithm is used to control the rate of task dispatches. Each
3453 # queue has a token bucket that holds tokens, up to the maximum
3454 # specified by `max_burst_size`. Each time a task is dispatched, a
3455 # token is removed from the bucket. Tasks will be dispatched until
3456 # the queue&#x27;s bucket runs out of tokens. The bucket will be
3457 # continuously refilled with new tokens based on
3458 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003459 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003460 # Cloud Tasks will pick the value of `max_burst_size` based on the
3461 # value of
3462 # max_dispatches_per_second.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003463 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003464 # For App Engine queues that were created or updated using
3465 # `queue.yaml/xml`, `max_burst_size` is equal to
3466 # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
3467 # Since `max_burst_size` is output only, if
3468 # UpdateQueue is called on a queue
3469 # created by `queue.yaml/xml`, `max_burst_size` will be reset based
3470 # on the value of
3471 # max_dispatches_per_second,
3472 # regardless of whether
3473 # max_dispatches_per_second
3474 # is updated.
3475 &quot;maxConcurrentDispatches&quot;: 42, # The maximum number of concurrent tasks that Cloud Tasks allows
3476 # to be dispatched for this queue. After this threshold has been
3477 # reached, Cloud Tasks stops dispatching tasks until the number of
3478 # concurrent requests decreases.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003479 #
3480 # If unspecified when the queue is created, Cloud Tasks will pick the
3481 # default.
3482 #
3483 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003484 # The maximum allowed value is 5,000.
3485 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003486 #
3487 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07003488 # [max_concurrent_requests in
3489 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
3490 &quot;maxDispatchesPerSecond&quot;: 3.14, # The maximum rate at which tasks are dispatched from this queue.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003491 #
3492 # If unspecified when the queue is created, Cloud Tasks will pick the
3493 # default.
3494 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003495 # * For App Engine queues, the maximum allowed value
3496 # is 500.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003497 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003498 #
3499 # This field has the same meaning as
Bu Sun Kim65020912020-05-20 12:08:20 -07003500 # [rate in
3501 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
3502 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003503 &quot;appEngineHttpQueue&quot;: { # App Engine HTTP queue. # AppEngineHttpQueue settings apply only to
3504 # App Engine tasks in this queue.
3505 # Http tasks are not affected by this proto.
3506 #
3507 # The task will be delivered to the App Engine application hostname
3508 # specified by its AppEngineHttpQueue and AppEngineHttpRequest.
3509 # The documentation for AppEngineHttpRequest explains how the
3510 # task&#x27;s host URL is constructed.
3511 #
3512 # Using AppEngineHttpQueue requires
3513 # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
3514 # Google IAM permission for the project
3515 # and the following scope:
3516 #
3517 # `https://www.googleapis.com/auth/cloud-platform`
3518 &quot;appEngineRoutingOverride&quot;: { # App Engine Routing. # Overrides for the
3519 # task-level app_engine_routing.
3520 #
3521 # If set, `app_engine_routing_override` is used for all tasks in
3522 # the queue, no matter what the setting is for the
3523 # task-level app_engine_routing.
3524 #
3525 # Defines routing characteristics specific to App Engine - service, version,
3526 # and instance.
3527 #
3528 # For more information about services, versions, and instances see
3529 # [An Overview of App
3530 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3531 # [Microservices Architecture on Google App
3532 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
3533 # [App Engine Standard request
3534 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
3535 # and [App Engine Flex request
3536 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003537 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the task is sent to.
3538 #
3539 # The host is constructed from the domain name of the app associated with
3540 # the queue&#x27;s project ID (for example &lt;app-id&gt;.appspot.com), and the
3541 # service, version,
3542 # and instance. Tasks which were created using
3543 # the App Engine SDK might have a custom domain name.
3544 #
3545 # For more information, see
3546 # [How Requests are
3547 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3548 &quot;instance&quot;: &quot;A String&quot;, # App instance.
3549 #
3550 # By default, the task is sent to an instance which is available when
3551 # the task is attempted.
3552 #
3553 # Requests can only be sent to a specific instance if
3554 # [manual scaling is used in App Engine
3555 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3556 # App Engine Flex does not support instances. For more information, see
3557 # [App Engine Standard request
3558 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3559 # and [App Engine Flex request
3560 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003561 &quot;service&quot;: &quot;A String&quot;, # App service.
3562 #
3563 # By default, the task is sent to the service which is the default
3564 # service when the task is attempted.
3565 #
3566 # For some queues or tasks which were created using the App Engine
3567 # Task Queue API, host is not parsable
3568 # into service,
3569 # version, and
3570 # instance. For example, some tasks
3571 # which were created using the App Engine SDK use a custom domain
3572 # name; custom domains are not parsed by Cloud Tasks. If
3573 # host is not parsable, then
3574 # service,
3575 # version, and
3576 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003577 &quot;version&quot;: &quot;A String&quot;, # App version.
3578 #
3579 # By default, the task is sent to the version which is the default
3580 # version when the task is attempted.
3581 #
3582 # For some queues or tasks which were created using the App Engine
3583 # Task Queue API, host is not parsable
3584 # into service,
3585 # version, and
3586 # instance. For example, some tasks
3587 # which were created using the App Engine SDK use a custom domain
3588 # name; custom domains are not parsed by Cloud Tasks. If
3589 # host is not parsable, then
3590 # service,
3591 # version, and
3592 # instance are the empty string.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003593 },
3594 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003595 &quot;name&quot;: &quot;A String&quot;, # Caller-specified and required in CreateQueue,
3596 # after which it becomes output only.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003597 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003598 # The queue name.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003599 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003600 # The queue name must have the following format:
3601 # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003602 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003603 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3604 # hyphens (-), colons (:), or periods (.).
3605 # For more information, see
3606 # [Identifying
3607 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3608 # * `LOCATION_ID` is the canonical ID for the queue&#x27;s location.
3609 # The list of available locations can be obtained by calling
3610 # ListLocations.
3611 # For more information, see https://cloud.google.com/about/locations/.
3612 # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
3613 # hyphens (-). The maximum length is 100 characters.
3614 &quot;stackdriverLoggingConfig&quot;: { # Configuration options for writing logs to # Configuration options for writing logs to
3615 # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
3616 # field is unset, then no logs are written.
3617 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3618 &quot;samplingRatio&quot;: 3.14, # Specifies the fraction of operations to write to
3619 # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
3620 # This field may contain any value between 0.0 and 1.0, inclusive.
3621 # 0.0 is the default and means that no operations are logged.
3622 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003623 &quot;retryConfig&quot;: { # Retry config. # Settings that determine the retry behavior.
3624 #
3625 # * For tasks created using Cloud Tasks: the queue-level retry settings
3626 # apply to all tasks in the queue that were created using Cloud Tasks.
3627 # Retry settings cannot be set on individual tasks.
3628 # * For tasks created using the App Engine SDK: the queue-level retry
3629 # settings apply to all tasks in the queue which do not have retry settings
3630 # explicitly set on the task and were created by the App Engine SDK. See
3631 # [App Engine
3632 # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
3633 #
3634 # These settings determine when a failed task attempt is retried.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003635 &quot;maxBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3636 # min_backoff and
3637 # max_backoff duration after it fails,
3638 # if the queue&#x27;s RetryConfig specifies that the task should be
3639 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003640 #
3641 # If unspecified when the queue is created, Cloud Tasks will pick the
3642 # default.
3643 #
3644 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003645 # `max_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003646 #
3647 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003648 # [max_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003649 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003650 &quot;minBackoff&quot;: &quot;A String&quot;, # A task will be scheduled for retry between
3651 # min_backoff and
3652 # max_backoff duration after it fails,
3653 # if the queue&#x27;s RetryConfig specifies that the task should be
3654 # retried.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003655 #
3656 # If unspecified when the queue is created, Cloud Tasks will pick the
3657 # default.
3658 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003659 #
3660 # `min_backoff` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003661 #
3662 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003663 # [min_backoff_seconds in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003664 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3665 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
3666 #
3667 # A task&#x27;s retry interval starts at
3668 # min_backoff, then doubles
3669 # `max_doublings` times, then increases linearly, and finally
3670 # retries at intervals of
3671 # max_backoff up to
3672 # max_attempts times.
3673 #
3674 # For example, if min_backoff is 10s,
3675 # max_backoff is 300s, and
3676 # `max_doublings` is 3, then the a task will first be retried in
3677 # 10s. The retry interval will double three times, and then
3678 # increase linearly by 2^3 * 10s. Finally, the task will retry at
3679 # intervals of max_backoff until the
3680 # task has been attempted max_attempts
3681 # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
3682 # 240s, 300s, 300s, ....
3683 #
3684 # If unspecified when the queue is created, Cloud Tasks will pick the
3685 # default.
3686 #
3687 #
3688 # This field has the same meaning as
3689 # [max_doublings in
3690 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003691 &quot;maxAttempts&quot;: 42, # Number of attempts per task.
3692 #
3693 # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
3694 # first attempt fails, then there will be `max_attempts - 1` retries). Must
3695 # be &gt;= -1.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003696 #
3697 # If unspecified when the queue is created, Cloud Tasks will pick the
3698 # default.
3699 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003700 # -1 indicates unlimited attempts.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003701 #
3702 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003703 # [task_retry_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003704 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003705 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # If positive, `max_retry_duration` specifies the time limit for
3706 # retrying a failed task, measured from when the task was first
3707 # attempted. Once `max_retry_duration` time has passed *and* the
3708 # task has been attempted max_attempts
3709 # times, no further attempts will be made and the task will be
3710 # deleted.
3711 #
3712 # If zero, then the task age is unlimited.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003713 #
3714 # If unspecified when the queue is created, Cloud Tasks will pick the
3715 # default.
3716 #
3717 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003718 # `max_retry_duration` will be truncated to the nearest second.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003719 #
3720 # This field has the same meaning as
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003721 # [task_age_limit in
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003722 # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
3723 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003724 }</pre>
3725</div>
3726
3727<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07003728 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003729 <pre>Sets the access control policy for a Queue. Replaces any existing
3730policy.
3731
3732Note: The Cloud Console does not check queue-level IAM permissions yet.
3733Project-level permissions are required to use the Cloud Console.
3734
3735Authorization requires the following
3736[Google IAM](https://cloud.google.com/iam) permission on the specified
3737resource parent:
3738
3739* `cloudtasks.queues.setIamPolicy`
3740
3741Args:
3742 resource: string, REQUIRED: The resource for which the policy is being specified.
3743See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07003744 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003745 The object takes the form of:
3746
3747{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07003748 &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 -07003749 # the policy is limited to a few 10s of KB. An empty policy is a
3750 # valid policy but certain Cloud Platform services (such as Projects)
3751 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -07003752 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003753 #
3754 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003755 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
3756 # `members` to a single `role`. Members can be user accounts, service accounts,
3757 # Google groups, and domains (such as G Suite). A `role` is a named list of
3758 # permissions; each `role` can be an IAM predefined role or a user-created
3759 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003760 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003761 # For some types of Google Cloud resources, a `binding` can also specify a
3762 # `condition`, which is a logical expression that allows access to a resource
3763 # only if the expression evaluates to `true`. A condition can add constraints
3764 # based on attributes of the request, the resource, or both. To learn which
3765 # resources support conditions in their IAM policies, see the
3766 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07003767 #
3768 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003769 #
3770 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003771 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003772 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003773 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
3774 # &quot;members&quot;: [
3775 # &quot;user:mike@example.com&quot;,
3776 # &quot;group:admins@example.com&quot;,
3777 # &quot;domain:google.com&quot;,
3778 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003779 # ]
3780 # },
3781 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003782 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
3783 # &quot;members&quot;: [
3784 # &quot;user:eve@example.com&quot;
3785 # ],
3786 # &quot;condition&quot;: {
3787 # &quot;title&quot;: &quot;expirable access&quot;,
3788 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
3789 # &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 -07003790 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003791 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07003792 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003793 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
3794 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003795 # }
3796 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003797 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003798 #
3799 # bindings:
3800 # - members:
3801 # - user:mike@example.com
3802 # - group:admins@example.com
3803 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07003804 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
3805 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003806 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07003807 # - user:eve@example.com
3808 # role: roles/resourcemanager.organizationViewer
3809 # condition:
3810 # title: expirable access
3811 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07003812 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07003813 # - etag: BwWWja0YfJA=
3814 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003815 #
3816 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07003817 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07003818 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07003819 # `condition` that determines how and when the `bindings` are applied. Each
3820 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003821 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003822 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
3823 # `members` can have the following values:
3824 #
3825 # * `allUsers`: A special identifier that represents anyone who is
3826 # on the internet; with or without a Google account.
3827 #
3828 # * `allAuthenticatedUsers`: A special identifier that represents anyone
3829 # who is authenticated with a Google account or a service account.
3830 #
3831 # * `user:{emailid}`: An email address that represents a specific Google
3832 # account. For example, `alice@example.com` .
3833 #
3834 #
3835 # * `serviceAccount:{emailid}`: An email address that represents a service
3836 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
3837 #
3838 # * `group:{emailid}`: An email address that represents a Google group.
3839 # For example, `admins@example.com`.
3840 #
3841 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
3842 # identifier) representing a user that has been recently deleted. For
3843 # example, `alice@example.com?uid=123456789012345678901`. If the user is
3844 # recovered, this value reverts to `user:{emailid}` and the recovered user
3845 # retains the role in the binding.
3846 #
3847 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
3848 # unique identifier) representing a service account that has been recently
3849 # deleted. For example,
3850 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
3851 # If the service account is undeleted, this value reverts to
3852 # `serviceAccount:{emailid}` and the undeleted service account retains the
3853 # role in the binding.
3854 #
3855 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
3856 # identifier) representing a Google group that has been recently
3857 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
3858 # the group is recovered, this value reverts to `group:{emailid}` and the
3859 # recovered group retains the role in the binding.
3860 #
3861 #
3862 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
3863 # users of that domain. For example, `google.com` or `example.com`.
3864 #
3865 &quot;A String&quot;,
3866 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003867 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
3868 #
3869 # If the condition evaluates to `true`, then this binding applies to the
3870 # current request.
3871 #
3872 # If the condition evaluates to `false`, then this binding does not apply to
3873 # the current request. However, a different role binding might grant the same
3874 # role to one or more of the members in this binding.
3875 #
3876 # To learn which resources support conditions in their IAM policies, see the
3877 # [IAM
3878 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07003879 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
3880 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003881 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003882 # Example (Comparison):
3883 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003884 # title: &quot;Summary size limit&quot;
3885 # description: &quot;Determines if a summary is less than 100 chars&quot;
3886 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07003887 #
3888 # Example (Equality):
3889 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003890 # title: &quot;Requestor is owner&quot;
3891 # description: &quot;Determines if requestor is the document owner&quot;
3892 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07003893 #
3894 # Example (Logic):
3895 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003896 # title: &quot;Public documents&quot;
3897 # description: &quot;Determine whether the document should be publicly visible&quot;
3898 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07003899 #
3900 # Example (Data Manipulation):
3901 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003902 # title: &quot;Notification string&quot;
3903 # description: &quot;Create a notification string with a timestamp.&quot;
3904 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07003905 #
3906 # The exact variables and functions that may be referenced within an expression
3907 # are determined by the service that evaluates it. See the service
3908 # documentation for additional information.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003909 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
3910 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07003911 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
Dan O'Mearadd494642020-05-01 07:42:23 -07003912 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003913 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
3914 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07003915 &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 -07003916 # its purpose. This can be used e.g. in UIs which allow to enter the
3917 # expression.
3918 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003919 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
3920 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003921 },
3922 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07003923 &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 -07003924 # prevent simultaneous updates of a policy from overwriting each other.
3925 # It is strongly suggested that systems make use of the `etag` in the
3926 # read-modify-write cycle to perform policy updates in order to avoid race
3927 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
3928 # systems are expected to put that etag in the request to `setIamPolicy` to
3929 # ensure that their change will be applied to the same version of the policy.
3930 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003931 # **Important:** If you use IAM Conditions, you must include the `etag` field
3932 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3933 # you to overwrite a version `3` policy with a version `1` policy, and all of
3934 # the conditions in the version `3` policy are lost.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003935 &quot;version&quot;: 42, # Specifies the format of the policy.
3936 #
3937 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
3938 # are rejected.
3939 #
3940 # Any operation that affects conditional role bindings must specify version
3941 # `3`. This requirement applies to the following operations:
3942 #
3943 # * Getting a policy that includes a conditional role binding
3944 # * Adding a conditional role binding to a policy
3945 # * Changing a conditional role binding in a policy
3946 # * Removing any role binding, with or without a condition, from a policy
3947 # that includes conditions
3948 #
3949 # **Important:** If you use IAM Conditions, you must include the `etag` field
3950 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
3951 # you to overwrite a version `3` policy with a version `1` policy, and all of
3952 # the conditions in the version `3` policy are lost.
3953 #
3954 # If a policy does not include any conditions, operations on that policy may
3955 # specify any valid version or leave the field unset.
3956 #
3957 # To learn which resources support conditions in their IAM policies, see the
3958 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003959 },
3960 }
3961
3962 x__xgafv: string, V1 error format.
3963 Allowed values
3964 1 - v1 error format
3965 2 - v2 error format
3966
3967Returns:
3968 An object of the form:
3969
Dan O'Mearadd494642020-05-01 07:42:23 -07003970 { # An Identity and Access Management (IAM) policy, which specifies access
3971 # controls for Google Cloud resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003972 #
3973 #
Dan O'Mearadd494642020-05-01 07:42:23 -07003974 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
3975 # `members` to a single `role`. Members can be user accounts, service accounts,
3976 # Google groups, and domains (such as G Suite). A `role` is a named list of
3977 # permissions; each `role` can be an IAM predefined role or a user-created
3978 # custom role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003979 #
Bu Sun Kim65020912020-05-20 12:08:20 -07003980 # For some types of Google Cloud resources, a `binding` can also specify a
3981 # `condition`, which is a logical expression that allows access to a resource
3982 # only if the expression evaluates to `true`. A condition can add constraints
3983 # based on attributes of the request, the resource, or both. To learn which
3984 # resources support conditions in their IAM policies, see the
3985 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07003986 #
3987 # **JSON example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003988 #
3989 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003990 # &quot;bindings&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003991 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07003992 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
3993 # &quot;members&quot;: [
3994 # &quot;user:mike@example.com&quot;,
3995 # &quot;group:admins@example.com&quot;,
3996 # &quot;domain:google.com&quot;,
3997 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003998 # ]
3999 # },
4000 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07004001 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
4002 # &quot;members&quot;: [
4003 # &quot;user:eve@example.com&quot;
4004 # ],
4005 # &quot;condition&quot;: {
4006 # &quot;title&quot;: &quot;expirable access&quot;,
4007 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
4008 # &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 -07004009 # }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004010 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07004011 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004012 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
4013 # &quot;version&quot;: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004014 # }
4015 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004016 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004017 #
4018 # bindings:
4019 # - members:
4020 # - user:mike@example.com
4021 # - group:admins@example.com
4022 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07004023 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
4024 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004025 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07004026 # - user:eve@example.com
4027 # role: roles/resourcemanager.organizationViewer
4028 # condition:
4029 # title: expirable access
4030 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07004031 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07004032 # - etag: BwWWja0YfJA=
4033 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004034 #
4035 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07004036 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07004037 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07004038 # `condition` that determines how and when the `bindings` are applied. Each
4039 # of the `bindings` must contain at least one member.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004040 { # Associates `members` with a `role`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004041 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
4042 # `members` can have the following values:
4043 #
4044 # * `allUsers`: A special identifier that represents anyone who is
4045 # on the internet; with or without a Google account.
4046 #
4047 # * `allAuthenticatedUsers`: A special identifier that represents anyone
4048 # who is authenticated with a Google account or a service account.
4049 #
4050 # * `user:{emailid}`: An email address that represents a specific Google
4051 # account. For example, `alice@example.com` .
4052 #
4053 #
4054 # * `serviceAccount:{emailid}`: An email address that represents a service
4055 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
4056 #
4057 # * `group:{emailid}`: An email address that represents a Google group.
4058 # For example, `admins@example.com`.
4059 #
4060 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
4061 # identifier) representing a user that has been recently deleted. For
4062 # example, `alice@example.com?uid=123456789012345678901`. If the user is
4063 # recovered, this value reverts to `user:{emailid}` and the recovered user
4064 # retains the role in the binding.
4065 #
4066 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
4067 # unique identifier) representing a service account that has been recently
4068 # deleted. For example,
4069 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
4070 # If the service account is undeleted, this value reverts to
4071 # `serviceAccount:{emailid}` and the undeleted service account retains the
4072 # role in the binding.
4073 #
4074 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
4075 # identifier) representing a Google group that has been recently
4076 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
4077 # the group is recovered, this value reverts to `group:{emailid}` and the
4078 # recovered group retains the role in the binding.
4079 #
4080 #
4081 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
4082 # users of that domain. For example, `google.com` or `example.com`.
4083 #
4084 &quot;A String&quot;,
4085 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004086 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
4087 #
4088 # If the condition evaluates to `true`, then this binding applies to the
4089 # current request.
4090 #
4091 # If the condition evaluates to `false`, then this binding does not apply to
4092 # the current request. However, a different role binding might grant the same
4093 # role to one or more of the members in this binding.
4094 #
4095 # To learn which resources support conditions in their IAM policies, see the
4096 # [IAM
4097 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07004098 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
4099 # are documented at https://github.com/google/cel-spec.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004100 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004101 # Example (Comparison):
4102 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004103 # title: &quot;Summary size limit&quot;
4104 # description: &quot;Determines if a summary is less than 100 chars&quot;
4105 # expression: &quot;document.summary.size() &lt; 100&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004106 #
4107 # Example (Equality):
4108 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004109 # title: &quot;Requestor is owner&quot;
4110 # description: &quot;Determines if requestor is the document owner&quot;
4111 # expression: &quot;document.owner == request.auth.claims.email&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004112 #
4113 # Example (Logic):
4114 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004115 # title: &quot;Public documents&quot;
4116 # description: &quot;Determine whether the document should be publicly visible&quot;
4117 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004118 #
4119 # Example (Data Manipulation):
4120 #
Bu Sun Kim65020912020-05-20 12:08:20 -07004121 # title: &quot;Notification string&quot;
4122 # description: &quot;Create a notification string with a timestamp.&quot;
4123 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -07004124 #
4125 # The exact variables and functions that may be referenced within an expression
4126 # are determined by the service that evaluates it. See the service
4127 # documentation for additional information.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004128 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
4129 # reporting, e.g. a file name and a position in the file.
Bu Sun Kim65020912020-05-20 12:08:20 -07004130 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
Dan O'Mearadd494642020-05-01 07:42:23 -07004131 # syntax.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004132 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
4133 # describes the expression, e.g. when hovered over it in a UI.
Bu Sun Kim65020912020-05-20 12:08:20 -07004134 &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 -07004135 # its purpose. This can be used e.g. in UIs which allow to enter the
4136 # expression.
4137 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07004138 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
4139 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004140 },
4141 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07004142 &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 -07004143 # prevent simultaneous updates of a policy from overwriting each other.
4144 # It is strongly suggested that systems make use of the `etag` in the
4145 # read-modify-write cycle to perform policy updates in order to avoid race
4146 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
4147 # systems are expected to put that etag in the request to `setIamPolicy` to
4148 # ensure that their change will be applied to the same version of the policy.
4149 #
Dan O'Mearadd494642020-05-01 07:42:23 -07004150 # **Important:** If you use IAM Conditions, you must include the `etag` field
4151 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4152 # you to overwrite a version `3` policy with a version `1` policy, and all of
4153 # the conditions in the version `3` policy are lost.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07004154 &quot;version&quot;: 42, # Specifies the format of the policy.
4155 #
4156 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
4157 # are rejected.
4158 #
4159 # Any operation that affects conditional role bindings must specify version
4160 # `3`. This requirement applies to the following operations:
4161 #
4162 # * Getting a policy that includes a conditional role binding
4163 # * Adding a conditional role binding to a policy
4164 # * Changing a conditional role binding in a policy
4165 # * Removing any role binding, with or without a condition, from a policy
4166 # that includes conditions
4167 #
4168 # **Important:** If you use IAM Conditions, you must include the `etag` field
4169 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
4170 # you to overwrite a version `3` policy with a version `1` policy, and all of
4171 # the conditions in the version `3` policy are lost.
4172 #
4173 # If a policy does not include any conditions, operations on that policy may
4174 # specify any valid version or leave the field unset.
4175 #
4176 # To learn which resources support conditions in their IAM policies, see the
4177 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004178 }</pre>
4179</div>
4180
4181<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07004182 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004183 <pre>Returns permissions that a caller has on a Queue.
4184If the resource does not exist, this will return an empty set of
4185permissions, not a NOT_FOUND error.
4186
4187Note: This operation is designed to be used for building permission-aware
4188UIs and command-line tools, not for authorization checking. This operation
Bu Sun Kim65020912020-05-20 12:08:20 -07004189may &quot;fail open&quot; without warning.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004190
4191Args:
4192 resource: string, REQUIRED: The resource for which the policy detail is being requested.
4193See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07004194 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004195 The object takes the form of:
4196
4197{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07004198 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
4199 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004200 # information see
4201 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07004202 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004203 ],
4204 }
4205
4206 x__xgafv: string, V1 error format.
4207 Allowed values
4208 1 - v1 error format
4209 2 - v2 error format
4210
4211Returns:
4212 An object of the form:
4213
4214 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07004215 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004216 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07004217 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07004218 ],
4219 }</pre>
4220</div>
4221
4222</body></html>