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