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