younifyd
Menu

Run.projects.locations.jobs.create

Creates a Job.

POST/v2/{parent}/jobs

Use it in a workflow

  1. Add a step and choose the Google Cloud Run Jobs connector.
  2. Pick the Run.projects.locations.jobs.create action (under projects).
  3. Fill in the fields below, then reference the result from later steps as {{runProjectsLocationsJobsCreate.response.data}}.

Request

Path parameters

parentstringrequired

Required. The location and project in which this Job should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number.

Query parameters

$.xgafvstring

V1 error format.

One of12

access_tokenstring

OAuth access token.

altstring

Data format for response.

One ofjsonmediaproto

callbackstring

JSONP

fieldsstring

Selector specifying which fields to include in a partial response.

keystring

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_tokenstring

OAuth 2.0 token for the current user.

prettyPrintboolean

Returns response with indentations and line breaks.

quotaUserstring

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.

upload_protocolstring

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

uploadTypestring

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

jobIdstring

Required. The unique identifier for the Job. The name of the job becomes {parent}/jobs/{job_id}.

validateOnlyboolean

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

Request body

Enter the body as JSON in the step's Body field.

annotationsobject

KRM-style annotations for the resource. 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.

binaryAuthorizationobject

Settings for Binary Authorization feature.

breakglassJustificationstring

If present, indicates to use Breakglass using this justification. If use_default is False, then it must be empty. For more information on breakglass, see https://cloud.google.com/binary-authorization/docs/using-breakglass

useDefaultboolean

If True, indicates to use the default project's binary authorization policy. If False, binary authorization will be disabled.

clientstring

Arbitrary identifier for the API client.

clientVersionstring

Arbitrary version identifier for the API client.

conditionsarray<object>

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.

executionReasonstring

A reason for the execution condition.

One ofEXECUTION_REASON_UNDEFINEDJOB_STATUS_SERVICE_POLLING_ERRORNON_ZERO_EXIT_CODECANCELLEDCANCELLING

lastTransitionTimestring (google-datetime)

Last time the condition transitioned from one status to another.

messagestring

Human readable message indicating details about the current status.

reasonstring

A common (service-level) reason for this condition.

One ofCOMMON_REASON_UNDEFINEDUNKNOWNREVISION_FAILEDPROGRESS_DEADLINE_EXCEEDEDCONTAINER_MISSINGCONTAINER_PERMISSION_DENIEDCONTAINER_IMAGE_UNAUTHORIZEDCONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILEDENCRYPTION_KEY_PERMISSION_DENIEDENCRYPTION_KEY_CHECK_FAILEDSECRETS_ACCESS_CHECK_FAILEDWAITING_FOR_OPERATIONIMMEDIATE_RETRYPOSTPONED_RETRYINTERNAL

revisionReasonstring

A reason for the revision condition.

One ofREVISION_REASON_UNDEFINEDPENDINGRESERVERETIREDRETIRINGRECREATINGHEALTH_CHECK_CONTAINER_ERRORCUSTOMIZED_PATH_RESPONSE_PENDINGMIN_INSTANCES_NOT_PROVISIONEDACTIVE_REVISION_LIMIT_REACHEDNO_DEPLOYMENTHEALTH_CHECK_SKIPPEDMIN_INSTANCES_WARMING

severitystring

How to interpret failures of this condition, one of Error, Warning, Info

One ofSEVERITY_UNSPECIFIEDERRORWARNINGINFO

statestring

State of the condition.

One ofSTATE_UNSPECIFIEDCONDITION_PENDINGCONDITION_RECONCILINGCONDITION_FAILEDCONDITION_SUCCEEDED

typestring

type is used to communicate the status of the reconciliation process. See also: https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting Types common to all resources include: * "Ready": True when the Resource is ready.

createTimestring (google-datetime)

Output only. The creation time.

creatorstring

Output only. Email address of the authenticated creator.

deleteTimestring (google-datetime)

Output only. The deletion time.

etagstring

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

executionCountinteger (int32)

Output only. Number of executions created for this job.

expireTimestring (google-datetime)

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

generationstring (int64)

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

labelsobject

KRM-style labels for the resource. 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.

lastModifierstring

Output only. Email address of the last authenticated modifier.

latestCreatedExecutionobject

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

completionTimestring (google-datetime)

Creation timestamp of the execution.

createTimestring (google-datetime)

Creation timestamp of the execution.

namestring

Name of the execution.

launchStagestring

The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/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.

One ofLAUNCH_STAGE_UNSPECIFIEDUNIMPLEMENTEDPRELAUNCHEARLY_ACCESSALPHABETAGADEPRECATED

namestring

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

observedGenerationstring (int64)

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

