Skip to main content

notebook_runtime_templates

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

Overview

Namenotebook_runtime_templates
TypeResource
Idgoogle.aiplatform.notebook_runtime_templates

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringThe resource name of the NotebookRuntimeTemplate.
createTimestring (google-datetime)Output only. Timestamp when this NotebookRuntimeTemplate was created.
dataPersistentDiskSpecobjectOptional. The specification of persistent disk attached to the runtime as data disk storage. (id: GoogleCloudAiplatformV1PersistentDiskSpec)
descriptionstringThe description of the NotebookRuntimeTemplate.
displayNamestringRequired. The display name of the NotebookRuntimeTemplate. 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 runtime. (id: GoogleCloudAiplatformV1EncryptionSpec)
etagstringUsed to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
eucConfigobjectEUC configuration of the NotebookRuntimeTemplate. (id: GoogleCloudAiplatformV1NotebookEucConfig)
idleShutdownConfigobjectThe idle shutdown configuration of NotebookRuntimeTemplate. This config will only be set when idle shutdown is enabled. (id: GoogleCloudAiplatformV1NotebookIdleShutdownConfig)
isDefaultbooleanOutput only. Deprecated: This field has no behavior. Use notebook_runtime_type = 'ONE_CLICK' instead. The default template to use if not specified.
labelsobjectThe labels with user-defined metadata to organize the NotebookRuntimeTemplates. 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.
machineSpecobjectOptional. Immutable. The specification of a single machine for the template. (id: GoogleCloudAiplatformV1MachineSpec)
networkSpecobjectOptional. Network spec. (id: GoogleCloudAiplatformV1NetworkSpec)
networkTagsarrayOptional. The Compute Engine tags to add to runtime (see Tagging instances).
notebookRuntimeTypestringOptional. Immutable. The type of the notebook runtime template.
reservationAffinityobjectOptional. Reservation Affinity of the notebook runtime template. (id: GoogleCloudAiplatformV1NotebookReservationAffinity)
serviceAccountstringDeprecated: This field is ignored and the "Vertex AI Notebook Service Account" (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is used for the runtime workload identity. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account for more details. For NotebookExecutionJob, use NotebookExecutionJob.service_account instead. The service account that the runtime workload runs as. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the Compute Engine default service account is used.
shieldedVmConfigobjectOptional. Immutable. Runtime Shielded VM spec. (id: GoogleCloudAiplatformV1ShieldedVmConfig)
softwareConfigobjectOptional. The notebook software configuration of the notebook runtime. (id: GoogleCloudAiplatformV1NotebookSoftwareConfig)
updateTimestring (google-datetime)Output only. Timestamp when this NotebookRuntimeTemplate was most recently updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, notebookRuntimeTemplatesIdGets a NotebookRuntimeTemplate.
listselectprojectsId, locationsIdfilter, pageSize, pageToken, readMask, orderByLists NotebookRuntimeTemplates in a Location.
createinsertprojectsId, locationsIdnotebookRuntimeTemplateIdCreates a NotebookRuntimeTemplate.
patchupdateprojectsId, locationsId, notebookRuntimeTemplatesIdupdateMaskUpdates a NotebookRuntimeTemplate.
deletedeleteprojectsId, locationsId, notebookRuntimeTemplatesIdDeletes a NotebookRuntimeTemplate.

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
notebookRuntimeTemplatesIdstring
projectsIdstring
filterstring
notebookRuntimeTemplateIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
readMaskstring (google-fieldmask)
updateMaskstring (google-fieldmask)

SELECT examples

Gets a NotebookRuntimeTemplate.

SELECT
name,
createTime,
dataPersistentDiskSpec,
description,
displayName,
encryptionSpec,
etag,
eucConfig,
idleShutdownConfig,
isDefault,
labels,
machineSpec,
networkSpec,
networkTags,
notebookRuntimeType,
reservationAffinity,
serviceAccount,
shieldedVmConfig,
softwareConfig,
updateTime
FROM google.aiplatform.notebook_runtime_templates
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND notebookRuntimeTemplatesId = '{{ notebookRuntimeTemplatesId }}' -- required;

INSERT examples

Creates a NotebookRuntimeTemplate.

INSERT INTO google.aiplatform.notebook_runtime_templates (
data__name,
data__displayName,
data__description,
data__machineSpec,
data__dataPersistentDiskSpec,
data__networkSpec,
data__serviceAccount,
data__etag,
data__labels,
data__idleShutdownConfig,
data__eucConfig,
data__notebookRuntimeType,
data__shieldedVmConfig,
data__networkTags,
data__reservationAffinity,
data__encryptionSpec,
data__softwareConfig,
projectsId,
locationsId,
notebookRuntimeTemplateId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ machineSpec }}',
'{{ dataPersistentDiskSpec }}',
'{{ networkSpec }}',
'{{ serviceAccount }}',
'{{ etag }}',
'{{ labels }}',
'{{ idleShutdownConfig }}',
'{{ eucConfig }}',
'{{ notebookRuntimeType }}',
'{{ shieldedVmConfig }}',
'{{ networkTags }}',
'{{ reservationAffinity }}',
'{{ encryptionSpec }}',
'{{ softwareConfig }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ notebookRuntimeTemplateId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates a NotebookRuntimeTemplate.

UPDATE google.aiplatform.notebook_runtime_templates
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__machineSpec = '{{ machineSpec }}',
data__dataPersistentDiskSpec = '{{ dataPersistentDiskSpec }}',
data__networkSpec = '{{ networkSpec }}',
data__serviceAccount = '{{ serviceAccount }}',
data__etag = '{{ etag }}',
data__labels = '{{ labels }}',
data__idleShutdownConfig = '{{ idleShutdownConfig }}',
data__eucConfig = '{{ eucConfig }}',
data__notebookRuntimeType = '{{ notebookRuntimeType }}',
data__shieldedVmConfig = '{{ shieldedVmConfig }}',
data__networkTags = '{{ networkTags }}',
data__reservationAffinity = '{{ reservationAffinity }}',
data__encryptionSpec = '{{ encryptionSpec }}',
data__softwareConfig = '{{ softwareConfig }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND notebookRuntimeTemplatesId = '{{ notebookRuntimeTemplatesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
dataPersistentDiskSpec,
description,
displayName,
encryptionSpec,
etag,
eucConfig,
idleShutdownConfig,
isDefault,
labels,
machineSpec,
networkSpec,
networkTags,
notebookRuntimeType,
reservationAffinity,
serviceAccount,
shieldedVmConfig,
softwareConfig,
updateTime;

DELETE examples

Deletes a NotebookRuntimeTemplate.

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