REST Resource: projects.locations.instances

Resource: Instance

The definition of a notebook instance.

JSON representation
{
  "name": string,
  "postStartupScript": string,
  "proxyUri": string,
  "instanceOwners": [
    string
  ],
  "serviceAccount": string,
  "machineType": string,
  "acceleratorConfig": {
    object (AcceleratorConfig)
  },
  "state": enum (State),
  "installGpuDriver": boolean,
  "customGpuDriverPath": string,
  "bootDiskType": enum (DiskType),
  "bootDiskSizeGb": string,
  "dataDiskType": enum (DiskType),
  "dataDiskSizeGb": string,
  "noRemoveDataDisk": boolean,
  "diskEncryption": enum (DiskEncryption),
  "kmsKey": string,
  "noPublicIp": boolean,
  "noProxyAccess": boolean,
  "network": string,
  "subnet": string,
  "labels": {
    string: string,
    ...
  },
  "metadata": {
    string: string,
    ...
  },
  "createTime": string,
  "updateTime": string,

  // Union field environment can be only one of the following:
  "vmImage": {
    object (VmImage)
  },
  "containerImage": {
    object (ContainerImage)
  }
  // End of list of possible types for union field environment.
}
Fields
name

string

Output only. The name of this notebook instance. Format: projects/{project_id}/locations/{location}/instances/{instanceId}

postStartupScript

string

Path to a Bash script that automatically runs after a notebook instance fully boots up. The path must be a URL or Cloud Storage path (gs://path-to-file/file-name).

proxyUri

string

Output only. The proxy endpoint that is used to access the Jupyter notebook.

instanceOwners[]

string

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.

serviceAccount

string

The service account on this instance, giving access to other Google Cloud services. 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.

machineType

string

Required. The Compute Engine machine type of this instance.

acceleratorConfig

object (AcceleratorConfig)

The hardware accelerator used on this instance. If you use accelerators, make sure that your configuration has enough vCPUs and memory to support the machineType you have selected.

state

enum (State)

Output only. The state of this instance.

installGpuDriver

boolean

Whether the end user authorizes Google Cloud to install GPU driver on this instance. If this field is empty or set to false, the GPU driver won't be installed. Only applicable to instances with GPUs.

customGpuDriverPath

string

Specify a custom Cloud Storage path where the GPU driver is stored. If not specified, we'll automatically choose from official GPU drivers.

bootDiskType

enum (DiskType)

Input only. The type of the boot disk attached to this instance, defaults to standard persistent disk (PD_STANDARD).

bootDiskSizeGb

string (int64 format)

Input only. The size of the boot disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not specified, this defaults to 100.

dataDiskType

enum (DiskType)

Input only. The type of the data disk attached to this instance, defaults to standard persistent disk (PD_STANDARD).

dataDiskSizeGb

string (int64 format)

Input only. The size of the data disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). You can choose the size of the data disk based on how big your notebooks and data are. If not specified, this defaults to 100.

noRemoveDataDisk

boolean

Input only. If true, the data disk will not be auto deleted when deleting the instance.

diskEncryption

enum (DiskEncryption)

Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.

kmsKey

string

Input only. The KMS key used to encrypt the disks, only applicable if diskEncryption is CMEK. Format: projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}

Learn more about using your own encryption keys.

noPublicIp

boolean

If true, no public IP will be assigned to this instance.

noProxyAccess

boolean

If true, the notebook instance will not register with the proxy.

network

string

The name of the VPC that this instance is in. Format: projects/{project_id}/global/networks/{network_id}

subnet

string

The name of the subnet that this instance is in. Format: projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}

labels

map (key: string, value: string)

Labels to apply to this instance. These can be later modified by the setLabels method.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

metadata

map (key: string, value: string)

Custom metadata to apply to this instance.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

createTime

string (Timestamp format)

Output only. Instance creation time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. Instance update time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Union field environment. Type of the environment; can be one of VM image, or container image. environment can be only one of the following:
vmImage

object (VmImage)

Use a Compute Engine VM image to start the notebook instance.

containerImage

object (ContainerImage)

Use a container image to start the notebook instance.

AcceleratorConfig

Definition of a hardware accelerator. Note that not all combinations of type and coreCount are valid. Check GPUs on Compute Engine to find a valid combination. TPUs are not supported.

JSON representation
{
  "type": enum (AcceleratorType),
  "coreCount": string
}
Fields
type

enum (AcceleratorType)

Type of this accelerator.

coreCount

string (int64 format)

Count of cores of this accelerator.

AcceleratorType

Definition of the types of hardware accelerators that can be used on this instance.

Enums
ACCELERATOR_TYPE_UNSPECIFIED Accelerator type is not specified.
NVIDIA_TESLA_K80 Accelerator type is Nvidia Tesla K80.
NVIDIA_TESLA_P100 Accelerator type is Nvidia Tesla P100.
NVIDIA_TESLA_V100 Accelerator type is Nvidia Tesla V100.
NVIDIA_TESLA_P4 Accelerator type is Nvidia Tesla P4.
NVIDIA_TESLA_T4 Accelerator type is Nvidia Tesla T4.
NVIDIA_TESLA_T4_VWS Accelerator type is NVIDIA Tesla T4 Virtual Workstations.
NVIDIA_TESLA_P100_VWS Accelerator type is NVIDIA Tesla P100 Virtual Workstations.
NVIDIA_TESLA_P4_VWS Accelerator type is NVIDIA Tesla P4 Virtual Workstations.
TPU_V2 (Coming soon) Accelerator type is TPU V2.
TPU_V3 (Coming soon) Accelerator type is TPU V3.

State

The definition of the states of this instance.

Enums
STATE_UNSPECIFIED State is not specified.
STARTING The control logic is starting the instance.
PROVISIONING The control logic is installing required frameworks and registering the instance with notebook proxy
ACTIVE The instance is running.
STOPPING The control logic is stopping the instance.
STOPPED The instance is stopped.
DELETED The instance is deleted.
UPGRADING The instance is upgrading.
INITIALIZING The instance is being created.
REGISTERING The instance is getting registered.

DiskType

Possible disk types for notebook instances.

Enums
DISK_TYPE_UNSPECIFIED Disk type not set.
PD_STANDARD Standard persistent disk type.
PD_SSD SSD persistent disk type.
PD_BALANCED Balanced persistent disk type.

DiskEncryption

Definition of the disk encryption options.

Enums
DISK_ENCRYPTION_UNSPECIFIED Disk encryption is not specified.
GMEK Use Google managed encryption keys to encrypt the boot disk.
CMEK Use customer managed encryption keys to encrypt the boot disk.

Methods

create

Creates a new Instance in a given project and location.

delete

Deletes a single Instance.

get

Gets details of a single Instance.

getIamPolicy

Gets the access control policy for a resource.

isUpgradeable
(deprecated)

Check if a notebook instance is upgradable.

list

Lists instances in a given project and location.

register

Registers an existing legacy notebook instance to the Notebooks API server.

report

Allows notebook instances to report their latest instance information to the Notebooks API server.

reset

Resets a notebook instance.

setAccelerator

Updates the guest accelerators of a single Instance.

setIamPolicy

Sets the access control policy on the specified resource.

setLabels

Updates the labels of an Instance.

setMachineType

Updates the machine type of a single Instance.

start

Starts a notebook instance.

stop

Stops a notebook instance.

testIamPermissions

Returns permissions that a caller has on the specified resource.

upgrade
(deprecated)

Upgrades a notebook instance to the latest version.

upgradeInternal
(deprecated)

Allows notebook instances to call this endpoint to upgrade themselves.