projects

PATCH /v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}

Changed on

Updates a Job.

Request

  • Base URL
    https://run.googleapis.com
  • Auth
    • OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/cloud-platform
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/cloud-platform
    • or OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/run
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/run

Path parameters

projectsId, string required
locationsId, string required
jobsId, string required

Query parameters

$.xgafv, '1' | '2'

V1 error format.

access_token, string

OAuth access token.

alt, 'json' | 'media' | 'proto'

Data format for response.

callback, string

JSONP

fields, string

Selector specifying which fields to include in a partial response.

key, string

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

oauth_token, string

OAuth 2.0 token for the current user.

prettyPrint, boolean

Returns response with indentations and line breaks.

quotaUser, string

Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

uploadType, string

Legacy upload protocol for media (e.g. "media", "multipart").

upload_protocol, string

Upload protocol for media (e.g. "raw", "multipart").

allowMissing, boolean

Optional. If set to true, and if the Job does not exist, it will create a new one. Caller must have both create and update permissions for this call if this is set to true.

validateOnly, boolean

Indicates that the request should be validated and default values populated, without persisting the request or updating any resources.

Request body

GoogleCloudRunV2Job required

Job represents the configuration of a single job, which references a container image that is run to completion.

annotations, object

Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with run.googleapis.com, cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev namespaces, and they will be rejected on new resources. All system annotations in v1 now have a corresponding field in v2 Job. This field follows Kubernetes annotations' namespacing, limits, and rules.

binaryAuthorization, GoogleCloudRunV2BinaryAuthorization

Settings for Binary Authorization feature.

client, string

Arbitrary identifier for the API client.

clientVersion, string

Arbitrary version identifier for the API client.

conditions, GoogleCloudRunV2Condition[]

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Job does not reach its desired state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

createTime, string google-datetime

Output only. The creation time.

creator, string

Output only. Email address of the authenticated creator.

deleteTime, string google-datetime

Output only. The deletion time. It is only populated as a response to a Delete request.

etag, string

Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.

executionCount, integer

Output only. Number of executions created for this job.

expireTime, string google-datetime

Output only. For a deleted resource, the time after which it will be permamently deleted.

functionalType, 'FUNCTIONAL_TYPE_UNSPECIFIED' | 'FUNCTIONAL_TYPE_AGENT' | 'FUNCTIONAL_TYPE_MCP_SERVER'

Optional. The functional type of the Job.

generation, string int64

Output only. A number that monotonically increases every time the user modifies the desired state.

labels, object

Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with run.googleapis.com, cloud.googleapis.com, serving.knative.dev, or autoscaling.knative.dev namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Job.

lastModifier, string

Output only. Email address of the last authenticated modifier.

latestCreatedExecution, GoogleCloudRunV2ExecutionReference

Reference to an Execution. Use /Executions.GetExecution with the given name to get full execution including the latest status.

launchStage, 'LAUNCH_STAGE_UNSPECIFIED' | 'UNIMPLEMENTED' | 'PRELAUNCH' | 'EARLY_ACCESS' | 'ALPHA' | 'BETA' | 'GA' | 'DEPRECATED'

The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output.

name, string

The fully qualified name of this Job. Format: projects/{project}/locations/{location}/jobs/{job}

observedGeneration, string int64

Output only. The generation of this Job. See comments in reconciling for additional information on reconciliation process in Cloud Run.

reconciling, boolean

Output only. Returns true if the Job is currently being acted upon by the system to bring it into the desired state. When a new Job is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Job to the desired state. This process is called reconciliation. While reconciliation is in process, observed_generation and latest_succeeded_execution, will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the state matches the Job, or there was an error, and reconciliation failed. This state can be found in terminal_condition.state. If reconciliation succeeded, the following fields will match: observed_generation and generation, latest_succeeded_execution and latest_created_execution. If reconciliation failed, observed_generation and latest_succeeded_execution will have the state of the last succeeded execution or empty for newly created Job. Additional information on the failure can be found in terminal_condition and conditions.

runExecutionToken, string

A unique string used as a suffix for creating a new execution. The Job will become ready when the execution is successfully completed. The sum of job name and token length must be fewer than 63 characters.

satisfiesPzs, boolean

Output only. Reserved for future use.

startExecutionToken, string

A unique string used as a suffix creating a new execution. The Job will become ready when the execution is successfully started. The sum of job name and token length must be fewer than 63 characters.

template, GoogleCloudRunV2ExecutionTemplate

ExecutionTemplate describes the data an execution should have when created from a template.

terminalCondition, GoogleCloudRunV2Condition

Defines a status condition for a resource.

uid, string

Output only. Server assigned unique identifier for the Execution. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.

updateTime, string google-datetime

Output only. The last-modified time.

Response

Successful response

GoogleLongrunningOperation required

This resource represents a long-running operation that is the result of a network API call.

done, boolean

If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

error, GoogleRpcStatus

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.

metadata, object

Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.

name, string

The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.

response, object

The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.

Changes

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/cloud-platform was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/run was removed from the endpoint's security scheme Oauth2

    1 more change in this revision