Package google.cloud.notebooks.v1beta1

Index

NotebookService

API v1beta1 service for Notebooks.

CreateEnvironment

rpc CreateEnvironment(CreateEnvironmentRequest) returns (Operation)

Creates a new Environment.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

CreateInstance

rpc CreateInstance(CreateInstanceRequest) returns (Operation)

Creates a new Instance in a given project and location.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

DeleteEnvironment

rpc DeleteEnvironment(DeleteEnvironmentRequest) returns (Operation)

Deletes a single Environment.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

DeleteInstance

rpc DeleteInstance(DeleteInstanceRequest) returns (Operation)

Deletes a single Instance.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetEnvironment

rpc GetEnvironment(GetEnvironmentRequest) returns (Environment)

Gets details of a single Environment.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

GetInstance

rpc GetInstance(GetInstanceRequest) returns (Instance)

Gets details of a single Instance.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IsInstanceUpgradeable

rpc IsInstanceUpgradeable(IsInstanceUpgradeableRequest) returns (IsInstanceUpgradeableResponse)

Check if a notebook instance is upgradable. Deprecated. Please consider using v1.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListEnvironments

rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse)

Lists environments in a project.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ListInstances

rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse)

Lists instances in a given project and location.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

RegisterInstance

rpc RegisterInstance(RegisterInstanceRequest) returns (Operation)

Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances are instances created with the legacy Compute Engine calls. They are not manageable by the Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ReportInstanceInfo

rpc ReportInstanceInfo(ReportInstanceInfoRequest) returns (Operation)

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.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ResetInstance

rpc ResetInstance(ResetInstanceRequest) returns (Operation)

Resets a notebook instance.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

SetInstanceAccelerator

rpc SetInstanceAccelerator(SetInstanceAcceleratorRequest) returns (Operation)

Updates the guest accelerators of a single Instance.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

SetInstanceLabels

rpc SetInstanceLabels(SetInstanceLabelsRequest) returns (Operation)

Updates the labels of an Instance.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

SetInstanceMachineType

rpc SetInstanceMachineType(SetInstanceMachineTypeRequest) returns (Operation)

Updates the machine type of a single Instance.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

StartInstance

rpc StartInstance(StartInstanceRequest) returns (Operation)

Starts a notebook instance.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

StopInstance

rpc StopInstance(StopInstanceRequest) returns (Operation)

Stops a notebook instance.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpgradeInstance

rpc UpgradeInstance(UpgradeInstanceRequest) returns (Operation)

Upgrades a notebook instance to the latest version. Deprecated. Please consider using v1.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpgradeInstanceInternal

rpc UpgradeInstanceInternal(UpgradeInstanceInternalRequest) returns (Operation)

Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method directly. Deprecated. Please consider using v1.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ContainerImage

Definition of a container image for starting a notebook instance with the environment installed in a container.

Fields
repository

string

Required. The path to the container image repository. For example: gcr.io/{project_id}/{image_name}

tag

string

The tag of the container image. If not specified, this defaults to the latest tag.

CreateEnvironmentRequest

Request for creating a notebook environment.

Fields
parent

string

Required. Format: projects/{project_id}/locations/{location}

Authorization requires the following IAM permission on the specified resource parent:

  • notebooks.environments.create
environment_id

string

Required. User-defined unique ID of this environment. The environment_id must be 1 to 63 characters long and contain only lowercase letters, numeric characters, and dashes. The first character must be a lowercase letter and the last character cannot be a dash.

environment

Environment

Required. The environment to be created.

CreateInstanceRequest

Request for creating a notebook instance.

Fields
parent

string

Required. Format: parent=projects/{project_id}/locations/{location}

Authorization requires the following IAM permission on the specified resource parent:

  • notebooks.instances.create
instance_id

string

Required. User-defined unique ID of this instance.

instance

Instance

Required. The instance to be created.

DeleteEnvironmentRequest

