| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1 | <html><body> | 
 | 2 | <style> | 
 | 3 |  | 
 | 4 | body, h1, h2, h3, div, span, p, pre, a { | 
 | 5 |   margin: 0; | 
 | 6 |   padding: 0; | 
 | 7 |   border: 0; | 
 | 8 |   font-weight: inherit; | 
 | 9 |   font-style: inherit; | 
 | 10 |   font-size: 100%; | 
 | 11 |   font-family: inherit; | 
 | 12 |   vertical-align: baseline; | 
 | 13 | } | 
 | 14 |  | 
 | 15 | body { | 
 | 16 |   font-size: 13px; | 
 | 17 |   padding: 1em; | 
 | 18 | } | 
 | 19 |  | 
 | 20 | h1 { | 
 | 21 |   font-size: 26px; | 
 | 22 |   margin-bottom: 1em; | 
 | 23 | } | 
 | 24 |  | 
 | 25 | h2 { | 
 | 26 |   font-size: 24px; | 
 | 27 |   margin-bottom: 1em; | 
 | 28 | } | 
 | 29 |  | 
 | 30 | h3 { | 
 | 31 |   font-size: 20px; | 
 | 32 |   margin-bottom: 1em; | 
 | 33 |   margin-top: 1em; | 
 | 34 | } | 
 | 35 |  | 
 | 36 | pre, code { | 
 | 37 |   line-height: 1.5; | 
 | 38 |   font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; | 
 | 39 | } | 
 | 40 |  | 
 | 41 | pre { | 
 | 42 |   margin-top: 0.5em; | 
 | 43 | } | 
 | 44 |  | 
 | 45 | h1, h2, h3, p { | 
 | 46 |   font-family: Arial, sans serif; | 
 | 47 | } | 
 | 48 |  | 
 | 49 | h1, h2, h3 { | 
 | 50 |   border-bottom: solid #CCC 1px; | 
 | 51 | } | 
 | 52 |  | 
 | 53 | .toc_element { | 
 | 54 |   margin-top: 0.5em; | 
 | 55 | } | 
 | 56 |  | 
 | 57 | .firstline { | 
 | 58 |   margin-left: 2 em; | 
 | 59 | } | 
 | 60 |  | 
 | 61 | .method  { | 
 | 62 |   margin-top: 1em; | 
 | 63 |   border: solid 1px #CCC; | 
 | 64 |   padding: 1em; | 
 | 65 |   background: #EEE; | 
 | 66 | } | 
 | 67 |  | 
 | 68 | .details { | 
 | 69 |   font-weight: bold; | 
 | 70 |   font-size: 14px; | 
 | 71 | } | 
 | 72 |  | 
 | 73 | </style> | 
 | 74 |  | 
 | 75 | <h1><a href="cloudtasks_v2beta2.html">Cloud Tasks API</a> . <a href="cloudtasks_v2beta2.projects.html">projects</a> . <a href="cloudtasks_v2beta2.projects.locations.html">locations</a> . <a href="cloudtasks_v2beta2.projects.locations.queues.html">queues</a> . <a href="cloudtasks_v2beta2.projects.locations.queues.tasks.html">tasks</a></h1> | 
 | 76 | <h2>Instance Methods</h2> | 
 | 77 | <p class="toc_element"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 78 |   <code><a href="#acknowledge">acknowledge(name, body=None, x__xgafv=None)</a></code></p> | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 79 | <p class="firstline">Acknowledges a pull task.</p> | 
 | 80 | <p class="toc_element"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 81 |   <code><a href="#cancelLease">cancelLease(name, body=None, x__xgafv=None)</a></code></p> | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 82 | <p class="firstline">Cancel a pull task's lease.</p> | 
 | 83 | <p class="toc_element"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 84 |   <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] | 85 | <p class="firstline">Creates a task and adds it to a queue.</p> | 
 | 86 | <p class="toc_element"> | 
 | 87 |   <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> | 
 | 88 | <p class="firstline">Deletes a task.</p> | 
 | 89 | <p class="toc_element"> | 
 | 90 |   <code><a href="#get">get(name, responseView=None, x__xgafv=None)</a></code></p> | 
 | 91 | <p class="firstline">Gets a task.</p> | 
 | 92 | <p class="toc_element"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 |   <code><a href="#lease">lease(parent, body=None, x__xgafv=None)</a></code></p> | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 94 | <p class="firstline">Leases tasks from a pull queue for</p> | 
 | 95 | <p class="toc_element"> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 96 |   <code><a href="#list">list(parent, responseView=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p> | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 97 | <p class="firstline">Lists the tasks in a queue.</p> | 
 | 98 | <p class="toc_element"> | 
 | 99 |   <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> | 
 | 100 | <p class="firstline">Retrieves the next page of results.</p> | 
 | 101 | <p class="toc_element"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 102 |   <code><a href="#renewLease">renewLease(name, body=None, x__xgafv=None)</a></code></p> | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 103 | <p class="firstline">Renew the current lease of a pull task.</p> | 
 | 104 | <p class="toc_element"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 105 |   <code><a href="#run">run(name, body=None, x__xgafv=None)</a></code></p> | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 106 | <p class="firstline">Forces a task to run now.</p> | 
 | 107 | <h3>Method Details</h3> | 
 | 108 | <div class="method"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 109 |     <code class="details" id="acknowledge">acknowledge(name, body=None, x__xgafv=None)</code> | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 110 |   <pre>Acknowledges a pull task. | 
 | 111 |  | 
 | 112 | The worker, that is, the entity that | 
 | 113 | leased this task must call this method | 
 | 114 | to indicate that the work associated with the task has finished. | 
 | 115 |  | 
 | 116 | The worker must acknowledge a task within the | 
 | 117 | lease_duration or the lease | 
 | 118 | will expire and the task will become available to be leased | 
 | 119 | again. After the task is acknowledged, it will not be returned | 
 | 120 | by a later LeaseTasks, | 
 | 121 | GetTask, or | 
 | 122 | ListTasks. | 
 | 123 |  | 
 | 124 | Args: | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 125 |   name: string, Required. The task name. For example: | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 126 | `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required) | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 127 |   body: object, The request body. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 128 |     The object takes the form of: | 
 | 129 |  | 
 | 130 | { # Request message for acknowledging a task using | 
 | 131 |       # AcknowledgeTask. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 132 |     "scheduleTime": "A String", # Required. The task's current schedule time, available in the | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 133 |         # schedule_time returned by | 
 | 134 |         # LeaseTasks response or | 
 | 135 |         # RenewLease response. This restriction is | 
 | 136 |         # to ensure that your worker currently holds the lease. | 
 | 137 |   } | 
 | 138 |  | 
 | 139 |   x__xgafv: string, V1 error format. | 
 | 140 |     Allowed values | 
 | 141 |       1 - v1 error format | 
 | 142 |       2 - v2 error format | 
 | 143 |  | 
 | 144 | Returns: | 
 | 145 |   An object of the form: | 
 | 146 |  | 
 | 147 |     { # A generic empty message that you can re-use to avoid defining duplicated | 
 | 148 |       # empty messages in your APIs. A typical example is to use it as the request | 
 | 149 |       # or the response type of an API method. For instance: | 
 | 150 |       # | 
 | 151 |       #     service Foo { | 
 | 152 |       #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); | 
 | 153 |       #     } | 
 | 154 |       # | 
 | 155 |       # The JSON representation for `Empty` is empty JSON object `{}`. | 
 | 156 |   }</pre> | 
 | 157 | </div> | 
 | 158 |  | 
 | 159 | <div class="method"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 160 |     <code class="details" id="cancelLease">cancelLease(name, body=None, x__xgafv=None)</code> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 161 |   <pre>Cancel a pull task's lease. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 162 |  | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 163 | The worker can use this method to cancel a task's lease by | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 164 | setting its schedule_time to now. This will | 
 | 165 | make the task available to be leased to the next caller of | 
 | 166 | LeaseTasks. | 
 | 167 |  | 
 | 168 | Args: | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 169 |   name: string, Required. The task name. For example: | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 170 | `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required) | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 171 |   body: object, The request body. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 172 |     The object takes the form of: | 
 | 173 |  | 
 | 174 | { # Request message for canceling a lease using | 
 | 175 |       # CancelLease. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 176 |     "responseView": "A String", # The response_view specifies which subset of the Task will be | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 177 |         # returned. | 
 | 178 |         #  | 
 | 179 |         # By default response_view is BASIC; not all | 
 | 180 |         # information is retrieved by default because some data, such as | 
 | 181 |         # payloads, might be desirable to return only when needed because | 
 | 182 |         # of its large size or because of the sensitivity of data that it | 
 | 183 |         # contains. | 
 | 184 |         #  | 
 | 185 |         # Authorization for FULL requires | 
 | 186 |         # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) | 
 | 187 |         # permission on the Task resource. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 188 |     "scheduleTime": "A String", # Required. The task's current schedule time, available in the | 
 | 189 |         # schedule_time returned by | 
 | 190 |         # LeaseTasks response or | 
 | 191 |         # RenewLease response. This restriction is | 
 | 192 |         # to ensure that your worker currently holds the lease. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 193 |   } | 
 | 194 |  | 
 | 195 |   x__xgafv: string, V1 error format. | 
 | 196 |     Allowed values | 
 | 197 |       1 - v1 error format | 
 | 198 |       2 - v2 error format | 
 | 199 |  | 
 | 200 | Returns: | 
 | 201 |   An object of the form: | 
 | 202 |  | 
 | 203 |     { # A unit of scheduled work. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 204 |     "appEngineHttpRequest": { # App Engine HTTP request. # App Engine HTTP request that is sent to the task's target. Can | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 205 |         # be set only if | 
 | 206 |         # app_engine_http_target is set | 
 | 207 |         # on the queue. | 
 | 208 |         # | 
 | 209 |         # An App Engine task is a task that has AppEngineHttpRequest set. | 
 | 210 |         # | 
 | 211 |         # The message defines the HTTP request that is sent to an App Engine app when | 
 | 212 |         # the task is dispatched. | 
 | 213 |         # | 
 | 214 |         # This proto can only be used for tasks in a queue which has | 
 | 215 |         # app_engine_http_target set. | 
 | 216 |         # | 
 | 217 |         # Using AppEngineHttpRequest requires | 
 | 218 |         # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) | 
 | 219 |         # Google IAM permission for the project | 
 | 220 |         # and the following scope: | 
 | 221 |         # | 
 | 222 |         # `https://www.googleapis.com/auth/cloud-platform` | 
 | 223 |         # | 
 | 224 |         # The task will be delivered to the App Engine app which belongs to the same | 
 | 225 |         # project as the queue. For more information, see | 
 | 226 |         # [How Requests are | 
 | 227 |         # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 228 |         # and how routing is affected by | 
 | 229 |         # [dispatch | 
 | 230 |         # files](https://cloud.google.com/appengine/docs/python/config/dispatchref). | 
 | 231 |         # Traffic is encrypted during transport and never leaves Google datacenters. | 
 | 232 |         # Because this traffic is carried over a communication mechanism internal to | 
 | 233 |         # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). | 
 | 234 |         # The request to the handler, however, will appear to have used the HTTP | 
 | 235 |         # protocol. | 
 | 236 |         # | 
 | 237 |         # The AppEngineRouting used to construct the URL that the task is | 
 | 238 |         # delivered to can be set at the queue-level or task-level: | 
 | 239 |         # | 
 | 240 |         # * If set, | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 241 |         #   app_engine_routing_override | 
 | 242 |         #   is used for all tasks in the queue, no matter what the setting | 
 | 243 |         #   is for the | 
 | 244 |         #   task-level app_engine_routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 245 |         # | 
 | 246 |         # | 
 | 247 |         # The `url` that the task will be sent to is: | 
 | 248 |         # | 
 | 249 |         # * `url =` host `+` | 
 | 250 |         #   relative_url | 
 | 251 |         # | 
 | 252 |         # Tasks can be dispatched to secure app handlers, unsecure app handlers, and | 
 | 253 |         # URIs restricted with | 
 | 254 |         # [`login: | 
 | 255 |         # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). | 
 | 256 |         # Because tasks are not run as any user, they cannot be dispatched to URIs | 
 | 257 |         # restricted with | 
 | 258 |         # [`login: | 
 | 259 |         # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) | 
 | 260 |         # Task dispatches also do not follow redirects. | 
 | 261 |         # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 262 |         # The task attempt has succeeded if the app's request handler returns an HTTP | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 263 |         # response code in the range [`200` - `299`]. The task attempt has failed if | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 264 |         # the app's handler returns a non-2xx response code or Cloud Tasks does | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 265 |         # not receive response before the deadline. Failed | 
 | 266 |         # tasks will be retried according to the | 
 | 267 |         # retry configuration. `503` (Service Unavailable) is | 
 | 268 |         # considered an App Engine system error instead of an application error and | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 269 |         # will cause Cloud Tasks' traffic congestion control to temporarily throttle | 
 | 270 |         # the queue's dispatches. Unlike other types of task targets, a `429` (Too Many | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 271 |         # Requests) response from an app handler does not cause traffic congestion | 
 | 272 |         # control to throttle the queue. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 273 |       "httpMethod": "A String", # The HTTP method to use for the request. The default is POST. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 274 |           # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 275 |           # The app's request handler for the task's target URL must be able to handle | 
 | 276 |           # HTTP requests with this http_method, otherwise the task attempt fails with | 
 | 277 |           # error code 405 (Method Not Allowed). See [Writing a push task request | 
 | 278 |           # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) | 
 | 279 |           # and the App Engine documentation for your runtime on [How Requests are | 
 | 280 |           # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). | 
 | 281 |       "payload": "A String", # Payload. | 
 | 282 |           # | 
 | 283 |           # The payload will be sent as the HTTP message body. A message | 
 | 284 |           # body, and thus a payload, is allowed only if the HTTP method is | 
 | 285 |           # POST or PUT. It is an error to set a data payload on a task with | 
 | 286 |           # an incompatible HttpMethod. | 
 | 287 |       "relativeUrl": "A String", # The relative URL. | 
 | 288 |           # | 
 | 289 |           # The relative URL must begin with "/" and must be a valid HTTP relative URL. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 290 |           # It can contain a path and query string arguments. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 291 |           # If the relative URL is empty, then the root path "/" will be used. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 292 |           # No spaces are allowed, and the maximum length allowed is 2083 characters. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 293 |       "headers": { # HTTP request headers. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 294 |           # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 295 |           # This map contains the header field names and values. | 
 | 296 |           # Headers can be set when the | 
 | 297 |           # task is created. | 
 | 298 |           # Repeated headers are not supported but a header value can contain commas. | 
 | 299 |           # | 
 | 300 |           # Cloud Tasks sets some headers to default values: | 
 | 301 |           # | 
 | 302 |           # * `User-Agent`: By default, this header is | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 303 |           #   `"AppEngine-Google; (+http://code.google.com/appengine)"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 304 |           #   This header can be modified, but Cloud Tasks will append | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 305 |           #   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 306 |           #   modified `User-Agent`. | 
 | 307 |           # | 
 | 308 |           # If the task has a payload, Cloud | 
 | 309 |           # Tasks sets the following headers: | 
 | 310 |           # | 
 | 311 |           # * `Content-Type`: By default, the `Content-Type` header is set to | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 312 |           #   `"application/octet-stream"`. The default can be overridden by explicitly | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 313 |           #   setting `Content-Type` to a particular media type when the | 
 | 314 |           #   task is created. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 315 |           #   For example, `Content-Type` can be set to `"application/json"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 316 |           # * `Content-Length`: This is computed by Cloud Tasks. This value is | 
 | 317 |           #   output only.   It cannot be changed. | 
 | 318 |           # | 
 | 319 |           # The headers below cannot be set or overridden: | 
 | 320 |           # | 
 | 321 |           # * `Host` | 
 | 322 |           # * `X-Google-*` | 
 | 323 |           # * `X-AppEngine-*` | 
 | 324 |           # | 
 | 325 |           # In addition, Cloud Tasks sets some headers when the task is dispatched, | 
 | 326 |           # such as headers containing information about the task; see | 
 | 327 |           # [request | 
 | 328 |           # headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). | 
 | 329 |           # These headers are set only when the task is dispatched, so they are not | 
 | 330 |           # visible when the task is returned in a Cloud Tasks response. | 
 | 331 |           # | 
 | 332 |           # Although there is no specific limit for the maximum number of headers or | 
 | 333 |           # the size, there is a limit on the maximum size of the Task. For more | 
 | 334 |           # information, see the CreateTask documentation. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 335 |         "a_key": "A String", | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 336 |       }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 337 |       "appEngineRouting": { # App Engine Routing. # Task-level setting for App Engine routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 338 |           # | 
 | 339 |           # If set, | 
 | 340 |           # app_engine_routing_override | 
 | 341 |           # is used for all tasks in the queue, no matter what the setting is for the | 
 | 342 |           # task-level app_engine_routing. | 
 | 343 |           # | 
 | 344 |           # Defines routing characteristics specific to App Engine - service, version, | 
 | 345 |           # and instance. | 
 | 346 |           # | 
 | 347 |           # For more information about services, versions, and instances see | 
 | 348 |           # [An Overview of App | 
 | 349 |           # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), | 
 | 350 |           # [Microservices Architecture on Google App | 
 | 351 |           # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), | 
 | 352 |           # [App Engine Standard request | 
 | 353 |           # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), | 
 | 354 |           # and [App Engine Flex request | 
 | 355 |           # 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^] | 356 |         "instance": "A String", # App instance. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 357 |             # | 
 | 358 |             # By default, the task is sent to an instance which is available when | 
 | 359 |             # the task is attempted. | 
 | 360 |             # | 
 | 361 |             # Requests can only be sent to a specific instance if | 
 | 362 |             # [manual scaling is used in App Engine | 
 | 363 |             # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). | 
 | 364 |             # App Engine Flex does not support instances. For more information, see | 
 | 365 |             # [App Engine Standard request | 
 | 366 |             # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 367 |             # and [App Engine Flex request | 
 | 368 |             # 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^] | 369 |         "version": "A String", # App version. | 
 | 370 |             # | 
 | 371 |             # By default, the task is sent to the version which is the default | 
 | 372 |             # version when the task is attempted. | 
 | 373 |             # | 
 | 374 |             # For some queues or tasks which were created using the App Engine | 
 | 375 |             # Task Queue API, host is not parsable | 
 | 376 |             # into service, | 
 | 377 |             # version, and | 
 | 378 |             # instance. For example, some tasks | 
 | 379 |             # which were created using the App Engine SDK use a custom domain | 
 | 380 |             # name; custom domains are not parsed by Cloud Tasks. If | 
 | 381 |             # host is not parsable, then | 
 | 382 |             # service, | 
 | 383 |             # version, and | 
 | 384 |             # instance are the empty string. | 
 | 385 |         "host": "A String", # Output only. The host that the task is sent to. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 386 |             # | 
 | 387 |             # For more information, see | 
 | 388 |             # [How Requests are | 
 | 389 |             # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). | 
 | 390 |             # | 
 | 391 |             # The host is constructed as: | 
 | 392 |             # | 
 | 393 |             # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 394 |             # * `host = [application_domain_name]`</br> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 395 |             #   `| [service] + '.' + [application_domain_name]`</br> | 
 | 396 |             #   `| [version] + '.' + [application_domain_name]`</br> | 
 | 397 |             #   `| [version_dot_service]+ '.' + [application_domain_name]`</br> | 
 | 398 |             #   `| [instance] + '.' + [application_domain_name]`</br> | 
 | 399 |             #   `| [instance_dot_service] + '.' + [application_domain_name]`</br> | 
 | 400 |             #   `| [instance_dot_version] + '.' + [application_domain_name]`</br> | 
 | 401 |             #   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 402 |             # | 
 | 403 |             # * `application_domain_name` = The domain name of the app, for | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 404 |             #   example <app-id>.appspot.com, which is associated with the | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 405 |             #   queue's project ID. Some tasks which were created using the App Engine | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 406 |             #   SDK use a custom domain name. | 
 | 407 |             # | 
 | 408 |             # * `service =` service | 
 | 409 |             # | 
 | 410 |             # * `version =` version | 
 | 411 |             # | 
 | 412 |             # * `version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 413 |             #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 414 |             #   service | 
 | 415 |             # | 
 | 416 |             # * `instance =` instance | 
 | 417 |             # | 
 | 418 |             # * `instance_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 419 |             #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 420 |             #   service | 
 | 421 |             # | 
 | 422 |             # * `instance_dot_version =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 423 |             #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 424 |             #   version | 
 | 425 |             # | 
 | 426 |             # * `instance_dot_version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 427 |             #   instance `+ '.' +` | 
 | 428 |             #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 429 |             #   service | 
 | 430 |             # | 
 | 431 |             # If service is empty, then the task will be sent | 
 | 432 |             # to the service which is the default service when the task is attempted. | 
 | 433 |             # | 
 | 434 |             # If version is empty, then the task will be sent | 
 | 435 |             # to the version which is the default version when the task is attempted. | 
 | 436 |             # | 
 | 437 |             # If instance is empty, then the task | 
 | 438 |             # will be sent to an instance which is available when the task is | 
 | 439 |             # attempted. | 
 | 440 |             # | 
 | 441 |             # If service, | 
 | 442 |             # version, or | 
 | 443 |             # instance is invalid, then the task | 
 | 444 |             # will be sent to the default version of the default service when | 
 | 445 |             # the task is attempted. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 446 |         "service": "A String", # App service. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 447 |             # | 
 | 448 |             # By default, the task is sent to the service which is the default | 
 | 449 |             # service when the task is attempted. | 
 | 450 |             # | 
 | 451 |             # For some queues or tasks which were created using the App Engine | 
 | 452 |             # Task Queue API, host is not parsable | 
 | 453 |             # into service, | 
 | 454 |             # version, and | 
 | 455 |             # instance. For example, some tasks | 
 | 456 |             # which were created using the App Engine SDK use a custom domain | 
 | 457 |             # name; custom domains are not parsed by Cloud Tasks. If | 
 | 458 |             # host is not parsable, then | 
 | 459 |             # service, | 
 | 460 |             # version, and | 
 | 461 |             # instance are the empty string. | 
 | 462 |       }, | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 463 |     }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 464 |     "view": "A String", # Output only. The view specifies which subset of the Task has | 
 | 465 |         # been returned. | 
 | 466 |     "pullMessage": { # The pull message contains data that can be used by the caller of # LeaseTasks to process the task. Can be | 
 | 467 |         # set only if pull_target is set on the queue. | 
 | 468 |         # | 
 | 469 |         # A pull task is a task that has PullMessage set. | 
 | 470 |         # LeaseTasks to process the task. | 
 | 471 |         # | 
 | 472 |         # This proto can only be used for tasks in a queue which has | 
 | 473 |         # pull_target set. | 
 | 474 |       "payload": "A String", # A data payload consumed by the worker to execute the task. | 
 | 475 |       "tag": "A String", # The task's tag. | 
 | 476 |           # | 
 | 477 |           # Tags allow similar tasks to be processed in a batch. If you label | 
 | 478 |           # tasks with a tag, your worker can | 
 | 479 |           # lease tasks with the same tag using | 
 | 480 |           # filter. For example, if you want to | 
 | 481 |           # aggregate the events associated with a specific user once a day, | 
 | 482 |           # you could tag tasks with the user ID. | 
 | 483 |           # | 
 | 484 |           # The task's tag can only be set when the | 
 | 485 |           # task is created. | 
 | 486 |           # | 
 | 487 |           # The tag must be less than 500 characters. | 
 | 488 |           # | 
 | 489 |           # SDK compatibility: Although the SDK allows tags to be either | 
 | 490 |           # string or | 
 | 491 |           # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), | 
 | 492 |           # only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 | 
 | 493 |           # encoded, the tag will be empty when the task is returned by Cloud Tasks. | 
 | 494 |     }, | 
 | 495 |     "scheduleTime": "A String", # The time when the task is scheduled to be attempted. | 
 | 496 |         # | 
 | 497 |         # For App Engine queues, this is when the task will be attempted or retried. | 
 | 498 |         # | 
 | 499 |         # For pull queues, this is the time when the task is available to | 
 | 500 |         # be leased; if a task is currently leased, this is the time when | 
 | 501 |         # the current lease expires, that is, the time that the task was | 
 | 502 |         # leased plus the lease_duration. | 
 | 503 |         # | 
 | 504 |         # `schedule_time` will be truncated to the nearest microsecond. | 
 | 505 |     "createTime": "A String", # Output only. The time that the task was created. | 
 | 506 |         # | 
 | 507 |         # `create_time` will be truncated to the nearest second. | 
 | 508 |     "status": { # Status of the task. # Output only. The task status. | 
 | 509 |       "attemptDispatchCount": 42, # Output only. The number of attempts dispatched. | 
 | 510 |           # | 
 | 511 |           # This count includes attempts which have been dispatched but haven't | 
 | 512 |           # received a response. | 
 | 513 |       "firstAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's first attempt. | 
 | 514 |           # | 
 | 515 |           # Only dispatch_time will be set. | 
 | 516 |           # The other AttemptStatus information is not retained by Cloud Tasks. | 
 | 517 |           # | 
 | 518 |           # This field is not calculated for pull tasks. | 
 | 519 |         "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 520 |             # | 
 | 521 |             # `response_time` will be truncated to the nearest microsecond. | 
 | 522 |         "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 523 |             # | 
 | 524 |             # If the task has not been attempted or the task is currently running | 
 | 525 |             # then the response status is unset. | 
 | 526 |             # different programming environments, including REST APIs and RPC APIs. It is | 
 | 527 |             # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 528 |             # three pieces of data: error code, error message, and error details. | 
 | 529 |             # | 
 | 530 |             # You can find out more about this error model and how to work with it in the | 
 | 531 |             # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 532 |           "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 533 |               # message types for APIs to use. | 
 | 534 |             { | 
 | 535 |               "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 536 |             }, | 
 | 537 |           ], | 
 | 538 |           "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 539 |           "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 540 |               # user-facing error message should be localized and sent in the | 
 | 541 |               # google.rpc.Status.details field, or localized by the client. | 
 | 542 |         }, | 
 | 543 |         "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 544 |             # | 
 | 545 |             # `schedule_time` will be truncated to the nearest microsecond. | 
 | 546 |         "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 547 |             # | 
 | 548 |             # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 549 |       }, | 
 | 550 |       "attemptResponseCount": 42, # Output only. The number of attempts which have received a response. | 
 | 551 |           # | 
 | 552 |           # This field is not calculated for pull tasks. | 
 | 553 |       "lastAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's last attempt. | 
 | 554 |           # | 
 | 555 |           # This field is not calculated for pull tasks. | 
 | 556 |         "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 557 |             # | 
 | 558 |             # `response_time` will be truncated to the nearest microsecond. | 
 | 559 |         "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 560 |             # | 
 | 561 |             # If the task has not been attempted or the task is currently running | 
 | 562 |             # then the response status is unset. | 
 | 563 |             # different programming environments, including REST APIs and RPC APIs. It is | 
 | 564 |             # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 565 |             # three pieces of data: error code, error message, and error details. | 
 | 566 |             # | 
 | 567 |             # You can find out more about this error model and how to work with it in the | 
 | 568 |             # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 569 |           "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 570 |               # message types for APIs to use. | 
 | 571 |             { | 
 | 572 |               "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 573 |             }, | 
 | 574 |           ], | 
 | 575 |           "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 576 |           "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 577 |               # user-facing error message should be localized and sent in the | 
 | 578 |               # google.rpc.Status.details field, or localized by the client. | 
 | 579 |         }, | 
 | 580 |         "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 581 |             # | 
 | 582 |             # `schedule_time` will be truncated to the nearest microsecond. | 
 | 583 |         "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 584 |             # | 
 | 585 |             # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 586 |       }, | 
 | 587 |     }, | 
 | 588 |     "name": "A String", # Optionally caller-specified in CreateTask. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 589 |         # | 
 | 590 |         # The task name. | 
 | 591 |         # | 
 | 592 |         # The task name must have the following format: | 
 | 593 |         # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` | 
 | 594 |         # | 
 | 595 |         # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), | 
 | 596 |         #    hyphens (-), colons (:), or periods (.). | 
 | 597 |         #    For more information, see | 
 | 598 |         #    [Identifying | 
 | 599 |         #    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^] | 600 |         # * `LOCATION_ID` is the canonical ID for the task's location. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 601 |         #    The list of available locations can be obtained by calling | 
 | 602 |         #    ListLocations. | 
 | 603 |         #    For more information, see https://cloud.google.com/about/locations/. | 
 | 604 |         # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or | 
 | 605 |         #   hyphens (-). The maximum length is 100 characters. | 
 | 606 |         # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), | 
 | 607 |         #   hyphens (-), or underscores (_). The maximum length is 500 characters. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 608 |   }</pre> | 
 | 609 | </div> | 
 | 610 |  | 
 | 611 | <div class="method"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 612 |     <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] | 613 |   <pre>Creates a task and adds it to a queue. | 
 | 614 |  | 
 | 615 | Tasks cannot be updated after creation; there is no UpdateTask command. | 
 | 616 |  | 
 | 617 | * For App Engine queues, the maximum task size is | 
 | 618 |   100KB. | 
 | 619 | * For pull queues, the maximum task size is 1MB. | 
 | 620 |  | 
 | 621 | Args: | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 622 |   parent: string, Required. The queue name. For example: | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 623 | `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` | 
 | 624 |  | 
 | 625 | The queue must already exist. (required) | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 626 |   body: object, The request body. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 627 |     The object takes the form of: | 
 | 628 |  | 
 | 629 | { # Request message for CreateTask. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 630 |     "task": { # A unit of scheduled work. # Required. The task to add. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 631 |         #  | 
 | 632 |         # Task names have the following format: | 
 | 633 |         # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. | 
 | 634 |         # The user can optionally specify a task name. If a | 
 | 635 |         # name is not specified then the system will generate a random | 
 | 636 |         # unique task id, which will be set in the task returned in the | 
 | 637 |         # response. | 
 | 638 |         #  | 
 | 639 |         # If schedule_time is not set or is in the | 
 | 640 |         # past then Cloud Tasks will set it to the current time. | 
 | 641 |         #  | 
 | 642 |         # Task De-duplication: | 
 | 643 |         #  | 
 | 644 |         # Explicitly specifying a task ID enables task de-duplication.  If | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 645 |         # a task's ID is identical to that of an existing task or a task | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 646 |         # that was deleted or completed recently then the call will fail | 
 | 647 |         # with ALREADY_EXISTS. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 648 |         # If the task's queue was created using Cloud Tasks, then another task with | 
 | 649 |         # the same name can't be created for ~1hour after the original task was | 
 | 650 |         # deleted or completed. If the task's queue was created using queue.yaml or | 
 | 651 |         # queue.xml, then another task with the same name can't be created | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 652 |         # for ~9days after the original task was deleted or completed. | 
 | 653 |         #  | 
 | 654 |         # Because there is an extra lookup cost to identify duplicate task | 
 | 655 |         # names, these CreateTask calls have significantly | 
 | 656 |         # increased latency. Using hashed strings for the task id or for | 
 | 657 |         # the prefix of the task id is recommended. Choosing task ids that | 
 | 658 |         # are sequential or have sequential prefixes, for example using a | 
 | 659 |         # timestamp, causes an increase in latency and error rates in all | 
 | 660 |         # task commands. The infrastructure relies on an approximately | 
 | 661 |         # uniform distribution of task ids to store and serve tasks | 
 | 662 |         # efficiently. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 663 |       "appEngineHttpRequest": { # App Engine HTTP request. # App Engine HTTP request that is sent to the task's target. Can | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 664 |           # be set only if | 
 | 665 |           # app_engine_http_target is set | 
 | 666 |           # on the queue. | 
 | 667 |           # | 
 | 668 |           # An App Engine task is a task that has AppEngineHttpRequest set. | 
 | 669 |           # | 
 | 670 |           # The message defines the HTTP request that is sent to an App Engine app when | 
 | 671 |           # the task is dispatched. | 
 | 672 |           # | 
 | 673 |           # This proto can only be used for tasks in a queue which has | 
 | 674 |           # app_engine_http_target set. | 
 | 675 |           # | 
 | 676 |           # Using AppEngineHttpRequest requires | 
 | 677 |           # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) | 
 | 678 |           # Google IAM permission for the project | 
 | 679 |           # and the following scope: | 
 | 680 |           # | 
 | 681 |           # `https://www.googleapis.com/auth/cloud-platform` | 
 | 682 |           # | 
 | 683 |           # The task will be delivered to the App Engine app which belongs to the same | 
 | 684 |           # project as the queue. For more information, see | 
 | 685 |           # [How Requests are | 
 | 686 |           # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 687 |           # and how routing is affected by | 
 | 688 |           # [dispatch | 
 | 689 |           # files](https://cloud.google.com/appengine/docs/python/config/dispatchref). | 
 | 690 |           # Traffic is encrypted during transport and never leaves Google datacenters. | 
 | 691 |           # Because this traffic is carried over a communication mechanism internal to | 
 | 692 |           # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). | 
 | 693 |           # The request to the handler, however, will appear to have used the HTTP | 
 | 694 |           # protocol. | 
 | 695 |           # | 
 | 696 |           # The AppEngineRouting used to construct the URL that the task is | 
 | 697 |           # delivered to can be set at the queue-level or task-level: | 
 | 698 |           # | 
 | 699 |           # * If set, | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 700 |           #   app_engine_routing_override | 
 | 701 |           #   is used for all tasks in the queue, no matter what the setting | 
 | 702 |           #   is for the | 
 | 703 |           #   task-level app_engine_routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 704 |           # | 
 | 705 |           # | 
 | 706 |           # The `url` that the task will be sent to is: | 
 | 707 |           # | 
 | 708 |           # * `url =` host `+` | 
 | 709 |           #   relative_url | 
 | 710 |           # | 
 | 711 |           # Tasks can be dispatched to secure app handlers, unsecure app handlers, and | 
 | 712 |           # URIs restricted with | 
 | 713 |           # [`login: | 
 | 714 |           # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). | 
 | 715 |           # Because tasks are not run as any user, they cannot be dispatched to URIs | 
 | 716 |           # restricted with | 
 | 717 |           # [`login: | 
 | 718 |           # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) | 
 | 719 |           # Task dispatches also do not follow redirects. | 
 | 720 |           # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 721 |           # The task attempt has succeeded if the app's request handler returns an HTTP | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 722 |           # response code in the range [`200` - `299`]. The task attempt has failed if | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 723 |           # the app's handler returns a non-2xx response code or Cloud Tasks does | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 724 |           # not receive response before the deadline. Failed | 
 | 725 |           # tasks will be retried according to the | 
 | 726 |           # retry configuration. `503` (Service Unavailable) is | 
 | 727 |           # considered an App Engine system error instead of an application error and | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 728 |           # will cause Cloud Tasks' traffic congestion control to temporarily throttle | 
 | 729 |           # the queue's dispatches. Unlike other types of task targets, a `429` (Too Many | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 730 |           # Requests) response from an app handler does not cause traffic congestion | 
 | 731 |           # control to throttle the queue. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 732 |         "httpMethod": "A String", # The HTTP method to use for the request. The default is POST. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 733 |             # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 734 |             # The app's request handler for the task's target URL must be able to handle | 
 | 735 |             # HTTP requests with this http_method, otherwise the task attempt fails with | 
 | 736 |             # error code 405 (Method Not Allowed). See [Writing a push task request | 
 | 737 |             # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) | 
 | 738 |             # and the App Engine documentation for your runtime on [How Requests are | 
 | 739 |             # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). | 
 | 740 |         "payload": "A String", # Payload. | 
 | 741 |             # | 
 | 742 |             # The payload will be sent as the HTTP message body. A message | 
 | 743 |             # body, and thus a payload, is allowed only if the HTTP method is | 
 | 744 |             # POST or PUT. It is an error to set a data payload on a task with | 
 | 745 |             # an incompatible HttpMethod. | 
 | 746 |         "relativeUrl": "A String", # The relative URL. | 
 | 747 |             # | 
 | 748 |             # The relative URL must begin with "/" and must be a valid HTTP relative URL. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 749 |             # It can contain a path and query string arguments. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 750 |             # If the relative URL is empty, then the root path "/" will be used. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 751 |             # No spaces are allowed, and the maximum length allowed is 2083 characters. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 752 |         "headers": { # HTTP request headers. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 753 |             # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 754 |             # This map contains the header field names and values. | 
 | 755 |             # Headers can be set when the | 
 | 756 |             # task is created. | 
 | 757 |             # Repeated headers are not supported but a header value can contain commas. | 
 | 758 |             # | 
 | 759 |             # Cloud Tasks sets some headers to default values: | 
 | 760 |             # | 
 | 761 |             # * `User-Agent`: By default, this header is | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 762 |             #   `"AppEngine-Google; (+http://code.google.com/appengine)"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 763 |             #   This header can be modified, but Cloud Tasks will append | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 764 |             #   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 765 |             #   modified `User-Agent`. | 
 | 766 |             # | 
 | 767 |             # If the task has a payload, Cloud | 
 | 768 |             # Tasks sets the following headers: | 
 | 769 |             # | 
 | 770 |             # * `Content-Type`: By default, the `Content-Type` header is set to | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 771 |             #   `"application/octet-stream"`. The default can be overridden by explicitly | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 772 |             #   setting `Content-Type` to a particular media type when the | 
 | 773 |             #   task is created. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 774 |             #   For example, `Content-Type` can be set to `"application/json"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 775 |             # * `Content-Length`: This is computed by Cloud Tasks. This value is | 
 | 776 |             #   output only.   It cannot be changed. | 
 | 777 |             # | 
 | 778 |             # The headers below cannot be set or overridden: | 
 | 779 |             # | 
 | 780 |             # * `Host` | 
 | 781 |             # * `X-Google-*` | 
 | 782 |             # * `X-AppEngine-*` | 
 | 783 |             # | 
 | 784 |             # In addition, Cloud Tasks sets some headers when the task is dispatched, | 
 | 785 |             # such as headers containing information about the task; see | 
 | 786 |             # [request | 
 | 787 |             # headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). | 
 | 788 |             # These headers are set only when the task is dispatched, so they are not | 
 | 789 |             # visible when the task is returned in a Cloud Tasks response. | 
 | 790 |             # | 
 | 791 |             # Although there is no specific limit for the maximum number of headers or | 
 | 792 |             # the size, there is a limit on the maximum size of the Task. For more | 
 | 793 |             # information, see the CreateTask documentation. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 794 |           "a_key": "A String", | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 795 |         }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 796 |         "appEngineRouting": { # App Engine Routing. # Task-level setting for App Engine routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 797 |             # | 
 | 798 |             # If set, | 
 | 799 |             # app_engine_routing_override | 
 | 800 |             # is used for all tasks in the queue, no matter what the setting is for the | 
 | 801 |             # task-level app_engine_routing. | 
 | 802 |             # | 
 | 803 |             # Defines routing characteristics specific to App Engine - service, version, | 
 | 804 |             # and instance. | 
 | 805 |             # | 
 | 806 |             # For more information about services, versions, and instances see | 
 | 807 |             # [An Overview of App | 
 | 808 |             # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), | 
 | 809 |             # [Microservices Architecture on Google App | 
 | 810 |             # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), | 
 | 811 |             # [App Engine Standard request | 
 | 812 |             # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), | 
 | 813 |             # and [App Engine Flex request | 
 | 814 |             # 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^] | 815 |           "instance": "A String", # App instance. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 816 |               # | 
 | 817 |               # By default, the task is sent to an instance which is available when | 
 | 818 |               # the task is attempted. | 
 | 819 |               # | 
 | 820 |               # Requests can only be sent to a specific instance if | 
 | 821 |               # [manual scaling is used in App Engine | 
 | 822 |               # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). | 
 | 823 |               # App Engine Flex does not support instances. For more information, see | 
 | 824 |               # [App Engine Standard request | 
 | 825 |               # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 826 |               # and [App Engine Flex request | 
 | 827 |               # 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^] | 828 |           "version": "A String", # App version. | 
 | 829 |               # | 
 | 830 |               # By default, the task is sent to the version which is the default | 
 | 831 |               # version when the task is attempted. | 
 | 832 |               # | 
 | 833 |               # For some queues or tasks which were created using the App Engine | 
 | 834 |               # Task Queue API, host is not parsable | 
 | 835 |               # into service, | 
 | 836 |               # version, and | 
 | 837 |               # instance. For example, some tasks | 
 | 838 |               # which were created using the App Engine SDK use a custom domain | 
 | 839 |               # name; custom domains are not parsed by Cloud Tasks. If | 
 | 840 |               # host is not parsable, then | 
 | 841 |               # service, | 
 | 842 |               # version, and | 
 | 843 |               # instance are the empty string. | 
 | 844 |           "host": "A String", # Output only. The host that the task is sent to. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 845 |               # | 
 | 846 |               # For more information, see | 
 | 847 |               # [How Requests are | 
 | 848 |               # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). | 
 | 849 |               # | 
 | 850 |               # The host is constructed as: | 
 | 851 |               # | 
 | 852 |               # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 853 |               # * `host = [application_domain_name]`</br> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 854 |               #   `| [service] + '.' + [application_domain_name]`</br> | 
 | 855 |               #   `| [version] + '.' + [application_domain_name]`</br> | 
 | 856 |               #   `| [version_dot_service]+ '.' + [application_domain_name]`</br> | 
 | 857 |               #   `| [instance] + '.' + [application_domain_name]`</br> | 
 | 858 |               #   `| [instance_dot_service] + '.' + [application_domain_name]`</br> | 
 | 859 |               #   `| [instance_dot_version] + '.' + [application_domain_name]`</br> | 
 | 860 |               #   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 861 |               # | 
 | 862 |               # * `application_domain_name` = The domain name of the app, for | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 863 |               #   example <app-id>.appspot.com, which is associated with the | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 864 |               #   queue's project ID. Some tasks which were created using the App Engine | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 865 |               #   SDK use a custom domain name. | 
 | 866 |               # | 
 | 867 |               # * `service =` service | 
 | 868 |               # | 
 | 869 |               # * `version =` version | 
 | 870 |               # | 
 | 871 |               # * `version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 872 |               #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 873 |               #   service | 
 | 874 |               # | 
 | 875 |               # * `instance =` instance | 
 | 876 |               # | 
 | 877 |               # * `instance_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 878 |               #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 879 |               #   service | 
 | 880 |               # | 
 | 881 |               # * `instance_dot_version =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 882 |               #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 883 |               #   version | 
 | 884 |               # | 
 | 885 |               # * `instance_dot_version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 886 |               #   instance `+ '.' +` | 
 | 887 |               #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 888 |               #   service | 
 | 889 |               # | 
 | 890 |               # If service is empty, then the task will be sent | 
 | 891 |               # to the service which is the default service when the task is attempted. | 
 | 892 |               # | 
 | 893 |               # If version is empty, then the task will be sent | 
 | 894 |               # to the version which is the default version when the task is attempted. | 
 | 895 |               # | 
 | 896 |               # If instance is empty, then the task | 
 | 897 |               # will be sent to an instance which is available when the task is | 
 | 898 |               # attempted. | 
 | 899 |               # | 
 | 900 |               # If service, | 
 | 901 |               # version, or | 
 | 902 |               # instance is invalid, then the task | 
 | 903 |               # will be sent to the default version of the default service when | 
 | 904 |               # the task is attempted. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 905 |           "service": "A String", # App service. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 906 |               # | 
 | 907 |               # By default, the task is sent to the service which is the default | 
 | 908 |               # service when the task is attempted. | 
 | 909 |               # | 
 | 910 |               # For some queues or tasks which were created using the App Engine | 
 | 911 |               # Task Queue API, host is not parsable | 
 | 912 |               # into service, | 
 | 913 |               # version, and | 
 | 914 |               # instance. For example, some tasks | 
 | 915 |               # which were created using the App Engine SDK use a custom domain | 
 | 916 |               # name; custom domains are not parsed by Cloud Tasks. If | 
 | 917 |               # host is not parsable, then | 
 | 918 |               # service, | 
 | 919 |               # version, and | 
 | 920 |               # instance are the empty string. | 
 | 921 |         }, | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 922 |       }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 923 |       "view": "A String", # Output only. The view specifies which subset of the Task has | 
 | 924 |           # been returned. | 
 | 925 |       "pullMessage": { # The pull message contains data that can be used by the caller of # LeaseTasks to process the task. Can be | 
 | 926 |           # set only if pull_target is set on the queue. | 
 | 927 |           # | 
 | 928 |           # A pull task is a task that has PullMessage set. | 
 | 929 |           # LeaseTasks to process the task. | 
 | 930 |           # | 
 | 931 |           # This proto can only be used for tasks in a queue which has | 
 | 932 |           # pull_target set. | 
 | 933 |         "payload": "A String", # A data payload consumed by the worker to execute the task. | 
 | 934 |         "tag": "A String", # The task's tag. | 
 | 935 |             # | 
 | 936 |             # Tags allow similar tasks to be processed in a batch. If you label | 
 | 937 |             # tasks with a tag, your worker can | 
 | 938 |             # lease tasks with the same tag using | 
 | 939 |             # filter. For example, if you want to | 
 | 940 |             # aggregate the events associated with a specific user once a day, | 
 | 941 |             # you could tag tasks with the user ID. | 
 | 942 |             # | 
 | 943 |             # The task's tag can only be set when the | 
 | 944 |             # task is created. | 
 | 945 |             # | 
 | 946 |             # The tag must be less than 500 characters. | 
 | 947 |             # | 
 | 948 |             # SDK compatibility: Although the SDK allows tags to be either | 
 | 949 |             # string or | 
 | 950 |             # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), | 
 | 951 |             # only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 | 
 | 952 |             # encoded, the tag will be empty when the task is returned by Cloud Tasks. | 
 | 953 |       }, | 
 | 954 |       "scheduleTime": "A String", # The time when the task is scheduled to be attempted. | 
 | 955 |           # | 
 | 956 |           # For App Engine queues, this is when the task will be attempted or retried. | 
 | 957 |           # | 
 | 958 |           # For pull queues, this is the time when the task is available to | 
 | 959 |           # be leased; if a task is currently leased, this is the time when | 
 | 960 |           # the current lease expires, that is, the time that the task was | 
 | 961 |           # leased plus the lease_duration. | 
 | 962 |           # | 
 | 963 |           # `schedule_time` will be truncated to the nearest microsecond. | 
 | 964 |       "createTime": "A String", # Output only. The time that the task was created. | 
 | 965 |           # | 
 | 966 |           # `create_time` will be truncated to the nearest second. | 
 | 967 |       "status": { # Status of the task. # Output only. The task status. | 
 | 968 |         "attemptDispatchCount": 42, # Output only. The number of attempts dispatched. | 
 | 969 |             # | 
 | 970 |             # This count includes attempts which have been dispatched but haven't | 
 | 971 |             # received a response. | 
 | 972 |         "firstAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's first attempt. | 
 | 973 |             # | 
 | 974 |             # Only dispatch_time will be set. | 
 | 975 |             # The other AttemptStatus information is not retained by Cloud Tasks. | 
 | 976 |             # | 
 | 977 |             # This field is not calculated for pull tasks. | 
 | 978 |           "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 979 |               # | 
 | 980 |               # `response_time` will be truncated to the nearest microsecond. | 
 | 981 |           "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 982 |               # | 
 | 983 |               # If the task has not been attempted or the task is currently running | 
 | 984 |               # then the response status is unset. | 
 | 985 |               # different programming environments, including REST APIs and RPC APIs. It is | 
 | 986 |               # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 987 |               # three pieces of data: error code, error message, and error details. | 
 | 988 |               # | 
 | 989 |               # You can find out more about this error model and how to work with it in the | 
 | 990 |               # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 991 |             "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 992 |                 # message types for APIs to use. | 
 | 993 |               { | 
 | 994 |                 "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 995 |               }, | 
 | 996 |             ], | 
 | 997 |             "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 998 |             "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 999 |                 # user-facing error message should be localized and sent in the | 
 | 1000 |                 # google.rpc.Status.details field, or localized by the client. | 
 | 1001 |           }, | 
 | 1002 |           "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 1003 |               # | 
 | 1004 |               # `schedule_time` will be truncated to the nearest microsecond. | 
 | 1005 |           "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 1006 |               # | 
 | 1007 |               # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 1008 |         }, | 
 | 1009 |         "attemptResponseCount": 42, # Output only. The number of attempts which have received a response. | 
 | 1010 |             # | 
 | 1011 |             # This field is not calculated for pull tasks. | 
 | 1012 |         "lastAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's last attempt. | 
 | 1013 |             # | 
 | 1014 |             # This field is not calculated for pull tasks. | 
 | 1015 |           "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 1016 |               # | 
 | 1017 |               # `response_time` will be truncated to the nearest microsecond. | 
 | 1018 |           "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 1019 |               # | 
 | 1020 |               # If the task has not been attempted or the task is currently running | 
 | 1021 |               # then the response status is unset. | 
 | 1022 |               # different programming environments, including REST APIs and RPC APIs. It is | 
 | 1023 |               # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 1024 |               # three pieces of data: error code, error message, and error details. | 
 | 1025 |               # | 
 | 1026 |               # You can find out more about this error model and how to work with it in the | 
 | 1027 |               # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 1028 |             "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 1029 |                 # message types for APIs to use. | 
 | 1030 |               { | 
 | 1031 |                 "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 1032 |               }, | 
 | 1033 |             ], | 
 | 1034 |             "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 1035 |             "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 1036 |                 # user-facing error message should be localized and sent in the | 
 | 1037 |                 # google.rpc.Status.details field, or localized by the client. | 
 | 1038 |           }, | 
 | 1039 |           "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 1040 |               # | 
 | 1041 |               # `schedule_time` will be truncated to the nearest microsecond. | 
 | 1042 |           "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 1043 |               # | 
 | 1044 |               # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 1045 |         }, | 
 | 1046 |       }, | 
 | 1047 |       "name": "A String", # Optionally caller-specified in CreateTask. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1048 |           # | 
 | 1049 |           # The task name. | 
 | 1050 |           # | 
 | 1051 |           # The task name must have the following format: | 
 | 1052 |           # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` | 
 | 1053 |           # | 
 | 1054 |           # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), | 
 | 1055 |           #    hyphens (-), colons (:), or periods (.). | 
 | 1056 |           #    For more information, see | 
 | 1057 |           #    [Identifying | 
 | 1058 |           #    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^] | 1059 |           # * `LOCATION_ID` is the canonical ID for the task's location. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1060 |           #    The list of available locations can be obtained by calling | 
 | 1061 |           #    ListLocations. | 
 | 1062 |           #    For more information, see https://cloud.google.com/about/locations/. | 
 | 1063 |           # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or | 
 | 1064 |           #   hyphens (-). The maximum length is 100 characters. | 
 | 1065 |           # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), | 
 | 1066 |           #   hyphens (-), or underscores (_). The maximum length is 500 characters. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1067 |     }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1068 |     "responseView": "A String", # The response_view specifies which subset of the Task will be | 
 | 1069 |         # returned. | 
 | 1070 |         #  | 
 | 1071 |         # By default response_view is BASIC; not all | 
 | 1072 |         # information is retrieved by default because some data, such as | 
 | 1073 |         # payloads, might be desirable to return only when needed because | 
 | 1074 |         # of its large size or because of the sensitivity of data that it | 
 | 1075 |         # contains. | 
 | 1076 |         #  | 
 | 1077 |         # Authorization for FULL requires | 
 | 1078 |         # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) | 
 | 1079 |         # permission on the Task resource. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1080 |   } | 
 | 1081 |  | 
 | 1082 |   x__xgafv: string, V1 error format. | 
 | 1083 |     Allowed values | 
 | 1084 |       1 - v1 error format | 
 | 1085 |       2 - v2 error format | 
 | 1086 |  | 
 | 1087 | Returns: | 
 | 1088 |   An object of the form: | 
 | 1089 |  | 
 | 1090 |     { # A unit of scheduled work. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1091 |     "appEngineHttpRequest": { # App Engine HTTP request. # App Engine HTTP request that is sent to the task's target. Can | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1092 |         # be set only if | 
 | 1093 |         # app_engine_http_target is set | 
 | 1094 |         # on the queue. | 
 | 1095 |         # | 
 | 1096 |         # An App Engine task is a task that has AppEngineHttpRequest set. | 
 | 1097 |         # | 
 | 1098 |         # The message defines the HTTP request that is sent to an App Engine app when | 
 | 1099 |         # the task is dispatched. | 
 | 1100 |         # | 
 | 1101 |         # This proto can only be used for tasks in a queue which has | 
 | 1102 |         # app_engine_http_target set. | 
 | 1103 |         # | 
 | 1104 |         # Using AppEngineHttpRequest requires | 
 | 1105 |         # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) | 
 | 1106 |         # Google IAM permission for the project | 
 | 1107 |         # and the following scope: | 
 | 1108 |         # | 
 | 1109 |         # `https://www.googleapis.com/auth/cloud-platform` | 
 | 1110 |         # | 
 | 1111 |         # The task will be delivered to the App Engine app which belongs to the same | 
 | 1112 |         # project as the queue. For more information, see | 
 | 1113 |         # [How Requests are | 
 | 1114 |         # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 1115 |         # and how routing is affected by | 
 | 1116 |         # [dispatch | 
 | 1117 |         # files](https://cloud.google.com/appengine/docs/python/config/dispatchref). | 
 | 1118 |         # Traffic is encrypted during transport and never leaves Google datacenters. | 
 | 1119 |         # Because this traffic is carried over a communication mechanism internal to | 
 | 1120 |         # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). | 
 | 1121 |         # The request to the handler, however, will appear to have used the HTTP | 
 | 1122 |         # protocol. | 
 | 1123 |         # | 
 | 1124 |         # The AppEngineRouting used to construct the URL that the task is | 
 | 1125 |         # delivered to can be set at the queue-level or task-level: | 
 | 1126 |         # | 
 | 1127 |         # * If set, | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1128 |         #   app_engine_routing_override | 
 | 1129 |         #   is used for all tasks in the queue, no matter what the setting | 
 | 1130 |         #   is for the | 
 | 1131 |         #   task-level app_engine_routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1132 |         # | 
 | 1133 |         # | 
 | 1134 |         # The `url` that the task will be sent to is: | 
 | 1135 |         # | 
 | 1136 |         # * `url =` host `+` | 
 | 1137 |         #   relative_url | 
 | 1138 |         # | 
 | 1139 |         # Tasks can be dispatched to secure app handlers, unsecure app handlers, and | 
 | 1140 |         # URIs restricted with | 
 | 1141 |         # [`login: | 
 | 1142 |         # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). | 
 | 1143 |         # Because tasks are not run as any user, they cannot be dispatched to URIs | 
 | 1144 |         # restricted with | 
 | 1145 |         # [`login: | 
 | 1146 |         # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) | 
 | 1147 |         # Task dispatches also do not follow redirects. | 
 | 1148 |         # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1149 |         # The task attempt has succeeded if the app's request handler returns an HTTP | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1150 |         # response code in the range [`200` - `299`]. The task attempt has failed if | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1151 |         # the app's handler returns a non-2xx response code or Cloud Tasks does | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1152 |         # not receive response before the deadline. Failed | 
 | 1153 |         # tasks will be retried according to the | 
 | 1154 |         # retry configuration. `503` (Service Unavailable) is | 
 | 1155 |         # considered an App Engine system error instead of an application error and | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1156 |         # will cause Cloud Tasks' traffic congestion control to temporarily throttle | 
 | 1157 |         # the queue's dispatches. Unlike other types of task targets, a `429` (Too Many | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1158 |         # Requests) response from an app handler does not cause traffic congestion | 
 | 1159 |         # control to throttle the queue. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1160 |       "httpMethod": "A String", # The HTTP method to use for the request. The default is POST. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1161 |           # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1162 |           # The app's request handler for the task's target URL must be able to handle | 
 | 1163 |           # HTTP requests with this http_method, otherwise the task attempt fails with | 
 | 1164 |           # error code 405 (Method Not Allowed). See [Writing a push task request | 
 | 1165 |           # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) | 
 | 1166 |           # and the App Engine documentation for your runtime on [How Requests are | 
 | 1167 |           # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). | 
 | 1168 |       "payload": "A String", # Payload. | 
 | 1169 |           # | 
 | 1170 |           # The payload will be sent as the HTTP message body. A message | 
 | 1171 |           # body, and thus a payload, is allowed only if the HTTP method is | 
 | 1172 |           # POST or PUT. It is an error to set a data payload on a task with | 
 | 1173 |           # an incompatible HttpMethod. | 
 | 1174 |       "relativeUrl": "A String", # The relative URL. | 
 | 1175 |           # | 
 | 1176 |           # The relative URL must begin with "/" and must be a valid HTTP relative URL. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1177 |           # It can contain a path and query string arguments. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1178 |           # If the relative URL is empty, then the root path "/" will be used. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1179 |           # No spaces are allowed, and the maximum length allowed is 2083 characters. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1180 |       "headers": { # HTTP request headers. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1181 |           # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1182 |           # This map contains the header field names and values. | 
 | 1183 |           # Headers can be set when the | 
 | 1184 |           # task is created. | 
 | 1185 |           # Repeated headers are not supported but a header value can contain commas. | 
 | 1186 |           # | 
 | 1187 |           # Cloud Tasks sets some headers to default values: | 
 | 1188 |           # | 
 | 1189 |           # * `User-Agent`: By default, this header is | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1190 |           #   `"AppEngine-Google; (+http://code.google.com/appengine)"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1191 |           #   This header can be modified, but Cloud Tasks will append | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1192 |           #   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1193 |           #   modified `User-Agent`. | 
 | 1194 |           # | 
 | 1195 |           # If the task has a payload, Cloud | 
 | 1196 |           # Tasks sets the following headers: | 
 | 1197 |           # | 
 | 1198 |           # * `Content-Type`: By default, the `Content-Type` header is set to | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1199 |           #   `"application/octet-stream"`. The default can be overridden by explicitly | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1200 |           #   setting `Content-Type` to a particular media type when the | 
 | 1201 |           #   task is created. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1202 |           #   For example, `Content-Type` can be set to `"application/json"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1203 |           # * `Content-Length`: This is computed by Cloud Tasks. This value is | 
 | 1204 |           #   output only.   It cannot be changed. | 
 | 1205 |           # | 
 | 1206 |           # The headers below cannot be set or overridden: | 
 | 1207 |           # | 
 | 1208 |           # * `Host` | 
 | 1209 |           # * `X-Google-*` | 
 | 1210 |           # * `X-AppEngine-*` | 
 | 1211 |           # | 
 | 1212 |           # In addition, Cloud Tasks sets some headers when the task is dispatched, | 
 | 1213 |           # such as headers containing information about the task; see | 
 | 1214 |           # [request | 
 | 1215 |           # headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). | 
 | 1216 |           # These headers are set only when the task is dispatched, so they are not | 
 | 1217 |           # visible when the task is returned in a Cloud Tasks response. | 
 | 1218 |           # | 
 | 1219 |           # Although there is no specific limit for the maximum number of headers or | 
 | 1220 |           # the size, there is a limit on the maximum size of the Task. For more | 
 | 1221 |           # information, see the CreateTask documentation. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1222 |         "a_key": "A String", | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1223 |       }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1224 |       "appEngineRouting": { # App Engine Routing. # Task-level setting for App Engine routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1225 |           # | 
 | 1226 |           # If set, | 
 | 1227 |           # app_engine_routing_override | 
 | 1228 |           # is used for all tasks in the queue, no matter what the setting is for the | 
 | 1229 |           # task-level app_engine_routing. | 
 | 1230 |           # | 
 | 1231 |           # Defines routing characteristics specific to App Engine - service, version, | 
 | 1232 |           # and instance. | 
 | 1233 |           # | 
 | 1234 |           # For more information about services, versions, and instances see | 
 | 1235 |           # [An Overview of App | 
 | 1236 |           # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), | 
 | 1237 |           # [Microservices Architecture on Google App | 
 | 1238 |           # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), | 
 | 1239 |           # [App Engine Standard request | 
 | 1240 |           # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), | 
 | 1241 |           # and [App Engine Flex request | 
 | 1242 |           # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1243 |         "instance": "A String", # App instance. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1244 |             # | 
 | 1245 |             # By default, the task is sent to an instance which is available when | 
 | 1246 |             # the task is attempted. | 
 | 1247 |             # | 
 | 1248 |             # Requests can only be sent to a specific instance if | 
 | 1249 |             # [manual scaling is used in App Engine | 
 | 1250 |             # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). | 
 | 1251 |             # App Engine Flex does not support instances. For more information, see | 
 | 1252 |             # [App Engine Standard request | 
 | 1253 |             # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 1254 |             # and [App Engine Flex request | 
 | 1255 |             # 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^] | 1256 |         "version": "A String", # App version. | 
 | 1257 |             # | 
 | 1258 |             # By default, the task is sent to the version which is the default | 
 | 1259 |             # version when the task is attempted. | 
 | 1260 |             # | 
 | 1261 |             # For some queues or tasks which were created using the App Engine | 
 | 1262 |             # Task Queue API, host is not parsable | 
 | 1263 |             # into service, | 
 | 1264 |             # version, and | 
 | 1265 |             # instance. For example, some tasks | 
 | 1266 |             # which were created using the App Engine SDK use a custom domain | 
 | 1267 |             # name; custom domains are not parsed by Cloud Tasks. If | 
 | 1268 |             # host is not parsable, then | 
 | 1269 |             # service, | 
 | 1270 |             # version, and | 
 | 1271 |             # instance are the empty string. | 
 | 1272 |         "host": "A String", # Output only. The host that the task is sent to. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1273 |             # | 
 | 1274 |             # For more information, see | 
 | 1275 |             # [How Requests are | 
 | 1276 |             # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). | 
 | 1277 |             # | 
 | 1278 |             # The host is constructed as: | 
 | 1279 |             # | 
 | 1280 |             # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1281 |             # * `host = [application_domain_name]`</br> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1282 |             #   `| [service] + '.' + [application_domain_name]`</br> | 
 | 1283 |             #   `| [version] + '.' + [application_domain_name]`</br> | 
 | 1284 |             #   `| [version_dot_service]+ '.' + [application_domain_name]`</br> | 
 | 1285 |             #   `| [instance] + '.' + [application_domain_name]`</br> | 
 | 1286 |             #   `| [instance_dot_service] + '.' + [application_domain_name]`</br> | 
 | 1287 |             #   `| [instance_dot_version] + '.' + [application_domain_name]`</br> | 
 | 1288 |             #   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1289 |             # | 
 | 1290 |             # * `application_domain_name` = The domain name of the app, for | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1291 |             #   example <app-id>.appspot.com, which is associated with the | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1292 |             #   queue's project ID. Some tasks which were created using the App Engine | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1293 |             #   SDK use a custom domain name. | 
 | 1294 |             # | 
 | 1295 |             # * `service =` service | 
 | 1296 |             # | 
 | 1297 |             # * `version =` version | 
 | 1298 |             # | 
 | 1299 |             # * `version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1300 |             #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1301 |             #   service | 
 | 1302 |             # | 
 | 1303 |             # * `instance =` instance | 
 | 1304 |             # | 
 | 1305 |             # * `instance_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1306 |             #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1307 |             #   service | 
 | 1308 |             # | 
 | 1309 |             # * `instance_dot_version =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1310 |             #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1311 |             #   version | 
 | 1312 |             # | 
 | 1313 |             # * `instance_dot_version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1314 |             #   instance `+ '.' +` | 
 | 1315 |             #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1316 |             #   service | 
 | 1317 |             # | 
 | 1318 |             # If service is empty, then the task will be sent | 
 | 1319 |             # to the service which is the default service when the task is attempted. | 
 | 1320 |             # | 
 | 1321 |             # If version is empty, then the task will be sent | 
 | 1322 |             # to the version which is the default version when the task is attempted. | 
 | 1323 |             # | 
 | 1324 |             # If instance is empty, then the task | 
 | 1325 |             # will be sent to an instance which is available when the task is | 
 | 1326 |             # attempted. | 
 | 1327 |             # | 
 | 1328 |             # If service, | 
 | 1329 |             # version, or | 
 | 1330 |             # instance is invalid, then the task | 
 | 1331 |             # will be sent to the default version of the default service when | 
 | 1332 |             # the task is attempted. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1333 |         "service": "A String", # App service. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1334 |             # | 
 | 1335 |             # By default, the task is sent to the service which is the default | 
 | 1336 |             # service when the task is attempted. | 
 | 1337 |             # | 
 | 1338 |             # For some queues or tasks which were created using the App Engine | 
 | 1339 |             # Task Queue API, host is not parsable | 
 | 1340 |             # into service, | 
 | 1341 |             # version, and | 
 | 1342 |             # instance. For example, some tasks | 
 | 1343 |             # which were created using the App Engine SDK use a custom domain | 
 | 1344 |             # name; custom domains are not parsed by Cloud Tasks. If | 
 | 1345 |             # host is not parsable, then | 
 | 1346 |             # service, | 
 | 1347 |             # version, and | 
 | 1348 |             # instance are the empty string. | 
 | 1349 |       }, | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1350 |     }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1351 |     "view": "A String", # Output only. The view specifies which subset of the Task has | 
 | 1352 |         # been returned. | 
 | 1353 |     "pullMessage": { # The pull message contains data that can be used by the caller of # LeaseTasks to process the task. Can be | 
 | 1354 |         # set only if pull_target is set on the queue. | 
 | 1355 |         # | 
 | 1356 |         # A pull task is a task that has PullMessage set. | 
 | 1357 |         # LeaseTasks to process the task. | 
 | 1358 |         # | 
 | 1359 |         # This proto can only be used for tasks in a queue which has | 
 | 1360 |         # pull_target set. | 
 | 1361 |       "payload": "A String", # A data payload consumed by the worker to execute the task. | 
 | 1362 |       "tag": "A String", # The task's tag. | 
 | 1363 |           # | 
 | 1364 |           # Tags allow similar tasks to be processed in a batch. If you label | 
 | 1365 |           # tasks with a tag, your worker can | 
 | 1366 |           # lease tasks with the same tag using | 
 | 1367 |           # filter. For example, if you want to | 
 | 1368 |           # aggregate the events associated with a specific user once a day, | 
 | 1369 |           # you could tag tasks with the user ID. | 
 | 1370 |           # | 
 | 1371 |           # The task's tag can only be set when the | 
 | 1372 |           # task is created. | 
 | 1373 |           # | 
 | 1374 |           # The tag must be less than 500 characters. | 
 | 1375 |           # | 
 | 1376 |           # SDK compatibility: Although the SDK allows tags to be either | 
 | 1377 |           # string or | 
 | 1378 |           # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), | 
 | 1379 |           # only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 | 
 | 1380 |           # encoded, the tag will be empty when the task is returned by Cloud Tasks. | 
 | 1381 |     }, | 
 | 1382 |     "scheduleTime": "A String", # The time when the task is scheduled to be attempted. | 
 | 1383 |         # | 
 | 1384 |         # For App Engine queues, this is when the task will be attempted or retried. | 
 | 1385 |         # | 
 | 1386 |         # For pull queues, this is the time when the task is available to | 
 | 1387 |         # be leased; if a task is currently leased, this is the time when | 
 | 1388 |         # the current lease expires, that is, the time that the task was | 
 | 1389 |         # leased plus the lease_duration. | 
 | 1390 |         # | 
 | 1391 |         # `schedule_time` will be truncated to the nearest microsecond. | 
 | 1392 |     "createTime": "A String", # Output only. The time that the task was created. | 
 | 1393 |         # | 
 | 1394 |         # `create_time` will be truncated to the nearest second. | 
 | 1395 |     "status": { # Status of the task. # Output only. The task status. | 
 | 1396 |       "attemptDispatchCount": 42, # Output only. The number of attempts dispatched. | 
 | 1397 |           # | 
 | 1398 |           # This count includes attempts which have been dispatched but haven't | 
 | 1399 |           # received a response. | 
 | 1400 |       "firstAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's first attempt. | 
 | 1401 |           # | 
 | 1402 |           # Only dispatch_time will be set. | 
 | 1403 |           # The other AttemptStatus information is not retained by Cloud Tasks. | 
 | 1404 |           # | 
 | 1405 |           # This field is not calculated for pull tasks. | 
 | 1406 |         "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 1407 |             # | 
 | 1408 |             # `response_time` will be truncated to the nearest microsecond. | 
 | 1409 |         "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 1410 |             # | 
 | 1411 |             # If the task has not been attempted or the task is currently running | 
 | 1412 |             # then the response status is unset. | 
 | 1413 |             # different programming environments, including REST APIs and RPC APIs. It is | 
 | 1414 |             # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 1415 |             # three pieces of data: error code, error message, and error details. | 
 | 1416 |             # | 
 | 1417 |             # You can find out more about this error model and how to work with it in the | 
 | 1418 |             # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 1419 |           "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 1420 |               # message types for APIs to use. | 
 | 1421 |             { | 
 | 1422 |               "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 1423 |             }, | 
 | 1424 |           ], | 
 | 1425 |           "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 1426 |           "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 1427 |               # user-facing error message should be localized and sent in the | 
 | 1428 |               # google.rpc.Status.details field, or localized by the client. | 
 | 1429 |         }, | 
 | 1430 |         "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 1431 |             # | 
 | 1432 |             # `schedule_time` will be truncated to the nearest microsecond. | 
 | 1433 |         "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 1434 |             # | 
 | 1435 |             # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 1436 |       }, | 
 | 1437 |       "attemptResponseCount": 42, # Output only. The number of attempts which have received a response. | 
 | 1438 |           # | 
 | 1439 |           # This field is not calculated for pull tasks. | 
 | 1440 |       "lastAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's last attempt. | 
 | 1441 |           # | 
 | 1442 |           # This field is not calculated for pull tasks. | 
 | 1443 |         "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 1444 |             # | 
 | 1445 |             # `response_time` will be truncated to the nearest microsecond. | 
 | 1446 |         "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 1447 |             # | 
 | 1448 |             # If the task has not been attempted or the task is currently running | 
 | 1449 |             # then the response status is unset. | 
 | 1450 |             # different programming environments, including REST APIs and RPC APIs. It is | 
 | 1451 |             # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 1452 |             # three pieces of data: error code, error message, and error details. | 
 | 1453 |             # | 
 | 1454 |             # You can find out more about this error model and how to work with it in the | 
 | 1455 |             # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 1456 |           "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 1457 |               # message types for APIs to use. | 
 | 1458 |             { | 
 | 1459 |               "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 1460 |             }, | 
 | 1461 |           ], | 
 | 1462 |           "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 1463 |           "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 1464 |               # user-facing error message should be localized and sent in the | 
 | 1465 |               # google.rpc.Status.details field, or localized by the client. | 
 | 1466 |         }, | 
 | 1467 |         "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 1468 |             # | 
 | 1469 |             # `schedule_time` will be truncated to the nearest microsecond. | 
 | 1470 |         "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 1471 |             # | 
 | 1472 |             # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 1473 |       }, | 
 | 1474 |     }, | 
 | 1475 |     "name": "A String", # Optionally caller-specified in CreateTask. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1476 |         # | 
 | 1477 |         # The task name. | 
 | 1478 |         # | 
 | 1479 |         # The task name must have the following format: | 
 | 1480 |         # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` | 
 | 1481 |         # | 
 | 1482 |         # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), | 
 | 1483 |         #    hyphens (-), colons (:), or periods (.). | 
 | 1484 |         #    For more information, see | 
 | 1485 |         #    [Identifying | 
 | 1486 |         #    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^] | 1487 |         # * `LOCATION_ID` is the canonical ID for the task's location. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1488 |         #    The list of available locations can be obtained by calling | 
 | 1489 |         #    ListLocations. | 
 | 1490 |         #    For more information, see https://cloud.google.com/about/locations/. | 
 | 1491 |         # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or | 
 | 1492 |         #   hyphens (-). The maximum length is 100 characters. | 
 | 1493 |         # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), | 
 | 1494 |         #   hyphens (-), or underscores (_). The maximum length is 500 characters. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1495 |   }</pre> | 
 | 1496 | </div> | 
 | 1497 |  | 
 | 1498 | <div class="method"> | 
 | 1499 |     <code class="details" id="delete">delete(name, x__xgafv=None)</code> | 
 | 1500 |   <pre>Deletes a task. | 
 | 1501 |  | 
 | 1502 | A task can be deleted if it is scheduled or dispatched. A task | 
 | 1503 | cannot be deleted if it has completed successfully or permanently | 
 | 1504 | failed. | 
 | 1505 |  | 
 | 1506 | Args: | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1507 |   name: string, Required. The task name. For example: | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1508 | `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required) | 
 | 1509 |   x__xgafv: string, V1 error format. | 
 | 1510 |     Allowed values | 
 | 1511 |       1 - v1 error format | 
 | 1512 |       2 - v2 error format | 
 | 1513 |  | 
 | 1514 | Returns: | 
 | 1515 |   An object of the form: | 
 | 1516 |  | 
 | 1517 |     { # A generic empty message that you can re-use to avoid defining duplicated | 
 | 1518 |       # empty messages in your APIs. A typical example is to use it as the request | 
 | 1519 |       # or the response type of an API method. For instance: | 
 | 1520 |       # | 
 | 1521 |       #     service Foo { | 
 | 1522 |       #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); | 
 | 1523 |       #     } | 
 | 1524 |       # | 
 | 1525 |       # The JSON representation for `Empty` is empty JSON object `{}`. | 
 | 1526 |   }</pre> | 
 | 1527 | </div> | 
 | 1528 |  | 
 | 1529 | <div class="method"> | 
 | 1530 |     <code class="details" id="get">get(name, responseView=None, x__xgafv=None)</code> | 
 | 1531 |   <pre>Gets a task. | 
 | 1532 |  | 
 | 1533 | Args: | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1534 |   name: string, Required. The task name. For example: | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1535 | `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required) | 
 | 1536 |   responseView: string, The response_view specifies which subset of the Task will be | 
 | 1537 | returned. | 
 | 1538 |  | 
 | 1539 | By default response_view is BASIC; not all | 
 | 1540 | information is retrieved by default because some data, such as | 
 | 1541 | payloads, might be desirable to return only when needed because | 
 | 1542 | of its large size or because of the sensitivity of data that it | 
 | 1543 | contains. | 
 | 1544 |  | 
 | 1545 | Authorization for FULL requires | 
 | 1546 | `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) | 
 | 1547 | permission on the Task resource. | 
 | 1548 |   x__xgafv: string, V1 error format. | 
 | 1549 |     Allowed values | 
 | 1550 |       1 - v1 error format | 
 | 1551 |       2 - v2 error format | 
 | 1552 |  | 
 | 1553 | Returns: | 
 | 1554 |   An object of the form: | 
 | 1555 |  | 
 | 1556 |     { # A unit of scheduled work. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1557 |     "appEngineHttpRequest": { # App Engine HTTP request. # App Engine HTTP request that is sent to the task's target. Can | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1558 |         # be set only if | 
 | 1559 |         # app_engine_http_target is set | 
 | 1560 |         # on the queue. | 
 | 1561 |         # | 
 | 1562 |         # An App Engine task is a task that has AppEngineHttpRequest set. | 
 | 1563 |         # | 
 | 1564 |         # The message defines the HTTP request that is sent to an App Engine app when | 
 | 1565 |         # the task is dispatched. | 
 | 1566 |         # | 
 | 1567 |         # This proto can only be used for tasks in a queue which has | 
 | 1568 |         # app_engine_http_target set. | 
 | 1569 |         # | 
 | 1570 |         # Using AppEngineHttpRequest requires | 
 | 1571 |         # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) | 
 | 1572 |         # Google IAM permission for the project | 
 | 1573 |         # and the following scope: | 
 | 1574 |         # | 
 | 1575 |         # `https://www.googleapis.com/auth/cloud-platform` | 
 | 1576 |         # | 
 | 1577 |         # The task will be delivered to the App Engine app which belongs to the same | 
 | 1578 |         # project as the queue. For more information, see | 
 | 1579 |         # [How Requests are | 
 | 1580 |         # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 1581 |         # and how routing is affected by | 
 | 1582 |         # [dispatch | 
 | 1583 |         # files](https://cloud.google.com/appengine/docs/python/config/dispatchref). | 
 | 1584 |         # Traffic is encrypted during transport and never leaves Google datacenters. | 
 | 1585 |         # Because this traffic is carried over a communication mechanism internal to | 
 | 1586 |         # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). | 
 | 1587 |         # The request to the handler, however, will appear to have used the HTTP | 
 | 1588 |         # protocol. | 
 | 1589 |         # | 
 | 1590 |         # The AppEngineRouting used to construct the URL that the task is | 
 | 1591 |         # delivered to can be set at the queue-level or task-level: | 
 | 1592 |         # | 
 | 1593 |         # * If set, | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1594 |         #   app_engine_routing_override | 
 | 1595 |         #   is used for all tasks in the queue, no matter what the setting | 
 | 1596 |         #   is for the | 
 | 1597 |         #   task-level app_engine_routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1598 |         # | 
 | 1599 |         # | 
 | 1600 |         # The `url` that the task will be sent to is: | 
 | 1601 |         # | 
 | 1602 |         # * `url =` host `+` | 
 | 1603 |         #   relative_url | 
 | 1604 |         # | 
 | 1605 |         # Tasks can be dispatched to secure app handlers, unsecure app handlers, and | 
 | 1606 |         # URIs restricted with | 
 | 1607 |         # [`login: | 
 | 1608 |         # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). | 
 | 1609 |         # Because tasks are not run as any user, they cannot be dispatched to URIs | 
 | 1610 |         # restricted with | 
 | 1611 |         # [`login: | 
 | 1612 |         # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) | 
 | 1613 |         # Task dispatches also do not follow redirects. | 
 | 1614 |         # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1615 |         # The task attempt has succeeded if the app's request handler returns an HTTP | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1616 |         # response code in the range [`200` - `299`]. The task attempt has failed if | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1617 |         # the app's handler returns a non-2xx response code or Cloud Tasks does | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1618 |         # not receive response before the deadline. Failed | 
 | 1619 |         # tasks will be retried according to the | 
 | 1620 |         # retry configuration. `503` (Service Unavailable) is | 
 | 1621 |         # considered an App Engine system error instead of an application error and | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1622 |         # will cause Cloud Tasks' traffic congestion control to temporarily throttle | 
 | 1623 |         # the queue's dispatches. Unlike other types of task targets, a `429` (Too Many | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1624 |         # Requests) response from an app handler does not cause traffic congestion | 
 | 1625 |         # control to throttle the queue. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1626 |       "httpMethod": "A String", # The HTTP method to use for the request. The default is POST. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1627 |           # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1628 |           # The app's request handler for the task's target URL must be able to handle | 
 | 1629 |           # HTTP requests with this http_method, otherwise the task attempt fails with | 
 | 1630 |           # error code 405 (Method Not Allowed). See [Writing a push task request | 
 | 1631 |           # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) | 
 | 1632 |           # and the App Engine documentation for your runtime on [How Requests are | 
 | 1633 |           # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). | 
 | 1634 |       "payload": "A String", # Payload. | 
 | 1635 |           # | 
 | 1636 |           # The payload will be sent as the HTTP message body. A message | 
 | 1637 |           # body, and thus a payload, is allowed only if the HTTP method is | 
 | 1638 |           # POST or PUT. It is an error to set a data payload on a task with | 
 | 1639 |           # an incompatible HttpMethod. | 
 | 1640 |       "relativeUrl": "A String", # The relative URL. | 
 | 1641 |           # | 
 | 1642 |           # The relative URL must begin with "/" and must be a valid HTTP relative URL. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1643 |           # It can contain a path and query string arguments. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1644 |           # If the relative URL is empty, then the root path "/" will be used. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1645 |           # No spaces are allowed, and the maximum length allowed is 2083 characters. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1646 |       "headers": { # HTTP request headers. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1647 |           # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1648 |           # This map contains the header field names and values. | 
 | 1649 |           # Headers can be set when the | 
 | 1650 |           # task is created. | 
 | 1651 |           # Repeated headers are not supported but a header value can contain commas. | 
 | 1652 |           # | 
 | 1653 |           # Cloud Tasks sets some headers to default values: | 
 | 1654 |           # | 
 | 1655 |           # * `User-Agent`: By default, this header is | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1656 |           #   `"AppEngine-Google; (+http://code.google.com/appengine)"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1657 |           #   This header can be modified, but Cloud Tasks will append | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1658 |           #   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1659 |           #   modified `User-Agent`. | 
 | 1660 |           # | 
 | 1661 |           # If the task has a payload, Cloud | 
 | 1662 |           # Tasks sets the following headers: | 
 | 1663 |           # | 
 | 1664 |           # * `Content-Type`: By default, the `Content-Type` header is set to | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1665 |           #   `"application/octet-stream"`. The default can be overridden by explicitly | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1666 |           #   setting `Content-Type` to a particular media type when the | 
 | 1667 |           #   task is created. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1668 |           #   For example, `Content-Type` can be set to `"application/json"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1669 |           # * `Content-Length`: This is computed by Cloud Tasks. This value is | 
 | 1670 |           #   output only.   It cannot be changed. | 
 | 1671 |           # | 
 | 1672 |           # The headers below cannot be set or overridden: | 
 | 1673 |           # | 
 | 1674 |           # * `Host` | 
 | 1675 |           # * `X-Google-*` | 
 | 1676 |           # * `X-AppEngine-*` | 
 | 1677 |           # | 
 | 1678 |           # In addition, Cloud Tasks sets some headers when the task is dispatched, | 
 | 1679 |           # such as headers containing information about the task; see | 
 | 1680 |           # [request | 
 | 1681 |           # headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). | 
 | 1682 |           # These headers are set only when the task is dispatched, so they are not | 
 | 1683 |           # visible when the task is returned in a Cloud Tasks response. | 
 | 1684 |           # | 
 | 1685 |           # Although there is no specific limit for the maximum number of headers or | 
 | 1686 |           # the size, there is a limit on the maximum size of the Task. For more | 
 | 1687 |           # information, see the CreateTask documentation. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1688 |         "a_key": "A String", | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1689 |       }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1690 |       "appEngineRouting": { # App Engine Routing. # Task-level setting for App Engine routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1691 |           # | 
 | 1692 |           # If set, | 
 | 1693 |           # app_engine_routing_override | 
 | 1694 |           # is used for all tasks in the queue, no matter what the setting is for the | 
 | 1695 |           # task-level app_engine_routing. | 
 | 1696 |           # | 
 | 1697 |           # Defines routing characteristics specific to App Engine - service, version, | 
 | 1698 |           # and instance. | 
 | 1699 |           # | 
 | 1700 |           # For more information about services, versions, and instances see | 
 | 1701 |           # [An Overview of App | 
 | 1702 |           # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), | 
 | 1703 |           # [Microservices Architecture on Google App | 
 | 1704 |           # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), | 
 | 1705 |           # [App Engine Standard request | 
 | 1706 |           # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), | 
 | 1707 |           # and [App Engine Flex request | 
 | 1708 |           # 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^] | 1709 |         "instance": "A String", # App instance. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1710 |             # | 
 | 1711 |             # By default, the task is sent to an instance which is available when | 
 | 1712 |             # the task is attempted. | 
 | 1713 |             # | 
 | 1714 |             # Requests can only be sent to a specific instance if | 
 | 1715 |             # [manual scaling is used in App Engine | 
 | 1716 |             # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). | 
 | 1717 |             # App Engine Flex does not support instances. For more information, see | 
 | 1718 |             # [App Engine Standard request | 
 | 1719 |             # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 1720 |             # and [App Engine Flex request | 
 | 1721 |             # 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^] | 1722 |         "version": "A String", # App version. | 
 | 1723 |             # | 
 | 1724 |             # By default, the task is sent to the version which is the default | 
 | 1725 |             # version when the task is attempted. | 
 | 1726 |             # | 
 | 1727 |             # For some queues or tasks which were created using the App Engine | 
 | 1728 |             # Task Queue API, host is not parsable | 
 | 1729 |             # into service, | 
 | 1730 |             # version, and | 
 | 1731 |             # instance. For example, some tasks | 
 | 1732 |             # which were created using the App Engine SDK use a custom domain | 
 | 1733 |             # name; custom domains are not parsed by Cloud Tasks. If | 
 | 1734 |             # host is not parsable, then | 
 | 1735 |             # service, | 
 | 1736 |             # version, and | 
 | 1737 |             # instance are the empty string. | 
 | 1738 |         "host": "A String", # Output only. The host that the task is sent to. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1739 |             # | 
 | 1740 |             # For more information, see | 
 | 1741 |             # [How Requests are | 
 | 1742 |             # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). | 
 | 1743 |             # | 
 | 1744 |             # The host is constructed as: | 
 | 1745 |             # | 
 | 1746 |             # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1747 |             # * `host = [application_domain_name]`</br> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1748 |             #   `| [service] + '.' + [application_domain_name]`</br> | 
 | 1749 |             #   `| [version] + '.' + [application_domain_name]`</br> | 
 | 1750 |             #   `| [version_dot_service]+ '.' + [application_domain_name]`</br> | 
 | 1751 |             #   `| [instance] + '.' + [application_domain_name]`</br> | 
 | 1752 |             #   `| [instance_dot_service] + '.' + [application_domain_name]`</br> | 
 | 1753 |             #   `| [instance_dot_version] + '.' + [application_domain_name]`</br> | 
 | 1754 |             #   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1755 |             # | 
 | 1756 |             # * `application_domain_name` = The domain name of the app, for | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1757 |             #   example <app-id>.appspot.com, which is associated with the | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1758 |             #   queue's project ID. Some tasks which were created using the App Engine | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1759 |             #   SDK use a custom domain name. | 
 | 1760 |             # | 
 | 1761 |             # * `service =` service | 
 | 1762 |             # | 
 | 1763 |             # * `version =` version | 
 | 1764 |             # | 
 | 1765 |             # * `version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1766 |             #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1767 |             #   service | 
 | 1768 |             # | 
 | 1769 |             # * `instance =` instance | 
 | 1770 |             # | 
 | 1771 |             # * `instance_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1772 |             #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1773 |             #   service | 
 | 1774 |             # | 
 | 1775 |             # * `instance_dot_version =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1776 |             #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1777 |             #   version | 
 | 1778 |             # | 
 | 1779 |             # * `instance_dot_version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1780 |             #   instance `+ '.' +` | 
 | 1781 |             #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1782 |             #   service | 
 | 1783 |             # | 
 | 1784 |             # If service is empty, then the task will be sent | 
 | 1785 |             # to the service which is the default service when the task is attempted. | 
 | 1786 |             # | 
 | 1787 |             # If version is empty, then the task will be sent | 
 | 1788 |             # to the version which is the default version when the task is attempted. | 
 | 1789 |             # | 
 | 1790 |             # If instance is empty, then the task | 
 | 1791 |             # will be sent to an instance which is available when the task is | 
 | 1792 |             # attempted. | 
 | 1793 |             # | 
 | 1794 |             # If service, | 
 | 1795 |             # version, or | 
 | 1796 |             # instance is invalid, then the task | 
 | 1797 |             # will be sent to the default version of the default service when | 
 | 1798 |             # the task is attempted. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1799 |         "service": "A String", # App service. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1800 |             # | 
 | 1801 |             # By default, the task is sent to the service which is the default | 
 | 1802 |             # service when the task is attempted. | 
 | 1803 |             # | 
 | 1804 |             # For some queues or tasks which were created using the App Engine | 
 | 1805 |             # Task Queue API, host is not parsable | 
 | 1806 |             # into service, | 
 | 1807 |             # version, and | 
 | 1808 |             # instance. For example, some tasks | 
 | 1809 |             # which were created using the App Engine SDK use a custom domain | 
 | 1810 |             # name; custom domains are not parsed by Cloud Tasks. If | 
 | 1811 |             # host is not parsable, then | 
 | 1812 |             # service, | 
 | 1813 |             # version, and | 
 | 1814 |             # instance are the empty string. | 
 | 1815 |       }, | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1816 |     }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1817 |     "view": "A String", # Output only. The view specifies which subset of the Task has | 
 | 1818 |         # been returned. | 
 | 1819 |     "pullMessage": { # The pull message contains data that can be used by the caller of # LeaseTasks to process the task. Can be | 
 | 1820 |         # set only if pull_target is set on the queue. | 
 | 1821 |         # | 
 | 1822 |         # A pull task is a task that has PullMessage set. | 
 | 1823 |         # LeaseTasks to process the task. | 
 | 1824 |         # | 
 | 1825 |         # This proto can only be used for tasks in a queue which has | 
 | 1826 |         # pull_target set. | 
 | 1827 |       "payload": "A String", # A data payload consumed by the worker to execute the task. | 
 | 1828 |       "tag": "A String", # The task's tag. | 
 | 1829 |           # | 
 | 1830 |           # Tags allow similar tasks to be processed in a batch. If you label | 
 | 1831 |           # tasks with a tag, your worker can | 
 | 1832 |           # lease tasks with the same tag using | 
 | 1833 |           # filter. For example, if you want to | 
 | 1834 |           # aggregate the events associated with a specific user once a day, | 
 | 1835 |           # you could tag tasks with the user ID. | 
 | 1836 |           # | 
 | 1837 |           # The task's tag can only be set when the | 
 | 1838 |           # task is created. | 
 | 1839 |           # | 
 | 1840 |           # The tag must be less than 500 characters. | 
 | 1841 |           # | 
 | 1842 |           # SDK compatibility: Although the SDK allows tags to be either | 
 | 1843 |           # string or | 
 | 1844 |           # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), | 
 | 1845 |           # only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 | 
 | 1846 |           # encoded, the tag will be empty when the task is returned by Cloud Tasks. | 
 | 1847 |     }, | 
 | 1848 |     "scheduleTime": "A String", # The time when the task is scheduled to be attempted. | 
 | 1849 |         # | 
 | 1850 |         # For App Engine queues, this is when the task will be attempted or retried. | 
 | 1851 |         # | 
 | 1852 |         # For pull queues, this is the time when the task is available to | 
 | 1853 |         # be leased; if a task is currently leased, this is the time when | 
 | 1854 |         # the current lease expires, that is, the time that the task was | 
 | 1855 |         # leased plus the lease_duration. | 
 | 1856 |         # | 
 | 1857 |         # `schedule_time` will be truncated to the nearest microsecond. | 
 | 1858 |     "createTime": "A String", # Output only. The time that the task was created. | 
 | 1859 |         # | 
 | 1860 |         # `create_time` will be truncated to the nearest second. | 
 | 1861 |     "status": { # Status of the task. # Output only. The task status. | 
 | 1862 |       "attemptDispatchCount": 42, # Output only. The number of attempts dispatched. | 
 | 1863 |           # | 
 | 1864 |           # This count includes attempts which have been dispatched but haven't | 
 | 1865 |           # received a response. | 
 | 1866 |       "firstAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's first attempt. | 
 | 1867 |           # | 
 | 1868 |           # Only dispatch_time will be set. | 
 | 1869 |           # The other AttemptStatus information is not retained by Cloud Tasks. | 
 | 1870 |           # | 
 | 1871 |           # This field is not calculated for pull tasks. | 
 | 1872 |         "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 1873 |             # | 
 | 1874 |             # `response_time` will be truncated to the nearest microsecond. | 
 | 1875 |         "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 1876 |             # | 
 | 1877 |             # If the task has not been attempted or the task is currently running | 
 | 1878 |             # then the response status is unset. | 
 | 1879 |             # different programming environments, including REST APIs and RPC APIs. It is | 
 | 1880 |             # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 1881 |             # three pieces of data: error code, error message, and error details. | 
 | 1882 |             # | 
 | 1883 |             # You can find out more about this error model and how to work with it in the | 
 | 1884 |             # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 1885 |           "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 1886 |               # message types for APIs to use. | 
 | 1887 |             { | 
 | 1888 |               "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 1889 |             }, | 
 | 1890 |           ], | 
 | 1891 |           "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 1892 |           "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 1893 |               # user-facing error message should be localized and sent in the | 
 | 1894 |               # google.rpc.Status.details field, or localized by the client. | 
 | 1895 |         }, | 
 | 1896 |         "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 1897 |             # | 
 | 1898 |             # `schedule_time` will be truncated to the nearest microsecond. | 
 | 1899 |         "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 1900 |             # | 
 | 1901 |             # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 1902 |       }, | 
 | 1903 |       "attemptResponseCount": 42, # Output only. The number of attempts which have received a response. | 
 | 1904 |           # | 
 | 1905 |           # This field is not calculated for pull tasks. | 
 | 1906 |       "lastAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's last attempt. | 
 | 1907 |           # | 
 | 1908 |           # This field is not calculated for pull tasks. | 
 | 1909 |         "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 1910 |             # | 
 | 1911 |             # `response_time` will be truncated to the nearest microsecond. | 
 | 1912 |         "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 1913 |             # | 
 | 1914 |             # If the task has not been attempted or the task is currently running | 
 | 1915 |             # then the response status is unset. | 
 | 1916 |             # different programming environments, including REST APIs and RPC APIs. It is | 
 | 1917 |             # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 1918 |             # three pieces of data: error code, error message, and error details. | 
 | 1919 |             # | 
 | 1920 |             # You can find out more about this error model and how to work with it in the | 
 | 1921 |             # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 1922 |           "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 1923 |               # message types for APIs to use. | 
 | 1924 |             { | 
 | 1925 |               "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 1926 |             }, | 
 | 1927 |           ], | 
 | 1928 |           "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 1929 |           "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 1930 |               # user-facing error message should be localized and sent in the | 
 | 1931 |               # google.rpc.Status.details field, or localized by the client. | 
 | 1932 |         }, | 
 | 1933 |         "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 1934 |             # | 
 | 1935 |             # `schedule_time` will be truncated to the nearest microsecond. | 
 | 1936 |         "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 1937 |             # | 
 | 1938 |             # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 1939 |       }, | 
 | 1940 |     }, | 
 | 1941 |     "name": "A String", # Optionally caller-specified in CreateTask. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1942 |         # | 
 | 1943 |         # The task name. | 
 | 1944 |         # | 
 | 1945 |         # The task name must have the following format: | 
 | 1946 |         # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` | 
 | 1947 |         # | 
 | 1948 |         # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), | 
 | 1949 |         #    hyphens (-), colons (:), or periods (.). | 
 | 1950 |         #    For more information, see | 
 | 1951 |         #    [Identifying | 
 | 1952 |         #    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^] | 1953 |         # * `LOCATION_ID` is the canonical ID for the task's location. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1954 |         #    The list of available locations can be obtained by calling | 
 | 1955 |         #    ListLocations. | 
 | 1956 |         #    For more information, see https://cloud.google.com/about/locations/. | 
 | 1957 |         # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or | 
 | 1958 |         #   hyphens (-). The maximum length is 100 characters. | 
 | 1959 |         # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), | 
 | 1960 |         #   hyphens (-), or underscores (_). The maximum length is 500 characters. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1961 |   }</pre> | 
 | 1962 | </div> | 
 | 1963 |  | 
 | 1964 | <div class="method"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1965 |     <code class="details" id="lease">lease(parent, body=None, x__xgafv=None)</code> | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1966 |   <pre>Leases tasks from a pull queue for | 
 | 1967 | lease_duration. | 
 | 1968 |  | 
 | 1969 | This method is invoked by the worker to obtain a lease. The | 
 | 1970 | worker must acknowledge the task via | 
 | 1971 | AcknowledgeTask after they have | 
 | 1972 | performed the work associated with the task. | 
 | 1973 |  | 
 | 1974 | The payload is intended to store data that | 
 | 1975 | the worker needs to perform the work associated with the task. To | 
 | 1976 | return the payloads in the response, set | 
 | 1977 | response_view to | 
 | 1978 | FULL. | 
 | 1979 |  | 
 | 1980 | A maximum of 10 qps of LeaseTasks | 
 | 1981 | requests are allowed per | 
 | 1982 | queue. RESOURCE_EXHAUSTED | 
 | 1983 | is returned when this limit is | 
 | 1984 | exceeded. RESOURCE_EXHAUSTED | 
 | 1985 | is also returned when | 
 | 1986 | max_tasks_dispatched_per_second | 
 | 1987 | is exceeded. | 
 | 1988 |  | 
 | 1989 | Args: | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1990 |   parent: string, Required. The queue name. For example: | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1991 | `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required) | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1992 |   body: object, The request body. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1993 |     The object takes the form of: | 
 | 1994 |  | 
 | 1995 | { # Request message for leasing tasks using LeaseTasks. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 1996 |     "filter": "A String", # `filter` can be used to specify a subset of tasks to lease. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1997 |         #  | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1998 |         # When `filter` is set to `tag=<my-tag>` then the | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1999 |         # response will contain only tasks whose | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2000 |         # tag is equal to `<my-tag>`. `<my-tag>` must be | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2001 |         # less than 500 characters. | 
 | 2002 |         #  | 
 | 2003 |         # When `filter` is set to `tag_function=oldest_tag()`, only tasks which have | 
 | 2004 |         # the same tag as the task with the oldest | 
 | 2005 |         # schedule_time will be returned. | 
 | 2006 |         #  | 
 | 2007 |         # Grammar Syntax: | 
 | 2008 |         #  | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2009 |         # * `filter = "tag=" tag | "tag_function=" function` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2010 |         #  | 
 | 2011 |         # * `tag = string` | 
 | 2012 |         #  | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2013 |         # * `function = "oldest_tag()"` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2014 |         #  | 
 | 2015 |         # The `oldest_tag()` function returns tasks which have the same tag as the | 
 | 2016 |         # oldest task (ordered by schedule time). | 
 | 2017 |         #  | 
 | 2018 |         # SDK compatibility: Although the SDK allows tags to be either | 
 | 2019 |         # string or | 
 | 2020 |         # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), | 
 | 2021 |         # only UTF-8 encoded tags can be used in Cloud Tasks. Tag which | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2022 |         # aren't UTF-8 encoded can't be used in the | 
 | 2023 |         # filter and the task's | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2024 |         # tag will be displayed as empty in Cloud Tasks. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2025 |     "maxTasks": 42, # The maximum number of tasks to lease. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2026 |         #  | 
 | 2027 |         # The system will make a best effort to return as close to as | 
 | 2028 |         # `max_tasks` as possible. | 
 | 2029 |         #  | 
 | 2030 |         # The largest that `max_tasks` can be is 1000. | 
 | 2031 |         #  | 
 | 2032 |         # The maximum total size of a lease tasks response is | 
 | 2033 |         # 32 MB. If the sum of all task sizes requested reaches this limit, | 
 | 2034 |         # fewer tasks than requested are returned. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2035 |     "leaseDuration": "A String", # Required. The duration of the lease. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2036 |         #  | 
 | 2037 |         # Each task returned in the response will | 
 | 2038 |         # have its schedule_time set to the current | 
 | 2039 |         # time plus the `lease_duration`. The task is leased until its | 
 | 2040 |         # schedule_time; thus, the task will not be | 
 | 2041 |         # returned to another LeaseTasks call | 
 | 2042 |         # before its schedule_time. | 
 | 2043 |         #  | 
 | 2044 |         #  | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2045 |         # After the worker has successfully finished the work associated | 
 | 2046 |         # with the task, the worker must call via | 
 | 2047 |         # AcknowledgeTask before the | 
 | 2048 |         # schedule_time. Otherwise the task will be | 
 | 2049 |         # returned to a later LeaseTasks call so | 
 | 2050 |         # that another worker can retry it. | 
 | 2051 |         #  | 
 | 2052 |         # The maximum lease duration is 1 week. | 
 | 2053 |         # `lease_duration` will be truncated to the nearest second. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2054 |     "responseView": "A String", # The response_view specifies which subset of the Task will be | 
 | 2055 |         # returned. | 
 | 2056 |         #  | 
 | 2057 |         # By default response_view is BASIC; not all | 
 | 2058 |         # information is retrieved by default because some data, such as | 
 | 2059 |         # payloads, might be desirable to return only when needed because | 
 | 2060 |         # of its large size or because of the sensitivity of data that it | 
 | 2061 |         # contains. | 
 | 2062 |         #  | 
 | 2063 |         # Authorization for FULL requires | 
 | 2064 |         # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) | 
 | 2065 |         # permission on the Task resource. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2066 |   } | 
 | 2067 |  | 
 | 2068 |   x__xgafv: string, V1 error format. | 
 | 2069 |     Allowed values | 
 | 2070 |       1 - v1 error format | 
 | 2071 |       2 - v2 error format | 
 | 2072 |  | 
 | 2073 | Returns: | 
 | 2074 |   An object of the form: | 
 | 2075 |  | 
 | 2076 |     { # Response message for leasing tasks using LeaseTasks. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2077 |     "tasks": [ # The leased tasks. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2078 |       { # A unit of scheduled work. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2079 |         "appEngineHttpRequest": { # App Engine HTTP request. # App Engine HTTP request that is sent to the task's target. Can | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2080 |             # be set only if | 
 | 2081 |             # app_engine_http_target is set | 
 | 2082 |             # on the queue. | 
 | 2083 |             # | 
 | 2084 |             # An App Engine task is a task that has AppEngineHttpRequest set. | 
 | 2085 |             # | 
 | 2086 |             # The message defines the HTTP request that is sent to an App Engine app when | 
 | 2087 |             # the task is dispatched. | 
 | 2088 |             # | 
 | 2089 |             # This proto can only be used for tasks in a queue which has | 
 | 2090 |             # app_engine_http_target set. | 
 | 2091 |             # | 
 | 2092 |             # Using AppEngineHttpRequest requires | 
 | 2093 |             # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) | 
 | 2094 |             # Google IAM permission for the project | 
 | 2095 |             # and the following scope: | 
 | 2096 |             # | 
 | 2097 |             # `https://www.googleapis.com/auth/cloud-platform` | 
 | 2098 |             # | 
 | 2099 |             # The task will be delivered to the App Engine app which belongs to the same | 
 | 2100 |             # project as the queue. For more information, see | 
 | 2101 |             # [How Requests are | 
 | 2102 |             # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 2103 |             # and how routing is affected by | 
 | 2104 |             # [dispatch | 
 | 2105 |             # files](https://cloud.google.com/appengine/docs/python/config/dispatchref). | 
 | 2106 |             # Traffic is encrypted during transport and never leaves Google datacenters. | 
 | 2107 |             # Because this traffic is carried over a communication mechanism internal to | 
 | 2108 |             # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). | 
 | 2109 |             # The request to the handler, however, will appear to have used the HTTP | 
 | 2110 |             # protocol. | 
 | 2111 |             # | 
 | 2112 |             # The AppEngineRouting used to construct the URL that the task is | 
 | 2113 |             # delivered to can be set at the queue-level or task-level: | 
 | 2114 |             # | 
 | 2115 |             # * If set, | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2116 |             #   app_engine_routing_override | 
 | 2117 |             #   is used for all tasks in the queue, no matter what the setting | 
 | 2118 |             #   is for the | 
 | 2119 |             #   task-level app_engine_routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2120 |             # | 
 | 2121 |             # | 
 | 2122 |             # The `url` that the task will be sent to is: | 
 | 2123 |             # | 
 | 2124 |             # * `url =` host `+` | 
 | 2125 |             #   relative_url | 
 | 2126 |             # | 
 | 2127 |             # Tasks can be dispatched to secure app handlers, unsecure app handlers, and | 
 | 2128 |             # URIs restricted with | 
 | 2129 |             # [`login: | 
 | 2130 |             # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). | 
 | 2131 |             # Because tasks are not run as any user, they cannot be dispatched to URIs | 
 | 2132 |             # restricted with | 
 | 2133 |             # [`login: | 
 | 2134 |             # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) | 
 | 2135 |             # Task dispatches also do not follow redirects. | 
 | 2136 |             # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2137 |             # The task attempt has succeeded if the app's request handler returns an HTTP | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2138 |             # response code in the range [`200` - `299`]. The task attempt has failed if | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2139 |             # the app's handler returns a non-2xx response code or Cloud Tasks does | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2140 |             # not receive response before the deadline. Failed | 
 | 2141 |             # tasks will be retried according to the | 
 | 2142 |             # retry configuration. `503` (Service Unavailable) is | 
 | 2143 |             # considered an App Engine system error instead of an application error and | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2144 |             # will cause Cloud Tasks' traffic congestion control to temporarily throttle | 
 | 2145 |             # the queue's dispatches. Unlike other types of task targets, a `429` (Too Many | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2146 |             # Requests) response from an app handler does not cause traffic congestion | 
 | 2147 |             # control to throttle the queue. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2148 |           "httpMethod": "A String", # The HTTP method to use for the request. The default is POST. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2149 |               # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2150 |               # The app's request handler for the task's target URL must be able to handle | 
 | 2151 |               # HTTP requests with this http_method, otherwise the task attempt fails with | 
 | 2152 |               # error code 405 (Method Not Allowed). See [Writing a push task request | 
 | 2153 |               # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) | 
 | 2154 |               # and the App Engine documentation for your runtime on [How Requests are | 
 | 2155 |               # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). | 
 | 2156 |           "payload": "A String", # Payload. | 
 | 2157 |               # | 
 | 2158 |               # The payload will be sent as the HTTP message body. A message | 
 | 2159 |               # body, and thus a payload, is allowed only if the HTTP method is | 
 | 2160 |               # POST or PUT. It is an error to set a data payload on a task with | 
 | 2161 |               # an incompatible HttpMethod. | 
 | 2162 |           "relativeUrl": "A String", # The relative URL. | 
 | 2163 |               # | 
 | 2164 |               # The relative URL must begin with "/" and must be a valid HTTP relative URL. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2165 |               # It can contain a path and query string arguments. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2166 |               # If the relative URL is empty, then the root path "/" will be used. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2167 |               # No spaces are allowed, and the maximum length allowed is 2083 characters. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2168 |           "headers": { # HTTP request headers. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2169 |               # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2170 |               # This map contains the header field names and values. | 
 | 2171 |               # Headers can be set when the | 
 | 2172 |               # task is created. | 
 | 2173 |               # Repeated headers are not supported but a header value can contain commas. | 
 | 2174 |               # | 
 | 2175 |               # Cloud Tasks sets some headers to default values: | 
 | 2176 |               # | 
 | 2177 |               # * `User-Agent`: By default, this header is | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2178 |               #   `"AppEngine-Google; (+http://code.google.com/appengine)"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2179 |               #   This header can be modified, but Cloud Tasks will append | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2180 |               #   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2181 |               #   modified `User-Agent`. | 
 | 2182 |               # | 
 | 2183 |               # If the task has a payload, Cloud | 
 | 2184 |               # Tasks sets the following headers: | 
 | 2185 |               # | 
 | 2186 |               # * `Content-Type`: By default, the `Content-Type` header is set to | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2187 |               #   `"application/octet-stream"`. The default can be overridden by explicitly | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2188 |               #   setting `Content-Type` to a particular media type when the | 
 | 2189 |               #   task is created. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2190 |               #   For example, `Content-Type` can be set to `"application/json"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2191 |               # * `Content-Length`: This is computed by Cloud Tasks. This value is | 
 | 2192 |               #   output only.   It cannot be changed. | 
 | 2193 |               # | 
 | 2194 |               # The headers below cannot be set or overridden: | 
 | 2195 |               # | 
 | 2196 |               # * `Host` | 
 | 2197 |               # * `X-Google-*` | 
 | 2198 |               # * `X-AppEngine-*` | 
 | 2199 |               # | 
 | 2200 |               # In addition, Cloud Tasks sets some headers when the task is dispatched, | 
 | 2201 |               # such as headers containing information about the task; see | 
 | 2202 |               # [request | 
 | 2203 |               # headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). | 
 | 2204 |               # These headers are set only when the task is dispatched, so they are not | 
 | 2205 |               # visible when the task is returned in a Cloud Tasks response. | 
 | 2206 |               # | 
 | 2207 |               # Although there is no specific limit for the maximum number of headers or | 
 | 2208 |               # the size, there is a limit on the maximum size of the Task. For more | 
 | 2209 |               # information, see the CreateTask documentation. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2210 |             "a_key": "A String", | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2211 |           }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2212 |           "appEngineRouting": { # App Engine Routing. # Task-level setting for App Engine routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2213 |               # | 
 | 2214 |               # If set, | 
 | 2215 |               # app_engine_routing_override | 
 | 2216 |               # is used for all tasks in the queue, no matter what the setting is for the | 
 | 2217 |               # task-level app_engine_routing. | 
 | 2218 |               # | 
 | 2219 |               # Defines routing characteristics specific to App Engine - service, version, | 
 | 2220 |               # and instance. | 
 | 2221 |               # | 
 | 2222 |               # For more information about services, versions, and instances see | 
 | 2223 |               # [An Overview of App | 
 | 2224 |               # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), | 
 | 2225 |               # [Microservices Architecture on Google App | 
 | 2226 |               # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), | 
 | 2227 |               # [App Engine Standard request | 
 | 2228 |               # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), | 
 | 2229 |               # and [App Engine Flex request | 
 | 2230 |               # 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^] | 2231 |             "instance": "A String", # App instance. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2232 |                 # | 
 | 2233 |                 # By default, the task is sent to an instance which is available when | 
 | 2234 |                 # the task is attempted. | 
 | 2235 |                 # | 
 | 2236 |                 # Requests can only be sent to a specific instance if | 
 | 2237 |                 # [manual scaling is used in App Engine | 
 | 2238 |                 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). | 
 | 2239 |                 # App Engine Flex does not support instances. For more information, see | 
 | 2240 |                 # [App Engine Standard request | 
 | 2241 |                 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 2242 |                 # and [App Engine Flex request | 
 | 2243 |                 # 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^] | 2244 |             "version": "A String", # App version. | 
 | 2245 |                 # | 
 | 2246 |                 # By default, the task is sent to the version which is the default | 
 | 2247 |                 # version when the task is attempted. | 
 | 2248 |                 # | 
 | 2249 |                 # For some queues or tasks which were created using the App Engine | 
 | 2250 |                 # Task Queue API, host is not parsable | 
 | 2251 |                 # into service, | 
 | 2252 |                 # version, and | 
 | 2253 |                 # instance. For example, some tasks | 
 | 2254 |                 # which were created using the App Engine SDK use a custom domain | 
 | 2255 |                 # name; custom domains are not parsed by Cloud Tasks. If | 
 | 2256 |                 # host is not parsable, then | 
 | 2257 |                 # service, | 
 | 2258 |                 # version, and | 
 | 2259 |                 # instance are the empty string. | 
 | 2260 |             "host": "A String", # Output only. The host that the task is sent to. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2261 |                 # | 
 | 2262 |                 # For more information, see | 
 | 2263 |                 # [How Requests are | 
 | 2264 |                 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). | 
 | 2265 |                 # | 
 | 2266 |                 # The host is constructed as: | 
 | 2267 |                 # | 
 | 2268 |                 # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2269 |                 # * `host = [application_domain_name]`</br> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2270 |                 #   `| [service] + '.' + [application_domain_name]`</br> | 
 | 2271 |                 #   `| [version] + '.' + [application_domain_name]`</br> | 
 | 2272 |                 #   `| [version_dot_service]+ '.' + [application_domain_name]`</br> | 
 | 2273 |                 #   `| [instance] + '.' + [application_domain_name]`</br> | 
 | 2274 |                 #   `| [instance_dot_service] + '.' + [application_domain_name]`</br> | 
 | 2275 |                 #   `| [instance_dot_version] + '.' + [application_domain_name]`</br> | 
 | 2276 |                 #   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2277 |                 # | 
 | 2278 |                 # * `application_domain_name` = The domain name of the app, for | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2279 |                 #   example <app-id>.appspot.com, which is associated with the | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2280 |                 #   queue's project ID. Some tasks which were created using the App Engine | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2281 |                 #   SDK use a custom domain name. | 
 | 2282 |                 # | 
 | 2283 |                 # * `service =` service | 
 | 2284 |                 # | 
 | 2285 |                 # * `version =` version | 
 | 2286 |                 # | 
 | 2287 |                 # * `version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2288 |                 #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2289 |                 #   service | 
 | 2290 |                 # | 
 | 2291 |                 # * `instance =` instance | 
 | 2292 |                 # | 
 | 2293 |                 # * `instance_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2294 |                 #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2295 |                 #   service | 
 | 2296 |                 # | 
 | 2297 |                 # * `instance_dot_version =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2298 |                 #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2299 |                 #   version | 
 | 2300 |                 # | 
 | 2301 |                 # * `instance_dot_version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2302 |                 #   instance `+ '.' +` | 
 | 2303 |                 #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2304 |                 #   service | 
 | 2305 |                 # | 
 | 2306 |                 # If service is empty, then the task will be sent | 
 | 2307 |                 # to the service which is the default service when the task is attempted. | 
 | 2308 |                 # | 
 | 2309 |                 # If version is empty, then the task will be sent | 
 | 2310 |                 # to the version which is the default version when the task is attempted. | 
 | 2311 |                 # | 
 | 2312 |                 # If instance is empty, then the task | 
 | 2313 |                 # will be sent to an instance which is available when the task is | 
 | 2314 |                 # attempted. | 
 | 2315 |                 # | 
 | 2316 |                 # If service, | 
 | 2317 |                 # version, or | 
 | 2318 |                 # instance is invalid, then the task | 
 | 2319 |                 # will be sent to the default version of the default service when | 
 | 2320 |                 # the task is attempted. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2321 |             "service": "A String", # App service. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2322 |                 # | 
 | 2323 |                 # By default, the task is sent to the service which is the default | 
 | 2324 |                 # service when the task is attempted. | 
 | 2325 |                 # | 
 | 2326 |                 # For some queues or tasks which were created using the App Engine | 
 | 2327 |                 # Task Queue API, host is not parsable | 
 | 2328 |                 # into service, | 
 | 2329 |                 # version, and | 
 | 2330 |                 # instance. For example, some tasks | 
 | 2331 |                 # which were created using the App Engine SDK use a custom domain | 
 | 2332 |                 # name; custom domains are not parsed by Cloud Tasks. If | 
 | 2333 |                 # host is not parsable, then | 
 | 2334 |                 # service, | 
 | 2335 |                 # version, and | 
 | 2336 |                 # instance are the empty string. | 
 | 2337 |           }, | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2338 |         }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2339 |         "view": "A String", # Output only. The view specifies which subset of the Task has | 
 | 2340 |             # been returned. | 
 | 2341 |         "pullMessage": { # The pull message contains data that can be used by the caller of # LeaseTasks to process the task. Can be | 
 | 2342 |             # set only if pull_target is set on the queue. | 
 | 2343 |             # | 
 | 2344 |             # A pull task is a task that has PullMessage set. | 
 | 2345 |             # LeaseTasks to process the task. | 
 | 2346 |             # | 
 | 2347 |             # This proto can only be used for tasks in a queue which has | 
 | 2348 |             # pull_target set. | 
 | 2349 |           "payload": "A String", # A data payload consumed by the worker to execute the task. | 
 | 2350 |           "tag": "A String", # The task's tag. | 
 | 2351 |               # | 
 | 2352 |               # Tags allow similar tasks to be processed in a batch. If you label | 
 | 2353 |               # tasks with a tag, your worker can | 
 | 2354 |               # lease tasks with the same tag using | 
 | 2355 |               # filter. For example, if you want to | 
 | 2356 |               # aggregate the events associated with a specific user once a day, | 
 | 2357 |               # you could tag tasks with the user ID. | 
 | 2358 |               # | 
 | 2359 |               # The task's tag can only be set when the | 
 | 2360 |               # task is created. | 
 | 2361 |               # | 
 | 2362 |               # The tag must be less than 500 characters. | 
 | 2363 |               # | 
 | 2364 |               # SDK compatibility: Although the SDK allows tags to be either | 
 | 2365 |               # string or | 
 | 2366 |               # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), | 
 | 2367 |               # only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 | 
 | 2368 |               # encoded, the tag will be empty when the task is returned by Cloud Tasks. | 
 | 2369 |         }, | 
 | 2370 |         "scheduleTime": "A String", # The time when the task is scheduled to be attempted. | 
 | 2371 |             # | 
 | 2372 |             # For App Engine queues, this is when the task will be attempted or retried. | 
 | 2373 |             # | 
 | 2374 |             # For pull queues, this is the time when the task is available to | 
 | 2375 |             # be leased; if a task is currently leased, this is the time when | 
 | 2376 |             # the current lease expires, that is, the time that the task was | 
 | 2377 |             # leased plus the lease_duration. | 
 | 2378 |             # | 
 | 2379 |             # `schedule_time` will be truncated to the nearest microsecond. | 
 | 2380 |         "createTime": "A String", # Output only. The time that the task was created. | 
 | 2381 |             # | 
 | 2382 |             # `create_time` will be truncated to the nearest second. | 
 | 2383 |         "status": { # Status of the task. # Output only. The task status. | 
 | 2384 |           "attemptDispatchCount": 42, # Output only. The number of attempts dispatched. | 
 | 2385 |               # | 
 | 2386 |               # This count includes attempts which have been dispatched but haven't | 
 | 2387 |               # received a response. | 
 | 2388 |           "firstAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's first attempt. | 
 | 2389 |               # | 
 | 2390 |               # Only dispatch_time will be set. | 
 | 2391 |               # The other AttemptStatus information is not retained by Cloud Tasks. | 
 | 2392 |               # | 
 | 2393 |               # This field is not calculated for pull tasks. | 
 | 2394 |             "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 2395 |                 # | 
 | 2396 |                 # `response_time` will be truncated to the nearest microsecond. | 
 | 2397 |             "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 2398 |                 # | 
 | 2399 |                 # If the task has not been attempted or the task is currently running | 
 | 2400 |                 # then the response status is unset. | 
 | 2401 |                 # different programming environments, including REST APIs and RPC APIs. It is | 
 | 2402 |                 # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 2403 |                 # three pieces of data: error code, error message, and error details. | 
 | 2404 |                 # | 
 | 2405 |                 # You can find out more about this error model and how to work with it in the | 
 | 2406 |                 # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 2407 |               "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 2408 |                   # message types for APIs to use. | 
 | 2409 |                 { | 
 | 2410 |                   "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 2411 |                 }, | 
 | 2412 |               ], | 
 | 2413 |               "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 2414 |               "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 2415 |                   # user-facing error message should be localized and sent in the | 
 | 2416 |                   # google.rpc.Status.details field, or localized by the client. | 
 | 2417 |             }, | 
 | 2418 |             "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 2419 |                 # | 
 | 2420 |                 # `schedule_time` will be truncated to the nearest microsecond. | 
 | 2421 |             "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 2422 |                 # | 
 | 2423 |                 # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 2424 |           }, | 
 | 2425 |           "attemptResponseCount": 42, # Output only. The number of attempts which have received a response. | 
 | 2426 |               # | 
 | 2427 |               # This field is not calculated for pull tasks. | 
 | 2428 |           "lastAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's last attempt. | 
 | 2429 |               # | 
 | 2430 |               # This field is not calculated for pull tasks. | 
 | 2431 |             "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 2432 |                 # | 
 | 2433 |                 # `response_time` will be truncated to the nearest microsecond. | 
 | 2434 |             "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 2435 |                 # | 
 | 2436 |                 # If the task has not been attempted or the task is currently running | 
 | 2437 |                 # then the response status is unset. | 
 | 2438 |                 # different programming environments, including REST APIs and RPC APIs. It is | 
 | 2439 |                 # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 2440 |                 # three pieces of data: error code, error message, and error details. | 
 | 2441 |                 # | 
 | 2442 |                 # You can find out more about this error model and how to work with it in the | 
 | 2443 |                 # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 2444 |               "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 2445 |                   # message types for APIs to use. | 
 | 2446 |                 { | 
 | 2447 |                   "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 2448 |                 }, | 
 | 2449 |               ], | 
 | 2450 |               "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 2451 |               "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 2452 |                   # user-facing error message should be localized and sent in the | 
 | 2453 |                   # google.rpc.Status.details field, or localized by the client. | 
 | 2454 |             }, | 
 | 2455 |             "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 2456 |                 # | 
 | 2457 |                 # `schedule_time` will be truncated to the nearest microsecond. | 
 | 2458 |             "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 2459 |                 # | 
 | 2460 |                 # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 2461 |           }, | 
 | 2462 |         }, | 
 | 2463 |         "name": "A String", # Optionally caller-specified in CreateTask. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2464 |             # | 
 | 2465 |             # The task name. | 
 | 2466 |             # | 
 | 2467 |             # The task name must have the following format: | 
 | 2468 |             # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` | 
 | 2469 |             # | 
 | 2470 |             # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), | 
 | 2471 |             #    hyphens (-), colons (:), or periods (.). | 
 | 2472 |             #    For more information, see | 
 | 2473 |             #    [Identifying | 
 | 2474 |             #    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^] | 2475 |             # * `LOCATION_ID` is the canonical ID for the task's location. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2476 |             #    The list of available locations can be obtained by calling | 
 | 2477 |             #    ListLocations. | 
 | 2478 |             #    For more information, see https://cloud.google.com/about/locations/. | 
 | 2479 |             # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or | 
 | 2480 |             #   hyphens (-). The maximum length is 100 characters. | 
 | 2481 |             # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), | 
 | 2482 |             #   hyphens (-), or underscores (_). The maximum length is 500 characters. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2483 |       }, | 
 | 2484 |     ], | 
 | 2485 |   }</pre> | 
 | 2486 | </div> | 
 | 2487 |  | 
 | 2488 | <div class="method"> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2489 |     <code class="details" id="list">list(parent, responseView=None, pageToken=None, pageSize=None, x__xgafv=None)</code> | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2490 |   <pre>Lists the tasks in a queue. | 
 | 2491 |  | 
 | 2492 | By default, only the BASIC view is retrieved | 
 | 2493 | due to performance considerations; | 
 | 2494 | response_view controls the | 
 | 2495 | subset of information which is returned. | 
 | 2496 |  | 
 | 2497 | The tasks may be returned in any order. The ordering may change at any | 
 | 2498 | time. | 
 | 2499 |  | 
 | 2500 | Args: | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2501 |   parent: string, Required. The queue name. For example: | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2502 | `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` (required) | 
 | 2503 |   responseView: string, The response_view specifies which subset of the Task will be | 
 | 2504 | returned. | 
 | 2505 |  | 
 | 2506 | By default response_view is BASIC; not all | 
 | 2507 | information is retrieved by default because some data, such as | 
 | 2508 | payloads, might be desirable to return only when needed because | 
 | 2509 | of its large size or because of the sensitivity of data that it | 
 | 2510 | contains. | 
 | 2511 |  | 
 | 2512 | Authorization for FULL requires | 
 | 2513 | `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) | 
 | 2514 | permission on the Task resource. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2515 |   pageToken: string, A token identifying the page of results to return. | 
 | 2516 |  | 
 | 2517 | To request the first page results, page_token must be empty. To | 
 | 2518 | request the next page of results, page_token must be the value of | 
 | 2519 | next_page_token returned | 
 | 2520 | from the previous call to ListTasks | 
 | 2521 | method. | 
 | 2522 |  | 
 | 2523 | The page token is valid for only 2 hours. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2524 |   pageSize: integer, Maximum page size. | 
 | 2525 |  | 
 | 2526 | Fewer tasks than requested might be returned, even if more tasks exist; use | 
 | 2527 | next_page_token in the response to | 
 | 2528 | determine if more tasks exist. | 
 | 2529 |  | 
 | 2530 | The maximum page size is 1000. If unspecified, the page size will be the | 
 | 2531 | maximum. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2532 |   x__xgafv: string, V1 error format. | 
 | 2533 |     Allowed values | 
 | 2534 |       1 - v1 error format | 
 | 2535 |       2 - v2 error format | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2536 |  | 
 | 2537 | Returns: | 
 | 2538 |   An object of the form: | 
 | 2539 |  | 
 | 2540 |     { # Response message for listing tasks using ListTasks. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2541 |     "tasks": [ # The list of tasks. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2542 |       { # A unit of scheduled work. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2543 |         "appEngineHttpRequest": { # App Engine HTTP request. # App Engine HTTP request that is sent to the task's target. Can | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2544 |             # be set only if | 
 | 2545 |             # app_engine_http_target is set | 
 | 2546 |             # on the queue. | 
 | 2547 |             # | 
 | 2548 |             # An App Engine task is a task that has AppEngineHttpRequest set. | 
 | 2549 |             # | 
 | 2550 |             # The message defines the HTTP request that is sent to an App Engine app when | 
 | 2551 |             # the task is dispatched. | 
 | 2552 |             # | 
 | 2553 |             # This proto can only be used for tasks in a queue which has | 
 | 2554 |             # app_engine_http_target set. | 
 | 2555 |             # | 
 | 2556 |             # Using AppEngineHttpRequest requires | 
 | 2557 |             # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) | 
 | 2558 |             # Google IAM permission for the project | 
 | 2559 |             # and the following scope: | 
 | 2560 |             # | 
 | 2561 |             # `https://www.googleapis.com/auth/cloud-platform` | 
 | 2562 |             # | 
 | 2563 |             # The task will be delivered to the App Engine app which belongs to the same | 
 | 2564 |             # project as the queue. For more information, see | 
 | 2565 |             # [How Requests are | 
 | 2566 |             # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 2567 |             # and how routing is affected by | 
 | 2568 |             # [dispatch | 
 | 2569 |             # files](https://cloud.google.com/appengine/docs/python/config/dispatchref). | 
 | 2570 |             # Traffic is encrypted during transport and never leaves Google datacenters. | 
 | 2571 |             # Because this traffic is carried over a communication mechanism internal to | 
 | 2572 |             # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). | 
 | 2573 |             # The request to the handler, however, will appear to have used the HTTP | 
 | 2574 |             # protocol. | 
 | 2575 |             # | 
 | 2576 |             # The AppEngineRouting used to construct the URL that the task is | 
 | 2577 |             # delivered to can be set at the queue-level or task-level: | 
 | 2578 |             # | 
 | 2579 |             # * If set, | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2580 |             #   app_engine_routing_override | 
 | 2581 |             #   is used for all tasks in the queue, no matter what the setting | 
 | 2582 |             #   is for the | 
 | 2583 |             #   task-level app_engine_routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2584 |             # | 
 | 2585 |             # | 
 | 2586 |             # The `url` that the task will be sent to is: | 
 | 2587 |             # | 
 | 2588 |             # * `url =` host `+` | 
 | 2589 |             #   relative_url | 
 | 2590 |             # | 
 | 2591 |             # Tasks can be dispatched to secure app handlers, unsecure app handlers, and | 
 | 2592 |             # URIs restricted with | 
 | 2593 |             # [`login: | 
 | 2594 |             # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). | 
 | 2595 |             # Because tasks are not run as any user, they cannot be dispatched to URIs | 
 | 2596 |             # restricted with | 
 | 2597 |             # [`login: | 
 | 2598 |             # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) | 
 | 2599 |             # Task dispatches also do not follow redirects. | 
 | 2600 |             # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2601 |             # The task attempt has succeeded if the app's request handler returns an HTTP | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2602 |             # response code in the range [`200` - `299`]. The task attempt has failed if | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2603 |             # the app's handler returns a non-2xx response code or Cloud Tasks does | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2604 |             # not receive response before the deadline. Failed | 
 | 2605 |             # tasks will be retried according to the | 
 | 2606 |             # retry configuration. `503` (Service Unavailable) is | 
 | 2607 |             # considered an App Engine system error instead of an application error and | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2608 |             # will cause Cloud Tasks' traffic congestion control to temporarily throttle | 
 | 2609 |             # the queue's dispatches. Unlike other types of task targets, a `429` (Too Many | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2610 |             # Requests) response from an app handler does not cause traffic congestion | 
 | 2611 |             # control to throttle the queue. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2612 |           "httpMethod": "A String", # The HTTP method to use for the request. The default is POST. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2613 |               # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2614 |               # The app's request handler for the task's target URL must be able to handle | 
 | 2615 |               # HTTP requests with this http_method, otherwise the task attempt fails with | 
 | 2616 |               # error code 405 (Method Not Allowed). See [Writing a push task request | 
 | 2617 |               # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) | 
 | 2618 |               # and the App Engine documentation for your runtime on [How Requests are | 
 | 2619 |               # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). | 
 | 2620 |           "payload": "A String", # Payload. | 
 | 2621 |               # | 
 | 2622 |               # The payload will be sent as the HTTP message body. A message | 
 | 2623 |               # body, and thus a payload, is allowed only if the HTTP method is | 
 | 2624 |               # POST or PUT. It is an error to set a data payload on a task with | 
 | 2625 |               # an incompatible HttpMethod. | 
 | 2626 |           "relativeUrl": "A String", # The relative URL. | 
 | 2627 |               # | 
 | 2628 |               # The relative URL must begin with "/" and must be a valid HTTP relative URL. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2629 |               # It can contain a path and query string arguments. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2630 |               # If the relative URL is empty, then the root path "/" will be used. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2631 |               # No spaces are allowed, and the maximum length allowed is 2083 characters. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2632 |           "headers": { # HTTP request headers. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2633 |               # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2634 |               # This map contains the header field names and values. | 
 | 2635 |               # Headers can be set when the | 
 | 2636 |               # task is created. | 
 | 2637 |               # Repeated headers are not supported but a header value can contain commas. | 
 | 2638 |               # | 
 | 2639 |               # Cloud Tasks sets some headers to default values: | 
 | 2640 |               # | 
 | 2641 |               # * `User-Agent`: By default, this header is | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2642 |               #   `"AppEngine-Google; (+http://code.google.com/appengine)"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2643 |               #   This header can be modified, but Cloud Tasks will append | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2644 |               #   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2645 |               #   modified `User-Agent`. | 
 | 2646 |               # | 
 | 2647 |               # If the task has a payload, Cloud | 
 | 2648 |               # Tasks sets the following headers: | 
 | 2649 |               # | 
 | 2650 |               # * `Content-Type`: By default, the `Content-Type` header is set to | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2651 |               #   `"application/octet-stream"`. The default can be overridden by explicitly | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2652 |               #   setting `Content-Type` to a particular media type when the | 
 | 2653 |               #   task is created. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2654 |               #   For example, `Content-Type` can be set to `"application/json"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2655 |               # * `Content-Length`: This is computed by Cloud Tasks. This value is | 
 | 2656 |               #   output only.   It cannot be changed. | 
 | 2657 |               # | 
 | 2658 |               # The headers below cannot be set or overridden: | 
 | 2659 |               # | 
 | 2660 |               # * `Host` | 
 | 2661 |               # * `X-Google-*` | 
 | 2662 |               # * `X-AppEngine-*` | 
 | 2663 |               # | 
 | 2664 |               # In addition, Cloud Tasks sets some headers when the task is dispatched, | 
 | 2665 |               # such as headers containing information about the task; see | 
 | 2666 |               # [request | 
 | 2667 |               # headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). | 
 | 2668 |               # These headers are set only when the task is dispatched, so they are not | 
 | 2669 |               # visible when the task is returned in a Cloud Tasks response. | 
 | 2670 |               # | 
 | 2671 |               # Although there is no specific limit for the maximum number of headers or | 
 | 2672 |               # the size, there is a limit on the maximum size of the Task. For more | 
 | 2673 |               # information, see the CreateTask documentation. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2674 |             "a_key": "A String", | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2675 |           }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2676 |           "appEngineRouting": { # App Engine Routing. # Task-level setting for App Engine routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2677 |               # | 
 | 2678 |               # If set, | 
 | 2679 |               # app_engine_routing_override | 
 | 2680 |               # is used for all tasks in the queue, no matter what the setting is for the | 
 | 2681 |               # task-level app_engine_routing. | 
 | 2682 |               # | 
 | 2683 |               # Defines routing characteristics specific to App Engine - service, version, | 
 | 2684 |               # and instance. | 
 | 2685 |               # | 
 | 2686 |               # For more information about services, versions, and instances see | 
 | 2687 |               # [An Overview of App | 
 | 2688 |               # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), | 
 | 2689 |               # [Microservices Architecture on Google App | 
 | 2690 |               # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), | 
 | 2691 |               # [App Engine Standard request | 
 | 2692 |               # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), | 
 | 2693 |               # and [App Engine Flex request | 
 | 2694 |               # 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^] | 2695 |             "instance": "A String", # App instance. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2696 |                 # | 
 | 2697 |                 # By default, the task is sent to an instance which is available when | 
 | 2698 |                 # the task is attempted. | 
 | 2699 |                 # | 
 | 2700 |                 # Requests can only be sent to a specific instance if | 
 | 2701 |                 # [manual scaling is used in App Engine | 
 | 2702 |                 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). | 
 | 2703 |                 # App Engine Flex does not support instances. For more information, see | 
 | 2704 |                 # [App Engine Standard request | 
 | 2705 |                 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 2706 |                 # and [App Engine Flex request | 
 | 2707 |                 # 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^] | 2708 |             "version": "A String", # App version. | 
 | 2709 |                 # | 
 | 2710 |                 # By default, the task is sent to the version which is the default | 
 | 2711 |                 # version when the task is attempted. | 
 | 2712 |                 # | 
 | 2713 |                 # For some queues or tasks which were created using the App Engine | 
 | 2714 |                 # Task Queue API, host is not parsable | 
 | 2715 |                 # into service, | 
 | 2716 |                 # version, and | 
 | 2717 |                 # instance. For example, some tasks | 
 | 2718 |                 # which were created using the App Engine SDK use a custom domain | 
 | 2719 |                 # name; custom domains are not parsed by Cloud Tasks. If | 
 | 2720 |                 # host is not parsable, then | 
 | 2721 |                 # service, | 
 | 2722 |                 # version, and | 
 | 2723 |                 # instance are the empty string. | 
 | 2724 |             "host": "A String", # Output only. The host that the task is sent to. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2725 |                 # | 
 | 2726 |                 # For more information, see | 
 | 2727 |                 # [How Requests are | 
 | 2728 |                 # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). | 
 | 2729 |                 # | 
 | 2730 |                 # The host is constructed as: | 
 | 2731 |                 # | 
 | 2732 |                 # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2733 |                 # * `host = [application_domain_name]`</br> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2734 |                 #   `| [service] + '.' + [application_domain_name]`</br> | 
 | 2735 |                 #   `| [version] + '.' + [application_domain_name]`</br> | 
 | 2736 |                 #   `| [version_dot_service]+ '.' + [application_domain_name]`</br> | 
 | 2737 |                 #   `| [instance] + '.' + [application_domain_name]`</br> | 
 | 2738 |                 #   `| [instance_dot_service] + '.' + [application_domain_name]`</br> | 
 | 2739 |                 #   `| [instance_dot_version] + '.' + [application_domain_name]`</br> | 
 | 2740 |                 #   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2741 |                 # | 
 | 2742 |                 # * `application_domain_name` = The domain name of the app, for | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2743 |                 #   example <app-id>.appspot.com, which is associated with the | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2744 |                 #   queue's project ID. Some tasks which were created using the App Engine | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2745 |                 #   SDK use a custom domain name. | 
 | 2746 |                 # | 
 | 2747 |                 # * `service =` service | 
 | 2748 |                 # | 
 | 2749 |                 # * `version =` version | 
 | 2750 |                 # | 
 | 2751 |                 # * `version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2752 |                 #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2753 |                 #   service | 
 | 2754 |                 # | 
 | 2755 |                 # * `instance =` instance | 
 | 2756 |                 # | 
 | 2757 |                 # * `instance_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2758 |                 #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2759 |                 #   service | 
 | 2760 |                 # | 
 | 2761 |                 # * `instance_dot_version =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2762 |                 #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2763 |                 #   version | 
 | 2764 |                 # | 
 | 2765 |                 # * `instance_dot_version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2766 |                 #   instance `+ '.' +` | 
 | 2767 |                 #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2768 |                 #   service | 
 | 2769 |                 # | 
 | 2770 |                 # If service is empty, then the task will be sent | 
 | 2771 |                 # to the service which is the default service when the task is attempted. | 
 | 2772 |                 # | 
 | 2773 |                 # If version is empty, then the task will be sent | 
 | 2774 |                 # to the version which is the default version when the task is attempted. | 
 | 2775 |                 # | 
 | 2776 |                 # If instance is empty, then the task | 
 | 2777 |                 # will be sent to an instance which is available when the task is | 
 | 2778 |                 # attempted. | 
 | 2779 |                 # | 
 | 2780 |                 # If service, | 
 | 2781 |                 # version, or | 
 | 2782 |                 # instance is invalid, then the task | 
 | 2783 |                 # will be sent to the default version of the default service when | 
 | 2784 |                 # the task is attempted. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2785 |             "service": "A String", # App service. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2786 |                 # | 
 | 2787 |                 # By default, the task is sent to the service which is the default | 
 | 2788 |                 # service when the task is attempted. | 
 | 2789 |                 # | 
 | 2790 |                 # For some queues or tasks which were created using the App Engine | 
 | 2791 |                 # Task Queue API, host is not parsable | 
 | 2792 |                 # into service, | 
 | 2793 |                 # version, and | 
 | 2794 |                 # instance. For example, some tasks | 
 | 2795 |                 # which were created using the App Engine SDK use a custom domain | 
 | 2796 |                 # name; custom domains are not parsed by Cloud Tasks. If | 
 | 2797 |                 # host is not parsable, then | 
 | 2798 |                 # service, | 
 | 2799 |                 # version, and | 
 | 2800 |                 # instance are the empty string. | 
 | 2801 |           }, | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2802 |         }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2803 |         "view": "A String", # Output only. The view specifies which subset of the Task has | 
 | 2804 |             # been returned. | 
 | 2805 |         "pullMessage": { # The pull message contains data that can be used by the caller of # LeaseTasks to process the task. Can be | 
 | 2806 |             # set only if pull_target is set on the queue. | 
 | 2807 |             # | 
 | 2808 |             # A pull task is a task that has PullMessage set. | 
 | 2809 |             # LeaseTasks to process the task. | 
 | 2810 |             # | 
 | 2811 |             # This proto can only be used for tasks in a queue which has | 
 | 2812 |             # pull_target set. | 
 | 2813 |           "payload": "A String", # A data payload consumed by the worker to execute the task. | 
 | 2814 |           "tag": "A String", # The task's tag. | 
 | 2815 |               # | 
 | 2816 |               # Tags allow similar tasks to be processed in a batch. If you label | 
 | 2817 |               # tasks with a tag, your worker can | 
 | 2818 |               # lease tasks with the same tag using | 
 | 2819 |               # filter. For example, if you want to | 
 | 2820 |               # aggregate the events associated with a specific user once a day, | 
 | 2821 |               # you could tag tasks with the user ID. | 
 | 2822 |               # | 
 | 2823 |               # The task's tag can only be set when the | 
 | 2824 |               # task is created. | 
 | 2825 |               # | 
 | 2826 |               # The tag must be less than 500 characters. | 
 | 2827 |               # | 
 | 2828 |               # SDK compatibility: Although the SDK allows tags to be either | 
 | 2829 |               # string or | 
 | 2830 |               # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), | 
 | 2831 |               # only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 | 
 | 2832 |               # encoded, the tag will be empty when the task is returned by Cloud Tasks. | 
 | 2833 |         }, | 
 | 2834 |         "scheduleTime": "A String", # The time when the task is scheduled to be attempted. | 
 | 2835 |             # | 
 | 2836 |             # For App Engine queues, this is when the task will be attempted or retried. | 
 | 2837 |             # | 
 | 2838 |             # For pull queues, this is the time when the task is available to | 
 | 2839 |             # be leased; if a task is currently leased, this is the time when | 
 | 2840 |             # the current lease expires, that is, the time that the task was | 
 | 2841 |             # leased plus the lease_duration. | 
 | 2842 |             # | 
 | 2843 |             # `schedule_time` will be truncated to the nearest microsecond. | 
 | 2844 |         "createTime": "A String", # Output only. The time that the task was created. | 
 | 2845 |             # | 
 | 2846 |             # `create_time` will be truncated to the nearest second. | 
 | 2847 |         "status": { # Status of the task. # Output only. The task status. | 
 | 2848 |           "attemptDispatchCount": 42, # Output only. The number of attempts dispatched. | 
 | 2849 |               # | 
 | 2850 |               # This count includes attempts which have been dispatched but haven't | 
 | 2851 |               # received a response. | 
 | 2852 |           "firstAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's first attempt. | 
 | 2853 |               # | 
 | 2854 |               # Only dispatch_time will be set. | 
 | 2855 |               # The other AttemptStatus information is not retained by Cloud Tasks. | 
 | 2856 |               # | 
 | 2857 |               # This field is not calculated for pull tasks. | 
 | 2858 |             "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 2859 |                 # | 
 | 2860 |                 # `response_time` will be truncated to the nearest microsecond. | 
 | 2861 |             "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 2862 |                 # | 
 | 2863 |                 # If the task has not been attempted or the task is currently running | 
 | 2864 |                 # then the response status is unset. | 
 | 2865 |                 # different programming environments, including REST APIs and RPC APIs. It is | 
 | 2866 |                 # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 2867 |                 # three pieces of data: error code, error message, and error details. | 
 | 2868 |                 # | 
 | 2869 |                 # You can find out more about this error model and how to work with it in the | 
 | 2870 |                 # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 2871 |               "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 2872 |                   # message types for APIs to use. | 
 | 2873 |                 { | 
 | 2874 |                   "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 2875 |                 }, | 
 | 2876 |               ], | 
 | 2877 |               "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 2878 |               "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 2879 |                   # user-facing error message should be localized and sent in the | 
 | 2880 |                   # google.rpc.Status.details field, or localized by the client. | 
 | 2881 |             }, | 
 | 2882 |             "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 2883 |                 # | 
 | 2884 |                 # `schedule_time` will be truncated to the nearest microsecond. | 
 | 2885 |             "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 2886 |                 # | 
 | 2887 |                 # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 2888 |           }, | 
 | 2889 |           "attemptResponseCount": 42, # Output only. The number of attempts which have received a response. | 
 | 2890 |               # | 
 | 2891 |               # This field is not calculated for pull tasks. | 
 | 2892 |           "lastAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's last attempt. | 
 | 2893 |               # | 
 | 2894 |               # This field is not calculated for pull tasks. | 
 | 2895 |             "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 2896 |                 # | 
 | 2897 |                 # `response_time` will be truncated to the nearest microsecond. | 
 | 2898 |             "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 2899 |                 # | 
 | 2900 |                 # If the task has not been attempted or the task is currently running | 
 | 2901 |                 # then the response status is unset. | 
 | 2902 |                 # different programming environments, including REST APIs and RPC APIs. It is | 
 | 2903 |                 # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 2904 |                 # three pieces of data: error code, error message, and error details. | 
 | 2905 |                 # | 
 | 2906 |                 # You can find out more about this error model and how to work with it in the | 
 | 2907 |                 # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 2908 |               "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 2909 |                   # message types for APIs to use. | 
 | 2910 |                 { | 
 | 2911 |                   "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 2912 |                 }, | 
 | 2913 |               ], | 
 | 2914 |               "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 2915 |               "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 2916 |                   # user-facing error message should be localized and sent in the | 
 | 2917 |                   # google.rpc.Status.details field, or localized by the client. | 
 | 2918 |             }, | 
 | 2919 |             "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 2920 |                 # | 
 | 2921 |                 # `schedule_time` will be truncated to the nearest microsecond. | 
 | 2922 |             "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 2923 |                 # | 
 | 2924 |                 # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 2925 |           }, | 
 | 2926 |         }, | 
 | 2927 |         "name": "A String", # Optionally caller-specified in CreateTask. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2928 |             # | 
 | 2929 |             # The task name. | 
 | 2930 |             # | 
 | 2931 |             # The task name must have the following format: | 
 | 2932 |             # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` | 
 | 2933 |             # | 
 | 2934 |             # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), | 
 | 2935 |             #    hyphens (-), colons (:), or periods (.). | 
 | 2936 |             #    For more information, see | 
 | 2937 |             #    [Identifying | 
 | 2938 |             #    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^] | 2939 |             # * `LOCATION_ID` is the canonical ID for the task's location. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2940 |             #    The list of available locations can be obtained by calling | 
 | 2941 |             #    ListLocations. | 
 | 2942 |             #    For more information, see https://cloud.google.com/about/locations/. | 
 | 2943 |             # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or | 
 | 2944 |             #   hyphens (-). The maximum length is 100 characters. | 
 | 2945 |             # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), | 
 | 2946 |             #   hyphens (-), or underscores (_). The maximum length is 500 characters. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2947 |       }, | 
 | 2948 |     ], | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2949 |     "nextPageToken": "A String", # A token to retrieve next page of results. | 
 | 2950 |         # | 
 | 2951 |         # To return the next page of results, call | 
 | 2952 |         # ListTasks with this value as the | 
 | 2953 |         # page_token. | 
 | 2954 |         # | 
 | 2955 |         # If the next_page_token is empty, there are no more results. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2956 |   }</pre> | 
 | 2957 | </div> | 
 | 2958 |  | 
 | 2959 | <div class="method"> | 
 | 2960 |     <code class="details" id="list_next">list_next(previous_request, previous_response)</code> | 
 | 2961 |   <pre>Retrieves the next page of results. | 
 | 2962 |  | 
 | 2963 | Args: | 
 | 2964 |   previous_request: The request for the previous page. (required) | 
 | 2965 |   previous_response: The response from the request for the previous page. (required) | 
 | 2966 |  | 
 | 2967 | Returns: | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2968 |   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] | 2969 |   page. Returns None if there are no more items in the collection. | 
 | 2970 |     </pre> | 
 | 2971 | </div> | 
 | 2972 |  | 
 | 2973 | <div class="method"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2974 |     <code class="details" id="renewLease">renewLease(name, body=None, x__xgafv=None)</code> | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2975 |   <pre>Renew the current lease of a pull task. | 
 | 2976 |  | 
 | 2977 | The worker can use this method to extend the lease by a new | 
 | 2978 | duration, starting from now. The new task lease will be | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2979 | returned in the task's schedule_time. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2980 |  | 
 | 2981 | Args: | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2982 |   name: string, Required. The task name. For example: | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2983 | `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required) | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 2984 |   body: object, The request body. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2985 |     The object takes the form of: | 
 | 2986 |  | 
 | 2987 | { # Request message for renewing a lease using | 
 | 2988 |       # RenewLease. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 2989 |     "responseView": "A String", # The response_view specifies which subset of the Task will be | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 2990 |         # returned. | 
 | 2991 |         #  | 
 | 2992 |         # By default response_view is BASIC; not all | 
 | 2993 |         # information is retrieved by default because some data, such as | 
 | 2994 |         # payloads, might be desirable to return only when needed because | 
 | 2995 |         # of its large size or because of the sensitivity of data that it | 
 | 2996 |         # contains. | 
 | 2997 |         #  | 
 | 2998 |         # Authorization for FULL requires | 
 | 2999 |         # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) | 
 | 3000 |         # permission on the Task resource. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3001 |     "scheduleTime": "A String", # Required. The task's current schedule time, available in the | 
 | 3002 |         # schedule_time returned by | 
 | 3003 |         # LeaseTasks response or | 
 | 3004 |         # RenewLease response. This restriction is | 
 | 3005 |         # to ensure that your worker currently holds the lease. | 
 | 3006 |     "leaseDuration": "A String", # Required. The desired new lease duration, starting from now. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3007 |         #  | 
 | 3008 |         #  | 
 | 3009 |         # The maximum lease duration is 1 week. | 
 | 3010 |         # `lease_duration` will be truncated to the nearest second. | 
 | 3011 |   } | 
 | 3012 |  | 
 | 3013 |   x__xgafv: string, V1 error format. | 
 | 3014 |     Allowed values | 
 | 3015 |       1 - v1 error format | 
 | 3016 |       2 - v2 error format | 
 | 3017 |  | 
 | 3018 | Returns: | 
 | 3019 |   An object of the form: | 
 | 3020 |  | 
 | 3021 |     { # A unit of scheduled work. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3022 |     "appEngineHttpRequest": { # App Engine HTTP request. # App Engine HTTP request that is sent to the task's target. Can | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3023 |         # be set only if | 
 | 3024 |         # app_engine_http_target is set | 
 | 3025 |         # on the queue. | 
 | 3026 |         # | 
 | 3027 |         # An App Engine task is a task that has AppEngineHttpRequest set. | 
 | 3028 |         # | 
 | 3029 |         # The message defines the HTTP request that is sent to an App Engine app when | 
 | 3030 |         # the task is dispatched. | 
 | 3031 |         # | 
 | 3032 |         # This proto can only be used for tasks in a queue which has | 
 | 3033 |         # app_engine_http_target set. | 
 | 3034 |         # | 
 | 3035 |         # Using AppEngineHttpRequest requires | 
 | 3036 |         # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) | 
 | 3037 |         # Google IAM permission for the project | 
 | 3038 |         # and the following scope: | 
 | 3039 |         # | 
 | 3040 |         # `https://www.googleapis.com/auth/cloud-platform` | 
 | 3041 |         # | 
 | 3042 |         # The task will be delivered to the App Engine app which belongs to the same | 
 | 3043 |         # project as the queue. For more information, see | 
 | 3044 |         # [How Requests are | 
 | 3045 |         # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 3046 |         # and how routing is affected by | 
 | 3047 |         # [dispatch | 
 | 3048 |         # files](https://cloud.google.com/appengine/docs/python/config/dispatchref). | 
 | 3049 |         # Traffic is encrypted during transport and never leaves Google datacenters. | 
 | 3050 |         # Because this traffic is carried over a communication mechanism internal to | 
 | 3051 |         # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). | 
 | 3052 |         # The request to the handler, however, will appear to have used the HTTP | 
 | 3053 |         # protocol. | 
 | 3054 |         # | 
 | 3055 |         # The AppEngineRouting used to construct the URL that the task is | 
 | 3056 |         # delivered to can be set at the queue-level or task-level: | 
 | 3057 |         # | 
 | 3058 |         # * If set, | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3059 |         #   app_engine_routing_override | 
 | 3060 |         #   is used for all tasks in the queue, no matter what the setting | 
 | 3061 |         #   is for the | 
 | 3062 |         #   task-level app_engine_routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3063 |         # | 
 | 3064 |         # | 
 | 3065 |         # The `url` that the task will be sent to is: | 
 | 3066 |         # | 
 | 3067 |         # * `url =` host `+` | 
 | 3068 |         #   relative_url | 
 | 3069 |         # | 
 | 3070 |         # Tasks can be dispatched to secure app handlers, unsecure app handlers, and | 
 | 3071 |         # URIs restricted with | 
 | 3072 |         # [`login: | 
 | 3073 |         # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). | 
 | 3074 |         # Because tasks are not run as any user, they cannot be dispatched to URIs | 
 | 3075 |         # restricted with | 
 | 3076 |         # [`login: | 
 | 3077 |         # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) | 
 | 3078 |         # Task dispatches also do not follow redirects. | 
 | 3079 |         # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3080 |         # The task attempt has succeeded if the app's request handler returns an HTTP | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3081 |         # response code in the range [`200` - `299`]. The task attempt has failed if | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3082 |         # the app's handler returns a non-2xx response code or Cloud Tasks does | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3083 |         # not receive response before the deadline. Failed | 
 | 3084 |         # tasks will be retried according to the | 
 | 3085 |         # retry configuration. `503` (Service Unavailable) is | 
 | 3086 |         # considered an App Engine system error instead of an application error and | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3087 |         # will cause Cloud Tasks' traffic congestion control to temporarily throttle | 
 | 3088 |         # the queue's dispatches. Unlike other types of task targets, a `429` (Too Many | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3089 |         # Requests) response from an app handler does not cause traffic congestion | 
 | 3090 |         # control to throttle the queue. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3091 |       "httpMethod": "A String", # The HTTP method to use for the request. The default is POST. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3092 |           # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3093 |           # The app's request handler for the task's target URL must be able to handle | 
 | 3094 |           # HTTP requests with this http_method, otherwise the task attempt fails with | 
 | 3095 |           # error code 405 (Method Not Allowed). See [Writing a push task request | 
 | 3096 |           # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) | 
 | 3097 |           # and the App Engine documentation for your runtime on [How Requests are | 
 | 3098 |           # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). | 
 | 3099 |       "payload": "A String", # Payload. | 
 | 3100 |           # | 
 | 3101 |           # The payload will be sent as the HTTP message body. A message | 
 | 3102 |           # body, and thus a payload, is allowed only if the HTTP method is | 
 | 3103 |           # POST or PUT. It is an error to set a data payload on a task with | 
 | 3104 |           # an incompatible HttpMethod. | 
 | 3105 |       "relativeUrl": "A String", # The relative URL. | 
 | 3106 |           # | 
 | 3107 |           # The relative URL must begin with "/" and must be a valid HTTP relative URL. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3108 |           # It can contain a path and query string arguments. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3109 |           # If the relative URL is empty, then the root path "/" will be used. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3110 |           # No spaces are allowed, and the maximum length allowed is 2083 characters. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3111 |       "headers": { # HTTP request headers. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3112 |           # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3113 |           # This map contains the header field names and values. | 
 | 3114 |           # Headers can be set when the | 
 | 3115 |           # task is created. | 
 | 3116 |           # Repeated headers are not supported but a header value can contain commas. | 
 | 3117 |           # | 
 | 3118 |           # Cloud Tasks sets some headers to default values: | 
 | 3119 |           # | 
 | 3120 |           # * `User-Agent`: By default, this header is | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3121 |           #   `"AppEngine-Google; (+http://code.google.com/appengine)"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3122 |           #   This header can be modified, but Cloud Tasks will append | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3123 |           #   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3124 |           #   modified `User-Agent`. | 
 | 3125 |           # | 
 | 3126 |           # If the task has a payload, Cloud | 
 | 3127 |           # Tasks sets the following headers: | 
 | 3128 |           # | 
 | 3129 |           # * `Content-Type`: By default, the `Content-Type` header is set to | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3130 |           #   `"application/octet-stream"`. The default can be overridden by explicitly | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3131 |           #   setting `Content-Type` to a particular media type when the | 
 | 3132 |           #   task is created. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3133 |           #   For example, `Content-Type` can be set to `"application/json"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3134 |           # * `Content-Length`: This is computed by Cloud Tasks. This value is | 
 | 3135 |           #   output only.   It cannot be changed. | 
 | 3136 |           # | 
 | 3137 |           # The headers below cannot be set or overridden: | 
 | 3138 |           # | 
 | 3139 |           # * `Host` | 
 | 3140 |           # * `X-Google-*` | 
 | 3141 |           # * `X-AppEngine-*` | 
 | 3142 |           # | 
 | 3143 |           # In addition, Cloud Tasks sets some headers when the task is dispatched, | 
 | 3144 |           # such as headers containing information about the task; see | 
 | 3145 |           # [request | 
 | 3146 |           # headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). | 
 | 3147 |           # These headers are set only when the task is dispatched, so they are not | 
 | 3148 |           # visible when the task is returned in a Cloud Tasks response. | 
 | 3149 |           # | 
 | 3150 |           # Although there is no specific limit for the maximum number of headers or | 
 | 3151 |           # the size, there is a limit on the maximum size of the Task. For more | 
 | 3152 |           # information, see the CreateTask documentation. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3153 |         "a_key": "A String", | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3154 |       }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3155 |       "appEngineRouting": { # App Engine Routing. # Task-level setting for App Engine routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3156 |           # | 
 | 3157 |           # If set, | 
 | 3158 |           # app_engine_routing_override | 
 | 3159 |           # is used for all tasks in the queue, no matter what the setting is for the | 
 | 3160 |           # task-level app_engine_routing. | 
 | 3161 |           # | 
 | 3162 |           # Defines routing characteristics specific to App Engine - service, version, | 
 | 3163 |           # and instance. | 
 | 3164 |           # | 
 | 3165 |           # For more information about services, versions, and instances see | 
 | 3166 |           # [An Overview of App | 
 | 3167 |           # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), | 
 | 3168 |           # [Microservices Architecture on Google App | 
 | 3169 |           # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), | 
 | 3170 |           # [App Engine Standard request | 
 | 3171 |           # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), | 
 | 3172 |           # and [App Engine Flex request | 
 | 3173 |           # 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^] | 3174 |         "instance": "A String", # App instance. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3175 |             # | 
 | 3176 |             # By default, the task is sent to an instance which is available when | 
 | 3177 |             # the task is attempted. | 
 | 3178 |             # | 
 | 3179 |             # Requests can only be sent to a specific instance if | 
 | 3180 |             # [manual scaling is used in App Engine | 
 | 3181 |             # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). | 
 | 3182 |             # App Engine Flex does not support instances. For more information, see | 
 | 3183 |             # [App Engine Standard request | 
 | 3184 |             # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 3185 |             # and [App Engine Flex request | 
 | 3186 |             # 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^] | 3187 |         "version": "A String", # App version. | 
 | 3188 |             # | 
 | 3189 |             # By default, the task is sent to the version which is the default | 
 | 3190 |             # version when the task is attempted. | 
 | 3191 |             # | 
 | 3192 |             # For some queues or tasks which were created using the App Engine | 
 | 3193 |             # Task Queue API, host is not parsable | 
 | 3194 |             # into service, | 
 | 3195 |             # version, and | 
 | 3196 |             # instance. For example, some tasks | 
 | 3197 |             # which were created using the App Engine SDK use a custom domain | 
 | 3198 |             # name; custom domains are not parsed by Cloud Tasks. If | 
 | 3199 |             # host is not parsable, then | 
 | 3200 |             # service, | 
 | 3201 |             # version, and | 
 | 3202 |             # instance are the empty string. | 
 | 3203 |         "host": "A String", # Output only. The host that the task is sent to. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3204 |             # | 
 | 3205 |             # For more information, see | 
 | 3206 |             # [How Requests are | 
 | 3207 |             # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). | 
 | 3208 |             # | 
 | 3209 |             # The host is constructed as: | 
 | 3210 |             # | 
 | 3211 |             # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3212 |             # * `host = [application_domain_name]`</br> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3213 |             #   `| [service] + '.' + [application_domain_name]`</br> | 
 | 3214 |             #   `| [version] + '.' + [application_domain_name]`</br> | 
 | 3215 |             #   `| [version_dot_service]+ '.' + [application_domain_name]`</br> | 
 | 3216 |             #   `| [instance] + '.' + [application_domain_name]`</br> | 
 | 3217 |             #   `| [instance_dot_service] + '.' + [application_domain_name]`</br> | 
 | 3218 |             #   `| [instance_dot_version] + '.' + [application_domain_name]`</br> | 
 | 3219 |             #   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3220 |             # | 
 | 3221 |             # * `application_domain_name` = The domain name of the app, for | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3222 |             #   example <app-id>.appspot.com, which is associated with the | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3223 |             #   queue's project ID. Some tasks which were created using the App Engine | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3224 |             #   SDK use a custom domain name. | 
 | 3225 |             # | 
 | 3226 |             # * `service =` service | 
 | 3227 |             # | 
 | 3228 |             # * `version =` version | 
 | 3229 |             # | 
 | 3230 |             # * `version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3231 |             #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3232 |             #   service | 
 | 3233 |             # | 
 | 3234 |             # * `instance =` instance | 
 | 3235 |             # | 
 | 3236 |             # * `instance_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3237 |             #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3238 |             #   service | 
 | 3239 |             # | 
 | 3240 |             # * `instance_dot_version =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3241 |             #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3242 |             #   version | 
 | 3243 |             # | 
 | 3244 |             # * `instance_dot_version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3245 |             #   instance `+ '.' +` | 
 | 3246 |             #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3247 |             #   service | 
 | 3248 |             # | 
 | 3249 |             # If service is empty, then the task will be sent | 
 | 3250 |             # to the service which is the default service when the task is attempted. | 
 | 3251 |             # | 
 | 3252 |             # If version is empty, then the task will be sent | 
 | 3253 |             # to the version which is the default version when the task is attempted. | 
 | 3254 |             # | 
 | 3255 |             # If instance is empty, then the task | 
 | 3256 |             # will be sent to an instance which is available when the task is | 
 | 3257 |             # attempted. | 
 | 3258 |             # | 
 | 3259 |             # If service, | 
 | 3260 |             # version, or | 
 | 3261 |             # instance is invalid, then the task | 
 | 3262 |             # will be sent to the default version of the default service when | 
 | 3263 |             # the task is attempted. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3264 |         "service": "A String", # App service. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3265 |             # | 
 | 3266 |             # By default, the task is sent to the service which is the default | 
 | 3267 |             # service when the task is attempted. | 
 | 3268 |             # | 
 | 3269 |             # For some queues or tasks which were created using the App Engine | 
 | 3270 |             # Task Queue API, host is not parsable | 
 | 3271 |             # into service, | 
 | 3272 |             # version, and | 
 | 3273 |             # instance. For example, some tasks | 
 | 3274 |             # which were created using the App Engine SDK use a custom domain | 
 | 3275 |             # name; custom domains are not parsed by Cloud Tasks. If | 
 | 3276 |             # host is not parsable, then | 
 | 3277 |             # service, | 
 | 3278 |             # version, and | 
 | 3279 |             # instance are the empty string. | 
 | 3280 |       }, | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3281 |     }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3282 |     "view": "A String", # Output only. The view specifies which subset of the Task has | 
 | 3283 |         # been returned. | 
 | 3284 |     "pullMessage": { # The pull message contains data that can be used by the caller of # LeaseTasks to process the task. Can be | 
 | 3285 |         # set only if pull_target is set on the queue. | 
 | 3286 |         # | 
 | 3287 |         # A pull task is a task that has PullMessage set. | 
 | 3288 |         # LeaseTasks to process the task. | 
 | 3289 |         # | 
 | 3290 |         # This proto can only be used for tasks in a queue which has | 
 | 3291 |         # pull_target set. | 
 | 3292 |       "payload": "A String", # A data payload consumed by the worker to execute the task. | 
 | 3293 |       "tag": "A String", # The task's tag. | 
 | 3294 |           # | 
 | 3295 |           # Tags allow similar tasks to be processed in a batch. If you label | 
 | 3296 |           # tasks with a tag, your worker can | 
 | 3297 |           # lease tasks with the same tag using | 
 | 3298 |           # filter. For example, if you want to | 
 | 3299 |           # aggregate the events associated with a specific user once a day, | 
 | 3300 |           # you could tag tasks with the user ID. | 
 | 3301 |           # | 
 | 3302 |           # The task's tag can only be set when the | 
 | 3303 |           # task is created. | 
 | 3304 |           # | 
 | 3305 |           # The tag must be less than 500 characters. | 
 | 3306 |           # | 
 | 3307 |           # SDK compatibility: Although the SDK allows tags to be either | 
 | 3308 |           # string or | 
 | 3309 |           # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), | 
 | 3310 |           # only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 | 
 | 3311 |           # encoded, the tag will be empty when the task is returned by Cloud Tasks. | 
 | 3312 |     }, | 
 | 3313 |     "scheduleTime": "A String", # The time when the task is scheduled to be attempted. | 
 | 3314 |         # | 
 | 3315 |         # For App Engine queues, this is when the task will be attempted or retried. | 
 | 3316 |         # | 
 | 3317 |         # For pull queues, this is the time when the task is available to | 
 | 3318 |         # be leased; if a task is currently leased, this is the time when | 
 | 3319 |         # the current lease expires, that is, the time that the task was | 
 | 3320 |         # leased plus the lease_duration. | 
 | 3321 |         # | 
 | 3322 |         # `schedule_time` will be truncated to the nearest microsecond. | 
 | 3323 |     "createTime": "A String", # Output only. The time that the task was created. | 
 | 3324 |         # | 
 | 3325 |         # `create_time` will be truncated to the nearest second. | 
 | 3326 |     "status": { # Status of the task. # Output only. The task status. | 
 | 3327 |       "attemptDispatchCount": 42, # Output only. The number of attempts dispatched. | 
 | 3328 |           # | 
 | 3329 |           # This count includes attempts which have been dispatched but haven't | 
 | 3330 |           # received a response. | 
 | 3331 |       "firstAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's first attempt. | 
 | 3332 |           # | 
 | 3333 |           # Only dispatch_time will be set. | 
 | 3334 |           # The other AttemptStatus information is not retained by Cloud Tasks. | 
 | 3335 |           # | 
 | 3336 |           # This field is not calculated for pull tasks. | 
 | 3337 |         "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 3338 |             # | 
 | 3339 |             # `response_time` will be truncated to the nearest microsecond. | 
 | 3340 |         "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 3341 |             # | 
 | 3342 |             # If the task has not been attempted or the task is currently running | 
 | 3343 |             # then the response status is unset. | 
 | 3344 |             # different programming environments, including REST APIs and RPC APIs. It is | 
 | 3345 |             # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 3346 |             # three pieces of data: error code, error message, and error details. | 
 | 3347 |             # | 
 | 3348 |             # You can find out more about this error model and how to work with it in the | 
 | 3349 |             # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 3350 |           "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 3351 |               # message types for APIs to use. | 
 | 3352 |             { | 
 | 3353 |               "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 3354 |             }, | 
 | 3355 |           ], | 
 | 3356 |           "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 3357 |           "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 3358 |               # user-facing error message should be localized and sent in the | 
 | 3359 |               # google.rpc.Status.details field, or localized by the client. | 
 | 3360 |         }, | 
 | 3361 |         "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 3362 |             # | 
 | 3363 |             # `schedule_time` will be truncated to the nearest microsecond. | 
 | 3364 |         "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 3365 |             # | 
 | 3366 |             # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 3367 |       }, | 
 | 3368 |       "attemptResponseCount": 42, # Output only. The number of attempts which have received a response. | 
 | 3369 |           # | 
 | 3370 |           # This field is not calculated for pull tasks. | 
 | 3371 |       "lastAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's last attempt. | 
 | 3372 |           # | 
 | 3373 |           # This field is not calculated for pull tasks. | 
 | 3374 |         "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 3375 |             # | 
 | 3376 |             # `response_time` will be truncated to the nearest microsecond. | 
 | 3377 |         "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 3378 |             # | 
 | 3379 |             # If the task has not been attempted or the task is currently running | 
 | 3380 |             # then the response status is unset. | 
 | 3381 |             # different programming environments, including REST APIs and RPC APIs. It is | 
 | 3382 |             # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 3383 |             # three pieces of data: error code, error message, and error details. | 
 | 3384 |             # | 
 | 3385 |             # You can find out more about this error model and how to work with it in the | 
 | 3386 |             # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 3387 |           "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 3388 |               # message types for APIs to use. | 
 | 3389 |             { | 
 | 3390 |               "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 3391 |             }, | 
 | 3392 |           ], | 
 | 3393 |           "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 3394 |           "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 3395 |               # user-facing error message should be localized and sent in the | 
 | 3396 |               # google.rpc.Status.details field, or localized by the client. | 
 | 3397 |         }, | 
 | 3398 |         "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 3399 |             # | 
 | 3400 |             # `schedule_time` will be truncated to the nearest microsecond. | 
 | 3401 |         "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 3402 |             # | 
 | 3403 |             # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 3404 |       }, | 
 | 3405 |     }, | 
 | 3406 |     "name": "A String", # Optionally caller-specified in CreateTask. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3407 |         # | 
 | 3408 |         # The task name. | 
 | 3409 |         # | 
 | 3410 |         # The task name must have the following format: | 
 | 3411 |         # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` | 
 | 3412 |         # | 
 | 3413 |         # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), | 
 | 3414 |         #    hyphens (-), colons (:), or periods (.). | 
 | 3415 |         #    For more information, see | 
 | 3416 |         #    [Identifying | 
 | 3417 |         #    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^] | 3418 |         # * `LOCATION_ID` is the canonical ID for the task's location. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3419 |         #    The list of available locations can be obtained by calling | 
 | 3420 |         #    ListLocations. | 
 | 3421 |         #    For more information, see https://cloud.google.com/about/locations/. | 
 | 3422 |         # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or | 
 | 3423 |         #   hyphens (-). The maximum length is 100 characters. | 
 | 3424 |         # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), | 
 | 3425 |         #   hyphens (-), or underscores (_). The maximum length is 500 characters. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3426 |   }</pre> | 
 | 3427 | </div> | 
 | 3428 |  | 
 | 3429 | <div class="method"> | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3430 |     <code class="details" id="run">run(name, body=None, x__xgafv=None)</code> | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3431 |   <pre>Forces a task to run now. | 
 | 3432 |  | 
 | 3433 | When this method is called, Cloud Tasks will dispatch the task, even if | 
 | 3434 | the task is already running, the queue has reached its RateLimits or | 
 | 3435 | is PAUSED. | 
 | 3436 |  | 
 | 3437 | This command is meant to be used for manual debugging. For | 
 | 3438 | example, RunTask can be used to retry a failed | 
 | 3439 | task after a fix has been made or to manually force a task to be | 
 | 3440 | dispatched now. | 
 | 3441 |  | 
 | 3442 | The dispatched task is returned. That is, the task that is returned | 
 | 3443 | contains the status after the task is dispatched but | 
 | 3444 | before the task is received by its target. | 
 | 3445 |  | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3446 | If Cloud Tasks receives a successful response from the task's | 
 | 3447 | target, then the task will be deleted; otherwise the task's | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3448 | schedule_time will be reset to the time that | 
 | 3449 | RunTask was called plus the retry delay specified | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3450 | in the queue's RetryConfig. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3451 |  | 
 | 3452 | RunTask returns | 
 | 3453 | NOT_FOUND when it is called on a | 
 | 3454 | task that has already succeeded or permanently failed. | 
 | 3455 |  | 
 | 3456 | RunTask cannot be called on a | 
 | 3457 | pull task. | 
 | 3458 |  | 
 | 3459 | Args: | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3460 |   name: string, Required. The task name. For example: | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3461 | `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` (required) | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3462 |   body: object, The request body. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3463 |     The object takes the form of: | 
 | 3464 |  | 
 | 3465 | { # Request message for forcing a task to run now using | 
 | 3466 |       # RunTask. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3467 |     "responseView": "A String", # The response_view specifies which subset of the Task will be | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3468 |         # returned. | 
 | 3469 |         #  | 
 | 3470 |         # By default response_view is BASIC; not all | 
 | 3471 |         # information is retrieved by default because some data, such as | 
 | 3472 |         # payloads, might be desirable to return only when needed because | 
 | 3473 |         # of its large size or because of the sensitivity of data that it | 
 | 3474 |         # contains. | 
 | 3475 |         #  | 
 | 3476 |         # Authorization for FULL requires | 
 | 3477 |         # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) | 
 | 3478 |         # permission on the Task resource. | 
 | 3479 |   } | 
 | 3480 |  | 
 | 3481 |   x__xgafv: string, V1 error format. | 
 | 3482 |     Allowed values | 
 | 3483 |       1 - v1 error format | 
 | 3484 |       2 - v2 error format | 
 | 3485 |  | 
 | 3486 | Returns: | 
 | 3487 |   An object of the form: | 
 | 3488 |  | 
 | 3489 |     { # A unit of scheduled work. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3490 |     "appEngineHttpRequest": { # App Engine HTTP request. # App Engine HTTP request that is sent to the task's target. Can | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3491 |         # be set only if | 
 | 3492 |         # app_engine_http_target is set | 
 | 3493 |         # on the queue. | 
 | 3494 |         # | 
 | 3495 |         # An App Engine task is a task that has AppEngineHttpRequest set. | 
 | 3496 |         # | 
 | 3497 |         # The message defines the HTTP request that is sent to an App Engine app when | 
 | 3498 |         # the task is dispatched. | 
 | 3499 |         # | 
 | 3500 |         # This proto can only be used for tasks in a queue which has | 
 | 3501 |         # app_engine_http_target set. | 
 | 3502 |         # | 
 | 3503 |         # Using AppEngineHttpRequest requires | 
 | 3504 |         # [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) | 
 | 3505 |         # Google IAM permission for the project | 
 | 3506 |         # and the following scope: | 
 | 3507 |         # | 
 | 3508 |         # `https://www.googleapis.com/auth/cloud-platform` | 
 | 3509 |         # | 
 | 3510 |         # The task will be delivered to the App Engine app which belongs to the same | 
 | 3511 |         # project as the queue. For more information, see | 
 | 3512 |         # [How Requests are | 
 | 3513 |         # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 3514 |         # and how routing is affected by | 
 | 3515 |         # [dispatch | 
 | 3516 |         # files](https://cloud.google.com/appengine/docs/python/config/dispatchref). | 
 | 3517 |         # Traffic is encrypted during transport and never leaves Google datacenters. | 
 | 3518 |         # Because this traffic is carried over a communication mechanism internal to | 
 | 3519 |         # Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). | 
 | 3520 |         # The request to the handler, however, will appear to have used the HTTP | 
 | 3521 |         # protocol. | 
 | 3522 |         # | 
 | 3523 |         # The AppEngineRouting used to construct the URL that the task is | 
 | 3524 |         # delivered to can be set at the queue-level or task-level: | 
 | 3525 |         # | 
 | 3526 |         # * If set, | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3527 |         #   app_engine_routing_override | 
 | 3528 |         #   is used for all tasks in the queue, no matter what the setting | 
 | 3529 |         #   is for the | 
 | 3530 |         #   task-level app_engine_routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3531 |         # | 
 | 3532 |         # | 
 | 3533 |         # The `url` that the task will be sent to is: | 
 | 3534 |         # | 
 | 3535 |         # * `url =` host `+` | 
 | 3536 |         #   relative_url | 
 | 3537 |         # | 
 | 3538 |         # Tasks can be dispatched to secure app handlers, unsecure app handlers, and | 
 | 3539 |         # URIs restricted with | 
 | 3540 |         # [`login: | 
 | 3541 |         # admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). | 
 | 3542 |         # Because tasks are not run as any user, they cannot be dispatched to URIs | 
 | 3543 |         # restricted with | 
 | 3544 |         # [`login: | 
 | 3545 |         # required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) | 
 | 3546 |         # Task dispatches also do not follow redirects. | 
 | 3547 |         # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3548 |         # The task attempt has succeeded if the app's request handler returns an HTTP | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3549 |         # response code in the range [`200` - `299`]. The task attempt has failed if | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3550 |         # the app's handler returns a non-2xx response code or Cloud Tasks does | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3551 |         # not receive response before the deadline. Failed | 
 | 3552 |         # tasks will be retried according to the | 
 | 3553 |         # retry configuration. `503` (Service Unavailable) is | 
 | 3554 |         # considered an App Engine system error instead of an application error and | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3555 |         # will cause Cloud Tasks' traffic congestion control to temporarily throttle | 
 | 3556 |         # the queue's dispatches. Unlike other types of task targets, a `429` (Too Many | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3557 |         # Requests) response from an app handler does not cause traffic congestion | 
 | 3558 |         # control to throttle the queue. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3559 |       "httpMethod": "A String", # The HTTP method to use for the request. The default is POST. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3560 |           # | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3561 |           # The app's request handler for the task's target URL must be able to handle | 
 | 3562 |           # HTTP requests with this http_method, otherwise the task attempt fails with | 
 | 3563 |           # error code 405 (Method Not Allowed). See [Writing a push task request | 
 | 3564 |           # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) | 
 | 3565 |           # and the App Engine documentation for your runtime on [How Requests are | 
 | 3566 |           # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). | 
 | 3567 |       "payload": "A String", # Payload. | 
 | 3568 |           # | 
 | 3569 |           # The payload will be sent as the HTTP message body. A message | 
 | 3570 |           # body, and thus a payload, is allowed only if the HTTP method is | 
 | 3571 |           # POST or PUT. It is an error to set a data payload on a task with | 
 | 3572 |           # an incompatible HttpMethod. | 
 | 3573 |       "relativeUrl": "A String", # The relative URL. | 
 | 3574 |           # | 
 | 3575 |           # The relative URL must begin with "/" and must be a valid HTTP relative URL. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3576 |           # It can contain a path and query string arguments. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3577 |           # If the relative URL is empty, then the root path "/" will be used. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3578 |           # No spaces are allowed, and the maximum length allowed is 2083 characters. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3579 |       "headers": { # HTTP request headers. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3580 |           # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3581 |           # This map contains the header field names and values. | 
 | 3582 |           # Headers can be set when the | 
 | 3583 |           # task is created. | 
 | 3584 |           # Repeated headers are not supported but a header value can contain commas. | 
 | 3585 |           # | 
 | 3586 |           # Cloud Tasks sets some headers to default values: | 
 | 3587 |           # | 
 | 3588 |           # * `User-Agent`: By default, this header is | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3589 |           #   `"AppEngine-Google; (+http://code.google.com/appengine)"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3590 |           #   This header can be modified, but Cloud Tasks will append | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3591 |           #   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3592 |           #   modified `User-Agent`. | 
 | 3593 |           # | 
 | 3594 |           # If the task has a payload, Cloud | 
 | 3595 |           # Tasks sets the following headers: | 
 | 3596 |           # | 
 | 3597 |           # * `Content-Type`: By default, the `Content-Type` header is set to | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3598 |           #   `"application/octet-stream"`. The default can be overridden by explicitly | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3599 |           #   setting `Content-Type` to a particular media type when the | 
 | 3600 |           #   task is created. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3601 |           #   For example, `Content-Type` can be set to `"application/json"`. | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3602 |           # * `Content-Length`: This is computed by Cloud Tasks. This value is | 
 | 3603 |           #   output only.   It cannot be changed. | 
 | 3604 |           # | 
 | 3605 |           # The headers below cannot be set or overridden: | 
 | 3606 |           # | 
 | 3607 |           # * `Host` | 
 | 3608 |           # * `X-Google-*` | 
 | 3609 |           # * `X-AppEngine-*` | 
 | 3610 |           # | 
 | 3611 |           # In addition, Cloud Tasks sets some headers when the task is dispatched, | 
 | 3612 |           # such as headers containing information about the task; see | 
 | 3613 |           # [request | 
 | 3614 |           # headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). | 
 | 3615 |           # These headers are set only when the task is dispatched, so they are not | 
 | 3616 |           # visible when the task is returned in a Cloud Tasks response. | 
 | 3617 |           # | 
 | 3618 |           # Although there is no specific limit for the maximum number of headers or | 
 | 3619 |           # the size, there is a limit on the maximum size of the Task. For more | 
 | 3620 |           # information, see the CreateTask documentation. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3621 |         "a_key": "A String", | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3622 |       }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3623 |       "appEngineRouting": { # App Engine Routing. # Task-level setting for App Engine routing. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3624 |           # | 
 | 3625 |           # If set, | 
 | 3626 |           # app_engine_routing_override | 
 | 3627 |           # is used for all tasks in the queue, no matter what the setting is for the | 
 | 3628 |           # task-level app_engine_routing. | 
 | 3629 |           # | 
 | 3630 |           # Defines routing characteristics specific to App Engine - service, version, | 
 | 3631 |           # and instance. | 
 | 3632 |           # | 
 | 3633 |           # For more information about services, versions, and instances see | 
 | 3634 |           # [An Overview of App | 
 | 3635 |           # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), | 
 | 3636 |           # [Microservices Architecture on Google App | 
 | 3637 |           # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), | 
 | 3638 |           # [App Engine Standard request | 
 | 3639 |           # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), | 
 | 3640 |           # and [App Engine Flex request | 
 | 3641 |           # 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^] | 3642 |         "instance": "A String", # App instance. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3643 |             # | 
 | 3644 |             # By default, the task is sent to an instance which is available when | 
 | 3645 |             # the task is attempted. | 
 | 3646 |             # | 
 | 3647 |             # Requests can only be sent to a specific instance if | 
 | 3648 |             # [manual scaling is used in App Engine | 
 | 3649 |             # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). | 
 | 3650 |             # App Engine Flex does not support instances. For more information, see | 
 | 3651 |             # [App Engine Standard request | 
 | 3652 |             # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) | 
 | 3653 |             # and [App Engine Flex request | 
 | 3654 |             # 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^] | 3655 |         "version": "A String", # App version. | 
 | 3656 |             # | 
 | 3657 |             # By default, the task is sent to the version which is the default | 
 | 3658 |             # version when the task is attempted. | 
 | 3659 |             # | 
 | 3660 |             # For some queues or tasks which were created using the App Engine | 
 | 3661 |             # Task Queue API, host is not parsable | 
 | 3662 |             # into service, | 
 | 3663 |             # version, and | 
 | 3664 |             # instance. For example, some tasks | 
 | 3665 |             # which were created using the App Engine SDK use a custom domain | 
 | 3666 |             # name; custom domains are not parsed by Cloud Tasks. If | 
 | 3667 |             # host is not parsable, then | 
 | 3668 |             # service, | 
 | 3669 |             # version, and | 
 | 3670 |             # instance are the empty string. | 
 | 3671 |         "host": "A String", # Output only. The host that the task is sent to. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3672 |             # | 
 | 3673 |             # For more information, see | 
 | 3674 |             # [How Requests are | 
 | 3675 |             # Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). | 
 | 3676 |             # | 
 | 3677 |             # The host is constructed as: | 
 | 3678 |             # | 
 | 3679 |             # | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3680 |             # * `host = [application_domain_name]`</br> | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3681 |             #   `| [service] + '.' + [application_domain_name]`</br> | 
 | 3682 |             #   `| [version] + '.' + [application_domain_name]`</br> | 
 | 3683 |             #   `| [version_dot_service]+ '.' + [application_domain_name]`</br> | 
 | 3684 |             #   `| [instance] + '.' + [application_domain_name]`</br> | 
 | 3685 |             #   `| [instance_dot_service] + '.' + [application_domain_name]`</br> | 
 | 3686 |             #   `| [instance_dot_version] + '.' + [application_domain_name]`</br> | 
 | 3687 |             #   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3688 |             # | 
 | 3689 |             # * `application_domain_name` = The domain name of the app, for | 
| Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 3690 |             #   example <app-id>.appspot.com, which is associated with the | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3691 |             #   queue's project ID. Some tasks which were created using the App Engine | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3692 |             #   SDK use a custom domain name. | 
 | 3693 |             # | 
 | 3694 |             # * `service =` service | 
 | 3695 |             # | 
 | 3696 |             # * `version =` version | 
 | 3697 |             # | 
 | 3698 |             # * `version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3699 |             #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3700 |             #   service | 
 | 3701 |             # | 
 | 3702 |             # * `instance =` instance | 
 | 3703 |             # | 
 | 3704 |             # * `instance_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3705 |             #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3706 |             #   service | 
 | 3707 |             # | 
 | 3708 |             # * `instance_dot_version =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3709 |             #   instance `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3710 |             #   version | 
 | 3711 |             # | 
 | 3712 |             # * `instance_dot_version_dot_service =` | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3713 |             #   instance `+ '.' +` | 
 | 3714 |             #   version `+ '.' +` | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3715 |             #   service | 
 | 3716 |             # | 
 | 3717 |             # If service is empty, then the task will be sent | 
 | 3718 |             # to the service which is the default service when the task is attempted. | 
 | 3719 |             # | 
 | 3720 |             # If version is empty, then the task will be sent | 
 | 3721 |             # to the version which is the default version when the task is attempted. | 
 | 3722 |             # | 
 | 3723 |             # If instance is empty, then the task | 
 | 3724 |             # will be sent to an instance which is available when the task is | 
 | 3725 |             # attempted. | 
 | 3726 |             # | 
 | 3727 |             # If service, | 
 | 3728 |             # version, or | 
 | 3729 |             # instance is invalid, then the task | 
 | 3730 |             # will be sent to the default version of the default service when | 
 | 3731 |             # the task is attempted. | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3732 |         "service": "A String", # App service. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3733 |             # | 
 | 3734 |             # By default, the task is sent to the service which is the default | 
 | 3735 |             # service when the task is attempted. | 
 | 3736 |             # | 
 | 3737 |             # For some queues or tasks which were created using the App Engine | 
 | 3738 |             # Task Queue API, host is not parsable | 
 | 3739 |             # into service, | 
 | 3740 |             # version, and | 
 | 3741 |             # instance. For example, some tasks | 
 | 3742 |             # which were created using the App Engine SDK use a custom domain | 
 | 3743 |             # name; custom domains are not parsed by Cloud Tasks. If | 
 | 3744 |             # host is not parsable, then | 
 | 3745 |             # service, | 
 | 3746 |             # version, and | 
 | 3747 |             # instance are the empty string. | 
 | 3748 |       }, | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3749 |     }, | 
| Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame^] | 3750 |     "view": "A String", # Output only. The view specifies which subset of the Task has | 
 | 3751 |         # been returned. | 
 | 3752 |     "pullMessage": { # The pull message contains data that can be used by the caller of # LeaseTasks to process the task. Can be | 
 | 3753 |         # set only if pull_target is set on the queue. | 
 | 3754 |         # | 
 | 3755 |         # A pull task is a task that has PullMessage set. | 
 | 3756 |         # LeaseTasks to process the task. | 
 | 3757 |         # | 
 | 3758 |         # This proto can only be used for tasks in a queue which has | 
 | 3759 |         # pull_target set. | 
 | 3760 |       "payload": "A String", # A data payload consumed by the worker to execute the task. | 
 | 3761 |       "tag": "A String", # The task's tag. | 
 | 3762 |           # | 
 | 3763 |           # Tags allow similar tasks to be processed in a batch. If you label | 
 | 3764 |           # tasks with a tag, your worker can | 
 | 3765 |           # lease tasks with the same tag using | 
 | 3766 |           # filter. For example, if you want to | 
 | 3767 |           # aggregate the events associated with a specific user once a day, | 
 | 3768 |           # you could tag tasks with the user ID. | 
 | 3769 |           # | 
 | 3770 |           # The task's tag can only be set when the | 
 | 3771 |           # task is created. | 
 | 3772 |           # | 
 | 3773 |           # The tag must be less than 500 characters. | 
 | 3774 |           # | 
 | 3775 |           # SDK compatibility: Although the SDK allows tags to be either | 
 | 3776 |           # string or | 
 | 3777 |           # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), | 
 | 3778 |           # only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 | 
 | 3779 |           # encoded, the tag will be empty when the task is returned by Cloud Tasks. | 
 | 3780 |     }, | 
 | 3781 |     "scheduleTime": "A String", # The time when the task is scheduled to be attempted. | 
 | 3782 |         # | 
 | 3783 |         # For App Engine queues, this is when the task will be attempted or retried. | 
 | 3784 |         # | 
 | 3785 |         # For pull queues, this is the time when the task is available to | 
 | 3786 |         # be leased; if a task is currently leased, this is the time when | 
 | 3787 |         # the current lease expires, that is, the time that the task was | 
 | 3788 |         # leased plus the lease_duration. | 
 | 3789 |         # | 
 | 3790 |         # `schedule_time` will be truncated to the nearest microsecond. | 
 | 3791 |     "createTime": "A String", # Output only. The time that the task was created. | 
 | 3792 |         # | 
 | 3793 |         # `create_time` will be truncated to the nearest second. | 
 | 3794 |     "status": { # Status of the task. # Output only. The task status. | 
 | 3795 |       "attemptDispatchCount": 42, # Output only. The number of attempts dispatched. | 
 | 3796 |           # | 
 | 3797 |           # This count includes attempts which have been dispatched but haven't | 
 | 3798 |           # received a response. | 
 | 3799 |       "firstAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's first attempt. | 
 | 3800 |           # | 
 | 3801 |           # Only dispatch_time will be set. | 
 | 3802 |           # The other AttemptStatus information is not retained by Cloud Tasks. | 
 | 3803 |           # | 
 | 3804 |           # This field is not calculated for pull tasks. | 
 | 3805 |         "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 3806 |             # | 
 | 3807 |             # `response_time` will be truncated to the nearest microsecond. | 
 | 3808 |         "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 3809 |             # | 
 | 3810 |             # If the task has not been attempted or the task is currently running | 
 | 3811 |             # then the response status is unset. | 
 | 3812 |             # different programming environments, including REST APIs and RPC APIs. It is | 
 | 3813 |             # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 3814 |             # three pieces of data: error code, error message, and error details. | 
 | 3815 |             # | 
 | 3816 |             # You can find out more about this error model and how to work with it in the | 
 | 3817 |             # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 3818 |           "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 3819 |               # message types for APIs to use. | 
 | 3820 |             { | 
 | 3821 |               "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 3822 |             }, | 
 | 3823 |           ], | 
 | 3824 |           "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 3825 |           "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 3826 |               # user-facing error message should be localized and sent in the | 
 | 3827 |               # google.rpc.Status.details field, or localized by the client. | 
 | 3828 |         }, | 
 | 3829 |         "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 3830 |             # | 
 | 3831 |             # `schedule_time` will be truncated to the nearest microsecond. | 
 | 3832 |         "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 3833 |             # | 
 | 3834 |             # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 3835 |       }, | 
 | 3836 |       "attemptResponseCount": 42, # Output only. The number of attempts which have received a response. | 
 | 3837 |           # | 
 | 3838 |           # This field is not calculated for pull tasks. | 
 | 3839 |       "lastAttemptStatus": { # The status of a task attempt. # Output only. The status of the task's last attempt. | 
 | 3840 |           # | 
 | 3841 |           # This field is not calculated for pull tasks. | 
 | 3842 |         "responseTime": "A String", # Output only. The time that this attempt response was received. | 
 | 3843 |             # | 
 | 3844 |             # `response_time` will be truncated to the nearest microsecond. | 
 | 3845 |         "responseStatus": { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for this attempt. | 
 | 3846 |             # | 
 | 3847 |             # If the task has not been attempted or the task is currently running | 
 | 3848 |             # then the response status is unset. | 
 | 3849 |             # different programming environments, including REST APIs and RPC APIs. It is | 
 | 3850 |             # used by [gRPC](https://github.com/grpc). Each `Status` message contains | 
 | 3851 |             # three pieces of data: error code, error message, and error details. | 
 | 3852 |             # | 
 | 3853 |             # You can find out more about this error model and how to work with it in the | 
 | 3854 |             # [API Design Guide](https://cloud.google.com/apis/design/errors). | 
 | 3855 |           "details": [ # A list of messages that carry the error details.  There is a common set of | 
 | 3856 |               # message types for APIs to use. | 
 | 3857 |             { | 
 | 3858 |               "a_key": "", # Properties of the object. Contains field @type with type URL. | 
 | 3859 |             }, | 
 | 3860 |           ], | 
 | 3861 |           "code": 42, # The status code, which should be an enum value of google.rpc.Code. | 
 | 3862 |           "message": "A String", # A developer-facing error message, which should be in English. Any | 
 | 3863 |               # user-facing error message should be localized and sent in the | 
 | 3864 |               # google.rpc.Status.details field, or localized by the client. | 
 | 3865 |         }, | 
 | 3866 |         "scheduleTime": "A String", # Output only. The time that this attempt was scheduled. | 
 | 3867 |             # | 
 | 3868 |             # `schedule_time` will be truncated to the nearest microsecond. | 
 | 3869 |         "dispatchTime": "A String", # Output only. The time that this attempt was dispatched. | 
 | 3870 |             # | 
 | 3871 |             # `dispatch_time` will be truncated to the nearest microsecond. | 
 | 3872 |       }, | 
 | 3873 |     }, | 
 | 3874 |     "name": "A String", # Optionally caller-specified in CreateTask. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3875 |         # | 
 | 3876 |         # The task name. | 
 | 3877 |         # | 
 | 3878 |         # The task name must have the following format: | 
 | 3879 |         # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` | 
 | 3880 |         # | 
 | 3881 |         # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), | 
 | 3882 |         #    hyphens (-), colons (:), or periods (.). | 
 | 3883 |         #    For more information, see | 
 | 3884 |         #    [Identifying | 
 | 3885 |         #    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^] | 3886 |         # * `LOCATION_ID` is the canonical ID for the task's location. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3887 |         #    The list of available locations can be obtained by calling | 
 | 3888 |         #    ListLocations. | 
 | 3889 |         #    For more information, see https://cloud.google.com/about/locations/. | 
 | 3890 |         # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or | 
 | 3891 |         #   hyphens (-). The maximum length is 100 characters. | 
 | 3892 |         # * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), | 
 | 3893 |         #   hyphens (-), or underscores (_). The maximum length is 500 characters. | 
| Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 3894 |   }</pre> | 
 | 3895 | </div> | 
 | 3896 |  | 
 | 3897 | </body></html> |