Skip to main content

notebook_execution_jobs

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

Overview

Namenotebook_execution_jobs
TypeResource
Idgoogle.aiplatform.notebook_execution_jobs

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The resource name of this NotebookExecutionJob. Format: projects/{project_id}/locations/{location}/notebookExecutionJobs/{job_id}
createTimestring (google-datetime)Output only. Timestamp when this NotebookExecutionJob was created.
customEnvironmentSpecobjectThe custom compute configuration for an execution job. (id: GoogleCloudAiplatformV1NotebookExecutionJobCustomEnvironmentSpec)
dataformRepositorySourceobjectThe Dataform Repository pointing to a single file notebook repository. (id: GoogleCloudAiplatformV1NotebookExecutionJobDataformRepositorySource)
directNotebookSourceobjectThe contents of an input notebook file. (id: GoogleCloudAiplatformV1NotebookExecutionJobDirectNotebookSource)
displayNamestringThe display name of the NotebookExecutionJob. The name can be up to 128 characters long and can consist of any UTF-8 characters.
encryptionSpecobjectCustomer-managed encryption key spec for the notebook execution job. This field is auto-populated if the NotebookRuntimeTemplate has an encryption spec. (id: GoogleCloudAiplatformV1EncryptionSpec)
executionTimeoutstring (google-duration)Max running time of the execution job in seconds (default 86400s / 24 hrs).
executionUserstringThe user email to run the execution as. Only supported by Colab runtimes.
gcsNotebookSourceobjectThe Cloud Storage url pointing to the ipynb file. Format: gs://bucket/notebook_file.ipynb (id: GoogleCloudAiplatformV1NotebookExecutionJobGcsNotebookSource)
gcsOutputUristringThe Cloud Storage location to upload the result to. Format: gs://bucket-name
jobStatestringOutput only. The state of the NotebookExecutionJob.
kernelNamestringThe name of the kernel to use during notebook execution. If unset, the default kernel is used.
labelsobjectThe labels with user-defined metadata to organize NotebookExecutionJobs. 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. System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable.
notebookRuntimeTemplateResourceNamestringThe NotebookRuntimeTemplate to source compute configuration from.
scheduleResourceNamestringThe Schedule resource name if this job is triggered by one. Format: projects/{project_id}/locations/{location}/schedules/{schedule_id}
serviceAccountstringThe service account to run the execution as.
statusobjectThe 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)
updateTimestring (google-datetime)Output only. Timestamp when this NotebookExecutionJob was most recently updated.
workbenchRuntimeobjectThe Workbench runtime configuration to use for the notebook execution. (id: GoogleCloudAiplatformV1NotebookExecutionJobWorkbenchRuntime)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, notebookExecutionJobsIdviewGets a NotebookExecutionJob.
listselectprojectsId, locationsIdfilter, pageSize, pageToken, orderBy, viewLists NotebookExecutionJobs in a Location.
createinsertprojectsId, locationsIdnotebookExecutionJobIdCreates a NotebookExecutionJob.
deletedeleteprojectsId, locationsId, notebookExecutionJobsIdDeletes a NotebookExecutionJob.

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
notebookExecutionJobsIdstring
projectsIdstring
filterstring
notebookExecutionJobIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
viewstring

SELECT examples

Gets a NotebookExecutionJob.

SELECT
name,
createTime,
customEnvironmentSpec,
dataformRepositorySource,
directNotebookSource,
displayName,
encryptionSpec,
executionTimeout,
executionUser,
gcsNotebookSource,
gcsOutputUri,
jobState,
kernelName,
labels,
notebookRuntimeTemplateResourceName,
scheduleResourceName,
serviceAccount,
status,
updateTime,
workbenchRuntime
FROM google.aiplatform.notebook_execution_jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND notebookExecutionJobsId = '{{ notebookExecutionJobsId }}' -- required
AND view = '{{ view }}';

INSERT examples

Creates a NotebookExecutionJob.

INSERT INTO google.aiplatform.notebook_execution_jobs (
data__dataformRepositorySource,
data__gcsNotebookSource,
data__directNotebookSource,
data__notebookRuntimeTemplateResourceName,
data__customEnvironmentSpec,
data__gcsOutputUri,
data__executionUser,
data__serviceAccount,
data__workbenchRuntime,
data__displayName,
data__executionTimeout,
data__scheduleResourceName,
data__labels,
data__kernelName,
data__encryptionSpec,
projectsId,
locationsId,
notebookExecutionJobId
)
SELECT
'{{ dataformRepositorySource }}',
'{{ gcsNotebookSource }}',
'{{ directNotebookSource }}',
'{{ notebookRuntimeTemplateResourceName }}',
'{{ customEnvironmentSpec }}',
'{{ gcsOutputUri }}',
'{{ executionUser }}',
'{{ serviceAccount }}',
'{{ workbenchRuntime }}',
'{{ displayName }}',
'{{ executionTimeout }}',
'{{ scheduleResourceName }}',
'{{ labels }}',
'{{ kernelName }}',
'{{ encryptionSpec }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ notebookExecutionJobId }}'
RETURNING
name,
done,
error,
metadata,
response
;

DELETE examples

Deletes a NotebookExecutionJob.

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