reconcilingboolean

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`.

satisfiesPzsboolean

Output only. Reserved for future use.

templateobject

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

annotationsobject

KRM-style annotations for the resource. 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. All system annotations in v1 now have a corresponding field in v2 ExecutionTemplate.

labelsobject

KRM-style labels for the resource. 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 ExecutionTemplate.

parallelisminteger (int32)

Specifies the maximum desired number of tasks the execution should run at given time. Must be <= task_count. When the job is run, if this field is 0 or unset, the maximum possible value will be used for that execution. The actual number of tasks running in steady state will be less than this number when there are fewer tasks waiting to be completed remaining, i.e. when the work left to do is less than max parallelism.

taskCountinteger (int32)

Specifies the desired number of tasks the execution should run. Setting to 1 means that parallelism is limited to 1 and the success of that task signals the success of the execution. Defaults to 1.

templateobject8 fields

TaskTemplate describes the data a task should have when created from a template.

terminalConditionobject

Defines a status condition for a resource.

executionReasonstring

A reason for the execution condition.

One ofEXECUTION_REASON_UNDEFINEDJOB_STATUS_SERVICE_POLLING_ERRORNON_ZERO_EXIT_CODECANCELLEDCANCELLING

lastTransitionTimestring (google-datetime)

Last time the condition transitioned from one status to another.

messagestring

Human readable message indicating details about the current status.

reasonstring

A common (service-level) reason for this condition.

One ofCOMMON_REASON_UNDEFINEDUNKNOWNREVISION_FAILEDPROGRESS_DEADLINE_EXCEEDEDCONTAINER_MISSINGCONTAINER_PERMISSION_DENIEDCONTAINER_IMAGE_UNAUTHORIZEDCONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILEDENCRYPTION_KEY_PERMISSION_DENIEDENCRYPTION_KEY_CHECK_FAILEDSECRETS_ACCESS_CHECK_FAILEDWAITING_FOR_OPERATIONIMMEDIATE_RETRYPOSTPONED_RETRYINTERNAL

revisionReasonstring

A reason for the revision condition.

One ofREVISION_REASON_UNDEFINEDPENDINGRESERVERETIREDRETIRINGRECREATINGHEALTH_CHECK_CONTAINER_ERRORCUSTOMIZED_PATH_RESPONSE_PENDINGMIN_INSTANCES_NOT_PROVISIONEDACTIVE_REVISION_LIMIT_REACHEDNO_DEPLOYMENTHEALTH_CHECK_SKIPPEDMIN_INSTANCES_WARMING

severitystring

How to interpret failures of this condition, one of Error, Warning, Info

One ofSEVERITY_UNSPECIFIEDERRORWARNINGINFO

statestring

State of the condition.

One ofSTATE_UNSPECIFIEDCONDITION_PENDINGCONDITION_RECONCILINGCONDITION_FAILEDCONDITION_SUCCEEDED

typestring

type is used to communicate the status of the reconciliation process. See also: https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting Types common to all resources include: * "Ready": True when the Resource is ready.

uidstring

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.

updateTimestring (google-datetime)

Output only. The last-modified time.

json
{
  "annotations": {},
  "binaryAuthorization": {
    "breakglassJustification": "string",
    "useDefault": false
  },
  "client": "string",
  "clientVersion": "string",
  "conditions": [
    {
      "executionReason": "EXECUTION_REASON_UNDEFINED",
      "lastTransitionTime": "string",
      "message": "string",
      "reason": "COMMON_REASON_UNDEFINED",
      "revisionReason": "REVISION_REASON_UNDEFINED",
      "severity": "SEVERITY_UNSPECIFIED",
      "state": "STATE_UNSPECIFIED",
      "type": "string"
    }
  ],
  "createTime": "string",
  "creator": "string",
  "deleteTime": "string",
  "etag": "string",
  "executionCount": 0,
  "expireTime": "string",
  "generation": "string"
}

Response

Returns 200 with an object. Read it in later steps with {{runProjectsLocationsJobsCreate.response.data.<field>}}.

doneboolean

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.

errorobject

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](https://github.com/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](https://cloud.google.com/apis/design/errors).

codeinteger (int32)

The status code, which should be an enum value of google.rpc.Code.

detailsarray<object>

A list of messages that carry the error details. There is a common set of message types for APIs to use.

messagestring

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.

metadataobject

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.

namestring

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}`.

responseobject

The normal response of the operation in case of success. 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`.

json
{
  "done": false,
  "error": {
    "code": 0,
    "details": [
      {}
    ],
    "message": "string"
  },
  "metadata": {},
  "name": "string",
  "response": {}
}

Need more? See the Google Cloud Run Jobs guide for connection setup and behaviour shared by every action.