Request for deleting a notebook environment.

Fields
name

string

Required. Format: projects/{project_id}/locations/{location}/environments/{environment_id}

Authorization requires the following IAM permission on the specified resource name:

  • notebooks.environments.delete

DeleteInstanceRequest

Request for deleting a notebook instance.

Fields
name

string

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

Authorization requires the following IAM permission on the specified resource name:

  • notebooks.instances.delete

Environment

Definition of a software environment that is used to start a notebook instance.

Fields
name

string

Output only. Name of this environment. Format: projects/{project_id}/locations/{location}/environments/{environment_id}

display_name

string

Display name of this environment for the UI.

description

string

A brief description of this environment.

post_startup_script

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. Example: "gs://path-to-file/file-name"

create_time

Timestamp

Output only. The time at which this environment was created.

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

VmImage

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

container_image

ContainerImage

Use a container image to start the notebook instance.

GetEnvironmentRequest

Request for getting a notebook environment.

Fields
name

string

Required. Format: projects/{project_id}/locations/{location}/environments/{environment_id}

Authorization requires the following IAM permission on the specified resource name:

  • notebooks.environments.get

GetInstanceRequest

Request for getting a notebook instance.

Fields
name

string

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

Authorization requires the following IAM permission on the specified resource name:

  • notebooks.instances.get

Instance

The definition of a notebook instance.

Fields
name

string

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

post_startup_script

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).

proxy_uri

string

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

instance_owners[]

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.

service_account

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.

machine_type

string

Required. The Compute Engine machine type of this instance.

accelerator_config

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 machine_type you have selected.

state

State

Output only. The state of this instance.

install_gpu_driver

bool

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.

custom_gpu_driver_path

string

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

boot_disk_type

DiskType

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

boot_disk_size_gb

int64

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.

data_disk_type

DiskType

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

data_disk_size_gb

int64

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.

no_remove_data_disk

bool

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

disk_encryption

DiskEncryption

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

kms_key

string

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

Learn more about using your own encryption keys.

no_public_ip

bool

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

no_proxy_access

bool

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<string, string>

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

metadata

map<string, string>

Custom metadata to apply to this instance.

create_time

Timestamp

Output only. Instance creation time.

update_time

Timestamp

Output only. Instance update time.

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

VmImage

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

container_image

ContainerImage

Use a container image to start the notebook instance.

AcceleratorConfig

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

Fields
type

AcceleratorType

Type of this accelerator.

core_count

int64

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.

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.

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.

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.

IsInstanceUpgradeableRequest

Request for checking if a notebook instance is upgradeable.

Fields
notebook_instance

string

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

Authorization requires the following IAM permission on the specified resource notebookInstance:

  • notebooks.instances.checkUpgradability

IsInstanceUpgradeableResponse

Response for checking if a notebook instance is upgradeable.

Fields
upgradeable

bool

If an instance is upgradeable.

upgrade_version

string

The version this instance will be upgraded to if calling the upgrade endpoint. This field will only be populated if field upgradeable is true.

upgrade_info

string

Additional information about upgrade.

upgrade_image

string

The new image self link this instance will be upgraded to if calling the upgrade endpoint. This field will only be populated if field upgradeable is true.

ListEnvironmentsRequest

Request for listing environments.

Fields
parent

string

Required. Format: projects/{project_id}/locations/{location}

Authorization requires the following IAM permission on the specified resource parent:

  • notebooks.environments.list
page_size

int32

Maximum return size of the list call.

page_token

string

A previous returned page token that can be used to continue listing from the last result.

ListEnvironmentsResponse

Response for listing environments.

Fields
environments[]

Environment

A list of returned environments.

next_page_token

string

A page token that can be used to continue listing from the last result in the next list call.

unreachable[]

string

Locations that could not be reached.

ListInstancesRequest

Request for listing notebook instances.

Fields
parent

string

Required. Format: parent=projects/{project_id}/locations/{location}

