Skip to main content

instances

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

Overview

Nameinstances
TypeResource
Idgoogle.notebooks.instances

Fields

NameDatatypeDescription
idstringOutput only. Unique ID of the resource.
namestringOutput only. The name of this notebook instance. Format: projects/{project_id}/locations/{location}/instances/{instance_id}
createTimestringOutput only. Instance creation time.
creatorstringOutput only. Email address of entity that sent original CreateInstance request.
disableProxyAccessbooleanOptional. If true, the notebook instance will not register with the proxy.
gceSetupobjectThe definition of how to configure a VM instance outside of Resources and Identity.
healthInfoobjectOutput only. Additional information about instance health. Example: healthInfo": { "docker_proxy_agent_status": "1", "docker_status": "1", "jupyterlab_api_status": "-1", "jupyterlab_status": "-1", "updated": "2020-10-18 09:40:03.573409" }
healthStatestringOutput only. Instance health_state.
instanceOwnersarrayOptional. Input only. The owner of this instance after creation. Format: alias@example.com Currently supports one owner only. If not specified, all of the service account users of your VM instance's service account can use the instance.
labelsobjectOptional. Labels to apply to this instance. These can be later modified by the UpdateInstance method.
proxyUristringOutput only. The proxy endpoint that is used to access the Jupyter notebook.
satisfiesPzibooleanOutput only. Reserved for future use for Zone Isolation.
satisfiesPzsbooleanOutput only. Reserved for future use for Zone Separation.
statestringOutput only. The state of this instance.
thirdPartyProxyUrlstringOutput only. The workforce pools proxy endpoint that is used to access the Jupyter notebook.
updateTimestringOutput only. Instance update time.
upgradeHistoryarrayOutput only. The upgrade history of this instance.

Methods

NameAccessible byRequired ParamsDescription
getSELECTinstancesId, locationsId, projectsIdGets details of a single Instance.
listSELECTlocationsId, projectsIdLists instances in a given project and location.
createINSERTlocationsId, projectsIdCreates a new Instance in a given project and location.
deleteDELETEinstancesId, locationsId, projectsIdDeletes a single Instance.
patchUPDATEinstancesId, locationsId, projectsIdUpdateInstance updates an Instance.
check_upgradabilityEXECinstancesId, locationsId, projectsIdChecks whether a notebook instance is upgradable.
diagnoseEXECinstancesId, locationsId, projectsIdCreates a Diagnostic File and runs Diagnostic Tool given an Instance.
report_info_systemEXECinstancesId, locationsId, projectsIdAllows notebook instances to report their latest instance information to the Notebooks API server. The server will merge the reported information to the instance metadata store. Do not use this method directly.
resetEXECinstancesId, locationsId, projectsIdResets a notebook instance.
resize_diskEXECinstancesId, locationsId, projectsIdResize a notebook instance disk to a higher capacity.
restoreEXECinstancesId, locationsId, projectsIdRestoreInstance restores an Instance from a BackupSource.
rollbackEXECinstancesId, locationsId, projectsIdRollbacks a notebook instance to the previous version.
startEXECinstancesId, locationsId, projectsIdStarts a notebook instance.
stopEXECinstancesId, locationsId, projectsIdStops a notebook instance.
upgradeEXECinstancesId, locationsId, projectsIdUpgrades a notebook instance to the latest version.
upgrade_systemEXECinstancesId, locationsId, projectsIdAllows notebook instances to upgrade themselves. Do not use this method directly.

SELECT examples

Lists instances in a given project and location.

SELECT
id,
name,
createTime,
creator,
disableProxyAccess,
gceSetup,
healthInfo,
healthState,
instanceOwners,
labels,
proxyUri,
satisfiesPzi,
satisfiesPzs,
state,
thirdPartyProxyUrl,
updateTime,
upgradeHistory
FROM google.notebooks.instances
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.notebooks.instances (
locationsId,
projectsId,
gceSetup,
instanceOwners,
disableProxyAccess,
labels
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ gceSetup }}',
'{{ instanceOwners }}',
{{ disableProxyAccess }},
'{{ labels }}'
;

UPDATE example

Updates a instances resource.

/*+ update */
UPDATE google.notebooks.instances
SET
gceSetup = '{{ gceSetup }}',
instanceOwners = '{{ instanceOwners }}',
disableProxyAccess = true|false,
labels = '{{ labels }}'
WHERE
instancesId = '{{ instancesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified instances resource.

/*+ delete */
DELETE FROM google.notebooks.instances
WHERE instancesId = '{{ instancesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';