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