REST Resource: namespaces.jobs

Resource: Job

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

JSON representation
{
  "apiVersion": string,
  "kind": string,
  "metadata": {
    object (ObjectMeta)
  },
  "spec": {
    object (JobSpec)
  },
  "status": {
    object (JobStatus)
  }
}
Fields
apiVersion

string

Optional. APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.

kind

string

Optional. Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase.

metadata

object (ObjectMeta)

Optional. Standard object's metadata.

spec

object (JobSpec)

Optional. Specification of the desired behavior of a job.

status

object (JobStatus)

Output only. Current status of a job.

JobSpec

JobSpec describes how the job will look.

JSON representation
{
  "template": {
    object (ExecutionTemplateSpec)
  },

  // Union field create_execution can be only one of the following:
  "startExecutionToken": string,
  "runExecutionToken": string
  // End of list of possible types for union field create_execution.
}
Fields
template

object (ExecutionTemplateSpec)

Optional. Describes the execution that will be created when running a job.

Union field create_execution.

create_execution can be only one of the following:

startExecutionToken

string

A unique string used as a suffix for 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.

ExecutionTemplateSpec

ExecutionTemplateSpec describes the metadata and spec an Execution should have when created from a job.

JSON representation
{
  "metadata": {
    object (ObjectMeta)
  },
  "spec": {
    object (ExecutionSpec)
  }
}
Fields
metadata

object (ObjectMeta)

Optional. Optional metadata for this Execution, including labels and annotations.

The following annotation keys set properties of the created execution:

  • run.googleapis.com/cloudsql-instances sets Cloud SQL connections. Multiple values should be comma separated.
  • run.googleapis.com/vpc-access-connector sets a Serverless VPC Access connector.
  • run.googleapis.com/vpc-access-egress sets VPC egress. Supported values are all-traffic, all (deprecated), and private-ranges-only. all-traffic and all provide the same functionality. all is deprecated but will continue to be supported. Prefer all-traffic.
spec

object (ExecutionSpec)

Required. ExecutionSpec holds the desired configuration for executions of this job.

JobStatus

JobStatus represents the current state of a Job.

JSON representation
{
  "observedGeneration": integer,
  "conditions": [
    {
      object (Condition)
    }
  ],
  "executionCount": integer,
  "latestCreatedExecution": {
    object (ExecutionReference)
  }
}
Fields
observedGeneration

integer

The 'generation' of the job that was last processed by the controller.

conditions[]

object (Condition)

Conditions communicate information about ongoing/complete reconciliation processes that bring the "spec" inline with the observed state of the world.

Job-specific conditions include:

  • Ready: True when the job is ready to be executed.
executionCount

integer

Number of executions created for this job.

latestCreatedExecution

object (ExecutionReference)

A pointer to the most recently created execution for this job. This is set regardless of the eventual state of the 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,
  "creationTimestamp": string,
  "completionTimestamp": string
}
Fields
name

string

Optional. Name of the execution.

creationTimestamp

string (Timestamp format)

Optional. Creation timestamp of the execution.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

completionTimestamp

string (Timestamp format)

Optional. Completion timestamp of the execution.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Methods

create

Create a job.

delete

Delete a job.

get

Get information about a job.

list

List jobs.

replaceJob

Replace a job.

run

Trigger creation of a new execution of this job.