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