instances
Creates, updates, deletes, gets or lists an instances resource.
Overview
| Name | instances |
| Type | Resource |
| Id | google.notebooks.instances |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Output only. Unique ID of the resource. |
name | string | Output only. Identifier. The name of this notebook instance. Format: projects/{project_id}/locations/{location}/instances/{instance_id} |
createTime | string (google-datetime) | Output only. Instance creation time. |
creator | string | Output only. Email address of entity that sent original CreateInstance request. |
disableProxyAccess | boolean | Optional. If true, the notebook instance will not register with the proxy. |
enableDeletionProtection | boolean | Optional. If true, deletion protection will be enabled for this Workbench Instance. If false, deletion protection will be disabled for this Workbench Instance. |
enableManagedEuc | boolean | Optional. Flag to enable managed end user credentials for the instance. |
enableThirdPartyIdentity | boolean | Optional. Flag that specifies that a notebook can be accessed with third party identity provider. |
gceSetup | object | Optional. Compute Engine setup for the notebook. Uses notebook-defined fields. (id: GceSetup) |
healthInfo | object | Output 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" } |
healthState | string | Output only. Instance health_state. |
instanceOwners | array | Optional. 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. |
labels | object | Optional. Labels to apply to this instance. These can be later modified by the UpdateInstance method. |
proxyUri | string | Output only. The proxy endpoint that is used to access the Jupyter notebook. |
satisfiesPzi | boolean | Output only. Reserved for future use for Zone Isolation. |
satisfiesPzs | boolean | Output only. Reserved for future use for Zone Separation. |
state | string | Output only. The state of this instance. |
thirdPartyProxyUrl | string | Output only. The workforce pools proxy endpoint that is used to access the Jupyter notebook. |
updateTime | string (google-datetime) | Output only. Instance update time. |
upgradeHistory | array | Output only. The upgrade history of this instance. |
| Name | Datatype | Description |
|---|---|---|
id | string | Output only. Unique ID of the resource. |
name | string | Output only. Identifier. The name of this notebook instance. Format: projects/{project_id}/locations/{location}/instances/{instance_id} |
createTime | string (google-datetime) | Output only. Instance creation time. |
creator | string | Output only. Email address of entity that sent original CreateInstance request. |
disableProxyAccess | boolean | Optional. If true, the notebook instance will not register with the proxy. |
enableDeletionProtection | boolean | Optional. If true, deletion protection will be enabled for this Workbench Instance. If false, deletion protection will be disabled for this Workbench Instance. |
enableManagedEuc | boolean | Optional. Flag to enable managed end user credentials for the instance. |
enableThirdPartyIdentity | boolean | Optional. Flag that specifies that a notebook can be accessed with third party identity provider. |
gceSetup | object | Optional. Compute Engine setup for the notebook. Uses notebook-defined fields. (id: GceSetup) |
healthInfo | object | Output 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" } |
healthState | string | Output only. Instance health_state. |
instanceOwners | array | Optional. 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. |
labels | object | Optional. Labels to apply to this instance. These can be later modified by the UpdateInstance method. |
proxyUri | string | Output only. The proxy endpoint that is used to access the Jupyter notebook. |
satisfiesPzi | boolean | Output only. Reserved for future use for Zone Isolation. |
satisfiesPzs | boolean | Output only. Reserved for future use for Zone Separation. |
state | string | Output only. The state of this instance. |
thirdPartyProxyUrl | string | Output only. The workforce pools proxy endpoint that is used to access the Jupyter notebook. |
updateTime | string (google-datetime) | Output only. Instance update time. |
upgradeHistory | array | Output only. The upgrade history of this instance. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, instancesId | Gets details of a single Instance. | |
list | select | projectsId, locationsId | orderBy, pageToken, filter, pageSize | Lists instances in a given project and location. |
create | insert | projectsId, locationsId | requestId, instanceId | Creates a new Instance in a given project and location. |
patch | update | projectsId, locationsId, instancesId | requestId, updateMask | UpdateInstance updates an Instance. |
delete | delete | projectsId, locationsId, instancesId | requestId | Deletes a single Instance. |
upgrade | exec | projectsId, locationsId, instancesId | Upgrades a notebook instance to the latest version. | |
reset | exec | projectsId, locationsId, instancesId | Resets a notebook instance. | |
check_upgradability | exec | projectsId, locationsId, instancesId | Checks whether a notebook instance is upgradable. | |
upgrade_system | exec | projectsId, locationsId, instancesId | Allows notebook instances to upgrade themselves. Do not use this method directly. | |
check_authorization | exec | projectsId, locationsId, instancesId | Initiated by Cloud Console for Oauth consent flow for Workbench Instances. Do not use this method directly. Design doc: go/wbi-euc:auth-dd | |
stop | exec | projectsId, locationsId, instancesId | Stops a notebook instance. | |
resize_disk | exec | projectsId, locationsId, instancesId | Resize a notebook instance disk to a higher capacity. | |
rollback | exec | projectsId, locationsId, instancesId | Rollbacks a notebook instance to the previous version. | |
diagnose | exec | projectsId, locationsId, instancesId | Creates a Diagnostic File and runs Diagnostic Tool given an Instance. | |
generate_access_token | exec | projectsId, locationsId, instancesId | Called by VM to return an EUC for the instance owner. Do not use this method directly. Design doc: go/wbi-euc:dd | |
start | exec | projectsId, locationsId, instancesId | Starts a notebook instance. | |
report_info_system | exec | projectsId, locationsId, instancesId | Allows 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. | |
restore | exec | projectsId, locationsId, instancesId | RestoreInstance restores an Instance from a BackupSource. |
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.
| Name | Datatype | Description |
|---|---|---|
instancesId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
instanceId | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets details of a single Instance.
SELECT
id,
name,
createTime,
creator,
disableProxyAccess,
enableDeletionProtection,
enableManagedEuc,
enableThirdPartyIdentity,
gceSetup,
healthInfo,
healthState,
instanceOwners,
labels,
proxyUri,
satisfiesPzi,
satisfiesPzs,
state,
thirdPartyProxyUrl,
updateTime,
upgradeHistory
FROM google.notebooks.instances
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND instancesId = '{{ instancesId }}' -- required
;
Lists instances in a given project and location.
SELECT
id,
name,
createTime,
creator,
disableProxyAccess,
enableDeletionProtection,
enableManagedEuc,
enableThirdPartyIdentity,
gceSetup,
healthInfo,
healthState,
instanceOwners,
labels,
proxyUri,
satisfiesPzi,
satisfiesPzs,
state,
thirdPartyProxyUrl,
updateTime,
upgradeHistory
FROM google.notebooks.instances
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
;
INSERT examples
- create
- Manifest
Creates a new Instance in a given project and location.
INSERT INTO google.notebooks.instances (
data__enableThirdPartyIdentity,
data__enableManagedEuc,
data__enableDeletionProtection,
data__instanceOwners,
data__gceSetup,
data__labels,
data__disableProxyAccess,
projectsId,
locationsId,
requestId,
instanceId
)
SELECT
{{ enableThirdPartyIdentity }},
{{ enableManagedEuc }},
{{ enableDeletionProtection }},
'{{ instanceOwners }}',
'{{ gceSetup }}',
'{{ labels }}',
{{ disableProxyAccess }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ requestId }}',
'{{ instanceId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: instances
props:
- name: projectsId
value: string
description: Required parameter for the instances resource.
- name: locationsId
value: string
description: Required parameter for the instances resource.
- name: enableThirdPartyIdentity
value: boolean
description: >
Optional. Flag that specifies that a notebook can be accessed with third party identity provider.
- name: enableManagedEuc
value: boolean
description: >
Optional. Flag to enable managed end user credentials for the instance.
- name: enableDeletionProtection
value: boolean
description: >
Optional. If true, deletion protection will be enabled for this Workbench Instance. If false, deletion protection will be disabled for this Workbench Instance.
- name: instanceOwners
value: array
description: >
Optional. 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.
- name: gceSetup
value: object
description: >
Optional. Compute Engine setup for the notebook. Uses notebook-defined fields.
- name: labels
value: object
description: >
Optional. Labels to apply to this instance. These can be later modified by the UpdateInstance method.
- name: disableProxyAccess
value: boolean
description: >
Optional. If true, the notebook instance will not register with the proxy.
- name: requestId
value: string
- name: instanceId
value: string
UPDATE examples
- patch
UpdateInstance updates an Instance.
UPDATE google.notebooks.instances
SET
data__enableThirdPartyIdentity = {{ enableThirdPartyIdentity }},
data__enableManagedEuc = {{ enableManagedEuc }},
data__enableDeletionProtection = {{ enableDeletionProtection }},
data__instanceOwners = '{{ instanceOwners }}',
data__gceSetup = '{{ gceSetup }}',
data__labels = '{{ labels }}',
data__disableProxyAccess = {{ disableProxyAccess }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND instancesId = '{{ instancesId }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a single Instance.
DELETE FROM google.notebooks.instances
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND instancesId = '{{ instancesId }}' --required
AND requestId = '{{ requestId }}'
;
Lifecycle Methods
- upgrade
- reset
- check_upgradability
- upgrade_system
- check_authorization
- stop
- resize_disk
- rollback
- diagnose
- generate_access_token
- start
- report_info_system
- restore
Upgrades a notebook instance to the latest version.
EXEC google.notebooks.instances.upgrade
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
;
Resets a notebook instance.
EXEC google.notebooks.instances.reset
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
;
Checks whether a notebook instance is upgradable.
EXEC google.notebooks.instances.check_upgradability
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
;
Allows notebook instances to upgrade themselves. Do not use this method directly.
EXEC google.notebooks.instances.upgrade_system
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"vmId": "{{ vmId }}"
}'
;
Initiated by Cloud Console for Oauth consent flow for Workbench Instances. Do not use this method directly. Design doc: go/wbi-euc:auth-dd
EXEC google.notebooks.instances.check_authorization
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"authorizationDetails": "{{ authorizationDetails }}"
}'
;
Stops a notebook instance.
EXEC google.notebooks.instances.stop
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
;
Resize a notebook instance disk to a higher capacity.
EXEC google.notebooks.instances.resize_disk
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"bootDisk": "{{ bootDisk }}",
"dataDisk": "{{ dataDisk }}"
}'
;
Rollbacks a notebook instance to the previous version.
EXEC google.notebooks.instances.rollback
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"targetSnapshot": "{{ targetSnapshot }}"
}'
;
Creates a Diagnostic File and runs Diagnostic Tool given an Instance.
EXEC google.notebooks.instances.diagnose
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"timeoutMinutes": {{ timeoutMinutes }},
"diagnosticConfig": "{{ diagnosticConfig }}"
}'
;
Called by VM to return an EUC for the instance owner. Do not use this method directly. Design doc: go/wbi-euc:dd
EXEC google.notebooks.instances.generate_access_token
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"vmToken": "{{ vmToken }}"
}'
;
Starts a notebook instance.
EXEC google.notebooks.instances.start
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
;
Allows 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.
EXEC google.notebooks.instances.report_info_system
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"event": "{{ event }}",
"vmId": "{{ vmId }}"
}'
;
RestoreInstance restores an Instance from a BackupSource.
EXEC google.notebooks.instances.restore
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@instancesId='{{ instancesId }}' --required
@@json=
'{
"snapshot": "{{ snapshot }}"
}'
;