custom_jobs
Creates, updates, deletes, gets or lists a custom_jobs resource.
Overview
| Name | custom_jobs |
| Type | Resource |
| Id | google.aiplatform.custom_jobs |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Resource name of a CustomJob. |
createTime | string (google-datetime) | Output only. Time when the CustomJob was created. |
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. |
encryptionSpec | object | 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. (id: GoogleCloudAiplatformV1EncryptionSpec) |
endTime | string (google-datetime) | Output only. Time when the CustomJob entered any of the following states: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED. |
error | object | 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. 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. (id: GoogleRpcStatus) |
jobSpec | object | Required. Job spec. (id: GoogleCloudAiplatformV1CustomJobSpec) |
labels | object | 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. |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
startTime | string (google-datetime) | Output only. Time when the CustomJob for the first time entered the JOB_STATE_RUNNING state. |
state | string | Output only. The detailed state of the job. |
updateTime | string (google-datetime) | Output only. Time when the CustomJob was most recently updated. |
webAccessUris | object | Output only. URIs for accessing interactive shells (one URI for each training node). Only available if job_spec.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. |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Resource name of a CustomJob. |
createTime | string (google-datetime) | Output only. Time when the CustomJob was created. |
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. |
encryptionSpec | object | 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. (id: GoogleCloudAiplatformV1EncryptionSpec) |
endTime | string (google-datetime) | Output only. Time when the CustomJob entered any of the following states: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED. |
error | object | 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. 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. (id: GoogleRpcStatus) |
jobSpec | object | Required. Job spec. (id: GoogleCloudAiplatformV1CustomJobSpec) |
labels | object | 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. |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
startTime | string (google-datetime) | Output only. Time when the CustomJob for the first time entered the JOB_STATE_RUNNING state. |
state | string | Output only. The detailed state of the job. |
updateTime | string (google-datetime) | Output only. Time when the CustomJob was most recently updated. |
webAccessUris | object | Output only. URIs for accessing interactive shells (one URI for each training node). Only available if job_spec.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
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, customJobsId | Gets a CustomJob. | |
list | select | projectsId, locationsId | filter, pageSize, pageToken, readMask | Lists CustomJobs in a Location. |
create | insert | projectsId, locationsId | Creates a CustomJob. A created CustomJob right away will be attempted to be run. | |
delete | delete | projectsId, locationsId, customJobsId | Deletes a CustomJob. | |
cancel | exec | projectsId, locationsId, customJobsId | Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetCustomJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a CustomJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and CustomJob.state is set to CANCELLED. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
customJobsId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
readMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets a CustomJob.
SELECT
name,
createTime,
displayName,
encryptionSpec,
endTime,
error,
jobSpec,
labels,
satisfiesPzi,
satisfiesPzs,
startTime,
state,
updateTime,
webAccessUris
FROM google.aiplatform.custom_jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND customJobsId = '{{ customJobsId }}' -- required
;
Lists CustomJobs in a Location.
SELECT
name,
createTime,
displayName,
encryptionSpec,
endTime,
error,
jobSpec,
labels,
satisfiesPzi,
satisfiesPzs,
startTime,
state,
updateTime,
webAccessUris
FROM google.aiplatform.custom_jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND readMask = '{{ readMask }}'
;
INSERT examples
- create
- Manifest
Creates a CustomJob. A created CustomJob right away will be attempted to be run.
INSERT INTO google.aiplatform.custom_jobs (
data__jobSpec,
data__encryptionSpec,
data__displayName,
data__labels,
projectsId,
locationsId
)
SELECT
'{{ jobSpec }}',
'{{ encryptionSpec }}',
'{{ displayName }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
createTime,
displayName,
encryptionSpec,
endTime,
error,
jobSpec,
labels,
satisfiesPzi,
satisfiesPzs,
startTime,
state,
updateTime,
webAccessUris
;
# Description fields are for documentation purposes
- name: custom_jobs
props:
- name: projectsId
value: string
description: Required parameter for the custom_jobs resource.
- name: locationsId
value: string
description: Required parameter for the custom_jobs resource.
- name: jobSpec
value: object
description: >
Required. Job spec.
- name: encryptionSpec
value: object
description: >
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.
- name: displayName
value: string
description: >
Required. The display name of the CustomJob. The name can be up to 128 characters long and can consist of any UTF-8 characters.
- name: labels
value: object
description: >
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.
DELETE examples
- delete
Deletes a CustomJob.
DELETE FROM google.aiplatform.custom_jobs
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND customJobsId = '{{ customJobsId }}' --required
;
Lifecycle Methods
- cancel
Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetCustomJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a CustomJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and CustomJob.state is set to CANCELLED.
EXEC google.aiplatform.custom_jobs.cancel
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@customJobsId='{{ customJobsId }}' --required
;