Resource: Job
Job represents the configuration of a single job, which references a container image that is run to completion.
JSON representation |
---|
{ "name" : string , "uid" : string , "generation" : string , "labels" : { string : string , ... } , "annotations" : { string : string , ... } , "createTime" : string , "updateTime" : string , "deleteTime" : string , "expireTime" : string , "creator" : string , "lastModifier" : string , "client" : string , "clientVersion" : string , "launchStage" : enum ( |
name
string
The fully qualified name of this Job.
Format: projects/{project}/locations/{location}/jobs/{job}
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.
generation
string ( int64
format)
Output only. A number that monotonically increases every time the user modifies the desired state.
labels
map (key: string, value: string)
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.
An object containing a list of "key": value
pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }
.
annotations
map (key: string, value: string)
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.
An object containing a list of "key": value
pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }
.
createTime
string (
Timestamp
format)
Output only. The creation time.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z"
, "2014-10-02T15:01:23.045123456Z"
or "2014-10-02T15:01:23+05:30"
.
updateTime
string (
Timestamp
format)
Output only. The last-modified time.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z"
, "2014-10-02T15:01:23.045123456Z"
or "2014-10-02T15:01:23+05:30"
.
deleteTime
string (
Timestamp
format)
Output only. The deletion time. It is only populated as a response to a Delete request.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z"
, "2014-10-02T15:01:23.045123456Z"
or "2014-10-02T15:01:23+05:30"
.
expireTime
string (
Timestamp
format)
Output only. For a deleted resource, the time after which it will be permamently deleted.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z"
, "2014-10-02T15:01:23.045123456Z"
or "2014-10-02T15:01:23+05:30"
.
creator
string
Output only. Email address of the authenticated creator.
lastModifier
string
Output only. Email address of the last authenticated modifier.
client
string
Arbitrary identifier for the API client.
clientVersion
string
Arbitrary version identifier for the API client.
launchStage
enum (
LaunchStage
)
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.
template
object (
ExecutionTemplate
)
Required. The template used to create executions for this Job.
observedGeneration
string ( int64
format)
Output only. The generation of this Job. See comments in reconciling
for additional information on reconciliation process in Cloud Run.
terminalCondition
object (
Condition
)
Output only. The Condition of this Job, containing its readiness status, and detailed error information in case it did not reach the desired state.
conditions[]
object (
Condition
)
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.
executionCount
integer
Output only. Number of executions created for this job.
latestCreatedExecution
object (
ExecutionReference
)
Output only. Name of the last created execution.
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, observedGeneration
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 terminalCondition.state
.
If reconciliation succeeded, the following fields will match: observedGeneration
and generation
, latest_succeeded_execution
and latestCreatedExecution
.
If reconciliation failed, observedGeneration
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 terminalCondition
and conditions
.
satisfiesPzs
boolean
Output only. Reserved for future use.
etag
string
Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.
Union field create_execution
.
create_execution
can be only one of the following:
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.
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.
ExecutionTemplate
ExecutionTemplate describes the data an execution should have when created from a template.
JSON representation |
---|
{
"labels"
:
{
string
:
string
,
...
}
,
"annotations"
:
{
string
:
string
,
...
}
,
"parallelism"
:
integer
,
"taskCount"
:
integer
,
"template"
:
{
object (
|
Fields | |
---|---|
labels
|
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 An object containing a list of |
annotations
|
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 This field follows Kubernetes annotations' namespacing, limits, and rules. An object containing a list of |
parallelism
|
Optional. Specifies the maximum desired number of tasks the execution should run at given time. 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. |
taskCount
|
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. |
template
|
Required. Describes the task(s) that will be created when executing an execution. |
ExecutionReference
Reference to an Execution. Use /Executions.GetExecution with the given name to get full execution including the latest status.
JSON representation |
---|
{
"name"
:
string
,
"createTime"
:
string
,
"completionTime"
:
string
,
"deleteTime"
:
string
,
"completionStatus"
:
enum (
|
Fields | |
---|---|
name
|
Name of the execution. |
createTime
|
Creation timestamp of the execution. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
completionTime
|
Creation timestamp of the execution. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
deleteTime
|
The deletion time of the execution. It is only populated as a response to a Delete request. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
completionStatus
|
Status for the execution completion. |
CompletionStatus
Possible execution completion status.
Enums | |
---|---|
COMPLETION_STATUS_UNSPECIFIED
|
The default value. This value is used if the state is omitted. |
EXECUTION_SUCCEEDED
|
Job execution has succeeded. |
EXECUTION_FAILED
|
Job execution has failed. |
EXECUTION_RUNNING
|
Job execution is running normally. |
EXECUTION_PENDING
|
Waiting for backing resources to be provisioned. |
EXECUTION_CANCELLED
|
Job execution has been cancelled by the user. |
Methods |
|
---|---|
|
Creates a Job. |
|
Deletes a Job. |
|
Gets information about a Job. |
|
Gets the IAM Access Control policy currently in effect for the given Job. |
|
Lists Jobs. |
|
Updates a Job. |
|
Triggers creation of a new Execution of this Job. |
|
Sets the IAM Access control policy for the specified Job. |
|
Returns permissions that a caller has on the specified Project. |