Method: googleapis.cloudscheduler.v1beta1.projects.locations.jobs.patch

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

string

Required. Optionally caller-specified in CreateJob, after which it becomes output only. The job name. For example: projects/PROJECT_ID/locations/LOCATION_ID/jobs/JOB_ID. * PROJECT_ID can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see Identifying projects * LOCATION_ID is the canonical ID for the job's location. The list of available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/. * JOB_ID can contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or underscores (_). The maximum length is 500 characters.

updateMask

string (FieldMask format)

A mask used to specify which fields of the job are being updated.

body

object (Job)

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.v1beta1.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: ...
            legacyAppEngineCron: ...
            pubsubTarget:
                attributes: ...
                data: ...
                topicName: ...
            retryConfig:
                maxBackoffDuration: ...
                maxDoublings: ...
                maxRetryDuration: ...
                minBackoffDuration: ...
                retryCount: ...
            schedule: ...
            timeZone: ...
    result: patchResult

JSON

[
  {
    "patch": {
      "call": "googleapis.cloudscheduler.v1beta1.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": "..."
          },
          "legacyAppEngineCron": "...",
          "pubsubTarget": {
            "attributes": "...",
            "data": "...",
            "topicName": "..."
          },
          "retryConfig": {
            "maxBackoffDuration": "...",
            "maxDoublings": "...",
            "maxRetryDuration": "...",
            "minBackoffDuration": "...",
            "retryCount": "..."
          },
          "schedule": "...",
          "timeZone": "..."
        }
      },
      "result": "patchResult"
    }
  }
]