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

NameDatatypeDescription
namestringOutput only. The resource name of this NotebookExecutionJob. Format: projects/{project_id}/locations/{location}/notebookExecutionJobs/{job_id}
createTimestringOutput only. Timestamp when this NotebookExecutionJob was created.
dataformRepositorySourceobjectThe Dataform Repository containing the input notebook.
directNotebookSourceobjectThe content of the input notebook in ipynb format.
displayNamestringThe display name of the NotebookExecutionJob. The name can be up to 128 characters long and can consist of any UTF-8 characters.
encryptionSpecobjectRepresents a customer-managed encryption key spec that can be applied to a top-level resource.
executionTimeoutstringMax 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 uri for the input notebook.
gcsOutputUristringThe Cloud Storage location to upload the result to. Format: gs://bucket-name
jobStatestringOutput only. The state of the NotebookExecutionJob.
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.
scheduleResourceNamestringOutput only. The 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.
updateTimestringOutput only. Timestamp when this NotebookExecutionJob was most recently updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, notebookExecutionJobsId, projectsIdGets a NotebookExecutionJob.
listSELECTlocationsId, projectsIdLists NotebookExecutionJobs in a Location.
createINSERTlocationsId, projectsIdCreates a NotebookExecutionJob.
deleteDELETElocationsId, notebookExecutionJobsId, projectsIdDeletes a NotebookExecutionJob.

SELECT examples

Lists NotebookExecutionJobs in a Location.

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

INSERT example

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

/*+ create */
INSERT INTO google.aiplatform.notebook_execution_jobs (
locationsId,
projectsId,
executionTimeout,
notebookRuntimeTemplateResourceName,
labels,
directNotebookSource,
displayName,
serviceAccount,
gcsNotebookSource,
executionUser,
gcsOutputUri,
encryptionSpec,
dataformRepositorySource
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ executionTimeout }}',
'{{ notebookRuntimeTemplateResourceName }}',
'{{ labels }}',
'{{ directNotebookSource }}',
'{{ displayName }}',
'{{ serviceAccount }}',
'{{ gcsNotebookSource }}',
'{{ executionUser }}',
'{{ gcsOutputUri }}',
'{{ encryptionSpec }}',
'{{ dataformRepositorySource }}'
;

DELETE example

Deletes the specified notebook_execution_jobs resource.

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