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