blob: b1083562ff105d60d69ceeebd06c00c83d1c3c13 [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">
Bu Sun Kim65020912020-05-20 12:08:20 -070087 <code><a href="#list">list(parent, pageToken=None, pageSize=None, x__xgafv=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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700116 # The maximum allowed size for a job is 100KB.
Bu Sun Kim65020912020-05-20 12:08:20 -0700117 &quot;appEngineHttpTarget&quot;: { # App Engine target. The job will be pushed to a job handler by means # App Engine HTTP target.
118 # of an HTTP request via an http_method such
119 # as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an
120 # HTTP response code in the range [200 - 299]. Error 503 is
121 # considered an App Engine system error instead of an application
122 # error. Requests returning error 503 will be retried regardless of
123 # retry configuration and not counted against retry counts. Any other
124 # response code, or a failure to receive a response before the
125 # deadline, constitutes a failed attempt.
Bu Sun Kim65020912020-05-20 12:08:20 -0700126 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
127 #
128 # The relative URL must begin with &quot;/&quot; and must be a valid HTTP relative URL.
129 # It can contain a path, query string arguments, and `#` fragments.
130 # If the relative URL is empty, then the root path &quot;/&quot; will be used.
131 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700132 &quot;body&quot;: &quot;A String&quot;, # Body.
133 #
134 # HTTP request body. A request body is allowed only if the HTTP method is
135 # POST or PUT. It will result in invalid argument error to set a body on a
136 # job with an incompatible HttpMethod.
Bu Sun Kim65020912020-05-20 12:08:20 -0700137 &quot;headers&quot;: { # HTTP request headers.
138 #
139 # This map contains the header field names and values. Headers can be set
140 # when the job is created.
141 #
142 # Cloud Scheduler sets some headers to default values:
143 #
144 # * `User-Agent`: By default, this header is
145 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
146 # This header can be modified, but Cloud Scheduler will append
147 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
148 # modified `User-Agent`.
149 # * `X-CloudScheduler`: This header will be set to true.
150 #
151 # If the job has an body, Cloud Scheduler sets
152 # the following headers:
153 #
154 # * `Content-Type`: By default, the `Content-Type` header is set to
155 # `&quot;application/octet-stream&quot;`. The default can be overridden by explictly
156 # setting `Content-Type` to a particular media type when the job is
157 # created.
158 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
159 # * `Content-Length`: This is computed by Cloud Scheduler. This value is
160 # output only. It cannot be changed.
161 #
162 # The headers below are output only. They cannot be set or overridden:
163 #
164 # * `X-Google-*`: For Google internal use only.
165 # * `X-AppEngine-*`: For Google internal use only.
166 #
167 # In addition, some App Engine headers, which contain
168 # job-specific information, are also be sent to the job handler.
169 &quot;a_key&quot;: &quot;A String&quot;,
170 },
171 &quot;appEngineRouting&quot;: { # App Engine Routing. # App Engine Routing setting for the job.
172 #
173 # For more information about services, versions, and instances see
174 # [An Overview of App
175 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
176 # [Microservices Architecture on Google App
177 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
178 # [App Engine Standard request
179 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
180 # and [App Engine Flex request
181 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700182 &quot;instance&quot;: &quot;A String&quot;, # App instance.
183 #
184 # By default, the job is sent to an instance which is available when
185 # the job is attempted.
186 #
187 # Requests can only be sent to a specific instance if
188 # [manual scaling is used in App Engine
189 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
190 # App Engine Flex does not support instances. For more information, see
191 # [App Engine Standard request
192 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
193 # and [App Engine Flex request
194 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
195 &quot;service&quot;: &quot;A String&quot;, # App service.
196 #
197 # By default, the job is sent to the service which is the default
198 # service when the job is attempted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700199 &quot;version&quot;: &quot;A String&quot;, # App version.
200 #
201 # By default, the job is sent to the version which is the default
202 # version when the job is attempted.
203 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the job is sent to.
204 #
205 # For more information about how App Engine requests are routed, see
206 # [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
207 #
208 # The host is constructed as:
209 #
210 #
211 # * `host = [application_domain_name]`&lt;/br&gt;
212 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
213 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
214 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
215 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
216 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
217 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
218 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
219 #
220 # * `application_domain_name` = The domain name of the app, for
221 # example &lt;app-id&gt;.appspot.com, which is associated with the
222 # job&#x27;s project ID.
223 #
224 # * `service =` service
225 #
226 # * `version =` version
227 #
228 # * `version_dot_service =`
229 # version `+ &#x27;.&#x27; +`
230 # service
231 #
232 # * `instance =` instance
233 #
234 # * `instance_dot_service =`
235 # instance `+ &#x27;.&#x27; +`
236 # service
237 #
238 # * `instance_dot_version =`
239 # instance `+ &#x27;.&#x27; +`
240 # version
241 #
242 # * `instance_dot_version_dot_service =`
243 # instance `+ &#x27;.&#x27; +`
244 # version `+ &#x27;.&#x27; +`
245 # service
246 #
247 #
248 # If service is empty, then the job will be sent
249 # to the service which is the default service when the job is attempted.
250 #
251 # If version is empty, then the job will be sent
252 # to the version which is the default version when the job is attempted.
253 #
254 # If instance is empty, then the job will be
255 # sent to an instance which is available when the job is attempted.
256 #
257 # If service,
258 # version, or
259 # instance is invalid, then the job will be sent
260 # to the default version of the default service when the job is attempted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700261 },
262 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. PATCH and OPTIONS are not
263 # permitted.
264 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700265 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the job.
Bu Sun Kim65020912020-05-20 12:08:20 -0700266 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob, after
267 # which it becomes output only.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700268 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700269 # The job name. For example:
270 # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700271 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700272 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
273 # hyphens (-), colons (:), or periods (.).
274 # For more information, see
275 # [Identifying
276 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
277 # * `LOCATION_ID` is the canonical ID for the job&#x27;s location.
278 # The list of available locations can be obtained by calling
279 # ListLocations.
280 # For more information, see https://cloud.google.com/about/locations/.
281 # * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
282 # hyphens (-), or underscores (_). The maximum length is 500 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700283 &quot;userUpdateTime&quot;: &quot;A String&quot;, # Output only. The creation time of the job.
284 &quot;description&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob or
285 # UpdateJob.
286 #
287 # A human-readable description for the job. This string must not contain
288 # more than 500 characters.
289 &quot;pubsubTarget&quot;: { # Pub/Sub target. The job will be delivered by publishing a message to # Pub/Sub target.
290 # the given Pub/Sub topic.
291 &quot;attributes&quot;: { # Attributes for PubsubMessage.
292 #
293 # Pubsub message must contain either non-empty data, or at least one
294 # attribute.
295 &quot;a_key&quot;: &quot;A String&quot;,
296 },
297 &quot;topicName&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic to which messages will
298 # be published when a job is delivered. The topic name must be in the
299 # same format as required by PubSub&#x27;s
300 # [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
301 # for example `projects/PROJECT_ID/topics/TOPIC_ID`.
302 #
303 # The topic must be in the same project as the Cloud Scheduler job.
304 &quot;data&quot;: &quot;A String&quot;, # The message payload for PubsubMessage.
305 #
306 # Pubsub message must contain either non-empty data, or at least one
307 # attribute.
308 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700309 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The next time the job is scheduled. Note that this may be a
310 # retry of a previously failed attempt or the next execution time
311 # according to the schedule.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700312 &quot;timeZone&quot;: &quot;A String&quot;, # Specifies the time zone to be used in interpreting
313 # schedule. The value of this field must be a time
314 # zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
315 #
316 # Note that some time zones include a provision for
317 # daylight savings time. The rules for daylight saving time are
318 # determined by the chosen tz. For UTC use the string &quot;utc&quot;. If a
319 # time zone is not specified, the default will be in UTC (also known
320 # as GMT).
Bu Sun Kim65020912020-05-20 12:08:20 -0700321 &quot;httpTarget&quot;: { # Http target. The job will be pushed to the job handler by means of # HTTP target.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700322 # an HTTP request via an http_method such as HTTP
323 # POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
324 # response code in the range [200 - 299]. A failure to receive a response
325 # constitutes a failed execution. For a redirected request, the response
326 # returned by the redirected request is considered.
Bu Sun Kim65020912020-05-20 12:08:20 -0700327 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700328 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
329 # will be generated and attached as an `Authorization` header in the HTTP
330 # request.
331 #
332 # This type of authorization should generally only be used when calling
333 # Google APIs hosted on *.googleapis.com.
334 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
335 # This type of authorization should generally only be used when calling Google
336 # APIs hosted on *.googleapis.com.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700337 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
338 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
339 # will be used.
Bu Sun Kim65020912020-05-20 12:08:20 -0700340 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700341 # to be used for generating OAuth token.
342 # The service account must be within the same project as the job. The caller
343 # must have iam.serviceAccounts.actAs permission for the service account.
344 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700345 &quot;uri&quot;: &quot;A String&quot;, # Required. The full URI path that the request will be sent to. This string
346 # must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples of
347 # valid values for uri are:
348 # `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will
349 # encode some characters for safety and compatibility. The maximum allowed
350 # URL length is 2083 characters after encoding.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700351 &quot;body&quot;: &quot;A String&quot;, # HTTP request body. A request body is allowed only if the HTTP
352 # method is POST, PUT, or PATCH. It is an error to set body on a job with an
353 # incompatible HttpMethod.
Bu Sun Kim65020912020-05-20 12:08:20 -0700354 &quot;headers&quot;: { # The user can specify HTTP request headers to send with the job&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700355 # HTTP request. This map contains the header field names and
356 # values. Repeated headers are not supported, but a header value can
357 # contain commas. These headers represent a subset of the headers
Bu Sun Kim65020912020-05-20 12:08:20 -0700358 # that will accompany the job&#x27;s HTTP request. Some HTTP request
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700359 # headers will be ignored or replaced. A partial list of headers that
360 # will be ignored or replaced is below:
361 # - Host: This will be computed by Cloud Scheduler and derived from
362 # uri.
363 # * `Content-Length`: This will be computed by Cloud Scheduler.
Bu Sun Kim65020912020-05-20 12:08:20 -0700364 # * `User-Agent`: This will be set to `&quot;Google-Cloud-Scheduler&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700365 # * `X-Google-*`: Google internal use only.
366 # * `X-AppEngine-*`: Google internal use only.
367 #
368 # The total size of headers must be less than 80KB.
Bu Sun Kim65020912020-05-20 12:08:20 -0700369 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700370 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700371 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
372 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
373 # token will be generated and attached as an `Authorization` header in the
374 # HTTP request.
375 #
376 # This type of authorization can be used for many scenarios, including
377 # calling Cloud Run, or endpoints where you intend to validate the token
378 # yourself.
379 # [OpenID Connect
380 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
381 # This type of authorization can be used for many scenarios, including
382 # calling Cloud Run, or endpoints where you intend to validate the token
383 # yourself.
384 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
385 # specified in target will be used.
386 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
387 # to be used for generating OIDC token.
388 # The service account must be within the same project as the job. The caller
389 # must have iam.serviceAccounts.actAs permission for the service account.
390 },
391 &quot;httpMethod&quot;: &quot;A String&quot;, # Which HTTP method to use for the request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700392 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700393 &quot;schedule&quot;: &quot;A String&quot;, # Required, except when used with UpdateJob.
394 #
395 # Describes the schedule on which the job will be executed.
396 #
397 # The schedule can be either of the following types:
398 #
399 # * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
400 # * English-like
401 # [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
402 #
403 # As a general rule, execution `n + 1` of a job will not begin
404 # until execution `n` has finished. Cloud Scheduler will never
405 # allow two simultaneously outstanding executions. For example,
406 # this implies that if the `n+1`th execution is scheduled to run at
407 # 16:00 but the `n`th execution takes until 16:15, the `n+1`th
408 # execution will not start until `16:15`.
409 # A scheduled start time will be delayed if the previous
410 # execution has not ended when its scheduled time occurs.
411 #
412 # If retry_count &gt; 0 and a job attempt fails,
413 # the job will be tried a total of retry_count
414 # times, with exponential backoff, until the next scheduled start
415 # time.
416 &quot;retryConfig&quot;: { # Settings that determine the retry behavior. # Settings that determine the retry behavior.
417 #
418 # By default, if a job does not complete successfully (meaning that
419 # an acknowledgement is not received from the handler, then it will be retried
420 # with exponential backoff according to the settings in RetryConfig.
421 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # The time limit for retrying a failed job, measured from time when an
422 # execution was first attempted. If specified with
423 # retry_count, the job will be retried until both
424 # limits are reached.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700425 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700426 # The default value for max_retry_duration is zero, which means retry
427 # duration is unlimited.
428 &quot;minBackoffDuration&quot;: &quot;A String&quot;, # The minimum amount of time to wait before retrying a job after
429 # it fails.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700430 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700431 # The default value of this field is 5 seconds.
432 &quot;retryCount&quot;: 42, # The number of attempts that the system will make to run a job using the
433 # exponential backoff procedure described by
434 # max_doublings.
Bu Sun Kim65020912020-05-20 12:08:20 -0700435 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700436 # The default value of retry_count is zero.
437 #
438 # If retry_count is zero, a job attempt will *not* be retried if
439 # it fails. Instead the Cloud Scheduler system will wait for the
440 # next scheduled execution time.
441 #
442 # If retry_count is set to a non-zero number then Cloud Scheduler
443 # will retry failed attempts, using exponential backoff,
444 # retry_count times, or until the next scheduled execution time,
445 # whichever comes first.
446 #
447 # Values greater than 5 and negative values are not allowed.
448 &quot;maxBackoffDuration&quot;: &quot;A String&quot;, # The maximum amount of time to wait before retrying a job after
449 # it fails.
450 #
451 # The default value of this field is 1 hour.
452 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
453 #
454 # A job&#x27;s retry interval starts at
455 # min_backoff_duration, then doubles
456 # `max_doublings` times, then increases linearly, and finally
457 # retries at intervals of
458 # max_backoff_duration up to
459 # retry_count times.
460 #
461 # For example, if min_backoff_duration is
462 # 10s, max_backoff_duration is 300s, and
463 # `max_doublings` is 3, then the a job will first be retried in 10s. The
464 # retry interval will double three times, and then increase linearly by
465 # 2^3 * 10s. Finally, the job will retry at intervals of
466 # max_backoff_duration until the job has
467 # been attempted retry_count times. Thus, the
468 # requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
469 #
470 # The default value of this field is 5.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700471 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700472 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for the last attempted execution.
473 # different programming environments, including REST APIs and RPC APIs. It is
474 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
475 # three pieces of data: error code, error message, and error details.
476 #
477 # You can find out more about this error model and how to work with it in the
478 # [API Design Guide](https://cloud.google.com/apis/design/errors).
479 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
480 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
481 # user-facing error message should be localized and sent in the
482 # google.rpc.Status.details field, or localized by the client.
483 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
484 # message types for APIs to use.
485 {
486 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
487 },
488 ],
489 },
490 &quot;attemptDeadline&quot;: &quot;A String&quot;, # The deadline for job attempts. If the request handler does not respond by
491 # this deadline then the request is cancelled and the attempt is marked as a
492 # `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in
493 # execution logs. Cloud Scheduler will retry the job according
494 # to the RetryConfig.
495 #
496 # The allowed duration for this deadline is:
497 #
498 # * For HTTP targets, between 15 seconds and 30 minutes.
499 # * For App Engine HTTP targets, between 15
500 # seconds and 24 hours.
501 # * For PubSub targets, this field is ignored.
502 &quot;lastAttemptTime&quot;: &quot;A String&quot;, # Output only. The time the last job attempt started.
503 }
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 &quot;appEngineHttpTarget&quot;: { # App Engine target. The job will be pushed to a job handler by means # App Engine HTTP target.
516 # of an HTTP request via an http_method such
517 # as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an
518 # HTTP response code in the range [200 - 299]. Error 503 is
519 # considered an App Engine system error instead of an application
520 # error. Requests returning error 503 will be retried regardless of
521 # retry configuration and not counted against retry counts. Any other
522 # response code, or a failure to receive a response before the
523 # deadline, constitutes a failed attempt.
524 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
525 #
526 # The relative URL must begin with &quot;/&quot; and must be a valid HTTP relative URL.
527 # It can contain a path, query string arguments, and `#` fragments.
528 # If the relative URL is empty, then the root path &quot;/&quot; will be used.
529 # No spaces are allowed, and the maximum length allowed is 2083 characters.
530 &quot;body&quot;: &quot;A String&quot;, # Body.
531 #
532 # HTTP request body. A request body is allowed only if the HTTP method is
533 # POST or PUT. It will result in invalid argument error to set a body on a
534 # job with an incompatible HttpMethod.
535 &quot;headers&quot;: { # HTTP request headers.
536 #
537 # This map contains the header field names and values. Headers can be set
538 # when the job is created.
539 #
540 # Cloud Scheduler sets some headers to default values:
541 #
542 # * `User-Agent`: By default, this header is
543 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
544 # This header can be modified, but Cloud Scheduler will append
545 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
546 # modified `User-Agent`.
547 # * `X-CloudScheduler`: This header will be set to true.
548 #
549 # If the job has an body, Cloud Scheduler sets
550 # the following headers:
551 #
552 # * `Content-Type`: By default, the `Content-Type` header is set to
553 # `&quot;application/octet-stream&quot;`. The default can be overridden by explictly
554 # setting `Content-Type` to a particular media type when the job is
555 # created.
556 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
557 # * `Content-Length`: This is computed by Cloud Scheduler. This value is
558 # output only. It cannot be changed.
559 #
560 # The headers below are output only. They cannot be set or overridden:
561 #
562 # * `X-Google-*`: For Google internal use only.
563 # * `X-AppEngine-*`: For Google internal use only.
564 #
565 # In addition, some App Engine headers, which contain
566 # job-specific information, are also be sent to the job handler.
567 &quot;a_key&quot;: &quot;A String&quot;,
568 },
569 &quot;appEngineRouting&quot;: { # App Engine Routing. # App Engine Routing setting for the job.
570 #
571 # For more information about services, versions, and instances see
572 # [An Overview of App
573 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
574 # [Microservices Architecture on Google App
575 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
576 # [App Engine Standard request
577 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
578 # and [App Engine Flex request
579 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
580 &quot;instance&quot;: &quot;A String&quot;, # App instance.
581 #
582 # By default, the job is sent to an instance which is available when
583 # the job is attempted.
584 #
585 # Requests can only be sent to a specific instance if
586 # [manual scaling is used in App Engine
587 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
588 # App Engine Flex does not support instances. For more information, see
589 # [App Engine Standard request
590 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
591 # and [App Engine Flex request
592 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
593 &quot;service&quot;: &quot;A String&quot;, # App service.
594 #
595 # By default, the job is sent to the service which is the default
596 # service when the job is attempted.
597 &quot;version&quot;: &quot;A String&quot;, # App version.
598 #
599 # By default, the job is sent to the version which is the default
600 # version when the job is attempted.
601 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the job is sent to.
602 #
603 # For more information about how App Engine requests are routed, see
604 # [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
605 #
606 # The host is constructed as:
607 #
608 #
609 # * `host = [application_domain_name]`&lt;/br&gt;
610 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
611 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
612 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
613 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
614 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
615 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
616 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
617 #
618 # * `application_domain_name` = The domain name of the app, for
619 # example &lt;app-id&gt;.appspot.com, which is associated with the
620 # job&#x27;s project ID.
621 #
622 # * `service =` service
623 #
624 # * `version =` version
625 #
626 # * `version_dot_service =`
627 # version `+ &#x27;.&#x27; +`
628 # service
629 #
630 # * `instance =` instance
631 #
632 # * `instance_dot_service =`
633 # instance `+ &#x27;.&#x27; +`
634 # service
635 #
636 # * `instance_dot_version =`
637 # instance `+ &#x27;.&#x27; +`
638 # version
639 #
640 # * `instance_dot_version_dot_service =`
641 # instance `+ &#x27;.&#x27; +`
642 # version `+ &#x27;.&#x27; +`
643 # service
644 #
645 #
646 # If service is empty, then the job will be sent
647 # to the service which is the default service when the job is attempted.
648 #
649 # If version is empty, then the job will be sent
650 # to the version which is the default version when the job is attempted.
651 #
652 # If instance is empty, then the job will be
653 # sent to an instance which is available when the job is attempted.
654 #
655 # If service,
656 # version, or
657 # instance is invalid, then the job will be sent
658 # to the default version of the default service when the job is attempted.
659 },
660 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. PATCH and OPTIONS are not
661 # permitted.
662 },
663 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the job.
664 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob, after
665 # which it becomes output only.
666 #
667 # The job name. For example:
668 # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
669 #
670 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
671 # hyphens (-), colons (:), or periods (.).
672 # For more information, see
673 # [Identifying
674 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
675 # * `LOCATION_ID` is the canonical ID for the job&#x27;s location.
676 # The list of available locations can be obtained by calling
677 # ListLocations.
678 # For more information, see https://cloud.google.com/about/locations/.
679 # * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
680 # hyphens (-), or underscores (_). The maximum length is 500 characters.
681 &quot;userUpdateTime&quot;: &quot;A String&quot;, # Output only. The creation time of the job.
682 &quot;description&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob or
683 # UpdateJob.
684 #
685 # A human-readable description for the job. This string must not contain
686 # more than 500 characters.
687 &quot;pubsubTarget&quot;: { # Pub/Sub target. The job will be delivered by publishing a message to # Pub/Sub target.
688 # the given Pub/Sub topic.
689 &quot;attributes&quot;: { # Attributes for PubsubMessage.
690 #
691 # Pubsub message must contain either non-empty data, or at least one
692 # attribute.
693 &quot;a_key&quot;: &quot;A String&quot;,
694 },
695 &quot;topicName&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic to which messages will
696 # be published when a job is delivered. The topic name must be in the
697 # same format as required by PubSub&#x27;s
698 # [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
699 # for example `projects/PROJECT_ID/topics/TOPIC_ID`.
700 #
701 # The topic must be in the same project as the Cloud Scheduler job.
702 &quot;data&quot;: &quot;A String&quot;, # The message payload for PubsubMessage.
703 #
704 # Pubsub message must contain either non-empty data, or at least one
705 # attribute.
706 },
707 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The next time the job is scheduled. Note that this may be a
708 # retry of a previously failed attempt or the next execution time
709 # according to the schedule.
710 &quot;timeZone&quot;: &quot;A String&quot;, # Specifies the time zone to be used in interpreting
711 # schedule. The value of this field must be a time
712 # zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
713 #
714 # Note that some time zones include a provision for
715 # daylight savings time. The rules for daylight saving time are
716 # determined by the chosen tz. For UTC use the string &quot;utc&quot;. If a
717 # time zone is not specified, the default will be in UTC (also known
718 # as GMT).
719 &quot;httpTarget&quot;: { # Http target. The job will be pushed to the job handler by means of # HTTP target.
720 # an HTTP request via an http_method such as HTTP
721 # POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
722 # response code in the range [200 - 299]. A failure to receive a response
723 # constitutes a failed execution. For a redirected request, the response
724 # returned by the redirected request is considered.
725 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
726 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
727 # will be generated and attached as an `Authorization` header in the HTTP
728 # request.
729 #
730 # This type of authorization should generally only be used when calling
731 # Google APIs hosted on *.googleapis.com.
732 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
733 # This type of authorization should generally only be used when calling Google
734 # APIs hosted on *.googleapis.com.
735 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
736 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
737 # will be used.
738 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
739 # to be used for generating OAuth token.
740 # The service account must be within the same project as the job. The caller
741 # must have iam.serviceAccounts.actAs permission for the service account.
742 },
743 &quot;uri&quot;: &quot;A String&quot;, # Required. The full URI path that the request will be sent to. This string
744 # must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples of
745 # valid values for uri are:
746 # `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will
747 # encode some characters for safety and compatibility. The maximum allowed
748 # URL length is 2083 characters after encoding.
749 &quot;body&quot;: &quot;A String&quot;, # HTTP request body. A request body is allowed only if the HTTP
750 # method is POST, PUT, or PATCH. It is an error to set body on a job with an
751 # incompatible HttpMethod.
752 &quot;headers&quot;: { # The user can specify HTTP request headers to send with the job&#x27;s
753 # HTTP request. This map contains the header field names and
754 # values. Repeated headers are not supported, but a header value can
755 # contain commas. These headers represent a subset of the headers
756 # that will accompany the job&#x27;s HTTP request. Some HTTP request
757 # headers will be ignored or replaced. A partial list of headers that
758 # will be ignored or replaced is below:
759 # - Host: This will be computed by Cloud Scheduler and derived from
760 # uri.
761 # * `Content-Length`: This will be computed by Cloud Scheduler.
762 # * `User-Agent`: This will be set to `&quot;Google-Cloud-Scheduler&quot;`.
763 # * `X-Google-*`: Google internal use only.
764 # * `X-AppEngine-*`: Google internal use only.
765 #
766 # The total size of headers must be less than 80KB.
767 &quot;a_key&quot;: &quot;A String&quot;,
768 },
769 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
770 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
771 # token will be generated and attached as an `Authorization` header in the
772 # HTTP request.
773 #
774 # This type of authorization can be used for many scenarios, including
775 # calling Cloud Run, or endpoints where you intend to validate the token
776 # yourself.
777 # [OpenID Connect
778 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
779 # This type of authorization can be used for many scenarios, including
780 # calling Cloud Run, or endpoints where you intend to validate the token
781 # yourself.
782 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
783 # specified in target will be used.
784 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
785 # to be used for generating OIDC token.
786 # The service account must be within the same project as the job. The caller
787 # must have iam.serviceAccounts.actAs permission for the service account.
788 },
789 &quot;httpMethod&quot;: &quot;A String&quot;, # Which HTTP method to use for the request.
790 },
791 &quot;schedule&quot;: &quot;A String&quot;, # Required, except when used with UpdateJob.
792 #
793 # Describes the schedule on which the job will be executed.
794 #
795 # The schedule can be either of the following types:
796 #
797 # * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
798 # * English-like
799 # [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
800 #
801 # As a general rule, execution `n + 1` of a job will not begin
802 # until execution `n` has finished. Cloud Scheduler will never
803 # allow two simultaneously outstanding executions. For example,
804 # this implies that if the `n+1`th execution is scheduled to run at
805 # 16:00 but the `n`th execution takes until 16:15, the `n+1`th
806 # execution will not start until `16:15`.
807 # A scheduled start time will be delayed if the previous
808 # execution has not ended when its scheduled time occurs.
809 #
810 # If retry_count &gt; 0 and a job attempt fails,
811 # the job will be tried a total of retry_count
812 # times, with exponential backoff, until the next scheduled start
813 # time.
814 &quot;retryConfig&quot;: { # Settings that determine the retry behavior. # Settings that determine the retry behavior.
815 #
816 # By default, if a job does not complete successfully (meaning that
817 # an acknowledgement is not received from the handler, then it will be retried
818 # with exponential backoff according to the settings in RetryConfig.
819 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # The time limit for retrying a failed job, measured from time when an
820 # execution was first attempted. If specified with
821 # retry_count, the job will be retried until both
822 # limits are reached.
823 #
824 # The default value for max_retry_duration is zero, which means retry
825 # duration is unlimited.
826 &quot;minBackoffDuration&quot;: &quot;A String&quot;, # The minimum amount of time to wait before retrying a job after
827 # it fails.
828 #
829 # The default value of this field is 5 seconds.
830 &quot;retryCount&quot;: 42, # The number of attempts that the system will make to run a job using the
831 # exponential backoff procedure described by
832 # max_doublings.
833 #
834 # The default value of retry_count is zero.
835 #
836 # If retry_count is zero, a job attempt will *not* be retried if
837 # it fails. Instead the Cloud Scheduler system will wait for the
838 # next scheduled execution time.
839 #
840 # If retry_count is set to a non-zero number then Cloud Scheduler
841 # will retry failed attempts, using exponential backoff,
842 # retry_count times, or until the next scheduled execution time,
843 # whichever comes first.
844 #
845 # Values greater than 5 and negative values are not allowed.
846 &quot;maxBackoffDuration&quot;: &quot;A String&quot;, # The maximum amount of time to wait before retrying a job after
847 # it fails.
848 #
849 # The default value of this field is 1 hour.
850 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
851 #
852 # A job&#x27;s retry interval starts at
853 # min_backoff_duration, then doubles
854 # `max_doublings` times, then increases linearly, and finally
855 # retries at intervals of
856 # max_backoff_duration up to
857 # retry_count times.
858 #
859 # For example, if min_backoff_duration is
860 # 10s, max_backoff_duration is 300s, and
861 # `max_doublings` is 3, then the a job will first be retried in 10s. The
862 # retry interval will double three times, and then increase linearly by
863 # 2^3 * 10s. Finally, the job will retry at intervals of
864 # max_backoff_duration until the job has
865 # been attempted retry_count times. Thus, the
866 # requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
867 #
868 # The default value of this field is 5.
869 },
870 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for the last attempted execution.
871 # different programming environments, including REST APIs and RPC APIs. It is
872 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
873 # three pieces of data: error code, error message, and error details.
874 #
875 # You can find out more about this error model and how to work with it in the
876 # [API Design Guide](https://cloud.google.com/apis/design/errors).
877 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
878 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
879 # user-facing error message should be localized and sent in the
880 # google.rpc.Status.details field, or localized by the client.
881 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
882 # message types for APIs to use.
883 {
884 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
885 },
886 ],
887 },
888 &quot;attemptDeadline&quot;: &quot;A String&quot;, # The deadline for job attempts. If the request handler does not respond by
889 # this deadline then the request is cancelled and the attempt is marked as a
890 # `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in
891 # execution logs. Cloud Scheduler will retry the job according
892 # to the RetryConfig.
893 #
894 # The allowed duration for this deadline is:
895 #
896 # * For HTTP targets, between 15 seconds and 30 minutes.
897 # * For App Engine HTTP targets, between 15
898 # seconds and 24 hours.
899 # * For PubSub targets, this field is ignored.
900 &quot;lastAttemptTime&quot;: &quot;A String&quot;, # Output only. The time the last job attempt started.
901 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902</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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700947 # The maximum allowed size for a job is 100KB.
948 &quot;appEngineHttpTarget&quot;: { # App Engine target. The job will be pushed to a job handler by means # App Engine HTTP target.
949 # of an HTTP request via an http_method such
950 # as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an
951 # HTTP response code in the range [200 - 299]. Error 503 is
952 # considered an App Engine system error instead of an application
953 # error. Requests returning error 503 will be retried regardless of
954 # retry configuration and not counted against retry counts. Any other
955 # response code, or a failure to receive a response before the
956 # deadline, constitutes a failed attempt.
957 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
Bu Sun Kim65020912020-05-20 12:08:20 -0700958 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700959 # The relative URL must begin with &quot;/&quot; and must be a valid HTTP relative URL.
960 # It can contain a path, query string arguments, and `#` fragments.
961 # If the relative URL is empty, then the root path &quot;/&quot; will be used.
962 # No spaces are allowed, and the maximum length allowed is 2083 characters.
963 &quot;body&quot;: &quot;A String&quot;, # Body.
Bu Sun Kim65020912020-05-20 12:08:20 -0700964 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700965 # HTTP request body. A request body is allowed only if the HTTP method is
966 # POST or PUT. It will result in invalid argument error to set a body on a
967 # job with an incompatible HttpMethod.
968 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim65020912020-05-20 12:08:20 -0700969 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700970 # This map contains the header field names and values. Headers can be set
971 # when the job is created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700972 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700973 # Cloud Scheduler sets some headers to default values:
Bu Sun Kim65020912020-05-20 12:08:20 -0700974 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700975 # * `User-Agent`: By default, this header is
976 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
977 # This header can be modified, but Cloud Scheduler will append
978 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
979 # modified `User-Agent`.
980 # * `X-CloudScheduler`: This header will be set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700981 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700982 # If the job has an body, Cloud Scheduler sets
983 # the following headers:
Bu Sun Kim65020912020-05-20 12:08:20 -0700984 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700985 # * `Content-Type`: By default, the `Content-Type` header is set to
986 # `&quot;application/octet-stream&quot;`. The default can be overridden by explictly
987 # setting `Content-Type` to a particular media type when the job is
988 # created.
989 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
990 # * `Content-Length`: This is computed by Cloud Scheduler. This value is
991 # output only. It cannot be changed.
Bu Sun Kim65020912020-05-20 12:08:20 -0700992 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700993 # The headers below are output only. They cannot be set or overridden:
Bu Sun Kim65020912020-05-20 12:08:20 -0700994 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700995 # * `X-Google-*`: For Google internal use only.
996 # * `X-AppEngine-*`: For Google internal use only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700997 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700998 # In addition, some App Engine headers, which contain
999 # job-specific information, are also be sent to the job handler.
1000 &quot;a_key&quot;: &quot;A String&quot;,
1001 },
1002 &quot;appEngineRouting&quot;: { # App Engine Routing. # App Engine Routing setting for the job.
Bu Sun Kim65020912020-05-20 12:08:20 -07001003 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001004 # For more information about services, versions, and instances see
1005 # [An Overview of App
1006 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1007 # [Microservices Architecture on Google App
1008 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001009 # [App Engine Standard request
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001010 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001011 # and [App Engine Flex request
1012 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001013 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1014 #
1015 # By default, the job is sent to an instance which is available when
1016 # the job is attempted.
1017 #
1018 # Requests can only be sent to a specific instance if
1019 # [manual scaling is used in App Engine
1020 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1021 # App Engine Flex does not support instances. For more information, see
1022 # [App Engine Standard request
1023 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1024 # and [App Engine Flex request
1025 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1026 &quot;service&quot;: &quot;A String&quot;, # App service.
1027 #
1028 # By default, the job is sent to the service which is the default
1029 # service when the job is attempted.
1030 &quot;version&quot;: &quot;A String&quot;, # App version.
1031 #
1032 # By default, the job is sent to the version which is the default
1033 # version when the job is attempted.
1034 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the job is sent to.
1035 #
1036 # For more information about how App Engine requests are routed, see
1037 # [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1038 #
1039 # The host is constructed as:
1040 #
1041 #
1042 # * `host = [application_domain_name]`&lt;/br&gt;
1043 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1044 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1045 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1046 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1047 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1048 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1049 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
1050 #
1051 # * `application_domain_name` = The domain name of the app, for
1052 # example &lt;app-id&gt;.appspot.com, which is associated with the
1053 # job&#x27;s project ID.
1054 #
1055 # * `service =` service
1056 #
1057 # * `version =` version
1058 #
1059 # * `version_dot_service =`
1060 # version `+ &#x27;.&#x27; +`
1061 # service
1062 #
1063 # * `instance =` instance
1064 #
1065 # * `instance_dot_service =`
1066 # instance `+ &#x27;.&#x27; +`
1067 # service
1068 #
1069 # * `instance_dot_version =`
1070 # instance `+ &#x27;.&#x27; +`
1071 # version
1072 #
1073 # * `instance_dot_version_dot_service =`
1074 # instance `+ &#x27;.&#x27; +`
1075 # version `+ &#x27;.&#x27; +`
1076 # service
1077 #
1078 #
1079 # If service is empty, then the job will be sent
1080 # to the service which is the default service when the job is attempted.
1081 #
1082 # If version is empty, then the job will be sent
1083 # to the version which is the default version when the job is attempted.
1084 #
1085 # If instance is empty, then the job will be
1086 # sent to an instance which is available when the job is attempted.
1087 #
1088 # If service,
1089 # version, or
1090 # instance is invalid, then the job will be sent
1091 # to the default version of the default service when the job is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001092 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001093 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. PATCH and OPTIONS are not
1094 # permitted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001095 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001096 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the job.
1097 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob, after
1098 # which it becomes output only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001099 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001100 # The job name. For example:
1101 # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
1102 #
1103 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1104 # hyphens (-), colons (:), or periods (.).
1105 # For more information, see
1106 # [Identifying
1107 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1108 # * `LOCATION_ID` is the canonical ID for the job&#x27;s location.
1109 # The list of available locations can be obtained by calling
1110 # ListLocations.
1111 # For more information, see https://cloud.google.com/about/locations/.
1112 # * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1113 # hyphens (-), or underscores (_). The maximum length is 500 characters.
1114 &quot;userUpdateTime&quot;: &quot;A String&quot;, # Output only. The creation time of the job.
1115 &quot;description&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob or
1116 # UpdateJob.
1117 #
1118 # A human-readable description for the job. This string must not contain
1119 # more than 500 characters.
1120 &quot;pubsubTarget&quot;: { # Pub/Sub target. The job will be delivered by publishing a message to # Pub/Sub target.
1121 # the given Pub/Sub topic.
1122 &quot;attributes&quot;: { # Attributes for PubsubMessage.
1123 #
1124 # Pubsub message must contain either non-empty data, or at least one
1125 # attribute.
1126 &quot;a_key&quot;: &quot;A String&quot;,
1127 },
1128 &quot;topicName&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic to which messages will
1129 # be published when a job is delivered. The topic name must be in the
1130 # same format as required by PubSub&#x27;s
1131 # [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
1132 # for example `projects/PROJECT_ID/topics/TOPIC_ID`.
1133 #
1134 # The topic must be in the same project as the Cloud Scheduler job.
1135 &quot;data&quot;: &quot;A String&quot;, # The message payload for PubsubMessage.
1136 #
1137 # Pubsub message must contain either non-empty data, or at least one
1138 # attribute.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001139 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001140 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The next time the job is scheduled. Note that this may be a
1141 # retry of a previously failed attempt or the next execution time
1142 # according to the schedule.
1143 &quot;timeZone&quot;: &quot;A String&quot;, # Specifies the time zone to be used in interpreting
1144 # schedule. The value of this field must be a time
1145 # zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001146 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001147 # Note that some time zones include a provision for
1148 # daylight savings time. The rules for daylight saving time are
1149 # determined by the chosen tz. For UTC use the string &quot;utc&quot;. If a
1150 # time zone is not specified, the default will be in UTC (also known
1151 # as GMT).
1152 &quot;httpTarget&quot;: { # Http target. The job will be pushed to the job handler by means of # HTTP target.
1153 # an HTTP request via an http_method such as HTTP
1154 # POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
1155 # response code in the range [200 - 299]. A failure to receive a response
1156 # constitutes a failed execution. For a redirected request, the response
1157 # returned by the redirected request is considered.
1158 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
1159 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
1160 # will be generated and attached as an `Authorization` header in the HTTP
1161 # request.
1162 #
1163 # This type of authorization should generally only be used when calling
1164 # Google APIs hosted on *.googleapis.com.
1165 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
1166 # This type of authorization should generally only be used when calling Google
1167 # APIs hosted on *.googleapis.com.
1168 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
1169 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
1170 # will be used.
1171 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1172 # to be used for generating OAuth token.
1173 # The service account must be within the same project as the job. The caller
1174 # must have iam.serviceAccounts.actAs permission for the service account.
1175 },
1176 &quot;uri&quot;: &quot;A String&quot;, # Required. The full URI path that the request will be sent to. This string
1177 # must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples of
1178 # valid values for uri are:
1179 # `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will
1180 # encode some characters for safety and compatibility. The maximum allowed
1181 # URL length is 2083 characters after encoding.
1182 &quot;body&quot;: &quot;A String&quot;, # HTTP request body. A request body is allowed only if the HTTP
1183 # method is POST, PUT, or PATCH. It is an error to set body on a job with an
1184 # incompatible HttpMethod.
1185 &quot;headers&quot;: { # The user can specify HTTP request headers to send with the job&#x27;s
1186 # HTTP request. This map contains the header field names and
1187 # values. Repeated headers are not supported, but a header value can
1188 # contain commas. These headers represent a subset of the headers
1189 # that will accompany the job&#x27;s HTTP request. Some HTTP request
1190 # headers will be ignored or replaced. A partial list of headers that
1191 # will be ignored or replaced is below:
1192 # - Host: This will be computed by Cloud Scheduler and derived from
1193 # uri.
1194 # * `Content-Length`: This will be computed by Cloud Scheduler.
1195 # * `User-Agent`: This will be set to `&quot;Google-Cloud-Scheduler&quot;`.
1196 # * `X-Google-*`: Google internal use only.
1197 # * `X-AppEngine-*`: Google internal use only.
1198 #
1199 # The total size of headers must be less than 80KB.
1200 &quot;a_key&quot;: &quot;A String&quot;,
1201 },
1202 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
1203 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
1204 # token will be generated and attached as an `Authorization` header in the
1205 # HTTP request.
1206 #
1207 # This type of authorization can be used for many scenarios, including
1208 # calling Cloud Run, or endpoints where you intend to validate the token
1209 # yourself.
1210 # [OpenID Connect
1211 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
1212 # This type of authorization can be used for many scenarios, including
1213 # calling Cloud Run, or endpoints where you intend to validate the token
1214 # yourself.
1215 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
1216 # specified in target will be used.
1217 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1218 # to be used for generating OIDC token.
1219 # The service account must be within the same project as the job. The caller
1220 # must have iam.serviceAccounts.actAs permission for the service account.
1221 },
1222 &quot;httpMethod&quot;: &quot;A String&quot;, # Which HTTP method to use for the request.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001223 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001224 &quot;schedule&quot;: &quot;A String&quot;, # Required, except when used with UpdateJob.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001225 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001226 # Describes the schedule on which the job will be executed.
1227 #
1228 # The schedule can be either of the following types:
1229 #
1230 # * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
1231 # * English-like
1232 # [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
1233 #
1234 # As a general rule, execution `n + 1` of a job will not begin
1235 # until execution `n` has finished. Cloud Scheduler will never
1236 # allow two simultaneously outstanding executions. For example,
1237 # this implies that if the `n+1`th execution is scheduled to run at
1238 # 16:00 but the `n`th execution takes until 16:15, the `n+1`th
1239 # execution will not start until `16:15`.
1240 # A scheduled start time will be delayed if the previous
1241 # execution has not ended when its scheduled time occurs.
1242 #
1243 # If retry_count &gt; 0 and a job attempt fails,
1244 # the job will be tried a total of retry_count
1245 # times, with exponential backoff, until the next scheduled start
1246 # time.
1247 &quot;retryConfig&quot;: { # Settings that determine the retry behavior. # Settings that determine the retry behavior.
1248 #
1249 # By default, if a job does not complete successfully (meaning that
1250 # an acknowledgement is not received from the handler, then it will be retried
1251 # with exponential backoff according to the settings in RetryConfig.
1252 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # The time limit for retrying a failed job, measured from time when an
1253 # execution was first attempted. If specified with
1254 # retry_count, the job will be retried until both
1255 # limits are reached.
1256 #
1257 # The default value for max_retry_duration is zero, which means retry
1258 # duration is unlimited.
1259 &quot;minBackoffDuration&quot;: &quot;A String&quot;, # The minimum amount of time to wait before retrying a job after
1260 # it fails.
1261 #
1262 # The default value of this field is 5 seconds.
1263 &quot;retryCount&quot;: 42, # The number of attempts that the system will make to run a job using the
1264 # exponential backoff procedure described by
1265 # max_doublings.
1266 #
1267 # The default value of retry_count is zero.
1268 #
1269 # If retry_count is zero, a job attempt will *not* be retried if
1270 # it fails. Instead the Cloud Scheduler system will wait for the
1271 # next scheduled execution time.
1272 #
1273 # If retry_count is set to a non-zero number then Cloud Scheduler
1274 # will retry failed attempts, using exponential backoff,
1275 # retry_count times, or until the next scheduled execution time,
1276 # whichever comes first.
1277 #
1278 # Values greater than 5 and negative values are not allowed.
1279 &quot;maxBackoffDuration&quot;: &quot;A String&quot;, # The maximum amount of time to wait before retrying a job after
1280 # it fails.
1281 #
1282 # The default value of this field is 1 hour.
1283 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
1284 #
1285 # A job&#x27;s retry interval starts at
1286 # min_backoff_duration, then doubles
1287 # `max_doublings` times, then increases linearly, and finally
1288 # retries at intervals of
1289 # max_backoff_duration up to
1290 # retry_count times.
1291 #
1292 # For example, if min_backoff_duration is
1293 # 10s, max_backoff_duration is 300s, and
1294 # `max_doublings` is 3, then the a job will first be retried in 10s. The
1295 # retry interval will double three times, and then increase linearly by
1296 # 2^3 * 10s. Finally, the job will retry at intervals of
1297 # max_backoff_duration until the job has
1298 # been attempted retry_count times. Thus, the
1299 # requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
1300 #
1301 # The default value of this field is 5.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001302 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001303 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for the last attempted execution.
1304 # different programming environments, including REST APIs and RPC APIs. It is
1305 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1306 # three pieces of data: error code, error message, and error details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001307 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001308 # You can find out more about this error model and how to work with it in the
1309 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1310 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1311 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1312 # user-facing error message should be localized and sent in the
1313 # google.rpc.Status.details field, or localized by the client.
1314 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1315 # message types for APIs to use.
1316 {
1317 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1318 },
1319 ],
1320 },
1321 &quot;attemptDeadline&quot;: &quot;A String&quot;, # The deadline for job attempts. If the request handler does not respond by
1322 # this deadline then the request is cancelled and the attempt is marked as a
1323 # `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in
1324 # execution logs. Cloud Scheduler will retry the job according
1325 # to the RetryConfig.
Bu Sun Kim65020912020-05-20 12:08:20 -07001326 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001327 # The allowed duration for this deadline is:
1328 #
1329 # * For HTTP targets, between 15 seconds and 30 minutes.
1330 # * For App Engine HTTP targets, between 15
1331 # seconds and 24 hours.
1332 # * For PubSub targets, this field is ignored.
1333 &quot;lastAttemptTime&quot;: &quot;A String&quot;, # Output only. The time the last job attempt started.
1334 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001335</div>
1336
1337<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -07001338 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001351 pageSize: integer, Requested page size.
1352
1353The maximum page size is 500. If unspecified, the page size will
1354be the maximum. Fewer jobs than requested might be returned,
1355even if more jobs exist; use next_page_token to determine if more
1356jobs exist.
Bu Sun Kim65020912020-05-20 12:08:20 -07001357 x__xgafv: string, V1 error format.
1358 Allowed values
1359 1 - v1 error format
1360 2 - v2 error format
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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001366 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results. Pass this value in the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001367 # page_token field in the subsequent call to
1368 # ListJobs to retrieve the next page of results.
1369 # If this is empty it indicates that there are no more results
1370 # through which to paginate.
1371 #
1372 # The page token is valid for only 2 hours.
Bu Sun Kim65020912020-05-20 12:08:20 -07001373 &quot;jobs&quot;: [ # The list of jobs.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001374 { # Configuration for a job.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001375 # The maximum allowed size for a job is 100KB.
1376 &quot;appEngineHttpTarget&quot;: { # App Engine target. The job will be pushed to a job handler by means # App Engine HTTP target.
1377 # of an HTTP request via an http_method such
1378 # as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an
1379 # HTTP response code in the range [200 - 299]. Error 503 is
1380 # considered an App Engine system error instead of an application
1381 # error. Requests returning error 503 will be retried regardless of
1382 # retry configuration and not counted against retry counts. Any other
1383 # response code, or a failure to receive a response before the
1384 # deadline, constitutes a failed attempt.
1385 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
Bu Sun Kim65020912020-05-20 12:08:20 -07001386 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001387 # The relative URL must begin with &quot;/&quot; and must be a valid HTTP relative URL.
1388 # It can contain a path, query string arguments, and `#` fragments.
1389 # If the relative URL is empty, then the root path &quot;/&quot; will be used.
1390 # No spaces are allowed, and the maximum length allowed is 2083 characters.
1391 &quot;body&quot;: &quot;A String&quot;, # Body.
Bu Sun Kim65020912020-05-20 12:08:20 -07001392 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001393 # HTTP request body. A request body is allowed only if the HTTP method is
1394 # POST or PUT. It will result in invalid argument error to set a body on a
1395 # job with an incompatible HttpMethod.
1396 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim65020912020-05-20 12:08:20 -07001397 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001398 # This map contains the header field names and values. Headers can be set
1399 # when the job is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07001400 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001401 # Cloud Scheduler sets some headers to default values:
Bu Sun Kim65020912020-05-20 12:08:20 -07001402 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001403 # * `User-Agent`: By default, this header is
1404 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
1405 # This header can be modified, but Cloud Scheduler will append
1406 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
1407 # modified `User-Agent`.
1408 # * `X-CloudScheduler`: This header will be set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001409 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001410 # If the job has an body, Cloud Scheduler sets
1411 # the following headers:
Bu Sun Kim65020912020-05-20 12:08:20 -07001412 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001413 # * `Content-Type`: By default, the `Content-Type` header is set to
1414 # `&quot;application/octet-stream&quot;`. The default can be overridden by explictly
1415 # setting `Content-Type` to a particular media type when the job is
1416 # created.
1417 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
1418 # * `Content-Length`: This is computed by Cloud Scheduler. This value is
1419 # output only. It cannot be changed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001420 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001421 # The headers below are output only. They cannot be set or overridden:
Bu Sun Kim65020912020-05-20 12:08:20 -07001422 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001423 # * `X-Google-*`: For Google internal use only.
1424 # * `X-AppEngine-*`: For Google internal use only.
Bu Sun Kim65020912020-05-20 12:08:20 -07001425 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001426 # In addition, some App Engine headers, which contain
1427 # job-specific information, are also be sent to the job handler.
1428 &quot;a_key&quot;: &quot;A String&quot;,
1429 },
1430 &quot;appEngineRouting&quot;: { # App Engine Routing. # App Engine Routing setting for the job.
Bu Sun Kim65020912020-05-20 12:08:20 -07001431 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001432 # For more information about services, versions, and instances see
1433 # [An Overview of App
1434 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1435 # [Microservices Architecture on Google App
1436 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001437 # [App Engine Standard request
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001438 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001439 # and [App Engine Flex request
1440 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001441 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1442 #
1443 # By default, the job is sent to an instance which is available when
1444 # the job is attempted.
1445 #
1446 # Requests can only be sent to a specific instance if
1447 # [manual scaling is used in App Engine
1448 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1449 # App Engine Flex does not support instances. For more information, see
1450 # [App Engine Standard request
1451 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1452 # and [App Engine Flex request
1453 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1454 &quot;service&quot;: &quot;A String&quot;, # App service.
1455 #
1456 # By default, the job is sent to the service which is the default
1457 # service when the job is attempted.
1458 &quot;version&quot;: &quot;A String&quot;, # App version.
1459 #
1460 # By default, the job is sent to the version which is the default
1461 # version when the job is attempted.
1462 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the job is sent to.
1463 #
1464 # For more information about how App Engine requests are routed, see
1465 # [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1466 #
1467 # The host is constructed as:
1468 #
1469 #
1470 # * `host = [application_domain_name]`&lt;/br&gt;
1471 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1472 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1473 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1474 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1475 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1476 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1477 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
1478 #
1479 # * `application_domain_name` = The domain name of the app, for
1480 # example &lt;app-id&gt;.appspot.com, which is associated with the
1481 # job&#x27;s project ID.
1482 #
1483 # * `service =` service
1484 #
1485 # * `version =` version
1486 #
1487 # * `version_dot_service =`
1488 # version `+ &#x27;.&#x27; +`
1489 # service
1490 #
1491 # * `instance =` instance
1492 #
1493 # * `instance_dot_service =`
1494 # instance `+ &#x27;.&#x27; +`
1495 # service
1496 #
1497 # * `instance_dot_version =`
1498 # instance `+ &#x27;.&#x27; +`
1499 # version
1500 #
1501 # * `instance_dot_version_dot_service =`
1502 # instance `+ &#x27;.&#x27; +`
1503 # version `+ &#x27;.&#x27; +`
1504 # service
1505 #
1506 #
1507 # If service is empty, then the job will be sent
1508 # to the service which is the default service when the job is attempted.
1509 #
1510 # If version is empty, then the job will be sent
1511 # to the version which is the default version when the job is attempted.
1512 #
1513 # If instance is empty, then the job will be
1514 # sent to an instance which is available when the job is attempted.
1515 #
1516 # If service,
1517 # version, or
1518 # instance is invalid, then the job will be sent
1519 # to the default version of the default service when the job is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001520 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001521 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. PATCH and OPTIONS are not
1522 # permitted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001523 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001524 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the job.
1525 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob, after
1526 # which it becomes output only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001527 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001528 # The job name. For example:
1529 # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001530 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001531 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1532 # hyphens (-), colons (:), or periods (.).
1533 # For more information, see
1534 # [Identifying
1535 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1536 # * `LOCATION_ID` is the canonical ID for the job&#x27;s location.
1537 # The list of available locations can be obtained by calling
1538 # ListLocations.
1539 # For more information, see https://cloud.google.com/about/locations/.
1540 # * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1541 # hyphens (-), or underscores (_). The maximum length is 500 characters.
1542 &quot;userUpdateTime&quot;: &quot;A String&quot;, # Output only. The creation time of the job.
1543 &quot;description&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob or
1544 # UpdateJob.
1545 #
1546 # A human-readable description for the job. This string must not contain
1547 # more than 500 characters.
1548 &quot;pubsubTarget&quot;: { # Pub/Sub target. The job will be delivered by publishing a message to # Pub/Sub target.
1549 # the given Pub/Sub topic.
1550 &quot;attributes&quot;: { # Attributes for PubsubMessage.
1551 #
1552 # Pubsub message must contain either non-empty data, or at least one
1553 # attribute.
1554 &quot;a_key&quot;: &quot;A String&quot;,
1555 },
1556 &quot;topicName&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic to which messages will
1557 # be published when a job is delivered. The topic name must be in the
1558 # same format as required by PubSub&#x27;s
1559 # [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
1560 # for example `projects/PROJECT_ID/topics/TOPIC_ID`.
1561 #
1562 # The topic must be in the same project as the Cloud Scheduler job.
1563 &quot;data&quot;: &quot;A String&quot;, # The message payload for PubsubMessage.
1564 #
1565 # Pubsub message must contain either non-empty data, or at least one
1566 # attribute.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001567 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001568 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The next time the job is scheduled. Note that this may be a
1569 # retry of a previously failed attempt or the next execution time
1570 # according to the schedule.
1571 &quot;timeZone&quot;: &quot;A String&quot;, # Specifies the time zone to be used in interpreting
1572 # schedule. The value of this field must be a time
1573 # zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
1574 #
1575 # Note that some time zones include a provision for
1576 # daylight savings time. The rules for daylight saving time are
1577 # determined by the chosen tz. For UTC use the string &quot;utc&quot;. If a
1578 # time zone is not specified, the default will be in UTC (also known
1579 # as GMT).
1580 &quot;httpTarget&quot;: { # Http target. The job will be pushed to the job handler by means of # HTTP target.
1581 # an HTTP request via an http_method such as HTTP
1582 # POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
1583 # response code in the range [200 - 299]. A failure to receive a response
1584 # constitutes a failed execution. For a redirected request, the response
1585 # returned by the redirected request is considered.
1586 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
1587 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
1588 # will be generated and attached as an `Authorization` header in the HTTP
1589 # request.
1590 #
1591 # This type of authorization should generally only be used when calling
1592 # Google APIs hosted on *.googleapis.com.
1593 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
1594 # This type of authorization should generally only be used when calling Google
1595 # APIs hosted on *.googleapis.com.
1596 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
1597 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
1598 # will be used.
1599 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1600 # to be used for generating OAuth token.
1601 # The service account must be within the same project as the job. The caller
1602 # must have iam.serviceAccounts.actAs permission for the service account.
1603 },
1604 &quot;uri&quot;: &quot;A String&quot;, # Required. The full URI path that the request will be sent to. This string
1605 # must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples of
1606 # valid values for uri are:
1607 # `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will
1608 # encode some characters for safety and compatibility. The maximum allowed
1609 # URL length is 2083 characters after encoding.
1610 &quot;body&quot;: &quot;A String&quot;, # HTTP request body. A request body is allowed only if the HTTP
1611 # method is POST, PUT, or PATCH. It is an error to set body on a job with an
1612 # incompatible HttpMethod.
1613 &quot;headers&quot;: { # The user can specify HTTP request headers to send with the job&#x27;s
1614 # HTTP request. This map contains the header field names and
1615 # values. Repeated headers are not supported, but a header value can
1616 # contain commas. These headers represent a subset of the headers
1617 # that will accompany the job&#x27;s HTTP request. Some HTTP request
1618 # headers will be ignored or replaced. A partial list of headers that
1619 # will be ignored or replaced is below:
1620 # - Host: This will be computed by Cloud Scheduler and derived from
1621 # uri.
1622 # * `Content-Length`: This will be computed by Cloud Scheduler.
1623 # * `User-Agent`: This will be set to `&quot;Google-Cloud-Scheduler&quot;`.
1624 # * `X-Google-*`: Google internal use only.
1625 # * `X-AppEngine-*`: Google internal use only.
1626 #
1627 # The total size of headers must be less than 80KB.
1628 &quot;a_key&quot;: &quot;A String&quot;,
1629 },
1630 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
1631 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
1632 # token will be generated and attached as an `Authorization` header in the
1633 # HTTP request.
1634 #
1635 # This type of authorization can be used for many scenarios, including
1636 # calling Cloud Run, or endpoints where you intend to validate the token
1637 # yourself.
1638 # [OpenID Connect
1639 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
1640 # This type of authorization can be used for many scenarios, including
1641 # calling Cloud Run, or endpoints where you intend to validate the token
1642 # yourself.
1643 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
1644 # specified in target will be used.
1645 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
1646 # to be used for generating OIDC token.
1647 # The service account must be within the same project as the job. The caller
1648 # must have iam.serviceAccounts.actAs permission for the service account.
1649 },
1650 &quot;httpMethod&quot;: &quot;A String&quot;, # Which HTTP method to use for the request.
1651 },
1652 &quot;schedule&quot;: &quot;A String&quot;, # Required, except when used with UpdateJob.
1653 #
1654 # Describes the schedule on which the job will be executed.
1655 #
1656 # The schedule can be either of the following types:
1657 #
1658 # * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
1659 # * English-like
1660 # [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
1661 #
1662 # As a general rule, execution `n + 1` of a job will not begin
1663 # until execution `n` has finished. Cloud Scheduler will never
1664 # allow two simultaneously outstanding executions. For example,
1665 # this implies that if the `n+1`th execution is scheduled to run at
1666 # 16:00 but the `n`th execution takes until 16:15, the `n+1`th
1667 # execution will not start until `16:15`.
1668 # A scheduled start time will be delayed if the previous
1669 # execution has not ended when its scheduled time occurs.
1670 #
1671 # If retry_count &gt; 0 and a job attempt fails,
1672 # the job will be tried a total of retry_count
1673 # times, with exponential backoff, until the next scheduled start
1674 # time.
1675 &quot;retryConfig&quot;: { # Settings that determine the retry behavior. # Settings that determine the retry behavior.
1676 #
1677 # By default, if a job does not complete successfully (meaning that
1678 # an acknowledgement is not received from the handler, then it will be retried
1679 # with exponential backoff according to the settings in RetryConfig.
1680 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # The time limit for retrying a failed job, measured from time when an
1681 # execution was first attempted. If specified with
1682 # retry_count, the job will be retried until both
1683 # limits are reached.
1684 #
1685 # The default value for max_retry_duration is zero, which means retry
1686 # duration is unlimited.
1687 &quot;minBackoffDuration&quot;: &quot;A String&quot;, # The minimum amount of time to wait before retrying a job after
1688 # it fails.
1689 #
1690 # The default value of this field is 5 seconds.
1691 &quot;retryCount&quot;: 42, # The number of attempts that the system will make to run a job using the
1692 # exponential backoff procedure described by
1693 # max_doublings.
1694 #
1695 # The default value of retry_count is zero.
1696 #
1697 # If retry_count is zero, a job attempt will *not* be retried if
1698 # it fails. Instead the Cloud Scheduler system will wait for the
1699 # next scheduled execution time.
1700 #
1701 # If retry_count is set to a non-zero number then Cloud Scheduler
1702 # will retry failed attempts, using exponential backoff,
1703 # retry_count times, or until the next scheduled execution time,
1704 # whichever comes first.
1705 #
1706 # Values greater than 5 and negative values are not allowed.
1707 &quot;maxBackoffDuration&quot;: &quot;A String&quot;, # The maximum amount of time to wait before retrying a job after
1708 # it fails.
1709 #
1710 # The default value of this field is 1 hour.
1711 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
1712 #
1713 # A job&#x27;s retry interval starts at
1714 # min_backoff_duration, then doubles
1715 # `max_doublings` times, then increases linearly, and finally
1716 # retries at intervals of
1717 # max_backoff_duration up to
1718 # retry_count times.
1719 #
1720 # For example, if min_backoff_duration is
1721 # 10s, max_backoff_duration is 300s, and
1722 # `max_doublings` is 3, then the a job will first be retried in 10s. The
1723 # retry interval will double three times, and then increase linearly by
1724 # 2^3 * 10s. Finally, the job will retry at intervals of
1725 # max_backoff_duration until the job has
1726 # been attempted retry_count times. Thus, the
1727 # requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
1728 #
1729 # The default value of this field is 5.
1730 },
1731 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for the last attempted execution.
1732 # different programming environments, including REST APIs and RPC APIs. It is
1733 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1734 # three pieces of data: error code, error message, and error details.
1735 #
1736 # You can find out more about this error model and how to work with it in the
1737 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1738 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1739 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1740 # user-facing error message should be localized and sent in the
1741 # google.rpc.Status.details field, or localized by the client.
1742 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1743 # message types for APIs to use.
1744 {
1745 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1746 },
1747 ],
1748 },
1749 &quot;attemptDeadline&quot;: &quot;A String&quot;, # The deadline for job attempts. If the request handler does not respond by
1750 # this deadline then the request is cancelled and the attempt is marked as a
1751 # `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in
1752 # execution logs. Cloud Scheduler will retry the job according
1753 # to the RetryConfig.
1754 #
1755 # The allowed duration for this deadline is:
1756 #
1757 # * For HTTP targets, between 15 seconds and 30 minutes.
1758 # * For App Engine HTTP targets, between 15
1759 # seconds and 24 hours.
1760 # * For PubSub targets, this field is ignored.
1761 &quot;lastAttemptTime&quot;: &quot;A String&quot;, # Output only. The time the last job attempt started.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001762 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001763 ],
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:
Bu Sun Kim65020912020-05-20 12:08:20 -07001776 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001777 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)
Bu Sun Kim65020912020-05-20 12:08:20 -07001805* `LOCATION_ID` is the canonical ID for the job&#x27;s location.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001806 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001815 # The maximum allowed size for a job is 100KB.
Bu Sun Kim65020912020-05-20 12:08:20 -07001816 &quot;appEngineHttpTarget&quot;: { # App Engine target. The job will be pushed to a job handler by means # App Engine HTTP target.
1817 # of an HTTP request via an http_method such
1818 # as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an
1819 # HTTP response code in the range [200 - 299]. Error 503 is
1820 # considered an App Engine system error instead of an application
1821 # error. Requests returning error 503 will be retried regardless of
1822 # retry configuration and not counted against retry counts. Any other
1823 # response code, or a failure to receive a response before the
1824 # deadline, constitutes a failed attempt.
Bu Sun Kim65020912020-05-20 12:08:20 -07001825 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
1826 #
1827 # The relative URL must begin with &quot;/&quot; and must be a valid HTTP relative URL.
1828 # It can contain a path, query string arguments, and `#` fragments.
1829 # If the relative URL is empty, then the root path &quot;/&quot; will be used.
1830 # No spaces are allowed, and the maximum length allowed is 2083 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001831 &quot;body&quot;: &quot;A String&quot;, # Body.
1832 #
1833 # HTTP request body. A request body is allowed only if the HTTP method is
1834 # POST or PUT. It will result in invalid argument error to set a body on a
1835 # job with an incompatible HttpMethod.
Bu Sun Kim65020912020-05-20 12:08:20 -07001836 &quot;headers&quot;: { # HTTP request headers.
1837 #
1838 # This map contains the header field names and values. Headers can be set
1839 # when the job is created.
1840 #
1841 # Cloud Scheduler sets some headers to default values:
1842 #
1843 # * `User-Agent`: By default, this header is
1844 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
1845 # This header can be modified, but Cloud Scheduler will append
1846 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
1847 # modified `User-Agent`.
1848 # * `X-CloudScheduler`: This header will be set to true.
1849 #
1850 # If the job has an body, Cloud Scheduler sets
1851 # the following headers:
1852 #
1853 # * `Content-Type`: By default, the `Content-Type` header is set to
1854 # `&quot;application/octet-stream&quot;`. The default can be overridden by explictly
1855 # setting `Content-Type` to a particular media type when the job is
1856 # created.
1857 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
1858 # * `Content-Length`: This is computed by Cloud Scheduler. This value is
1859 # output only. It cannot be changed.
1860 #
1861 # The headers below are output only. They cannot be set or overridden:
1862 #
1863 # * `X-Google-*`: For Google internal use only.
1864 # * `X-AppEngine-*`: For Google internal use only.
1865 #
1866 # In addition, some App Engine headers, which contain
1867 # job-specific information, are also be sent to the job handler.
1868 &quot;a_key&quot;: &quot;A String&quot;,
1869 },
1870 &quot;appEngineRouting&quot;: { # App Engine Routing. # App Engine Routing setting for the job.
1871 #
1872 # For more information about services, versions, and instances see
1873 # [An Overview of App
1874 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
1875 # [Microservices Architecture on Google App
1876 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
1877 # [App Engine Standard request
1878 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
1879 # and [App Engine Flex request
1880 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001881 &quot;instance&quot;: &quot;A String&quot;, # App instance.
1882 #
1883 # By default, the job is sent to an instance which is available when
1884 # the job is attempted.
1885 #
1886 # Requests can only be sent to a specific instance if
1887 # [manual scaling is used in App Engine
1888 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
1889 # App Engine Flex does not support instances. For more information, see
1890 # [App Engine Standard request
1891 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
1892 # and [App Engine Flex request
1893 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
1894 &quot;service&quot;: &quot;A String&quot;, # App service.
1895 #
1896 # By default, the job is sent to the service which is the default
1897 # service when the job is attempted.
Bu Sun Kim65020912020-05-20 12:08:20 -07001898 &quot;version&quot;: &quot;A String&quot;, # App version.
1899 #
1900 # By default, the job is sent to the version which is the default
1901 # version when the job is attempted.
1902 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the job is sent to.
1903 #
1904 # For more information about how App Engine requests are routed, see
1905 # [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
1906 #
1907 # The host is constructed as:
1908 #
1909 #
1910 # * `host = [application_domain_name]`&lt;/br&gt;
1911 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1912 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1913 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1914 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1915 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1916 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
1917 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
1918 #
1919 # * `application_domain_name` = The domain name of the app, for
1920 # example &lt;app-id&gt;.appspot.com, which is associated with the
1921 # job&#x27;s project ID.
1922 #
1923 # * `service =` service
1924 #
1925 # * `version =` version
1926 #
1927 # * `version_dot_service =`
1928 # version `+ &#x27;.&#x27; +`
1929 # service
1930 #
1931 # * `instance =` instance
1932 #
1933 # * `instance_dot_service =`
1934 # instance `+ &#x27;.&#x27; +`
1935 # service
1936 #
1937 # * `instance_dot_version =`
1938 # instance `+ &#x27;.&#x27; +`
1939 # version
1940 #
1941 # * `instance_dot_version_dot_service =`
1942 # instance `+ &#x27;.&#x27; +`
1943 # version `+ &#x27;.&#x27; +`
1944 # service
1945 #
1946 #
1947 # If service is empty, then the job will be sent
1948 # to the service which is the default service when the job is attempted.
1949 #
1950 # If version is empty, then the job will be sent
1951 # to the version which is the default version when the job is attempted.
1952 #
1953 # If instance is empty, then the job will be
1954 # sent to an instance which is available when the job is attempted.
1955 #
1956 # If service,
1957 # version, or
1958 # instance is invalid, then the job will be sent
1959 # to the default version of the default service when the job is attempted.
Bu Sun Kim65020912020-05-20 12:08:20 -07001960 },
1961 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. PATCH and OPTIONS are not
1962 # permitted.
1963 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001964 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the job.
Bu Sun Kim65020912020-05-20 12:08:20 -07001965 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob, after
1966 # which it becomes output only.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001967 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001968 # The job name. For example:
1969 # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001970 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001971 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1972 # hyphens (-), colons (:), or periods (.).
1973 # For more information, see
1974 # [Identifying
1975 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1976 # * `LOCATION_ID` is the canonical ID for the job&#x27;s location.
1977 # The list of available locations can be obtained by calling
1978 # ListLocations.
1979 # For more information, see https://cloud.google.com/about/locations/.
1980 # * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1981 # hyphens (-), or underscores (_). The maximum length is 500 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001982 &quot;userUpdateTime&quot;: &quot;A String&quot;, # Output only. The creation time of the job.
1983 &quot;description&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob or
1984 # UpdateJob.
1985 #
1986 # A human-readable description for the job. This string must not contain
1987 # more than 500 characters.
1988 &quot;pubsubTarget&quot;: { # Pub/Sub target. The job will be delivered by publishing a message to # Pub/Sub target.
1989 # the given Pub/Sub topic.
1990 &quot;attributes&quot;: { # Attributes for PubsubMessage.
1991 #
1992 # Pubsub message must contain either non-empty data, or at least one
1993 # attribute.
1994 &quot;a_key&quot;: &quot;A String&quot;,
1995 },
1996 &quot;topicName&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic to which messages will
1997 # be published when a job is delivered. The topic name must be in the
1998 # same format as required by PubSub&#x27;s
1999 # [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
2000 # for example `projects/PROJECT_ID/topics/TOPIC_ID`.
2001 #
2002 # The topic must be in the same project as the Cloud Scheduler job.
2003 &quot;data&quot;: &quot;A String&quot;, # The message payload for PubsubMessage.
2004 #
2005 # Pubsub message must contain either non-empty data, or at least one
2006 # attribute.
2007 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002008 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The next time the job is scheduled. Note that this may be a
2009 # retry of a previously failed attempt or the next execution time
2010 # according to the schedule.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002011 &quot;timeZone&quot;: &quot;A String&quot;, # Specifies the time zone to be used in interpreting
2012 # schedule. The value of this field must be a time
2013 # zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
2014 #
2015 # Note that some time zones include a provision for
2016 # daylight savings time. The rules for daylight saving time are
2017 # determined by the chosen tz. For UTC use the string &quot;utc&quot;. If a
2018 # time zone is not specified, the default will be in UTC (also known
2019 # as GMT).
Bu Sun Kim65020912020-05-20 12:08:20 -07002020 &quot;httpTarget&quot;: { # Http target. The job will be pushed to the job handler by means of # HTTP target.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002021 # an HTTP request via an http_method such as HTTP
2022 # POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
2023 # response code in the range [200 - 299]. A failure to receive a response
2024 # constitutes a failed execution. For a redirected request, the response
2025 # returned by the redirected request is considered.
Bu Sun Kim65020912020-05-20 12:08:20 -07002026 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002027 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
2028 # will be generated and attached as an `Authorization` header in the HTTP
2029 # request.
2030 #
2031 # This type of authorization should generally only be used when calling
2032 # Google APIs hosted on *.googleapis.com.
2033 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
2034 # This type of authorization should generally only be used when calling Google
2035 # APIs hosted on *.googleapis.com.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002036 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
2037 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
2038 # will be used.
Bu Sun Kim65020912020-05-20 12:08:20 -07002039 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002040 # to be used for generating OAuth token.
2041 # The service account must be within the same project as the job. The caller
2042 # must have iam.serviceAccounts.actAs permission for the service account.
2043 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002044 &quot;uri&quot;: &quot;A String&quot;, # Required. The full URI path that the request will be sent to. This string
2045 # must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples of
2046 # valid values for uri are:
2047 # `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will
2048 # encode some characters for safety and compatibility. The maximum allowed
2049 # URL length is 2083 characters after encoding.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002050 &quot;body&quot;: &quot;A String&quot;, # HTTP request body. A request body is allowed only if the HTTP
2051 # method is POST, PUT, or PATCH. It is an error to set body on a job with an
2052 # incompatible HttpMethod.
Bu Sun Kim65020912020-05-20 12:08:20 -07002053 &quot;headers&quot;: { # The user can specify HTTP request headers to send with the job&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002054 # HTTP request. This map contains the header field names and
2055 # values. Repeated headers are not supported, but a header value can
2056 # contain commas. These headers represent a subset of the headers
Bu Sun Kim65020912020-05-20 12:08:20 -07002057 # that will accompany the job&#x27;s HTTP request. Some HTTP request
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002058 # headers will be ignored or replaced. A partial list of headers that
2059 # will be ignored or replaced is below:
2060 # - Host: This will be computed by Cloud Scheduler and derived from
2061 # uri.
2062 # * `Content-Length`: This will be computed by Cloud Scheduler.
Bu Sun Kim65020912020-05-20 12:08:20 -07002063 # * `User-Agent`: This will be set to `&quot;Google-Cloud-Scheduler&quot;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002064 # * `X-Google-*`: Google internal use only.
2065 # * `X-AppEngine-*`: Google internal use only.
2066 #
2067 # The total size of headers must be less than 80KB.
Bu Sun Kim65020912020-05-20 12:08:20 -07002068 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002069 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002070 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
2071 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
2072 # token will be generated and attached as an `Authorization` header in the
2073 # HTTP request.
2074 #
2075 # This type of authorization can be used for many scenarios, including
2076 # calling Cloud Run, or endpoints where you intend to validate the token
2077 # yourself.
2078 # [OpenID Connect
2079 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
2080 # This type of authorization can be used for many scenarios, including
2081 # calling Cloud Run, or endpoints where you intend to validate the token
2082 # yourself.
2083 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
2084 # specified in target will be used.
2085 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2086 # to be used for generating OIDC token.
2087 # The service account must be within the same project as the job. The caller
2088 # must have iam.serviceAccounts.actAs permission for the service account.
2089 },
2090 &quot;httpMethod&quot;: &quot;A String&quot;, # Which HTTP method to use for the request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002091 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002092 &quot;schedule&quot;: &quot;A String&quot;, # Required, except when used with UpdateJob.
2093 #
2094 # Describes the schedule on which the job will be executed.
2095 #
2096 # The schedule can be either of the following types:
2097 #
2098 # * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
2099 # * English-like
2100 # [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
2101 #
2102 # As a general rule, execution `n + 1` of a job will not begin
2103 # until execution `n` has finished. Cloud Scheduler will never
2104 # allow two simultaneously outstanding executions. For example,
2105 # this implies that if the `n+1`th execution is scheduled to run at
2106 # 16:00 but the `n`th execution takes until 16:15, the `n+1`th
2107 # execution will not start until `16:15`.
2108 # A scheduled start time will be delayed if the previous
2109 # execution has not ended when its scheduled time occurs.
2110 #
2111 # If retry_count &gt; 0 and a job attempt fails,
2112 # the job will be tried a total of retry_count
2113 # times, with exponential backoff, until the next scheduled start
2114 # time.
2115 &quot;retryConfig&quot;: { # Settings that determine the retry behavior. # Settings that determine the retry behavior.
2116 #
2117 # By default, if a job does not complete successfully (meaning that
2118 # an acknowledgement is not received from the handler, then it will be retried
2119 # with exponential backoff according to the settings in RetryConfig.
2120 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # The time limit for retrying a failed job, measured from time when an
2121 # execution was first attempted. If specified with
2122 # retry_count, the job will be retried until both
2123 # limits are reached.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002124 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002125 # The default value for max_retry_duration is zero, which means retry
2126 # duration is unlimited.
2127 &quot;minBackoffDuration&quot;: &quot;A String&quot;, # The minimum amount of time to wait before retrying a job after
2128 # it fails.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002129 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002130 # The default value of this field is 5 seconds.
2131 &quot;retryCount&quot;: 42, # The number of attempts that the system will make to run a job using the
2132 # exponential backoff procedure described by
2133 # max_doublings.
Bu Sun Kim65020912020-05-20 12:08:20 -07002134 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002135 # The default value of retry_count is zero.
2136 #
2137 # If retry_count is zero, a job attempt will *not* be retried if
2138 # it fails. Instead the Cloud Scheduler system will wait for the
2139 # next scheduled execution time.
2140 #
2141 # If retry_count is set to a non-zero number then Cloud Scheduler
2142 # will retry failed attempts, using exponential backoff,
2143 # retry_count times, or until the next scheduled execution time,
2144 # whichever comes first.
2145 #
2146 # Values greater than 5 and negative values are not allowed.
2147 &quot;maxBackoffDuration&quot;: &quot;A String&quot;, # The maximum amount of time to wait before retrying a job after
2148 # it fails.
2149 #
2150 # The default value of this field is 1 hour.
2151 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2152 #
2153 # A job&#x27;s retry interval starts at
2154 # min_backoff_duration, then doubles
2155 # `max_doublings` times, then increases linearly, and finally
2156 # retries at intervals of
2157 # max_backoff_duration up to
2158 # retry_count times.
2159 #
2160 # For example, if min_backoff_duration is
2161 # 10s, max_backoff_duration is 300s, and
2162 # `max_doublings` is 3, then the a job will first be retried in 10s. The
2163 # retry interval will double three times, and then increase linearly by
2164 # 2^3 * 10s. Finally, the job will retry at intervals of
2165 # max_backoff_duration until the job has
2166 # been attempted retry_count times. Thus, the
2167 # requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
2168 #
2169 # The default value of this field is 5.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002170 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002171 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for the last attempted execution.
2172 # different programming environments, including REST APIs and RPC APIs. It is
2173 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2174 # three pieces of data: error code, error message, and error details.
2175 #
2176 # You can find out more about this error model and how to work with it in the
2177 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2178 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2179 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2180 # user-facing error message should be localized and sent in the
2181 # google.rpc.Status.details field, or localized by the client.
2182 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2183 # message types for APIs to use.
2184 {
2185 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2186 },
2187 ],
2188 },
2189 &quot;attemptDeadline&quot;: &quot;A String&quot;, # The deadline for job attempts. If the request handler does not respond by
2190 # this deadline then the request is cancelled and the attempt is marked as a
2191 # `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in
2192 # execution logs. Cloud Scheduler will retry the job according
2193 # to the RetryConfig.
2194 #
2195 # The allowed duration for this deadline is:
2196 #
2197 # * For HTTP targets, between 15 seconds and 30 minutes.
2198 # * For App Engine HTTP targets, between 15
2199 # seconds and 24 hours.
2200 # * For PubSub targets, this field is ignored.
2201 &quot;lastAttemptTime&quot;: &quot;A String&quot;, # Output only. The time the last job attempt started.
2202 }
2203
2204 updateMask: string, A mask used to specify which fields of the job are being updated.
2205 x__xgafv: string, V1 error format.
2206 Allowed values
2207 1 - v1 error format
2208 2 - v2 error format
2209
2210Returns:
2211 An object of the form:
2212
2213 { # Configuration for a job.
2214 # The maximum allowed size for a job is 100KB.
2215 &quot;appEngineHttpTarget&quot;: { # App Engine target. The job will be pushed to a job handler by means # App Engine HTTP target.
2216 # of an HTTP request via an http_method such
2217 # as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an
2218 # HTTP response code in the range [200 - 299]. Error 503 is
2219 # considered an App Engine system error instead of an application
2220 # error. Requests returning error 503 will be retried regardless of
2221 # retry configuration and not counted against retry counts. Any other
2222 # response code, or a failure to receive a response before the
2223 # deadline, constitutes a failed attempt.
2224 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
2225 #
2226 # The relative URL must begin with &quot;/&quot; and must be a valid HTTP relative URL.
2227 # It can contain a path, query string arguments, and `#` fragments.
2228 # If the relative URL is empty, then the root path &quot;/&quot; will be used.
2229 # No spaces are allowed, and the maximum length allowed is 2083 characters.
2230 &quot;body&quot;: &quot;A String&quot;, # Body.
2231 #
2232 # HTTP request body. A request body is allowed only if the HTTP method is
2233 # POST or PUT. It will result in invalid argument error to set a body on a
2234 # job with an incompatible HttpMethod.
2235 &quot;headers&quot;: { # HTTP request headers.
2236 #
2237 # This map contains the header field names and values. Headers can be set
2238 # when the job is created.
2239 #
2240 # Cloud Scheduler sets some headers to default values:
2241 #
2242 # * `User-Agent`: By default, this header is
2243 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
2244 # This header can be modified, but Cloud Scheduler will append
2245 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
2246 # modified `User-Agent`.
2247 # * `X-CloudScheduler`: This header will be set to true.
2248 #
2249 # If the job has an body, Cloud Scheduler sets
2250 # the following headers:
2251 #
2252 # * `Content-Type`: By default, the `Content-Type` header is set to
2253 # `&quot;application/octet-stream&quot;`. The default can be overridden by explictly
2254 # setting `Content-Type` to a particular media type when the job is
2255 # created.
2256 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
2257 # * `Content-Length`: This is computed by Cloud Scheduler. This value is
2258 # output only. It cannot be changed.
2259 #
2260 # The headers below are output only. They cannot be set or overridden:
2261 #
2262 # * `X-Google-*`: For Google internal use only.
2263 # * `X-AppEngine-*`: For Google internal use only.
2264 #
2265 # In addition, some App Engine headers, which contain
2266 # job-specific information, are also be sent to the job handler.
2267 &quot;a_key&quot;: &quot;A String&quot;,
2268 },
2269 &quot;appEngineRouting&quot;: { # App Engine Routing. # App Engine Routing setting for the job.
2270 #
2271 # For more information about services, versions, and instances see
2272 # [An Overview of App
2273 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2274 # [Microservices Architecture on Google App
2275 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
2276 # [App Engine Standard request
2277 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
2278 # and [App Engine Flex request
2279 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2280 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2281 #
2282 # By default, the job is sent to an instance which is available when
2283 # the job is attempted.
2284 #
2285 # Requests can only be sent to a specific instance if
2286 # [manual scaling is used in App Engine
2287 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2288 # App Engine Flex does not support instances. For more information, see
2289 # [App Engine Standard request
2290 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2291 # and [App Engine Flex request
2292 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2293 &quot;service&quot;: &quot;A String&quot;, # App service.
2294 #
2295 # By default, the job is sent to the service which is the default
2296 # service when the job is attempted.
2297 &quot;version&quot;: &quot;A String&quot;, # App version.
2298 #
2299 # By default, the job is sent to the version which is the default
2300 # version when the job is attempted.
2301 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the job is sent to.
2302 #
2303 # For more information about how App Engine requests are routed, see
2304 # [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2305 #
2306 # The host is constructed as:
2307 #
2308 #
2309 # * `host = [application_domain_name]`&lt;/br&gt;
2310 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2311 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2312 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2313 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2314 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2315 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2316 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
2317 #
2318 # * `application_domain_name` = The domain name of the app, for
2319 # example &lt;app-id&gt;.appspot.com, which is associated with the
2320 # job&#x27;s project ID.
2321 #
2322 # * `service =` service
2323 #
2324 # * `version =` version
2325 #
2326 # * `version_dot_service =`
2327 # version `+ &#x27;.&#x27; +`
2328 # service
2329 #
2330 # * `instance =` instance
2331 #
2332 # * `instance_dot_service =`
2333 # instance `+ &#x27;.&#x27; +`
2334 # service
2335 #
2336 # * `instance_dot_version =`
2337 # instance `+ &#x27;.&#x27; +`
2338 # version
2339 #
2340 # * `instance_dot_version_dot_service =`
2341 # instance `+ &#x27;.&#x27; +`
2342 # version `+ &#x27;.&#x27; +`
2343 # service
2344 #
2345 #
2346 # If service is empty, then the job will be sent
2347 # to the service which is the default service when the job is attempted.
2348 #
2349 # If version is empty, then the job will be sent
2350 # to the version which is the default version when the job is attempted.
2351 #
2352 # If instance is empty, then the job will be
2353 # sent to an instance which is available when the job is attempted.
2354 #
2355 # If service,
2356 # version, or
2357 # instance is invalid, then the job will be sent
2358 # to the default version of the default service when the job is attempted.
2359 },
2360 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. PATCH and OPTIONS are not
2361 # permitted.
2362 },
2363 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the job.
2364 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob, after
2365 # which it becomes output only.
2366 #
2367 # The job name. For example:
2368 # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
2369 #
2370 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2371 # hyphens (-), colons (:), or periods (.).
2372 # For more information, see
2373 # [Identifying
2374 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2375 # * `LOCATION_ID` is the canonical ID for the job&#x27;s location.
2376 # The list of available locations can be obtained by calling
2377 # ListLocations.
2378 # For more information, see https://cloud.google.com/about/locations/.
2379 # * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
2380 # hyphens (-), or underscores (_). The maximum length is 500 characters.
2381 &quot;userUpdateTime&quot;: &quot;A String&quot;, # Output only. The creation time of the job.
2382 &quot;description&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob or
2383 # UpdateJob.
2384 #
2385 # A human-readable description for the job. This string must not contain
2386 # more than 500 characters.
2387 &quot;pubsubTarget&quot;: { # Pub/Sub target. The job will be delivered by publishing a message to # Pub/Sub target.
2388 # the given Pub/Sub topic.
2389 &quot;attributes&quot;: { # Attributes for PubsubMessage.
2390 #
2391 # Pubsub message must contain either non-empty data, or at least one
2392 # attribute.
2393 &quot;a_key&quot;: &quot;A String&quot;,
2394 },
2395 &quot;topicName&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic to which messages will
2396 # be published when a job is delivered. The topic name must be in the
2397 # same format as required by PubSub&#x27;s
2398 # [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
2399 # for example `projects/PROJECT_ID/topics/TOPIC_ID`.
2400 #
2401 # The topic must be in the same project as the Cloud Scheduler job.
2402 &quot;data&quot;: &quot;A String&quot;, # The message payload for PubsubMessage.
2403 #
2404 # Pubsub message must contain either non-empty data, or at least one
2405 # attribute.
2406 },
2407 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The next time the job is scheduled. Note that this may be a
2408 # retry of a previously failed attempt or the next execution time
2409 # according to the schedule.
2410 &quot;timeZone&quot;: &quot;A String&quot;, # Specifies the time zone to be used in interpreting
2411 # schedule. The value of this field must be a time
2412 # zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
2413 #
2414 # Note that some time zones include a provision for
2415 # daylight savings time. The rules for daylight saving time are
2416 # determined by the chosen tz. For UTC use the string &quot;utc&quot;. If a
2417 # time zone is not specified, the default will be in UTC (also known
2418 # as GMT).
2419 &quot;httpTarget&quot;: { # Http target. The job will be pushed to the job handler by means of # HTTP target.
2420 # an HTTP request via an http_method such as HTTP
2421 # POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
2422 # response code in the range [200 - 299]. A failure to receive a response
2423 # constitutes a failed execution. For a redirected request, the response
2424 # returned by the redirected request is considered.
2425 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
2426 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
2427 # will be generated and attached as an `Authorization` header in the HTTP
2428 # request.
2429 #
2430 # This type of authorization should generally only be used when calling
2431 # Google APIs hosted on *.googleapis.com.
2432 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
2433 # This type of authorization should generally only be used when calling Google
2434 # APIs hosted on *.googleapis.com.
2435 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
2436 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
2437 # will be used.
2438 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2439 # to be used for generating OAuth token.
2440 # The service account must be within the same project as the job. The caller
2441 # must have iam.serviceAccounts.actAs permission for the service account.
2442 },
2443 &quot;uri&quot;: &quot;A String&quot;, # Required. The full URI path that the request will be sent to. This string
2444 # must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples of
2445 # valid values for uri are:
2446 # `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will
2447 # encode some characters for safety and compatibility. The maximum allowed
2448 # URL length is 2083 characters after encoding.
2449 &quot;body&quot;: &quot;A String&quot;, # HTTP request body. A request body is allowed only if the HTTP
2450 # method is POST, PUT, or PATCH. It is an error to set body on a job with an
2451 # incompatible HttpMethod.
2452 &quot;headers&quot;: { # The user can specify HTTP request headers to send with the job&#x27;s
2453 # HTTP request. This map contains the header field names and
2454 # values. Repeated headers are not supported, but a header value can
2455 # contain commas. These headers represent a subset of the headers
2456 # that will accompany the job&#x27;s HTTP request. Some HTTP request
2457 # headers will be ignored or replaced. A partial list of headers that
2458 # will be ignored or replaced is below:
2459 # - Host: This will be computed by Cloud Scheduler and derived from
2460 # uri.
2461 # * `Content-Length`: This will be computed by Cloud Scheduler.
2462 # * `User-Agent`: This will be set to `&quot;Google-Cloud-Scheduler&quot;`.
2463 # * `X-Google-*`: Google internal use only.
2464 # * `X-AppEngine-*`: Google internal use only.
2465 #
2466 # The total size of headers must be less than 80KB.
2467 &quot;a_key&quot;: &quot;A String&quot;,
2468 },
2469 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
2470 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
2471 # token will be generated and attached as an `Authorization` header in the
2472 # HTTP request.
2473 #
2474 # This type of authorization can be used for many scenarios, including
2475 # calling Cloud Run, or endpoints where you intend to validate the token
2476 # yourself.
2477 # [OpenID Connect
2478 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
2479 # This type of authorization can be used for many scenarios, including
2480 # calling Cloud Run, or endpoints where you intend to validate the token
2481 # yourself.
2482 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
2483 # specified in target will be used.
2484 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2485 # to be used for generating OIDC token.
2486 # The service account must be within the same project as the job. The caller
2487 # must have iam.serviceAccounts.actAs permission for the service account.
2488 },
2489 &quot;httpMethod&quot;: &quot;A String&quot;, # Which HTTP method to use for the request.
2490 },
2491 &quot;schedule&quot;: &quot;A String&quot;, # Required, except when used with UpdateJob.
2492 #
2493 # Describes the schedule on which the job will be executed.
2494 #
2495 # The schedule can be either of the following types:
2496 #
2497 # * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
2498 # * English-like
2499 # [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
2500 #
2501 # As a general rule, execution `n + 1` of a job will not begin
2502 # until execution `n` has finished. Cloud Scheduler will never
2503 # allow two simultaneously outstanding executions. For example,
2504 # this implies that if the `n+1`th execution is scheduled to run at
2505 # 16:00 but the `n`th execution takes until 16:15, the `n+1`th
2506 # execution will not start until `16:15`.
2507 # A scheduled start time will be delayed if the previous
2508 # execution has not ended when its scheduled time occurs.
2509 #
2510 # If retry_count &gt; 0 and a job attempt fails,
2511 # the job will be tried a total of retry_count
2512 # times, with exponential backoff, until the next scheduled start
2513 # time.
2514 &quot;retryConfig&quot;: { # Settings that determine the retry behavior. # Settings that determine the retry behavior.
2515 #
2516 # By default, if a job does not complete successfully (meaning that
2517 # an acknowledgement is not received from the handler, then it will be retried
2518 # with exponential backoff according to the settings in RetryConfig.
2519 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # The time limit for retrying a failed job, measured from time when an
2520 # execution was first attempted. If specified with
2521 # retry_count, the job will be retried until both
2522 # limits are reached.
2523 #
2524 # The default value for max_retry_duration is zero, which means retry
2525 # duration is unlimited.
2526 &quot;minBackoffDuration&quot;: &quot;A String&quot;, # The minimum amount of time to wait before retrying a job after
2527 # it fails.
2528 #
2529 # The default value of this field is 5 seconds.
2530 &quot;retryCount&quot;: 42, # The number of attempts that the system will make to run a job using the
2531 # exponential backoff procedure described by
2532 # max_doublings.
2533 #
2534 # The default value of retry_count is zero.
2535 #
2536 # If retry_count is zero, a job attempt will *not* be retried if
2537 # it fails. Instead the Cloud Scheduler system will wait for the
2538 # next scheduled execution time.
2539 #
2540 # If retry_count is set to a non-zero number then Cloud Scheduler
2541 # will retry failed attempts, using exponential backoff,
2542 # retry_count times, or until the next scheduled execution time,
2543 # whichever comes first.
2544 #
2545 # Values greater than 5 and negative values are not allowed.
2546 &quot;maxBackoffDuration&quot;: &quot;A String&quot;, # The maximum amount of time to wait before retrying a job after
2547 # it fails.
2548 #
2549 # The default value of this field is 1 hour.
2550 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2551 #
2552 # A job&#x27;s retry interval starts at
2553 # min_backoff_duration, then doubles
2554 # `max_doublings` times, then increases linearly, and finally
2555 # retries at intervals of
2556 # max_backoff_duration up to
2557 # retry_count times.
2558 #
2559 # For example, if min_backoff_duration is
2560 # 10s, max_backoff_duration is 300s, and
2561 # `max_doublings` is 3, then the a job will first be retried in 10s. The
2562 # retry interval will double three times, and then increase linearly by
2563 # 2^3 * 10s. Finally, the job will retry at intervals of
2564 # max_backoff_duration until the job has
2565 # been attempted retry_count times. Thus, the
2566 # requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
2567 #
2568 # The default value of this field is 5.
2569 },
2570 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for the last attempted execution.
2571 # different programming environments, including REST APIs and RPC APIs. It is
2572 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2573 # three pieces of data: error code, error message, and error details.
2574 #
2575 # You can find out more about this error model and how to work with it in the
2576 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2577 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2578 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2579 # user-facing error message should be localized and sent in the
2580 # google.rpc.Status.details field, or localized by the client.
2581 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
2582 # message types for APIs to use.
2583 {
2584 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
2585 },
2586 ],
2587 },
2588 &quot;attemptDeadline&quot;: &quot;A String&quot;, # The deadline for job attempts. If the request handler does not respond by
2589 # this deadline then the request is cancelled and the attempt is marked as a
2590 # `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in
2591 # execution logs. Cloud Scheduler will retry the job according
2592 # to the RetryConfig.
2593 #
2594 # The allowed duration for this deadline is:
2595 #
2596 # * For HTTP targets, between 15 seconds and 30 minutes.
2597 # * For App Engine HTTP targets, between 15
2598 # seconds and 24 hours.
2599 # * For PubSub targets, this field is ignored.
2600 &quot;lastAttemptTime&quot;: &quot;A String&quot;, # Output only. The time the last job attempt started.
2601 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002602</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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002632 # The maximum allowed size for a job is 100KB.
2633 &quot;appEngineHttpTarget&quot;: { # App Engine target. The job will be pushed to a job handler by means # App Engine HTTP target.
2634 # of an HTTP request via an http_method such
2635 # as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an
2636 # HTTP response code in the range [200 - 299]. Error 503 is
2637 # considered an App Engine system error instead of an application
2638 # error. Requests returning error 503 will be retried regardless of
2639 # retry configuration and not counted against retry counts. Any other
2640 # response code, or a failure to receive a response before the
2641 # deadline, constitutes a failed attempt.
2642 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
Bu Sun Kim65020912020-05-20 12:08:20 -07002643 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002644 # The relative URL must begin with &quot;/&quot; and must be a valid HTTP relative URL.
2645 # It can contain a path, query string arguments, and `#` fragments.
2646 # If the relative URL is empty, then the root path &quot;/&quot; will be used.
2647 # No spaces are allowed, and the maximum length allowed is 2083 characters.
2648 &quot;body&quot;: &quot;A String&quot;, # Body.
Bu Sun Kim65020912020-05-20 12:08:20 -07002649 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002650 # HTTP request body. A request body is allowed only if the HTTP method is
2651 # POST or PUT. It will result in invalid argument error to set a body on a
2652 # job with an incompatible HttpMethod.
2653 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim65020912020-05-20 12:08:20 -07002654 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002655 # This map contains the header field names and values. Headers can be set
2656 # when the job is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07002657 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002658 # Cloud Scheduler sets some headers to default values:
Bu Sun Kim65020912020-05-20 12:08:20 -07002659 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002660 # * `User-Agent`: By default, this header is
2661 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
2662 # This header can be modified, but Cloud Scheduler will append
2663 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
2664 # modified `User-Agent`.
2665 # * `X-CloudScheduler`: This header will be set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002666 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002667 # If the job has an body, Cloud Scheduler sets
2668 # the following headers:
Bu Sun Kim65020912020-05-20 12:08:20 -07002669 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002670 # * `Content-Type`: By default, the `Content-Type` header is set to
2671 # `&quot;application/octet-stream&quot;`. The default can be overridden by explictly
2672 # setting `Content-Type` to a particular media type when the job is
2673 # created.
2674 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
2675 # * `Content-Length`: This is computed by Cloud Scheduler. This value is
2676 # output only. It cannot be changed.
Bu Sun Kim65020912020-05-20 12:08:20 -07002677 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002678 # The headers below are output only. They cannot be set or overridden:
Bu Sun Kim65020912020-05-20 12:08:20 -07002679 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002680 # * `X-Google-*`: For Google internal use only.
2681 # * `X-AppEngine-*`: For Google internal use only.
Bu Sun Kim65020912020-05-20 12:08:20 -07002682 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002683 # In addition, some App Engine headers, which contain
2684 # job-specific information, are also be sent to the job handler.
2685 &quot;a_key&quot;: &quot;A String&quot;,
2686 },
2687 &quot;appEngineRouting&quot;: { # App Engine Routing. # App Engine Routing setting for the job.
Bu Sun Kim65020912020-05-20 12:08:20 -07002688 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002689 # For more information about services, versions, and instances see
2690 # [An Overview of App
2691 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
2692 # [Microservices Architecture on Google App
2693 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002694 # [App Engine Standard request
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002695 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002696 # and [App Engine Flex request
2697 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002698 &quot;instance&quot;: &quot;A String&quot;, # App instance.
2699 #
2700 # By default, the job is sent to an instance which is available when
2701 # the job is attempted.
2702 #
2703 # Requests can only be sent to a specific instance if
2704 # [manual scaling is used in App Engine
2705 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
2706 # App Engine Flex does not support instances. For more information, see
2707 # [App Engine Standard request
2708 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
2709 # and [App Engine Flex request
2710 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
2711 &quot;service&quot;: &quot;A String&quot;, # App service.
2712 #
2713 # By default, the job is sent to the service which is the default
2714 # service when the job is attempted.
2715 &quot;version&quot;: &quot;A String&quot;, # App version.
2716 #
2717 # By default, the job is sent to the version which is the default
2718 # version when the job is attempted.
2719 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the job is sent to.
2720 #
2721 # For more information about how App Engine requests are routed, see
2722 # [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
2723 #
2724 # The host is constructed as:
2725 #
2726 #
2727 # * `host = [application_domain_name]`&lt;/br&gt;
2728 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2729 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2730 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2731 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2732 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2733 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
2734 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
2735 #
2736 # * `application_domain_name` = The domain name of the app, for
2737 # example &lt;app-id&gt;.appspot.com, which is associated with the
2738 # job&#x27;s project ID.
2739 #
2740 # * `service =` service
2741 #
2742 # * `version =` version
2743 #
2744 # * `version_dot_service =`
2745 # version `+ &#x27;.&#x27; +`
2746 # service
2747 #
2748 # * `instance =` instance
2749 #
2750 # * `instance_dot_service =`
2751 # instance `+ &#x27;.&#x27; +`
2752 # service
2753 #
2754 # * `instance_dot_version =`
2755 # instance `+ &#x27;.&#x27; +`
2756 # version
2757 #
2758 # * `instance_dot_version_dot_service =`
2759 # instance `+ &#x27;.&#x27; +`
2760 # version `+ &#x27;.&#x27; +`
2761 # service
2762 #
2763 #
2764 # If service is empty, then the job will be sent
2765 # to the service which is the default service when the job is attempted.
2766 #
2767 # If version is empty, then the job will be sent
2768 # to the version which is the default version when the job is attempted.
2769 #
2770 # If instance is empty, then the job will be
2771 # sent to an instance which is available when the job is attempted.
2772 #
2773 # If service,
2774 # version, or
2775 # instance is invalid, then the job will be sent
2776 # to the default version of the default service when the job is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002777 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002778 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. PATCH and OPTIONS are not
2779 # permitted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002780 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002781 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the job.
2782 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob, after
2783 # which it becomes output only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002784 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002785 # The job name. For example:
2786 # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
2787 #
2788 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
2789 # hyphens (-), colons (:), or periods (.).
2790 # For more information, see
2791 # [Identifying
2792 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
2793 # * `LOCATION_ID` is the canonical ID for the job&#x27;s location.
2794 # The list of available locations can be obtained by calling
2795 # ListLocations.
2796 # For more information, see https://cloud.google.com/about/locations/.
2797 # * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
2798 # hyphens (-), or underscores (_). The maximum length is 500 characters.
2799 &quot;userUpdateTime&quot;: &quot;A String&quot;, # Output only. The creation time of the job.
2800 &quot;description&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob or
2801 # UpdateJob.
2802 #
2803 # A human-readable description for the job. This string must not contain
2804 # more than 500 characters.
2805 &quot;pubsubTarget&quot;: { # Pub/Sub target. The job will be delivered by publishing a message to # Pub/Sub target.
2806 # the given Pub/Sub topic.
2807 &quot;attributes&quot;: { # Attributes for PubsubMessage.
2808 #
2809 # Pubsub message must contain either non-empty data, or at least one
2810 # attribute.
2811 &quot;a_key&quot;: &quot;A String&quot;,
2812 },
2813 &quot;topicName&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic to which messages will
2814 # be published when a job is delivered. The topic name must be in the
2815 # same format as required by PubSub&#x27;s
2816 # [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
2817 # for example `projects/PROJECT_ID/topics/TOPIC_ID`.
2818 #
2819 # The topic must be in the same project as the Cloud Scheduler job.
2820 &quot;data&quot;: &quot;A String&quot;, # The message payload for PubsubMessage.
2821 #
2822 # Pubsub message must contain either non-empty data, or at least one
2823 # attribute.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002824 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002825 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The next time the job is scheduled. Note that this may be a
2826 # retry of a previously failed attempt or the next execution time
2827 # according to the schedule.
2828 &quot;timeZone&quot;: &quot;A String&quot;, # Specifies the time zone to be used in interpreting
2829 # schedule. The value of this field must be a time
2830 # zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002831 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002832 # Note that some time zones include a provision for
2833 # daylight savings time. The rules for daylight saving time are
2834 # determined by the chosen tz. For UTC use the string &quot;utc&quot;. If a
2835 # time zone is not specified, the default will be in UTC (also known
2836 # as GMT).
2837 &quot;httpTarget&quot;: { # Http target. The job will be pushed to the job handler by means of # HTTP target.
2838 # an HTTP request via an http_method such as HTTP
2839 # POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
2840 # response code in the range [200 - 299]. A failure to receive a response
2841 # constitutes a failed execution. For a redirected request, the response
2842 # returned by the redirected request is considered.
2843 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
2844 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
2845 # will be generated and attached as an `Authorization` header in the HTTP
2846 # request.
2847 #
2848 # This type of authorization should generally only be used when calling
2849 # Google APIs hosted on *.googleapis.com.
2850 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
2851 # This type of authorization should generally only be used when calling Google
2852 # APIs hosted on *.googleapis.com.
2853 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
2854 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
2855 # will be used.
2856 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2857 # to be used for generating OAuth token.
2858 # The service account must be within the same project as the job. The caller
2859 # must have iam.serviceAccounts.actAs permission for the service account.
2860 },
2861 &quot;uri&quot;: &quot;A String&quot;, # Required. The full URI path that the request will be sent to. This string
2862 # must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples of
2863 # valid values for uri are:
2864 # `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will
2865 # encode some characters for safety and compatibility. The maximum allowed
2866 # URL length is 2083 characters after encoding.
2867 &quot;body&quot;: &quot;A String&quot;, # HTTP request body. A request body is allowed only if the HTTP
2868 # method is POST, PUT, or PATCH. It is an error to set body on a job with an
2869 # incompatible HttpMethod.
2870 &quot;headers&quot;: { # The user can specify HTTP request headers to send with the job&#x27;s
2871 # HTTP request. This map contains the header field names and
2872 # values. Repeated headers are not supported, but a header value can
2873 # contain commas. These headers represent a subset of the headers
2874 # that will accompany the job&#x27;s HTTP request. Some HTTP request
2875 # headers will be ignored or replaced. A partial list of headers that
2876 # will be ignored or replaced is below:
2877 # - Host: This will be computed by Cloud Scheduler and derived from
2878 # uri.
2879 # * `Content-Length`: This will be computed by Cloud Scheduler.
2880 # * `User-Agent`: This will be set to `&quot;Google-Cloud-Scheduler&quot;`.
2881 # * `X-Google-*`: Google internal use only.
2882 # * `X-AppEngine-*`: Google internal use only.
2883 #
2884 # The total size of headers must be less than 80KB.
2885 &quot;a_key&quot;: &quot;A String&quot;,
2886 },
2887 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
2888 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
2889 # token will be generated and attached as an `Authorization` header in the
2890 # HTTP request.
2891 #
2892 # This type of authorization can be used for many scenarios, including
2893 # calling Cloud Run, or endpoints where you intend to validate the token
2894 # yourself.
2895 # [OpenID Connect
2896 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
2897 # This type of authorization can be used for many scenarios, including
2898 # calling Cloud Run, or endpoints where you intend to validate the token
2899 # yourself.
2900 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
2901 # specified in target will be used.
2902 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
2903 # to be used for generating OIDC token.
2904 # The service account must be within the same project as the job. The caller
2905 # must have iam.serviceAccounts.actAs permission for the service account.
2906 },
2907 &quot;httpMethod&quot;: &quot;A String&quot;, # Which HTTP method to use for the request.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07002908 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002909 &quot;schedule&quot;: &quot;A String&quot;, # Required, except when used with UpdateJob.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002910 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002911 # Describes the schedule on which the job will be executed.
2912 #
2913 # The schedule can be either of the following types:
2914 #
2915 # * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
2916 # * English-like
2917 # [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
2918 #
2919 # As a general rule, execution `n + 1` of a job will not begin
2920 # until execution `n` has finished. Cloud Scheduler will never
2921 # allow two simultaneously outstanding executions. For example,
2922 # this implies that if the `n+1`th execution is scheduled to run at
2923 # 16:00 but the `n`th execution takes until 16:15, the `n+1`th
2924 # execution will not start until `16:15`.
2925 # A scheduled start time will be delayed if the previous
2926 # execution has not ended when its scheduled time occurs.
2927 #
2928 # If retry_count &gt; 0 and a job attempt fails,
2929 # the job will be tried a total of retry_count
2930 # times, with exponential backoff, until the next scheduled start
2931 # time.
2932 &quot;retryConfig&quot;: { # Settings that determine the retry behavior. # Settings that determine the retry behavior.
2933 #
2934 # By default, if a job does not complete successfully (meaning that
2935 # an acknowledgement is not received from the handler, then it will be retried
2936 # with exponential backoff according to the settings in RetryConfig.
2937 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # The time limit for retrying a failed job, measured from time when an
2938 # execution was first attempted. If specified with
2939 # retry_count, the job will be retried until both
2940 # limits are reached.
2941 #
2942 # The default value for max_retry_duration is zero, which means retry
2943 # duration is unlimited.
2944 &quot;minBackoffDuration&quot;: &quot;A String&quot;, # The minimum amount of time to wait before retrying a job after
2945 # it fails.
2946 #
2947 # The default value of this field is 5 seconds.
2948 &quot;retryCount&quot;: 42, # The number of attempts that the system will make to run a job using the
2949 # exponential backoff procedure described by
2950 # max_doublings.
2951 #
2952 # The default value of retry_count is zero.
2953 #
2954 # If retry_count is zero, a job attempt will *not* be retried if
2955 # it fails. Instead the Cloud Scheduler system will wait for the
2956 # next scheduled execution time.
2957 #
2958 # If retry_count is set to a non-zero number then Cloud Scheduler
2959 # will retry failed attempts, using exponential backoff,
2960 # retry_count times, or until the next scheduled execution time,
2961 # whichever comes first.
2962 #
2963 # Values greater than 5 and negative values are not allowed.
2964 &quot;maxBackoffDuration&quot;: &quot;A String&quot;, # The maximum amount of time to wait before retrying a job after
2965 # it fails.
2966 #
2967 # The default value of this field is 1 hour.
2968 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
2969 #
2970 # A job&#x27;s retry interval starts at
2971 # min_backoff_duration, then doubles
2972 # `max_doublings` times, then increases linearly, and finally
2973 # retries at intervals of
2974 # max_backoff_duration up to
2975 # retry_count times.
2976 #
2977 # For example, if min_backoff_duration is
2978 # 10s, max_backoff_duration is 300s, and
2979 # `max_doublings` is 3, then the a job will first be retried in 10s. The
2980 # retry interval will double three times, and then increase linearly by
2981 # 2^3 * 10s. Finally, the job will retry at intervals of
2982 # max_backoff_duration until the job has
2983 # been attempted retry_count times. Thus, the
2984 # requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
2985 #
2986 # The default value of this field is 5.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002987 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002988 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for the last attempted execution.
2989 # different programming environments, including REST APIs and RPC APIs. It is
2990 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
2991 # three pieces of data: error code, error message, and error details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002992 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002993 # You can find out more about this error model and how to work with it in the
2994 # [API Design Guide](https://cloud.google.com/apis/design/errors).
2995 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
2996 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
2997 # user-facing error message should be localized and sent in the
2998 # google.rpc.Status.details field, or localized by the client.
2999 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
3000 # message types for APIs to use.
3001 {
3002 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
3003 },
3004 ],
3005 },
3006 &quot;attemptDeadline&quot;: &quot;A String&quot;, # The deadline for job attempts. If the request handler does not respond by
3007 # this deadline then the request is cancelled and the attempt is marked as a
3008 # `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in
3009 # execution logs. Cloud Scheduler will retry the job according
3010 # to the RetryConfig.
Bu Sun Kim65020912020-05-20 12:08:20 -07003011 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003012 # The allowed duration for this deadline is:
3013 #
3014 # * For HTTP targets, between 15 seconds and 30 minutes.
3015 # * For App Engine HTTP targets, between 15
3016 # seconds and 24 hours.
3017 # * For PubSub targets, this field is ignored.
3018 &quot;lastAttemptTime&quot;: &quot;A String&quot;, # Output only. The time the last job attempt started.
3019 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003020</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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003049 # The maximum allowed size for a job is 100KB.
3050 &quot;appEngineHttpTarget&quot;: { # App Engine target. The job will be pushed to a job handler by means # App Engine HTTP target.
3051 # of an HTTP request via an http_method such
3052 # as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an
3053 # HTTP response code in the range [200 - 299]. Error 503 is
3054 # considered an App Engine system error instead of an application
3055 # error. Requests returning error 503 will be retried regardless of
3056 # retry configuration and not counted against retry counts. Any other
3057 # response code, or a failure to receive a response before the
3058 # deadline, constitutes a failed attempt.
3059 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
Bu Sun Kim65020912020-05-20 12:08:20 -07003060 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003061 # The relative URL must begin with &quot;/&quot; and must be a valid HTTP relative URL.
3062 # It can contain a path, query string arguments, and `#` fragments.
3063 # If the relative URL is empty, then the root path &quot;/&quot; will be used.
3064 # No spaces are allowed, and the maximum length allowed is 2083 characters.
3065 &quot;body&quot;: &quot;A String&quot;, # Body.
Bu Sun Kim65020912020-05-20 12:08:20 -07003066 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003067 # HTTP request body. A request body is allowed only if the HTTP method is
3068 # POST or PUT. It will result in invalid argument error to set a body on a
3069 # job with an incompatible HttpMethod.
3070 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim65020912020-05-20 12:08:20 -07003071 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003072 # This map contains the header field names and values. Headers can be set
3073 # when the job is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07003074 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003075 # Cloud Scheduler sets some headers to default values:
Bu Sun Kim65020912020-05-20 12:08:20 -07003076 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003077 # * `User-Agent`: By default, this header is
3078 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
3079 # This header can be modified, but Cloud Scheduler will append
3080 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
3081 # modified `User-Agent`.
3082 # * `X-CloudScheduler`: This header will be set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003083 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003084 # If the job has an body, Cloud Scheduler sets
3085 # the following headers:
Bu Sun Kim65020912020-05-20 12:08:20 -07003086 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003087 # * `Content-Type`: By default, the `Content-Type` header is set to
3088 # `&quot;application/octet-stream&quot;`. The default can be overridden by explictly
3089 # setting `Content-Type` to a particular media type when the job is
3090 # created.
3091 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
3092 # * `Content-Length`: This is computed by Cloud Scheduler. This value is
3093 # output only. It cannot be changed.
Bu Sun Kim65020912020-05-20 12:08:20 -07003094 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003095 # The headers below are output only. They cannot be set or overridden:
Bu Sun Kim65020912020-05-20 12:08:20 -07003096 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003097 # * `X-Google-*`: For Google internal use only.
3098 # * `X-AppEngine-*`: For Google internal use only.
Bu Sun Kim65020912020-05-20 12:08:20 -07003099 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003100 # In addition, some App Engine headers, which contain
3101 # job-specific information, are also be sent to the job handler.
3102 &quot;a_key&quot;: &quot;A String&quot;,
3103 },
3104 &quot;appEngineRouting&quot;: { # App Engine Routing. # App Engine Routing setting for the job.
Bu Sun Kim65020912020-05-20 12:08:20 -07003105 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003106 # For more information about services, versions, and instances see
3107 # [An Overview of App
3108 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3109 # [Microservices Architecture on Google App
3110 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003111 # [App Engine Standard request
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003112 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003113 # and [App Engine Flex request
3114 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003115 &quot;instance&quot;: &quot;A String&quot;, # App instance.
3116 #
3117 # By default, the job is sent to an instance which is available when
3118 # the job is attempted.
3119 #
3120 # Requests can only be sent to a specific instance if
3121 # [manual scaling is used in App Engine
3122 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3123 # App Engine Flex does not support instances. For more information, see
3124 # [App Engine Standard request
3125 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3126 # and [App Engine Flex request
3127 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3128 &quot;service&quot;: &quot;A String&quot;, # App service.
3129 #
3130 # By default, the job is sent to the service which is the default
3131 # service when the job is attempted.
3132 &quot;version&quot;: &quot;A String&quot;, # App version.
3133 #
3134 # By default, the job is sent to the version which is the default
3135 # version when the job is attempted.
3136 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the job is sent to.
3137 #
3138 # For more information about how App Engine requests are routed, see
3139 # [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3140 #
3141 # The host is constructed as:
3142 #
3143 #
3144 # * `host = [application_domain_name]`&lt;/br&gt;
3145 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3146 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3147 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3148 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3149 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3150 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3151 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
3152 #
3153 # * `application_domain_name` = The domain name of the app, for
3154 # example &lt;app-id&gt;.appspot.com, which is associated with the
3155 # job&#x27;s project ID.
3156 #
3157 # * `service =` service
3158 #
3159 # * `version =` version
3160 #
3161 # * `version_dot_service =`
3162 # version `+ &#x27;.&#x27; +`
3163 # service
3164 #
3165 # * `instance =` instance
3166 #
3167 # * `instance_dot_service =`
3168 # instance `+ &#x27;.&#x27; +`
3169 # service
3170 #
3171 # * `instance_dot_version =`
3172 # instance `+ &#x27;.&#x27; +`
3173 # version
3174 #
3175 # * `instance_dot_version_dot_service =`
3176 # instance `+ &#x27;.&#x27; +`
3177 # version `+ &#x27;.&#x27; +`
3178 # service
3179 #
3180 #
3181 # If service is empty, then the job will be sent
3182 # to the service which is the default service when the job is attempted.
3183 #
3184 # If version is empty, then the job will be sent
3185 # to the version which is the default version when the job is attempted.
3186 #
3187 # If instance is empty, then the job will be
3188 # sent to an instance which is available when the job is attempted.
3189 #
3190 # If service,
3191 # version, or
3192 # instance is invalid, then the job will be sent
3193 # to the default version of the default service when the job is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003194 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003195 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. PATCH and OPTIONS are not
3196 # permitted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003197 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003198 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the job.
3199 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob, after
3200 # which it becomes output only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003201 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003202 # The job name. For example:
3203 # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
3204 #
3205 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3206 # hyphens (-), colons (:), or periods (.).
3207 # For more information, see
3208 # [Identifying
3209 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3210 # * `LOCATION_ID` is the canonical ID for the job&#x27;s location.
3211 # The list of available locations can be obtained by calling
3212 # ListLocations.
3213 # For more information, see https://cloud.google.com/about/locations/.
3214 # * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
3215 # hyphens (-), or underscores (_). The maximum length is 500 characters.
3216 &quot;userUpdateTime&quot;: &quot;A String&quot;, # Output only. The creation time of the job.
3217 &quot;description&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob or
3218 # UpdateJob.
3219 #
3220 # A human-readable description for the job. This string must not contain
3221 # more than 500 characters.
3222 &quot;pubsubTarget&quot;: { # Pub/Sub target. The job will be delivered by publishing a message to # Pub/Sub target.
3223 # the given Pub/Sub topic.
3224 &quot;attributes&quot;: { # Attributes for PubsubMessage.
3225 #
3226 # Pubsub message must contain either non-empty data, or at least one
3227 # attribute.
3228 &quot;a_key&quot;: &quot;A String&quot;,
3229 },
3230 &quot;topicName&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic to which messages will
3231 # be published when a job is delivered. The topic name must be in the
3232 # same format as required by PubSub&#x27;s
3233 # [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
3234 # for example `projects/PROJECT_ID/topics/TOPIC_ID`.
3235 #
3236 # The topic must be in the same project as the Cloud Scheduler job.
3237 &quot;data&quot;: &quot;A String&quot;, # The message payload for PubsubMessage.
3238 #
3239 # Pubsub message must contain either non-empty data, or at least one
3240 # attribute.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003241 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003242 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The next time the job is scheduled. Note that this may be a
3243 # retry of a previously failed attempt or the next execution time
3244 # according to the schedule.
3245 &quot;timeZone&quot;: &quot;A String&quot;, # Specifies the time zone to be used in interpreting
3246 # schedule. The value of this field must be a time
3247 # zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003248 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003249 # Note that some time zones include a provision for
3250 # daylight savings time. The rules for daylight saving time are
3251 # determined by the chosen tz. For UTC use the string &quot;utc&quot;. If a
3252 # time zone is not specified, the default will be in UTC (also known
3253 # as GMT).
3254 &quot;httpTarget&quot;: { # Http target. The job will be pushed to the job handler by means of # HTTP target.
3255 # an HTTP request via an http_method such as HTTP
3256 # POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
3257 # response code in the range [200 - 299]. A failure to receive a response
3258 # constitutes a failed execution. For a redirected request, the response
3259 # returned by the redirected request is considered.
3260 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
3261 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
3262 # will be generated and attached as an `Authorization` header in the HTTP
3263 # request.
3264 #
3265 # This type of authorization should generally only be used when calling
3266 # Google APIs hosted on *.googleapis.com.
3267 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
3268 # This type of authorization should generally only be used when calling Google
3269 # APIs hosted on *.googleapis.com.
3270 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
3271 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
3272 # will be used.
3273 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
3274 # to be used for generating OAuth token.
3275 # The service account must be within the same project as the job. The caller
3276 # must have iam.serviceAccounts.actAs permission for the service account.
3277 },
3278 &quot;uri&quot;: &quot;A String&quot;, # Required. The full URI path that the request will be sent to. This string
3279 # must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples of
3280 # valid values for uri are:
3281 # `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will
3282 # encode some characters for safety and compatibility. The maximum allowed
3283 # URL length is 2083 characters after encoding.
3284 &quot;body&quot;: &quot;A String&quot;, # HTTP request body. A request body is allowed only if the HTTP
3285 # method is POST, PUT, or PATCH. It is an error to set body on a job with an
3286 # incompatible HttpMethod.
3287 &quot;headers&quot;: { # The user can specify HTTP request headers to send with the job&#x27;s
3288 # HTTP request. This map contains the header field names and
3289 # values. Repeated headers are not supported, but a header value can
3290 # contain commas. These headers represent a subset of the headers
3291 # that will accompany the job&#x27;s HTTP request. Some HTTP request
3292 # headers will be ignored or replaced. A partial list of headers that
3293 # will be ignored or replaced is below:
3294 # - Host: This will be computed by Cloud Scheduler and derived from
3295 # uri.
3296 # * `Content-Length`: This will be computed by Cloud Scheduler.
3297 # * `User-Agent`: This will be set to `&quot;Google-Cloud-Scheduler&quot;`.
3298 # * `X-Google-*`: Google internal use only.
3299 # * `X-AppEngine-*`: Google internal use only.
3300 #
3301 # The total size of headers must be less than 80KB.
3302 &quot;a_key&quot;: &quot;A String&quot;,
3303 },
3304 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
3305 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
3306 # token will be generated and attached as an `Authorization` header in the
3307 # HTTP request.
3308 #
3309 # This type of authorization can be used for many scenarios, including
3310 # calling Cloud Run, or endpoints where you intend to validate the token
3311 # yourself.
3312 # [OpenID Connect
3313 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
3314 # This type of authorization can be used for many scenarios, including
3315 # calling Cloud Run, or endpoints where you intend to validate the token
3316 # yourself.
3317 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
3318 # specified in target will be used.
3319 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
3320 # to be used for generating OIDC token.
3321 # The service account must be within the same project as the job. The caller
3322 # must have iam.serviceAccounts.actAs permission for the service account.
3323 },
3324 &quot;httpMethod&quot;: &quot;A String&quot;, # Which HTTP method to use for the request.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003325 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003326 &quot;schedule&quot;: &quot;A String&quot;, # Required, except when used with UpdateJob.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003327 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003328 # Describes the schedule on which the job will be executed.
3329 #
3330 # The schedule can be either of the following types:
3331 #
3332 # * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
3333 # * English-like
3334 # [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
3335 #
3336 # As a general rule, execution `n + 1` of a job will not begin
3337 # until execution `n` has finished. Cloud Scheduler will never
3338 # allow two simultaneously outstanding executions. For example,
3339 # this implies that if the `n+1`th execution is scheduled to run at
3340 # 16:00 but the `n`th execution takes until 16:15, the `n+1`th
3341 # execution will not start until `16:15`.
3342 # A scheduled start time will be delayed if the previous
3343 # execution has not ended when its scheduled time occurs.
3344 #
3345 # If retry_count &gt; 0 and a job attempt fails,
3346 # the job will be tried a total of retry_count
3347 # times, with exponential backoff, until the next scheduled start
3348 # time.
3349 &quot;retryConfig&quot;: { # Settings that determine the retry behavior. # Settings that determine the retry behavior.
3350 #
3351 # By default, if a job does not complete successfully (meaning that
3352 # an acknowledgement is not received from the handler, then it will be retried
3353 # with exponential backoff according to the settings in RetryConfig.
3354 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # The time limit for retrying a failed job, measured from time when an
3355 # execution was first attempted. If specified with
3356 # retry_count, the job will be retried until both
3357 # limits are reached.
3358 #
3359 # The default value for max_retry_duration is zero, which means retry
3360 # duration is unlimited.
3361 &quot;minBackoffDuration&quot;: &quot;A String&quot;, # The minimum amount of time to wait before retrying a job after
3362 # it fails.
3363 #
3364 # The default value of this field is 5 seconds.
3365 &quot;retryCount&quot;: 42, # The number of attempts that the system will make to run a job using the
3366 # exponential backoff procedure described by
3367 # max_doublings.
3368 #
3369 # The default value of retry_count is zero.
3370 #
3371 # If retry_count is zero, a job attempt will *not* be retried if
3372 # it fails. Instead the Cloud Scheduler system will wait for the
3373 # next scheduled execution time.
3374 #
3375 # If retry_count is set to a non-zero number then Cloud Scheduler
3376 # will retry failed attempts, using exponential backoff,
3377 # retry_count times, or until the next scheduled execution time,
3378 # whichever comes first.
3379 #
3380 # Values greater than 5 and negative values are not allowed.
3381 &quot;maxBackoffDuration&quot;: &quot;A String&quot;, # The maximum amount of time to wait before retrying a job after
3382 # it fails.
3383 #
3384 # The default value of this field is 1 hour.
3385 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
3386 #
3387 # A job&#x27;s retry interval starts at
3388 # min_backoff_duration, then doubles
3389 # `max_doublings` times, then increases linearly, and finally
3390 # retries at intervals of
3391 # max_backoff_duration up to
3392 # retry_count times.
3393 #
3394 # For example, if min_backoff_duration is
3395 # 10s, max_backoff_duration is 300s, and
3396 # `max_doublings` is 3, then the a job will first be retried in 10s. The
3397 # retry interval will double three times, and then increase linearly by
3398 # 2^3 * 10s. Finally, the job will retry at intervals of
3399 # max_backoff_duration until the job has
3400 # been attempted retry_count times. Thus, the
3401 # requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
3402 #
3403 # The default value of this field is 5.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003404 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003405 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for the last attempted execution.
3406 # different programming environments, including REST APIs and RPC APIs. It is
3407 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
3408 # three pieces of data: error code, error message, and error details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003409 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003410 # You can find out more about this error model and how to work with it in the
3411 # [API Design Guide](https://cloud.google.com/apis/design/errors).
3412 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
3413 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
3414 # user-facing error message should be localized and sent in the
3415 # google.rpc.Status.details field, or localized by the client.
3416 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
3417 # message types for APIs to use.
3418 {
3419 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
3420 },
3421 ],
3422 },
3423 &quot;attemptDeadline&quot;: &quot;A String&quot;, # The deadline for job attempts. If the request handler does not respond by
3424 # this deadline then the request is cancelled and the attempt is marked as a
3425 # `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in
3426 # execution logs. Cloud Scheduler will retry the job according
3427 # to the RetryConfig.
Bu Sun Kim65020912020-05-20 12:08:20 -07003428 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003429 # The allowed duration for this deadline is:
3430 #
3431 # * For HTTP targets, between 15 seconds and 30 minutes.
3432 # * For App Engine HTTP targets, between 15
3433 # seconds and 24 hours.
3434 # * For PubSub targets, this field is ignored.
3435 &quot;lastAttemptTime&quot;: &quot;A String&quot;, # Output only. The time the last job attempt started.
3436 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003437</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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003465 # The maximum allowed size for a job is 100KB.
3466 &quot;appEngineHttpTarget&quot;: { # App Engine target. The job will be pushed to a job handler by means # App Engine HTTP target.
3467 # of an HTTP request via an http_method such
3468 # as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an
3469 # HTTP response code in the range [200 - 299]. Error 503 is
3470 # considered an App Engine system error instead of an application
3471 # error. Requests returning error 503 will be retried regardless of
3472 # retry configuration and not counted against retry counts. Any other
3473 # response code, or a failure to receive a response before the
3474 # deadline, constitutes a failed attempt.
3475 &quot;relativeUri&quot;: &quot;A String&quot;, # The relative URI.
Bu Sun Kim65020912020-05-20 12:08:20 -07003476 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003477 # The relative URL must begin with &quot;/&quot; and must be a valid HTTP relative URL.
3478 # It can contain a path, query string arguments, and `#` fragments.
3479 # If the relative URL is empty, then the root path &quot;/&quot; will be used.
3480 # No spaces are allowed, and the maximum length allowed is 2083 characters.
3481 &quot;body&quot;: &quot;A String&quot;, # Body.
Bu Sun Kim65020912020-05-20 12:08:20 -07003482 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003483 # HTTP request body. A request body is allowed only if the HTTP method is
3484 # POST or PUT. It will result in invalid argument error to set a body on a
3485 # job with an incompatible HttpMethod.
3486 &quot;headers&quot;: { # HTTP request headers.
Bu Sun Kim65020912020-05-20 12:08:20 -07003487 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003488 # This map contains the header field names and values. Headers can be set
3489 # when the job is created.
Bu Sun Kim65020912020-05-20 12:08:20 -07003490 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003491 # Cloud Scheduler sets some headers to default values:
Bu Sun Kim65020912020-05-20 12:08:20 -07003492 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003493 # * `User-Agent`: By default, this header is
3494 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;`.
3495 # This header can be modified, but Cloud Scheduler will append
3496 # `&quot;AppEngine-Google; (+http://code.google.com/appengine)&quot;` to the
3497 # modified `User-Agent`.
3498 # * `X-CloudScheduler`: This header will be set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07003499 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003500 # If the job has an body, Cloud Scheduler sets
3501 # the following headers:
Bu Sun Kim65020912020-05-20 12:08:20 -07003502 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003503 # * `Content-Type`: By default, the `Content-Type` header is set to
3504 # `&quot;application/octet-stream&quot;`. The default can be overridden by explictly
3505 # setting `Content-Type` to a particular media type when the job is
3506 # created.
3507 # For example, `Content-Type` can be set to `&quot;application/json&quot;`.
3508 # * `Content-Length`: This is computed by Cloud Scheduler. This value is
3509 # output only. It cannot be changed.
Bu Sun Kim65020912020-05-20 12:08:20 -07003510 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003511 # The headers below are output only. They cannot be set or overridden:
Bu Sun Kim65020912020-05-20 12:08:20 -07003512 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003513 # * `X-Google-*`: For Google internal use only.
3514 # * `X-AppEngine-*`: For Google internal use only.
Bu Sun Kim65020912020-05-20 12:08:20 -07003515 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003516 # In addition, some App Engine headers, which contain
3517 # job-specific information, are also be sent to the job handler.
3518 &quot;a_key&quot;: &quot;A String&quot;,
3519 },
3520 &quot;appEngineRouting&quot;: { # App Engine Routing. # App Engine Routing setting for the job.
Bu Sun Kim65020912020-05-20 12:08:20 -07003521 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003522 # For more information about services, versions, and instances see
3523 # [An Overview of App
3524 # Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
3525 # [Microservices Architecture on Google App
3526 # Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003527 # [App Engine Standard request
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003528 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003529 # and [App Engine Flex request
3530 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003531 &quot;instance&quot;: &quot;A String&quot;, # App instance.
3532 #
3533 # By default, the job is sent to an instance which is available when
3534 # the job is attempted.
3535 #
3536 # Requests can only be sent to a specific instance if
3537 # [manual scaling is used in App Engine
3538 # Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
3539 # App Engine Flex does not support instances. For more information, see
3540 # [App Engine Standard request
3541 # routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
3542 # and [App Engine Flex request
3543 # routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
3544 &quot;service&quot;: &quot;A String&quot;, # App service.
3545 #
3546 # By default, the job is sent to the service which is the default
3547 # service when the job is attempted.
3548 &quot;version&quot;: &quot;A String&quot;, # App version.
3549 #
3550 # By default, the job is sent to the version which is the default
3551 # version when the job is attempted.
3552 &quot;host&quot;: &quot;A String&quot;, # Output only. The host that the job is sent to.
3553 #
3554 # For more information about how App Engine requests are routed, see
3555 # [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
3556 #
3557 # The host is constructed as:
3558 #
3559 #
3560 # * `host = [application_domain_name]`&lt;/br&gt;
3561 # `| [service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3562 # `| [version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3563 # `| [version_dot_service]+ &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3564 # `| [instance] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3565 # `| [instance_dot_service] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3566 # `| [instance_dot_version] + &#x27;.&#x27; + [application_domain_name]`&lt;/br&gt;
3567 # `| [instance_dot_version_dot_service] + &#x27;.&#x27; + [application_domain_name]`
3568 #
3569 # * `application_domain_name` = The domain name of the app, for
3570 # example &lt;app-id&gt;.appspot.com, which is associated with the
3571 # job&#x27;s project ID.
3572 #
3573 # * `service =` service
3574 #
3575 # * `version =` version
3576 #
3577 # * `version_dot_service =`
3578 # version `+ &#x27;.&#x27; +`
3579 # service
3580 #
3581 # * `instance =` instance
3582 #
3583 # * `instance_dot_service =`
3584 # instance `+ &#x27;.&#x27; +`
3585 # service
3586 #
3587 # * `instance_dot_version =`
3588 # instance `+ &#x27;.&#x27; +`
3589 # version
3590 #
3591 # * `instance_dot_version_dot_service =`
3592 # instance `+ &#x27;.&#x27; +`
3593 # version `+ &#x27;.&#x27; +`
3594 # service
3595 #
3596 #
3597 # If service is empty, then the job will be sent
3598 # to the service which is the default service when the job is attempted.
3599 #
3600 # If version is empty, then the job will be sent
3601 # to the version which is the default version when the job is attempted.
3602 #
3603 # If instance is empty, then the job will be
3604 # sent to an instance which is available when the job is attempted.
3605 #
3606 # If service,
3607 # version, or
3608 # instance is invalid, then the job will be sent
3609 # to the default version of the default service when the job is attempted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003610 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003611 &quot;httpMethod&quot;: &quot;A String&quot;, # The HTTP method to use for the request. PATCH and OPTIONS are not
3612 # permitted.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003613 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003614 &quot;state&quot;: &quot;A String&quot;, # Output only. State of the job.
3615 &quot;name&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob, after
3616 # which it becomes output only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003617 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003618 # The job name. For example:
3619 # `projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID`.
3620 #
3621 # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
3622 # hyphens (-), colons (:), or periods (.).
3623 # For more information, see
3624 # [Identifying
3625 # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
3626 # * `LOCATION_ID` is the canonical ID for the job&#x27;s location.
3627 # The list of available locations can be obtained by calling
3628 # ListLocations.
3629 # For more information, see https://cloud.google.com/about/locations/.
3630 # * `JOB_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
3631 # hyphens (-), or underscores (_). The maximum length is 500 characters.
3632 &quot;userUpdateTime&quot;: &quot;A String&quot;, # Output only. The creation time of the job.
3633 &quot;description&quot;: &quot;A String&quot;, # Optionally caller-specified in CreateJob or
3634 # UpdateJob.
3635 #
3636 # A human-readable description for the job. This string must not contain
3637 # more than 500 characters.
3638 &quot;pubsubTarget&quot;: { # Pub/Sub target. The job will be delivered by publishing a message to # Pub/Sub target.
3639 # the given Pub/Sub topic.
3640 &quot;attributes&quot;: { # Attributes for PubsubMessage.
3641 #
3642 # Pubsub message must contain either non-empty data, or at least one
3643 # attribute.
3644 &quot;a_key&quot;: &quot;A String&quot;,
3645 },
3646 &quot;topicName&quot;: &quot;A String&quot;, # Required. The name of the Cloud Pub/Sub topic to which messages will
3647 # be published when a job is delivered. The topic name must be in the
3648 # same format as required by PubSub&#x27;s
3649 # [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
3650 # for example `projects/PROJECT_ID/topics/TOPIC_ID`.
3651 #
3652 # The topic must be in the same project as the Cloud Scheduler job.
3653 &quot;data&quot;: &quot;A String&quot;, # The message payload for PubsubMessage.
3654 #
3655 # Pubsub message must contain either non-empty data, or at least one
3656 # attribute.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003657 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003658 &quot;scheduleTime&quot;: &quot;A String&quot;, # Output only. The next time the job is scheduled. Note that this may be a
3659 # retry of a previously failed attempt or the next execution time
3660 # according to the schedule.
3661 &quot;timeZone&quot;: &quot;A String&quot;, # Specifies the time zone to be used in interpreting
3662 # schedule. The value of this field must be a time
3663 # zone name from the [tz database](http://en.wikipedia.org/wiki/Tz_database).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003664 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003665 # Note that some time zones include a provision for
3666 # daylight savings time. The rules for daylight saving time are
3667 # determined by the chosen tz. For UTC use the string &quot;utc&quot;. If a
3668 # time zone is not specified, the default will be in UTC (also known
3669 # as GMT).
3670 &quot;httpTarget&quot;: { # Http target. The job will be pushed to the job handler by means of # HTTP target.
3671 # an HTTP request via an http_method such as HTTP
3672 # POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
3673 # response code in the range [200 - 299]. A failure to receive a response
3674 # constitutes a failed execution. For a redirected request, the response
3675 # returned by the redirected request is considered.
3676 &quot;oauthToken&quot;: { # Contains information needed for generating an # If specified, an
3677 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2)
3678 # will be generated and attached as an `Authorization` header in the HTTP
3679 # request.
3680 #
3681 # This type of authorization should generally only be used when calling
3682 # Google APIs hosted on *.googleapis.com.
3683 # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
3684 # This type of authorization should generally only be used when calling Google
3685 # APIs hosted on *.googleapis.com.
3686 &quot;scope&quot;: &quot;A String&quot;, # OAuth scope to be used for generating OAuth access token.
3687 # If not specified, &quot;https://www.googleapis.com/auth/cloud-platform&quot;
3688 # will be used.
3689 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
3690 # to be used for generating OAuth token.
3691 # The service account must be within the same project as the job. The caller
3692 # must have iam.serviceAccounts.actAs permission for the service account.
3693 },
3694 &quot;uri&quot;: &quot;A String&quot;, # Required. The full URI path that the request will be sent to. This string
3695 # must begin with either &quot;http://&quot; or &quot;https://&quot;. Some examples of
3696 # valid values for uri are:
3697 # `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will
3698 # encode some characters for safety and compatibility. The maximum allowed
3699 # URL length is 2083 characters after encoding.
3700 &quot;body&quot;: &quot;A String&quot;, # HTTP request body. A request body is allowed only if the HTTP
3701 # method is POST, PUT, or PATCH. It is an error to set body on a job with an
3702 # incompatible HttpMethod.
3703 &quot;headers&quot;: { # The user can specify HTTP request headers to send with the job&#x27;s
3704 # HTTP request. This map contains the header field names and
3705 # values. Repeated headers are not supported, but a header value can
3706 # contain commas. These headers represent a subset of the headers
3707 # that will accompany the job&#x27;s HTTP request. Some HTTP request
3708 # headers will be ignored or replaced. A partial list of headers that
3709 # will be ignored or replaced is below:
3710 # - Host: This will be computed by Cloud Scheduler and derived from
3711 # uri.
3712 # * `Content-Length`: This will be computed by Cloud Scheduler.
3713 # * `User-Agent`: This will be set to `&quot;Google-Cloud-Scheduler&quot;`.
3714 # * `X-Google-*`: Google internal use only.
3715 # * `X-AppEngine-*`: Google internal use only.
3716 #
3717 # The total size of headers must be less than 80KB.
3718 &quot;a_key&quot;: &quot;A String&quot;,
3719 },
3720 &quot;oidcToken&quot;: { # Contains information needed for generating an # If specified, an
3721 # [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect)
3722 # token will be generated and attached as an `Authorization` header in the
3723 # HTTP request.
3724 #
3725 # This type of authorization can be used for many scenarios, including
3726 # calling Cloud Run, or endpoints where you intend to validate the token
3727 # yourself.
3728 # [OpenID Connect
3729 # token](https://developers.google.com/identity/protocols/OpenIDConnect).
3730 # This type of authorization can be used for many scenarios, including
3731 # calling Cloud Run, or endpoints where you intend to validate the token
3732 # yourself.
3733 &quot;audience&quot;: &quot;A String&quot;, # Audience to be used when generating OIDC token. If not specified, the URI
3734 # specified in target will be used.
3735 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # [Service account email](https://cloud.google.com/iam/docs/service-accounts)
3736 # to be used for generating OIDC token.
3737 # The service account must be within the same project as the job. The caller
3738 # must have iam.serviceAccounts.actAs permission for the service account.
3739 },
3740 &quot;httpMethod&quot;: &quot;A String&quot;, # Which HTTP method to use for the request.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07003741 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003742 &quot;schedule&quot;: &quot;A String&quot;, # Required, except when used with UpdateJob.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003743 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003744 # Describes the schedule on which the job will be executed.
3745 #
3746 # The schedule can be either of the following types:
3747 #
3748 # * [Crontab](http://en.wikipedia.org/wiki/Cron#Overview)
3749 # * English-like
3750 # [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules)
3751 #
3752 # As a general rule, execution `n + 1` of a job will not begin
3753 # until execution `n` has finished. Cloud Scheduler will never
3754 # allow two simultaneously outstanding executions. For example,
3755 # this implies that if the `n+1`th execution is scheduled to run at
3756 # 16:00 but the `n`th execution takes until 16:15, the `n+1`th
3757 # execution will not start until `16:15`.
3758 # A scheduled start time will be delayed if the previous
3759 # execution has not ended when its scheduled time occurs.
3760 #
3761 # If retry_count &gt; 0 and a job attempt fails,
3762 # the job will be tried a total of retry_count
3763 # times, with exponential backoff, until the next scheduled start
3764 # time.
3765 &quot;retryConfig&quot;: { # Settings that determine the retry behavior. # Settings that determine the retry behavior.
3766 #
3767 # By default, if a job does not complete successfully (meaning that
3768 # an acknowledgement is not received from the handler, then it will be retried
3769 # with exponential backoff according to the settings in RetryConfig.
3770 &quot;maxRetryDuration&quot;: &quot;A String&quot;, # The time limit for retrying a failed job, measured from time when an
3771 # execution was first attempted. If specified with
3772 # retry_count, the job will be retried until both
3773 # limits are reached.
3774 #
3775 # The default value for max_retry_duration is zero, which means retry
3776 # duration is unlimited.
3777 &quot;minBackoffDuration&quot;: &quot;A String&quot;, # The minimum amount of time to wait before retrying a job after
3778 # it fails.
3779 #
3780 # The default value of this field is 5 seconds.
3781 &quot;retryCount&quot;: 42, # The number of attempts that the system will make to run a job using the
3782 # exponential backoff procedure described by
3783 # max_doublings.
3784 #
3785 # The default value of retry_count is zero.
3786 #
3787 # If retry_count is zero, a job attempt will *not* be retried if
3788 # it fails. Instead the Cloud Scheduler system will wait for the
3789 # next scheduled execution time.
3790 #
3791 # If retry_count is set to a non-zero number then Cloud Scheduler
3792 # will retry failed attempts, using exponential backoff,
3793 # retry_count times, or until the next scheduled execution time,
3794 # whichever comes first.
3795 #
3796 # Values greater than 5 and negative values are not allowed.
3797 &quot;maxBackoffDuration&quot;: &quot;A String&quot;, # The maximum amount of time to wait before retrying a job after
3798 # it fails.
3799 #
3800 # The default value of this field is 1 hour.
3801 &quot;maxDoublings&quot;: 42, # The time between retries will double `max_doublings` times.
3802 #
3803 # A job&#x27;s retry interval starts at
3804 # min_backoff_duration, then doubles
3805 # `max_doublings` times, then increases linearly, and finally
3806 # retries at intervals of
3807 # max_backoff_duration up to
3808 # retry_count times.
3809 #
3810 # For example, if min_backoff_duration is
3811 # 10s, max_backoff_duration is 300s, and
3812 # `max_doublings` is 3, then the a job will first be retried in 10s. The
3813 # retry interval will double three times, and then increase linearly by
3814 # 2^3 * 10s. Finally, the job will retry at intervals of
3815 # max_backoff_duration until the job has
3816 # been attempted retry_count times. Thus, the
3817 # requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, ....
3818 #
3819 # The default value of this field is 5.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003820 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003821 &quot;status&quot;: { # The `Status` type defines a logical error model that is suitable for # Output only. The response from the target for the last attempted execution.
3822 # different programming environments, including REST APIs and RPC APIs. It is
3823 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
3824 # three pieces of data: error code, error message, and error details.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003825 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003826 # You can find out more about this error model and how to work with it in the
3827 # [API Design Guide](https://cloud.google.com/apis/design/errors).
3828 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
3829 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
3830 # user-facing error message should be localized and sent in the
3831 # google.rpc.Status.details field, or localized by the client.
3832 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
3833 # message types for APIs to use.
3834 {
3835 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
3836 },
3837 ],
3838 },
3839 &quot;attemptDeadline&quot;: &quot;A String&quot;, # The deadline for job attempts. If the request handler does not respond by
3840 # this deadline then the request is cancelled and the attempt is marked as a
3841 # `DEADLINE_EXCEEDED` failure. The failed attempt can be viewed in
3842 # execution logs. Cloud Scheduler will retry the job according
3843 # to the RetryConfig.
Bu Sun Kim65020912020-05-20 12:08:20 -07003844 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07003845 # The allowed duration for this deadline is:
3846 #
3847 # * For HTTP targets, between 15 seconds and 30 minutes.
3848 # * For App Engine HTTP targets, between 15
3849 # seconds and 24 hours.
3850 # * For PubSub targets, this field is ignored.
3851 &quot;lastAttemptTime&quot;: &quot;A String&quot;, # Output only. The time the last job attempt started.
3852 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07003853</div>
3854
3855</body></html>