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