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

Fields
namestring

Output only. Resource name of a CustomJob.

displayNamestring

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

jobSpecobject (CustomJobSpec)

Required. Job spec.

stateenum (JobState)

Output only. The detailed state of the job.

createTimestring (Timestamp format)

Output only. time when the CustomJob was created.

Uses RFC 3339, where generated output will always be Z-normalized and use 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".

startTimestring (Timestamp format)

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

Uses RFC 3339, where generated output will always be Z-normalized and use 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".

endTimestring (Timestamp format)

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

Uses RFC 3339, where generated output will always be Z-normalized and use 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".

updateTimestring (Timestamp format)

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

Uses RFC 3339, where generated output will always be Z-normalized and use 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".

errorobject (Status)

Output only. Only populated when job's state isJOB_STATE_FAILED orJOB_STATE_CANCELLED.

labelsmap (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.

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

encryptionSpecobject (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.

webAccessUrismap (key: string, value: string)

Output only. URIs for accessinginteractive shells (one URI for each training node). Only available ifjobSpec.enable_web_access istrue.

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, andworkerpool1-1 for the second node in the second worker pool.

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

satisfiesPzsboolean

Output only. reserved for future use.

satisfiesPziboolean

Output only. reserved for future use.

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,...},"satisfiesPzs":boolean,"satisfiesPzi":boolean}

Methods

cancel

Cancels a CustomJob.

create

Creates a CustomJob.

delete

Deletes a CustomJob.

get

Gets a CustomJob.

list

Lists CustomJobs in a Location.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-09-22 UTC.