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