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