Updates a job. If successful, the updated Job is returned. If the job
does not exist, NOT_FOUND
is returned. If UpdateJob does not
successfully return, it is possible for the job to be in an
Job.State.UPDATE_FAILED state. A job in this state may not be executed.
If this happens, retry the UpdateJob request until a successful response
is received.
Arguments
Parameters | |
---|---|
name |
Required. Optionally caller-specified in CreateJob, after which it becomes output only. The job name. For example:
|
updateMask |
A mask used to specify which fields of the job are being updated.
|
body |
Required.
|
Raised exceptions
Exceptions | |
---|---|
ConnectionError |
In case of a network problem (such as DNS failure or refused connection). |
HttpError |
If the response status is >= 400 (excluding 429 and 503). |
TimeoutError |
If a long-running operation takes longer to finish than the specified timeout limit. |
TypeError |
If an operation or function receives an argument of the wrong type. |
ValueError |
If an operation or function receives an argument of the right type but an inappropriate value. For example, a negative timeout. |
Response
If successful, the response contains an instance of Job
.
Subworkflow snippet
Some fields might be optional or required. To identify required fields, refer to the API documentation.
YAML
- patch: call: googleapis.cloudscheduler.v1.projects.locations.jobs.patch args: name: ... updateMask: ... body: appEngineHttpTarget: appEngineRouting: instance: ... service: ... version: ... body: ... httpMethod: ... relativeUri: ... attemptDeadline: ... description: ... httpTarget: body: ... headers: ... httpMethod: ... oauthToken: scope: ... serviceAccountEmail: ... oidcToken: audience: ... serviceAccountEmail: ... uri: ... pubsubTarget: attributes: ... data: ... topicName: ... retryConfig: maxBackoffDuration: ... maxDoublings: ... maxRetryDuration: ... minBackoffDuration: ... retryCount: ... schedule: ... timeZone: ... result: patchResult
JSON
[ { "patch": { "call": "googleapis.cloudscheduler.v1.projects.locations.jobs.patch", "args": { "name": "...", "updateMask": "...", "body": { "appEngineHttpTarget": { "appEngineRouting": { "instance": "...", "service": "...", "version": "..." }, "body": "...", "httpMethod": "...", "relativeUri": "..." }, "attemptDeadline": "...", "description": "...", "httpTarget": { "body": "...", "headers": "...", "httpMethod": "...", "oauthToken": { "scope": "...", "serviceAccountEmail": "..." }, "oidcToken": { "audience": "...", "serviceAccountEmail": "..." }, "uri": "..." }, "pubsubTarget": { "attributes": "...", "data": "...", "topicName": "..." }, "retryConfig": { "maxBackoffDuration": "...", "maxDoublings": "...", "maxRetryDuration": "...", "minBackoffDuration": "...", "retryCount": "..." }, "schedule": "...", "timeZone": "..." } }, "result": "patchResult" } } ]