Authorization requires the following IAM permission on the specified resource parent:

  • notebooks.instances.list
page_size

int32

Maximum return size of the list call.

page_token

string

A previous returned page token that can be used to continue listing from the last result.

ListInstancesResponse

Response for listing notebook instances.

Fields
instances[]

Instance

A list of returned instances.

next_page_token

string

Page token that can be used to continue listing from the last result in the next list call.

unreachable[]

string

Locations that could not be reached. For example, ['us-west1-a', 'us-central1-b']. A ListInstancesResponse will only contain either instances or unreachables,

OperationMetadata

Represents the metadata of the long-running operation.

Fields
create_time

Timestamp

The time the operation was created.

end_time

Timestamp

The time the operation finished running.

target

string

Server-defined resource path for the target of the operation.

verb

string

Name of the verb executed by the operation.

status_message

string

Human-readable status of the operation, if any.

requested_cancellation

bool

Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have [Operation.error][] value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

api_version

string

API version used to start the operation.

endpoint

string

API endpoint name of this operation.

RegisterInstanceRequest

Request for registering a notebook instance.

Fields
parent

string

Required. Format: parent=projects/{project_id}/locations/{location}

Authorization requires the following IAM permission on the specified resource parent:

  • notebooks.instances.create
instance_id

string

Required. User defined unique ID of this instance. The instance_id must be 1 to 63 characters long and contain only lowercase letters, numeric characters, and dashes. The first character must be a lowercase letter and the last character cannot be a dash.

ReportInstanceInfoRequest

Request for notebook instances to report information to Notebooks API.

Fields
name

string

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

vm_id

string

Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity

metadata

map<string, string>

The metadata reported to Notebooks API. This will be merged to the instance metadata store

ResetInstanceRequest

Request for reseting a notebook instance

Fields
name

string

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

Authorization requires the following IAM permission on the specified resource name:

  • notebooks.instances.update

SetInstanceAcceleratorRequest

Request for setting instance accelerator.

Fields
name

string

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

Authorization requires the following IAM permission on the specified resource name:

  • notebooks.instances.update
type

AcceleratorType

Required. Type of this accelerator.

core_count

int64

Required. Count of cores of this accelerator. Note that not all combinations of type and core_count are valid. Check GPUs on Compute Engine to find a valid combination. TPUs are not supported.

SetInstanceLabelsRequest

Request for setting instance labels.

Fields
name

string

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

Authorization requires the following IAM permission on the specified resource name:

  • notebooks.instances.update
labels

map<string, string>

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

SetInstanceMachineTypeRequest

Request for setting instance machine type.

Fields
name

string

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

Authorization requires the following IAM permission on the specified resource name:

  • notebooks.instances.update
machine_type

string

Required. The Compute Engine machine type.

StartInstanceRequest

Request for starting a notebook instance

Fields
name

string

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

Authorization requires the following IAM permission on the specified resource name:

  • notebooks.instances.update

StopInstanceRequest

Request for stopping a notebook instance

Fields
name

string

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

Authorization requires the following IAM permission on the specified resource name:

  • notebooks.instances.update

UpgradeInstanceInternalRequest

Request for upgrading a notebook instance from within the VM

Fields
name

string

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

vm_id

string

Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity

UpgradeInstanceRequest

Request for upgrading a notebook instance

Fields
name

string

Required. Format: projects/{project_id}/locations/{location}/instances/{instance_id}

Authorization requires the following IAM permission on the specified resource name:

  • notebooks.instances.update

VmImage

Definition of a custom Compute Engine virtual machine image for starting a notebook instance with the environment installed directly on the VM.

Fields
project

string

Required. The name of the Google Cloud project that this VM image belongs to. Format: projects/{project_id}

Union field image. The reference to an external Compute Engine VM image. image can be only one of the following:
image_name

string

Use VM image name to find the image.

image_family

string

Use this VM image family to find the image; the newest image in this family will be used.