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

NameDatatypeDescription
namestringOutput only. Resource name of the NasJob.
createTimestringOutput 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.
encryptionSpecobjectRepresents a customer-managed encryption key spec that can be applied to a top-level resource.
endTimestringOutput only. Time when the NasJob entered any of the following states: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED.
errorobjectThe 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.
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.
nasJobOutputobjectRepresents a uCAIP NasJob output.
nasJobSpecobjectRepresents the spec of a NasJob.
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
startTimestringOutput only. Time when the NasJob for the first time entered the JOB_STATE_RUNNING state.
statestringOutput only. The detailed state of the job.
updateTimestringOutput only. Time when the NasJob was most recently updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, nasJobsId, projectsIdGets a NasJob
listSELECTlocationsId, projectsIdLists NasJobs in a Location.
createINSERTlocationsId, projectsIdCreates a NasJob
deleteDELETElocationsId, nasJobsId, projectsIdDeletes a NasJob.
cancelEXEClocationsId, nasJobsId, projectsIdCancels 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.

SELECT examples

Lists NasJobs in a Location.

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

INSERT example

Use the following StackQL query and manifest file to create a new nas_jobs resource.

/*+ create */
INSERT INTO google.aiplatform.nas_jobs (
locationsId,
projectsId,
enableRestrictedImageTraining,
labels,
nasJobSpec,
displayName,
encryptionSpec
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
{{ enableRestrictedImageTraining }},
'{{ labels }}',
'{{ nasJobSpec }}',
'{{ displayName }}',
'{{ encryptionSpec }}'
;

DELETE example

Deletes the specified nas_jobs resource.

/*+ delete */
DELETE FROM google.aiplatform.nas_jobs
WHERE locationsId = '{{ locationsId }}'
AND nasJobsId = '{{ nasJobsId }}'
AND projectsId = '{{ projectsId }}';