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