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