REST Resource: projects.locations.customJobs

Resource: CustomJob

Represents a job that runs custom workloads such as a Docker container or a Python package. A CustomJob can have multiple worker pools and each worker pool can have its own machine and input spec. A CustomJob will be cleaned up once the job enters terminal state (failed or succeeded).

JSON representation
{
  "name": string,
  "displayName": string,
  "jobSpec": {
    object (CustomJobSpec)
  },
  "state": enum (JobState),
  "createTime": string,
  "startTime": string,
  "endTime": string,
  "updateTime": string,
  "error": {
    object (Status)
  },
  "labels": {
    string: string,
    ...
  },
  "encryptionSpec": {
    object (EncryptionSpec)
  },
  "webAccessUris": {
    string: string,
    ...
  }
}
Fields
name

string

Output only. Resource name of a CustomJob.

displayName

string

Required. The display name of the CustomJob. The name can be up to 128 characters long and can consist of any UTF-8 characters.

jobSpec

object (CustomJobSpec)

Required. Job spec.

state

enum (JobState)

Output only. The detailed state of the job.

createTime

string (Timestamp format)

Output only. time when the CustomJob was created.

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

startTime

string (Timestamp format)

Output only. time when the CustomJob for the first time entered the JOB_STATE_RUNNING state.

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

endTime

string (Timestamp format)

Output only. time when the CustomJob entered any of the following states: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED.

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

updateTime

string (Timestamp format)

Output only. time when the CustomJob was most recently updated.

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

error

object (Status)

Output only. Only populated when job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED.

labels

map (key: string, value: string)

The labels with user-defined metadata to organize CustomJobs.

label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed.

See https://goo.gl/xmQnxf for more information and examples of labels.

encryptionSpec

object (EncryptionSpec)

Customer-managed encryption key options for a CustomJob. If this is set, then all resources created by the CustomJob will be encrypted with the provided encryption key.

webAccessUris

map (key: string, value: string)

Output only. URIs for accessing interactive shells (one URI for each training node). Only available if jobSpec.enable_web_access is true.

The keys are names of each node in the training job; for example, workerpool0-0 for the primary node, workerpool1-0 for the first node in the second worker pool, and workerpool1-1 for the second node in the second worker pool.

The values are the URIs for each node's interactive shell.

Methods

cancel

Cancels a CustomJob.

create

Creates a CustomJob.

delete

Deletes a CustomJob.

get

Gets a CustomJob.

list

Lists CustomJobs in a Location.