Skip to main content

nas_jobs

Creates, updates, deletes, gets or lists a nas_jobs resource.

Overview

Namenas_jobs
TypeResource
Idgoogle.aiplatform.nas_jobs

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. Resource name of the NasJob.
createTimestring (google-datetime)Output only. Time when the NasJob was created.
displayNamestringRequired. The display name of the NasJob. The name can be up to 128 characters long and can consist of any UTF-8 characters.
enableRestrictedImageTrainingbooleanOptional. Enable a separation of Custom model training and restricted image training for tenant project.
encryptionSpecobjectCustomer-managed encryption key options for a NasJob. If this is set, then all resources created by the NasJob will be encrypted with the provided encryption key. (id: GoogleCloudAiplatformV1EncryptionSpec)
endTimestring (google-datetime)Output only. Time when the NasJob entered any of the following states: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED.
errorobjectOutput only. Only populated when job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED. (id: GoogleRpcStatus)
labelsobjectThe labels with user-defined metadata to organize NasJobs. 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.
nasJobOutputobjectOutput only. Output of the NasJob. (id: GoogleCloudAiplatformV1NasJobOutput)
nasJobSpecobjectRequired. The specification of a NasJob. (id: GoogleCloudAiplatformV1NasJobSpec)
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
startTimestring (google-datetime)Output only. Time when the NasJob for the first time entered the JOB_STATE_RUNNING state.
statestringOutput only. The detailed state of the job.
updateTimestring (google-datetime)Output only. Time when the NasJob was most recently updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, nasJobsIdGets a NasJob
listselectprojectsId, locationsIdfilter, pageSize, pageToken, readMaskLists NasJobs in a Location.
createinsertprojectsId, locationsIdCreates a NasJob
deletedeleteprojectsId, locationsId, nasJobsIdDeletes a NasJob.
cancelexecprojectsId, locationsId, nasJobsIdCancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetNasJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the NasJob is not deleted; instead it becomes a job with a NasJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and NasJob.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.

NameDatatypeDescription
locationsIdstring
nasJobsIdstring
projectsIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring
readMaskstring (google-fieldmask)

SELECT examples

Gets a NasJob

SELECT
name,
createTime,
displayName,
enableRestrictedImageTraining,
encryptionSpec,
endTime,
error,
labels,
nasJobOutput,
nasJobSpec,
satisfiesPzi,
satisfiesPzs,
startTime,
state,
updateTime
FROM google.aiplatform.nas_jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND nasJobsId = '{{ nasJobsId }}' -- required;

INSERT examples

Creates a NasJob

INSERT INTO google.aiplatform.nas_jobs (
data__displayName,
data__nasJobSpec,
data__labels,
data__encryptionSpec,
data__enableRestrictedImageTraining,
projectsId,
locationsId
)
SELECT
'{{ displayName }}',
'{{ nasJobSpec }}',
'{{ labels }}',
'{{ encryptionSpec }}',
{{ enableRestrictedImageTraining }},
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
createTime,
displayName,
enableRestrictedImageTraining,
encryptionSpec,
endTime,
error,
labels,
nasJobOutput,
nasJobSpec,
satisfiesPzi,
satisfiesPzs,
startTime,
state,
updateTime
;

DELETE examples

Deletes a NasJob.

DELETE FROM google.aiplatform.nas_jobs
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND nasJobsId = '{{ nasJobsId }}' --required;

Lifecycle Methods

Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetNasJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the NasJob is not deleted; instead it becomes a job with a NasJob.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and NasJob.state is set to CANCELLED.

EXEC google.aiplatform.nas_jobs.cancel 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@nasJobsId='{{ nasJobsId }}' --required;