As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Notebooks v1 API

class google.cloud.notebooks_v1.types.ContainerImage(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

repository

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

Type

str

tag

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

Type

str

class google.cloud.notebooks_v1.types.CreateEnvironmentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for creating a notebook environment.

parent

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

Type

str

environment_id

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.

Type

str

environment

Required. The environment to be created.

Type

google.cloud.notebooks_v1.types.Environment

class google.cloud.notebooks_v1.types.CreateExecutionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request to create notebook execution

parent

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

Type

str

execution_id

Required. User-defined unique ID of this execution.

Type

str

execution

Required. The execution to be created.

Type

google.cloud.notebooks_v1.types.Execution

class google.cloud.notebooks_v1.types.CreateInstanceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for creating a notebook instance.

parent

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

Type

str

instance_id

Required. User-defined unique ID of this instance.

Type

str

instance

Required. The instance to be created.

Type

google.cloud.notebooks_v1.types.Instance

class google.cloud.notebooks_v1.types.CreateRuntimeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for creating a Managed Notebook Runtime.

parent

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

Type

str

runtime_id

Required. User-defined unique ID of this Runtime.

Type

str

runtime

Required. The Runtime to be created.

Type

google.cloud.notebooks_v1.types.Runtime

request_id

Idempotent request UUID.

Type

str

class google.cloud.notebooks_v1.types.CreateScheduleRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for created scheduled notebooks

parent

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

Type

str

schedule_id

Required. User-defined unique ID of this schedule.

Type

str

schedule

Required. The schedule to be created.

Type

google.cloud.notebooks_v1.types.Schedule

class google.cloud.notebooks_v1.types.DeleteEnvironmentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for deleting a notebook environment.

name

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

Type

str

class google.cloud.notebooks_v1.types.DeleteExecutionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for deleting a scheduled notebook execution

name

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

Type

str

class google.cloud.notebooks_v1.types.DeleteInstanceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for deleting a notebook instance.

name

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

Type

str

class google.cloud.notebooks_v1.types.DeleteRuntimeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for deleting a Managed Notebook Runtime.

name

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

Type

str

request_id

Idempotent request UUID.

Type

str

class google.cloud.notebooks_v1.types.DeleteScheduleRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for deleting an Schedule

name

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

Type

str

class google.cloud.notebooks_v1.types.DiagnoseInstanceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for creating a notebook instance diagnostic file.

name

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

Type

str

diagnostic_config

Required. Defines flags that are used to run the diagnostic tool

Type

google.cloud.notebooks_v1.types.DiagnosticConfig

class google.cloud.notebooks_v1.types.DiagnoseRuntimeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for creating a notebook instance diagnostic file.

name

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

Type

str

diagnostic_config

Required. Defines flags that are used to run the diagnostic tool

Type

google.cloud.notebooks_v1.types.DiagnosticConfig

class google.cloud.notebooks_v1.types.DiagnosticConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Defines flags that are used to run the diagnostic tool

gcs_bucket

Required. User Cloud Storage bucket location (REQUIRED). Must be formatted with path prefix (gs://$GCS_BUCKET).

Permissions: User Managed Notebooks:

  • storage.buckets.writer: Must be given to the project’s service account attached to VM. Google Managed Notebooks:

  • storage.buckets.writer: Must be given to the project’s service account or user credentials attached to VM depending on authentication mode.

Cloud Storage bucket Log file will be written to gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz

Type

str

relative_path

Optional. Defines the relative storage path in the Cloud Storage bucket where the diagnostic logs will be written: Default path will be the root directory of the Cloud Storage bucket (gs://$GCS_BUCKET/$DATE_$TIME.tar.gz) Example of full path where Log file will be written: gs://$GCS_BUCKET/$RELATIVE_PATH/

Type

str

repair_flag_enabled

Optional. Enables flag to repair service for instance

Type

bool

packet_capture_flag_enabled

Optional. Enables flag to capture packets from the instance for 30 seconds

Type

bool

copy_home_files_flag_enabled

Optional. Enables flag to copy all /home/jupyter folder contents

Type

bool

class google.cloud.notebooks_v1.types.EncryptionConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a custom encryption key configuration that can be applied to a resource. This will encrypt all disks in Virtual Machine.

kms_key

The Cloud KMS resource identifier of the customer-managed encryption key used to protect a resource, such as a disks. It has the following format: projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}

Type

str

class google.cloud.notebooks_v1.types.Environment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

name

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

Type

str

display_name

Display name of this environment for the UI.

Type

str

description

A brief description of this environment.

Type

str

vm_image

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

This field is a member of oneof image_type.

Type

google.cloud.notebooks_v1.types.VmImage

container_image

Use a container image to start the notebook instance.

This field is a member of oneof image_type.

Type

google.cloud.notebooks_v1.types.ContainerImage

post_startup_script

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"

Type

str

create_time

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

Type

google.protobuf.timestamp_pb2.Timestamp

class google.cloud.notebooks_v1.types.Event(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The definition of an Event for a managed / semi-managed notebook instance.

report_time

Event report time.

Type

google.protobuf.timestamp_pb2.Timestamp

type_

Event type.

Type

google.cloud.notebooks_v1.types.Event.EventType

details

Optional. Event details. This field is used to pass event information.

Type

MutableMapping[str, str]

class DetailsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class EventType(value)[source]

Bases: proto.enums.Enum

The definition of the event types.

Values:
EVENT_TYPE_UNSPECIFIED (0):

Event is not specified.

IDLE (1):

The instance / runtime is idle

HEARTBEAT (2):

The instance / runtime is available. This event indicates that instance / runtime underlying compute is operational.

HEALTH (3):

The instance / runtime health is available. This event indicates that instance / runtime health information.

MAINTENANCE (4):

The instance / runtime is available. This event allows instance / runtime to send Host maintenance information to Control Plane. https://cloud.google.com/compute/docs/gpus/gpu-host-maintenance

class google.cloud.notebooks_v1.types.Execution(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The definition of a single executed notebook.

execution_template

execute metadata including name, hardware spec, region, labels, etc.

Type

google.cloud.notebooks_v1.types.ExecutionTemplate

name

Output only. The resource name of the execute. Format: projects/{project_id}/locations/{location}/executions/{execution_id}

Type

str

display_name

Output only. Name used for UI purposes. Name can only contain alphanumeric characters and underscores ‘_’.

Type

str

description

A brief description of this execution.

Type

str

create_time

Output only. Time the Execution was instantiated.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Time the Execution was last updated.

Type

google.protobuf.timestamp_pb2.Timestamp

state

Output only. State of the underlying AI Platform job.

Type

google.cloud.notebooks_v1.types.Execution.State

output_notebook_file

Output notebook file generated by this execution

Type

str

job_uri

Output only. The URI of the external job used to execute the notebook.

Type

str

class State(value)[source]

Bases: proto.enums.Enum

Enum description of the state of the underlying AIP job.

Values:
STATE_UNSPECIFIED (0):

The job state is unspecified.

QUEUED (1):

The job has been just created and processing has not yet begun.

PREPARING (2):

The service is preparing to execution the job.

RUNNING (3):

The job is in progress.

SUCCEEDED (4):

The job completed successfully.

FAILED (5):

The job failed. error_message should contain the details of the failure.

CANCELLING (6):

The job is being cancelled. error_message should describe the reason for the cancellation.

CANCELLED (7):

The job has been cancelled. error_message should describe the reason for the cancellation.

EXPIRED (9):

The job has become expired (relevant to Vertex AI jobs) https://cloud.google.com/vertex-ai/docs/reference/rest/v1/JobState

INITIALIZING (10):

The Execution is being created.

class google.cloud.notebooks_v1.types.ExecutionTemplate(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The description a notebook execution workload.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

scale_tier

Required. Scale tier of the hardware used for notebook execution. DEPRECATED Will be discontinued. As right now only CUSTOM is supported.

Type

google.cloud.notebooks_v1.types.ExecutionTemplate.ScaleTier

master_type

Specifies the type of virtual machine to use for your training job’s master worker. You must specify this field when scaleTier is set to CUSTOM.

You can use certain Compute Engine machine types directly in this field. The following types are supported:

  • n1-standard-4

  • n1-standard-8

  • n1-standard-16

  • n1-standard-32

  • n1-standard-64

  • n1-standard-96

  • n1-highmem-2

  • n1-highmem-4

  • n1-highmem-8

  • n1-highmem-16

  • n1-highmem-32

  • n1-highmem-64

  • n1-highmem-96

  • n1-highcpu-16

  • n1-highcpu-32

  • n1-highcpu-64

  • n1-highcpu-96

Alternatively, you can use the following legacy machine types:

  • standard

  • large_model

  • complex_model_s

  • complex_model_m

  • complex_model_l

  • standard_gpu

  • complex_model_m_gpu

  • complex_model_l_gpu

  • standard_p100

  • complex_model_m_p100

  • standard_v100

  • large_model_v100

  • complex_model_m_v100

  • complex_model_l_v100

Finally, if you want to use a TPU for training, specify cloud_tpu in this field. Learn more about the special configuration options for training with TPU.

Type

str

accelerator_config

Configuration (count and accelerator type) for hardware running notebook execution.

Type

google.cloud.notebooks_v1.types.ExecutionTemplate.SchedulerAcceleratorConfig

labels

Labels for execution. If execution is scheduled, a field included will be ‘nbs-scheduled’. Otherwise, it is an immediate execution, and an included field will be ‘nbs-immediate’. Use fields to efficiently index between various types of executions.

Type

MutableMapping[str, str]

input_notebook_file

Path to the notebook file to execute. Must be in a Google Cloud Storage bucket. Format: gs://{bucket_name}/{folder}/{notebook_file_name} Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb

Type

str

container_image_uri

Container Image URI to a DLVM Example: ‘gcr.io/deeplearning-platform-release/base-cu100’ More examples can be found at:

https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container

Type

str

output_notebook_folder

Path to the notebook folder to write to. Must be in a Google Cloud Storage bucket path. Format: gs://{bucket_name}/{folder} Ex: gs://notebook_user/scheduled_notebooks

Type

str

params_yaml_file

Parameters to be overridden in the notebook during execution. Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on how to specifying parameters in the input notebook and pass them here in an YAML file. Ex: gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml

Type

str

parameters

Parameters used within the ‘input_notebook_file’ notebook.

Type

str

service_account

The email address of a service account to use when running the execution. You must have the iam.serviceAccounts.actAs permission for the specified service account.

Type

str

job_type

The type of Job to be used on this execution.

Type

google.cloud.notebooks_v1.types.ExecutionTemplate.JobType

dataproc_parameters

Parameters used in Dataproc JobType executions.

This field is a member of oneof job_parameters.

Type

google.cloud.notebooks_v1.types.ExecutionTemplate.DataprocParameters

vertex_ai_parameters

Parameters used in Vertex AI JobType executions.

This field is a member of oneof job_parameters.

Type

google.cloud.notebooks_v1.types.ExecutionTemplate.VertexAIParameters

kernel_spec

Name of the kernel spec to use. This must be specified if the kernel spec name on the execution target does not match the name in the input notebook file.

Type

str

tensorboard

The name of a Vertex AI [Tensorboard] resource to which this execution will upload Tensorboard logs. Format: projects/{project}/locations/{location}/tensorboards/{tensorboard}

Type

str

class DataprocParameters(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Parameters used in Dataproc JobType executions.

cluster

URI for cluster used to run Dataproc execution. Format: projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}

Type

str

class JobType(value)[source]

Bases: proto.enums.Enum

The backend used for this execution.

Values:
JOB_TYPE_UNSPECIFIED (0):

No type specified.

VERTEX_AI (1):

Custom Job in aiplatform.googleapis.com. Default value for an execution.

DATAPROC (2):

Run execution on a cluster with Dataproc as a job. https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class ScaleTier(value)[source]

Bases: proto.enums.Enum

Required. Specifies the machine types, the number of replicas for workers and parameter servers.

Values:
SCALE_TIER_UNSPECIFIED (0):

Unspecified Scale Tier.

BASIC (1):

A single worker instance. This tier is suitable for learning how to use Cloud ML, and for experimenting with new models using small datasets.

STANDARD_1 (2):

Many workers and a few parameter servers.

PREMIUM_1 (3):

A large number of workers with many parameter servers.

BASIC_GPU (4):

A single worker instance with a K80 GPU.

BASIC_TPU (5):

A single worker instance with a Cloud TPU.

CUSTOM (6):

The CUSTOM tier is not a set tier, but rather enables you to use your own cluster specification. When you use this tier, set values to configure your processing cluster according to these guidelines:

  • You must set ExecutionTemplate.masterType to specify the type of machine to use for your master node. This is the only required setting.

class SchedulerAcceleratorConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

type_

Type of this accelerator.

Type

google.cloud.notebooks_v1.types.ExecutionTemplate.SchedulerAcceleratorType

core_count

Count of cores of this accelerator.

Type

int

class SchedulerAcceleratorType(value)[source]

Bases: proto.enums.Enum

Hardware accelerator types for AI Platform Training jobs.

Values:
SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED (0):

Unspecified accelerator type. Default to no GPU.

NVIDIA_TESLA_K80 (1):

Nvidia Tesla K80 GPU.

NVIDIA_TESLA_P100 (2):

Nvidia Tesla P100 GPU.

NVIDIA_TESLA_V100 (3):

Nvidia Tesla V100 GPU.

NVIDIA_TESLA_P4 (4):

Nvidia Tesla P4 GPU.

NVIDIA_TESLA_T4 (5):

Nvidia Tesla T4 GPU.

NVIDIA_TESLA_A100 (10):

Nvidia Tesla A100 GPU.

TPU_V2 (6):

TPU v2.

TPU_V3 (7):

TPU v3.

class VertexAIParameters(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Parameters used in Vertex AI JobType executions.

network

The full name of the Compute Engine network to which the Job should be peered. For example, projects/12345/global/networks/myVPC. Format is of the form projects/{project}/global/networks/{network}. Where {project} is a project number, as in 12345, and {network} is a network name.

Private services access must already be configured for the network. If left unspecified, the job is not peered with any network.

Type

str

env

Environment variables. At most 100 environment variables can be specified and unique. Example: GCP_BUCKET=gs://my-bucket/samples/

Type

MutableMapping[str, str]

class EnvEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.notebooks_v1.types.GetEnvironmentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for getting a notebook environment.

name

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

Type

str

class google.cloud.notebooks_v1.types.GetExecutionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for getting scheduled notebook execution

name

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

Type

str

class google.cloud.notebooks_v1.types.GetInstanceHealthRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for checking if a notebook instance is healthy.

name

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

Type

str

class google.cloud.notebooks_v1.types.GetInstanceHealthResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for checking if a notebook instance is healthy.

health_state

Output only. Runtime health_state.

Type

google.cloud.notebooks_v1.types.GetInstanceHealthResponse.HealthState

health_info

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” }

Type

MutableMapping[str, str]

class HealthInfoEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class HealthState(value)[source]

Bases: proto.enums.Enum

If an instance is healthy or not.

Values:
HEALTH_STATE_UNSPECIFIED (0):

The instance substate is unknown.

HEALTHY (1):

The instance is known to be in an healthy state (for example, critical daemons are running) Applies to ACTIVE state.

UNHEALTHY (2):

The instance is known to be in an unhealthy state (for example, critical daemons are not running) Applies to ACTIVE state.

AGENT_NOT_INSTALLED (3):

The instance has not installed health monitoring agent. Applies to ACTIVE state.

AGENT_NOT_RUNNING (4):

The instance health monitoring agent is not running. Applies to ACTIVE state.

class google.cloud.notebooks_v1.types.GetInstanceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for getting a notebook instance.

name

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

Type

str

class google.cloud.notebooks_v1.types.GetRuntimeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for getting a Managed Notebook Runtime.

name

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

Type

str

class google.cloud.notebooks_v1.types.GetScheduleRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for getting scheduled notebook.

name

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

Type

str

class google.cloud.notebooks_v1.types.Instance(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The definition of a notebook instance.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

name

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

Type

str

vm_image

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

This field is a member of oneof environment.

Type

google.cloud.notebooks_v1.types.VmImage

container_image

Use a container image to start the notebook instance.

This field is a member of oneof environment.

Type

google.cloud.notebooks_v1.types.ContainerImage

post_startup_script

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

Type

str

proxy_uri

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

Type

str

instance_owners

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.

Type

MutableSequence[str]

service_account

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.

Type

str

service_account_scopes

Optional. The URIs of service account scopes to be included in Compute Engine instances.

If not specified, the following scopes are defined:

Type

MutableSequence[str]

machine_type

Required. The Compute Engine machine type of this instance.

Type

str

accelerator_config

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 <https://cloud.google.com/compute/docs/gpus/#gpus-list>`__.

Type

google.cloud.notebooks_v1.types.Instance.AcceleratorConfig

state

Output only. The state of this instance.

Type

google.cloud.notebooks_v1.types.Instance.State

install_gpu_driver

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.

Type

bool

custom_gpu_driver_path

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

Type

str

boot_disk_type

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

Type

google.cloud.notebooks_v1.types.Instance.DiskType

boot_disk_size_gb

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.

Type

int

data_disk_type

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

Type

google.cloud.notebooks_v1.types.Instance.DiskType

data_disk_size_gb

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.

Type

int

no_remove_data_disk

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

Type

bool

disk_encryption

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

Type

google.cloud.notebooks_v1.types.Instance.DiskEncryption

kms_key

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.

Type

str

disks

Output only. Attached disks to notebook instance.

Type

MutableSequence[google.cloud.notebooks_v1.types.Instance.Disk]

shielded_instance_config

Optional. Shielded VM configuration. Images using supported Shielded VM features.

Type

google.cloud.notebooks_v1.types.Instance.ShieldedInstanceConfig

no_public_ip

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

Type

bool

no_proxy_access

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

Type

bool

network

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

Type

str

subnet

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

Type

str

labels

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

Type

MutableMapping[str, str]

metadata

Custom metadata to apply to this instance.

Type

MutableMapping[str, str]

tags

Optional. The Compute Engine tags to add to runtime (see Tagging instances).

Type

MutableSequence[str]

upgrade_history

The upgrade history of this instance.

Type

MutableSequence[google.cloud.notebooks_v1.types.Instance.UpgradeHistoryEntry]

nic_type

Optional. The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.

Type

google.cloud.notebooks_v1.types.Instance.NicType

reservation_affinity

Optional. The optional reservation affinity. Setting this field will apply the specified Zonal Compute Reservation to this notebook instance.

Type

google.cloud.notebooks_v1.types.ReservationAffinity

creator

Output only. Email address of entity that sent original CreateInstance request.

Type

str

can_ip_forward

Optional. Flag to enable ip forwarding or not, default false/off. https://cloud.google.com/vpc/docs/using-routes#canipforward

Type

bool

create_time

Output only. Instance creation time.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Instance update time.

Type

google.protobuf.timestamp_pb2.Timestamp

class AcceleratorConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

type_

Type of this accelerator.

Type

google.cloud.notebooks_v1.types.Instance.AcceleratorType

core_count

Count of cores of this accelerator.

Type

int

class AcceleratorType(value)[source]

Bases: proto.enums.Enum

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

Values:
ACCELERATOR_TYPE_UNSPECIFIED (0):

Accelerator type is not specified.

NVIDIA_TESLA_K80 (1):

Accelerator type is Nvidia Tesla K80.

NVIDIA_TESLA_P100 (2):

Accelerator type is Nvidia Tesla P100.

NVIDIA_TESLA_V100 (3):

Accelerator type is Nvidia Tesla V100.

NVIDIA_TESLA_P4 (4):

Accelerator type is Nvidia Tesla P4.

NVIDIA_TESLA_T4 (5):

Accelerator type is Nvidia Tesla T4.

NVIDIA_TESLA_A100 (11):

Accelerator type is Nvidia Tesla A100.

NVIDIA_TESLA_T4_VWS (8):

Accelerator type is NVIDIA Tesla T4 Virtual Workstations.

NVIDIA_TESLA_P100_VWS (9):

Accelerator type is NVIDIA Tesla P100 Virtual Workstations.

NVIDIA_TESLA_P4_VWS (10):

Accelerator type is NVIDIA Tesla P4 Virtual Workstations.

TPU_V2 (6):

(Coming soon) Accelerator type is TPU V2.

TPU_V3 (7):

(Coming soon) Accelerator type is TPU V3.

class Disk(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

An instance-attached disk resource.

auto_delete

Indicates whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).

Type

bool

boot

Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.

Type

bool

device_name

Indicates a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.

If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine.This field is only applicable for persistent disks.

Type

str

disk_size_gb

Indicates the size of the disk in base-2 GB.

Type

int

guest_os_features

Indicates a list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

Type

MutableSequence[google.cloud.notebooks_v1.types.Instance.Disk.GuestOsFeature]

index

A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.

Type

int

interface

Indicates the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. Valid values:

  • NVME

  • SCSI

Type

str

kind

Type of the resource. Always compute#attachedDisk for attached disks.

Type

str

licenses

A list of publicly visible licenses. Reserved for Google’s use. A License represents billing and aggregate usage data for public and marketplace images.

Type

MutableSequence[str]

mode

The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Valid values:

  • READ_ONLY

  • READ_WRITE

Type

str

source

Indicates a valid partial or full URL to an existing Persistent Disk resource.

Type

str

type_

Indicates the type of the disk, either SCRATCH or PERSISTENT. Valid values:

  • PERSISTENT

  • SCRATCH

Type

str

class GuestOsFeature(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Guest OS features for boot disk.

type_

The ID of a supported feature. Read Enabling guest operating system features to see a list of available options. Valid values:

  • FEATURE_TYPE_UNSPECIFIED

  • MULTI_IP_SUBNET

  • SECURE_BOOT

  • UEFI_COMPATIBLE

  • VIRTIO_SCSI_MULTIQUEUE

  • WINDOWS

Type

str

class DiskEncryption(value)[source]

Bases: proto.enums.Enum

Definition of the disk encryption options.

Values:
DISK_ENCRYPTION_UNSPECIFIED (0):

Disk encryption is not specified.

GMEK (1):

Use Google managed encryption keys to encrypt the boot disk.

CMEK (2):

Use customer managed encryption keys to encrypt the boot disk.

class DiskType(value)[source]

Bases: proto.enums.Enum

Possible disk types for notebook instances.

Values:
DISK_TYPE_UNSPECIFIED (0):

Disk type not set.

PD_STANDARD (1):

Standard persistent disk type.

PD_SSD (2):

SSD persistent disk type.

PD_BALANCED (3):

Balanced persistent disk type.

PD_EXTREME (4):

Extreme persistent disk type.

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class MetadataEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class NicType(value)[source]

Bases: proto.enums.Enum

The type of vNIC driver. Default should be UNSPECIFIED_NIC_TYPE.

Values:
UNSPECIFIED_NIC_TYPE (0):

No type specified.

VIRTIO_NET (1):

VIRTIO

GVNIC (2):

GVNIC

class ShieldedInstanceConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A set of Shielded Instance options. Check Images using supported Shielded VM features. Not all combinations are valid.

enable_secure_boot

Defines whether the instance has Secure Boot enabled. Secure Boot helps ensure that the system only runs authentic software by verifying the digital signature of all boot components, and halting the boot process if signature verification fails. Disabled by default.

Type

bool

enable_vtpm

Defines whether the instance has the vTPM enabled. Enabled by default.

Type

bool

enable_integrity_monitoring

Defines whether the instance has integrity monitoring enabled. Enables monitoring and attestation of the boot integrity of the instance. The attestation is performed against the integrity policy baseline. This baseline is initially derived from the implicitly trusted boot image when the instance is created. Enabled by default.

Type

bool

class State(value)[source]

Bases: proto.enums.Enum

The definition of the states of this instance.

Values:
STATE_UNSPECIFIED (0):

State is not specified.

STARTING (1):

The control logic is starting the instance.

PROVISIONING (2):

The control logic is installing required frameworks and registering the instance with notebook proxy

ACTIVE (3):

The instance is running.

STOPPING (4):

The control logic is stopping the instance.

STOPPED (5):

The instance is stopped.

DELETED (6):

The instance is deleted.

UPGRADING (7):

The instance is upgrading.

INITIALIZING (8):

The instance is being created.

REGISTERING (9):

The instance is getting registered.

SUSPENDING (10):

The instance is suspending.

SUSPENDED (11):

The instance is suspended.

class UpgradeHistoryEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The entry of VM image upgrade history.

snapshot

The snapshot of the boot disk of this notebook instance before upgrade.

Type

str

vm_image

The VM image before this instance upgrade.

Type

str

container_image

The container image before this instance upgrade.

Type

str

framework

The framework of this notebook instance.

Type

str

version

The version of the notebook instance before this upgrade.

Type

str

state

The state of this instance upgrade history entry.

Type

google.cloud.notebooks_v1.types.Instance.UpgradeHistoryEntry.State

create_time

The time that this instance upgrade history entry is created.

Type

google.protobuf.timestamp_pb2.Timestamp

target_image

Target VM Image. Format: ainotebooks-vm/project/image-name/name.

Type

str

action

Action. Rolloback or Upgrade.

Type

google.cloud.notebooks_v1.types.Instance.UpgradeHistoryEntry.Action

target_version

Target VM Version, like m63.

Type

str

class Action(value)[source]

Bases: proto.enums.Enum

The definition of operations of this upgrade history entry.

Values:
ACTION_UNSPECIFIED (0):

Operation is not specified.

UPGRADE (1):

Upgrade.

ROLLBACK (2):

Rollback.

class State(value)[source]

Bases: proto.enums.Enum

The definition of the states of this upgrade history entry.

Values:
STATE_UNSPECIFIED (0):

State is not specified.

STARTED (1):

The instance upgrade is started.

SUCCEEDED (2):

The instance upgrade is succeeded.

FAILED (3):

The instance upgrade is failed.

class google.cloud.notebooks_v1.types.InstanceConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Notebook instance configurations that can be updated.

notebook_upgrade_schedule

Cron expression in UTC timezone, used to schedule instance auto upgrade. Please follow the cron format.

Type

str

enable_health_monitoring

Verifies core internal services are running.

Type

bool

class google.cloud.notebooks_v1.types.IsInstanceUpgradeableRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for checking if a notebook instance is upgradeable.

notebook_instance

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

Type

str

type_

Optional. The optional UpgradeType. Setting this field will search for additional compute images to upgrade this instance.

Type

google.cloud.notebooks_v1.types.UpgradeType

class google.cloud.notebooks_v1.types.IsInstanceUpgradeableResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for checking if a notebook instance is upgradeable.

upgradeable

If an instance is upgradeable.

Type

bool

upgrade_version

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

Type

str

upgrade_info

Additional information about upgrade.

Type

str

upgrade_image

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.

Type

str

class google.cloud.notebooks_v1.types.ListEnvironmentsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for listing environments.

parent

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

Type

str

page_size

Maximum return size of the list call.

Type

int

page_token

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

Type

str

class google.cloud.notebooks_v1.types.ListEnvironmentsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for listing environments.

environments

A list of returned environments.

Type

MutableSequence[google.cloud.notebooks_v1.types.Environment]

next_page_token

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

Type

str

unreachable

Locations that could not be reached.

Type

MutableSequence[str]

class google.cloud.notebooks_v1.types.ListExecutionsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for listing scheduled notebook executions.

parent

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

Type

str

page_size

Maximum return size of the list call.

Type

int

page_token

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

Type

str

filter

Filter applied to resulting executions. Currently only supports filtering executions by a specified schedule_id. Format: schedule_id=<Schedule_ID>

Type

str

order_by

Sort by field.

Type

str

class google.cloud.notebooks_v1.types.ListExecutionsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for listing scheduled notebook executions

executions

A list of returned instances.

Type

MutableSequence[google.cloud.notebooks_v1.types.Execution]

next_page_token

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

Type

str

unreachable

Executions IDs that could not be reached. For example:

['projects/{project_id}/location/{location}/executions/imagenet_test1',
 'projects/{project_id}/location/{location}/executions/classifier_train1']
Type

MutableSequence[str]

class google.cloud.notebooks_v1.types.ListInstancesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for listing notebook instances.

parent

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

Type

str

page_size

Maximum return size of the list call.

Type

int

page_token

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

Type

str

class google.cloud.notebooks_v1.types.ListInstancesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for listing notebook instances.

instances

A list of returned instances.

Type

MutableSequence[google.cloud.notebooks_v1.types.Instance]

next_page_token

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

Type

str

unreachable

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

Type

MutableSequence[str]

class google.cloud.notebooks_v1.types.ListRuntimesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for listing Managed Notebook Runtimes.

parent

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

Type

str

page_size

Maximum return size of the list call.

Type

int

page_token

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

Type

str

class google.cloud.notebooks_v1.types.ListRuntimesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for listing Managed Notebook Runtimes.

runtimes

A list of returned Runtimes.

Type

MutableSequence[google.cloud.notebooks_v1.types.Runtime]

next_page_token

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

Type

str

unreachable

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

Type

MutableSequence[str]

class google.cloud.notebooks_v1.types.ListSchedulesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for listing scheduled notebook job.

parent

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

Type

str

page_size

Maximum return size of the list call.

Type

int

page_token

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

Type

str

filter

Filter applied to resulting schedules.

Type

str

order_by

Field to order results by.

Type

str

class google.cloud.notebooks_v1.types.ListSchedulesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for listing scheduled notebook job.

schedules

A list of returned instances.

Type

MutableSequence[google.cloud.notebooks_v1.types.Schedule]

next_page_token

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

Type

str

unreachable

Schedules that could not be reached. For example:

['projects/{project_id}/location/{location}/schedules/monthly_digest',
 'projects/{project_id}/location/{location}/schedules/weekly_sentiment']
Type

MutableSequence[str]

class google.cloud.notebooks_v1.types.LocalDisk(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A Local attached disk resource.

auto_delete

Optional. Output only. Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).

Type

bool

boot

Optional. Output only. Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.

Type

bool

device_name

Optional. Output only. Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.

If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.

Type

str

guest_os_features

Output only. Indicates a list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

Type

MutableSequence[google.cloud.notebooks_v1.types.LocalDisk.RuntimeGuestOsFeature]

index

Output only. A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.

Type

int

initialize_params

Input only. Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.

This property is mutually exclusive with the source property; you can only define one or the other, but not both.

Type

google.cloud.notebooks_v1.types.LocalDiskInitializeParams

interface

Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. Valid values:

  • NVME

  • SCSI

Type

str

kind

Output only. Type of the resource. Always compute#attachedDisk for attached disks.

Type

str

licenses

Output only. Any valid publicly visible licenses.

Type

MutableSequence[str]

mode

The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Valid values:

  • READ_ONLY

  • READ_WRITE

Type

str

source

Specifies a valid partial or full URL to an existing Persistent Disk resource.

Type

str

type_

Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. Valid values:

  • PERSISTENT

  • SCRATCH

Type

str

class RuntimeGuestOsFeature(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Optional. A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options. Guest OS features for boot disk.

type_

The ID of a supported feature. Read Enabling guest operating system features to see a list of available options.

Valid values:

  • FEATURE_TYPE_UNSPECIFIED

  • MULTI_IP_SUBNET

  • SECURE_BOOT

  • UEFI_COMPATIBLE

  • VIRTIO_SCSI_MULTIQUEUE

  • WINDOWS

Type

str

class google.cloud.notebooks_v1.types.LocalDiskInitializeParams(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Input only. Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new runtime. This property is mutually exclusive with the source property; you can only define one or the other, but not both.

description

Optional. Provide this property when creating the disk.

Type

str

disk_name

Optional. Specifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.

Type

str

disk_size_gb

Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk will be the same size as the image (usually 10GB). If specified, the size must be equal to or larger than 10GB. Default 100 GB.

Type

int

disk_type

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

Type

google.cloud.notebooks_v1.types.LocalDiskInitializeParams.DiskType

labels

Optional. Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.

Type

MutableMapping[str, str]

class DiskType(value)[source]

Bases: proto.enums.Enum

Possible disk types.

Values:
DISK_TYPE_UNSPECIFIED (0):

Disk type not set.

PD_STANDARD (1):

Standard persistent disk type.

PD_SSD (2):

SSD persistent disk type.

PD_BALANCED (3):

Balanced persistent disk type.

PD_EXTREME (4):

Extreme persistent disk type.

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.notebooks_v1.types.OperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the metadata of the long-running operation.

create_time

The time the operation was created.

Type

google.protobuf.timestamp_pb2.Timestamp

end_time

The time the operation finished running.

Type

google.protobuf.timestamp_pb2.Timestamp

target

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

Type

str

verb

Name of the verb executed by the operation.

Type

str

status_message

Human-readable status of the operation, if any.

Type

str

requested_cancellation

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][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED.

Type

bool

api_version

API version used to start the operation.

Type

str

endpoint

API endpoint name of this operation.

Type

str

class google.cloud.notebooks_v1.types.RefreshRuntimeTokenInternalRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for getting a new access token.

name

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

Type

str

vm_id

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

Type

str

class google.cloud.notebooks_v1.types.RefreshRuntimeTokenInternalResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response with a new access token.

access_token

The OAuth 2.0 access token.

Type

str

expire_time

Output only. Token expiration time.

Type

google.protobuf.timestamp_pb2.Timestamp

class google.cloud.notebooks_v1.types.RegisterInstanceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for registering a notebook instance.

parent

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

Type

str

instance_id

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.

Type

str

class google.cloud.notebooks_v1.types.ReportInstanceInfoRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for notebook instances to report information to Notebooks API.

name

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

Type

str

vm_id

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

Type

str

metadata

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

Type

MutableMapping[str, str]

class MetadataEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.notebooks_v1.types.ReportRuntimeEventRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for reporting a Managed Notebook Event.

name

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

Type

str

vm_id

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

Type

str

event

Required. The Event to be reported.

Type

google.cloud.notebooks_v1.types.Event

class google.cloud.notebooks_v1.types.ReservationAffinity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Reservation Affinity for consuming Zonal reservation.

consume_reservation_type

Optional. Type of reservation to consume

Type

google.cloud.notebooks_v1.types.ReservationAffinity.Type

key

Optional. Corresponds to the label key of reservation resource.

Type

str

values

Optional. Corresponds to the label values of reservation resource.

Type

MutableSequence[str]

class Type(value)[source]

Bases: proto.enums.Enum

Indicates whether to consume capacity from an reservation or not.

Values:
TYPE_UNSPECIFIED (0):

Default type.

NO_RESERVATION (1):

Do not consume from any allocated capacity.

ANY_RESERVATION (2):

Consume any reservation available.

SPECIFIC_RESERVATION (3):

Must consume from a specific reservation. Must specify key value fields for specifying the reservations.

class google.cloud.notebooks_v1.types.ResetInstanceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for resetting a notebook instance

name

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

Type

str

class google.cloud.notebooks_v1.types.ResetRuntimeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for resetting a Managed Notebook Runtime.

name

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

Type

str

request_id

Idempotent request UUID.

Type

str

class google.cloud.notebooks_v1.types.RollbackInstanceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for rollbacking a notebook instance

name

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

Type

str

target_snapshot

Required. The snapshot for rollback. Example: projects/test-project/global/snapshots/krwlzipynril.

Type

str

class google.cloud.notebooks_v1.types.Runtime(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The definition of a Runtime for a managed notebook instance.

name

Output only. The resource name of the runtime. Format: projects/{project}/locations/{location}/runtimes/{runtimeId}

Type

str

virtual_machine

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

This field is a member of oneof runtime_type.

Type

google.cloud.notebooks_v1.types.VirtualMachine

state

Output only. Runtime state.

Type

google.cloud.notebooks_v1.types.Runtime.State

health_state

Output only. Runtime health_state.

Type

google.cloud.notebooks_v1.types.Runtime.HealthState

access_config

The config settings for accessing runtime.

Type

google.cloud.notebooks_v1.types.RuntimeAccessConfig

software_config

The config settings for software inside the runtime.

Type

google.cloud.notebooks_v1.types.RuntimeSoftwareConfig

metrics

Output only. Contains Runtime daemon metrics such as Service status and JupyterLab stats.

Type

google.cloud.notebooks_v1.types.RuntimeMetrics

create_time

Output only. Runtime creation time.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Runtime update time.

Type

google.protobuf.timestamp_pb2.Timestamp

class HealthState(value)[source]

Bases: proto.enums.Enum

The runtime substate.

Values:
HEALTH_STATE_UNSPECIFIED (0):

The runtime substate is unknown.

HEALTHY (1):

The runtime is known to be in an healthy state (for example, critical daemons are running) Applies to ACTIVE state.

UNHEALTHY (2):

The runtime is known to be in an unhealthy state (for example, critical daemons are not running) Applies to ACTIVE state.

AGENT_NOT_INSTALLED (3):

The runtime has not installed health monitoring agent. Applies to ACTIVE state.

AGENT_NOT_RUNNING (4):

The runtime health monitoring agent is not running. Applies to ACTIVE state.

class State(value)[source]

Bases: proto.enums.Enum

The definition of the states of this runtime.

Values:
STATE_UNSPECIFIED (0):

State is not specified.

STARTING (1):

The compute layer is starting the runtime. It is not ready for use.

PROVISIONING (2):

The compute layer is installing required frameworks and registering the runtime with notebook proxy. It cannot be used.

ACTIVE (3):

The runtime is currently running. It is ready for use.

STOPPING (4):

The control logic is stopping the runtime. It cannot be used.

STOPPED (5):

The runtime is stopped. It cannot be used.

DELETING (6):

The runtime is being deleted. It cannot be used.

UPGRADING (7):

The runtime is upgrading. It cannot be used.

INITIALIZING (8):

The runtime is being created and set up. It is not ready for use.

class google.cloud.notebooks_v1.types.RuntimeAcceleratorConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Definition of the types of hardware accelerators that can be used. Definition of the types of hardware accelerators that can be used. See Compute Engine AcceleratorTypes. Examples:

  • nvidia-tesla-k80

  • nvidia-tesla-p100

  • nvidia-tesla-v100

  • nvidia-tesla-p4

  • nvidia-tesla-t4

  • nvidia-tesla-a100

type_

Accelerator model.

Type

google.cloud.notebooks_v1.types.RuntimeAcceleratorConfig.AcceleratorType

core_count

Count of cores of this accelerator.

Type

int

class AcceleratorType(value)[source]

Bases: proto.enums.Enum

Type of this accelerator.

Values:
ACCELERATOR_TYPE_UNSPECIFIED (0):

Accelerator type is not specified.

NVIDIA_TESLA_K80 (1):

Accelerator type is Nvidia Tesla K80.

NVIDIA_TESLA_P100 (2):

Accelerator type is Nvidia Tesla P100.

NVIDIA_TESLA_V100 (3):

Accelerator type is Nvidia Tesla V100.

NVIDIA_TESLA_P4 (4):

Accelerator type is Nvidia Tesla P4.

NVIDIA_TESLA_T4 (5):

Accelerator type is Nvidia Tesla T4.

NVIDIA_TESLA_A100 (6):

Accelerator type is Nvidia Tesla A100.

TPU_V2 (7):

(Coming soon) Accelerator type is TPU V2.

TPU_V3 (8):

(Coming soon) Accelerator type is TPU V3.

NVIDIA_TESLA_T4_VWS (9):

Accelerator type is NVIDIA Tesla T4 Virtual Workstations.

NVIDIA_TESLA_P100_VWS (10):

Accelerator type is NVIDIA Tesla P100 Virtual Workstations.

NVIDIA_TESLA_P4_VWS (11):

Accelerator type is NVIDIA Tesla P4 Virtual Workstations.

class google.cloud.notebooks_v1.types.RuntimeAccessConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Specifies the login configuration for Runtime

access_type

The type of access mode this instance.

Type

google.cloud.notebooks_v1.types.RuntimeAccessConfig.RuntimeAccessType

runtime_owner

The owner of this runtime after creation. Format: alias@example.com Currently supports one owner only.

Type

str

proxy_uri

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

Type

str

class RuntimeAccessType(value)[source]

Bases: proto.enums.Enum

Possible ways to access runtime. Authentication mode. Currently supports: Single User only.

Values:
RUNTIME_ACCESS_TYPE_UNSPECIFIED (0):

Unspecified access.

SINGLE_USER (1):

Single user login.

SERVICE_ACCOUNT (2):

Service Account mode. In Service Account mode, Runtime creator will specify a SA that exists in the consumer project. Using Runtime Service Account field. Users accessing the Runtime need ActAs (Service Account User) permission.

class google.cloud.notebooks_v1.types.RuntimeMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Contains runtime daemon metrics, such as OS and kernels and sessions stats.

system_metrics

Output only. The system metrics.

Type

MutableMapping[str, str]

class SystemMetricsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.notebooks_v1.types.RuntimeShieldedInstanceConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A set of Shielded Instance options. Check Images using supported Shielded VM features. Not all combinations are valid.

enable_secure_boot

Defines whether the instance has Secure Boot enabled. Secure Boot helps ensure that the system only runs authentic software by verifying the digital signature of all boot components, and halting the boot process if signature verification fails. Disabled by default.

Type

bool

enable_vtpm

Defines whether the instance has the vTPM enabled. Enabled by default.

Type

bool

enable_integrity_monitoring

Defines whether the instance has integrity monitoring enabled. Enables monitoring and attestation of the boot integrity of the instance. The attestation is performed against the integrity policy baseline. This baseline is initially derived from the implicitly trusted boot image when the instance is created. Enabled by default.

Type

bool

class google.cloud.notebooks_v1.types.RuntimeSoftwareConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Specifies the selection and configuration of software inside the runtime. The properties to set on runtime. Properties keys are specified in key:value format, for example:

  • idle_shutdown: true

  • idle_shutdown_timeout: 180

  • enable_health_monitoring: true

notebook_upgrade_schedule

Cron expression in UTC timezone, used to schedule instance auto upgrade. Please follow the cron format.

Type

str

enable_health_monitoring

Verifies core internal services are running. Default: True

This field is a member of oneof _enable_health_monitoring.

Type

bool

idle_shutdown

Runtime will automatically shutdown after idle_shutdown_time. Default: True

This field is a member of oneof _idle_shutdown.

Type

bool

idle_shutdown_timeout

Time in minutes to wait before shutting down runtime. Default: 180 minutes

Type

int

install_gpu_driver

Install Nvidia Driver automatically. Default: True

Type

bool

custom_gpu_driver_path

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

Type

str

post_startup_script

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

Type

str

kernels

Optional. Use a list of container images to use as Kernels in the notebook instance.

Type

MutableSequence[google.cloud.notebooks_v1.types.ContainerImage]

upgradeable

Output only. Bool indicating whether an newer image is available in an image family.

This field is a member of oneof _upgradeable.

Type

bool

post_startup_script_behavior

Behavior for the post startup script.

Type

google.cloud.notebooks_v1.types.RuntimeSoftwareConfig.PostStartupScriptBehavior

disable_terminal

Bool indicating whether JupyterLab terminal will be available or not. Default: False

This field is a member of oneof _disable_terminal.

Type

bool

version

Output only. version of boot image such as M100, from release label of the image.

This field is a member of oneof _version.

Type

str

class PostStartupScriptBehavior(value)[source]

Bases: proto.enums.Enum

Behavior for the post startup script.

Values:
POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED (0):

Unspecified post startup script behavior. Will run only once at creation.

RUN_EVERY_START (1):

Runs the post startup script provided during creation at every start.

DOWNLOAD_AND_RUN_EVERY_START (2):

Downloads and runs the provided post startup script at every start.

class google.cloud.notebooks_v1.types.Schedule(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The definition of a schedule.

name

Output only. The name of this schedule. Format: projects/{project_id}/locations/{location}/schedules/{schedule_id}

Type

str

display_name

Output only. Display name used for UI purposes. Name can only contain alphanumeric characters, hyphens -, and underscores _.

Type

str

description

A brief description of this environment.

Type

str

state
Type

google.cloud.notebooks_v1.types.Schedule.State

cron_schedule

Cron-tab formatted schedule by which the job will execute. Format: minute, hour, day of month, month, day of week, e.g. 0 0 * * WED = every Wednesday More examples: https://crontab.guru/examples.html

Type

str

time_zone

Timezone on which the cron_schedule. The value of this field must be a time zone name from the tz database. TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Note that some time zones include a provision for daylight savings time. The rules for daylight saving time are determined by the chosen tz. For UTC use the string “utc”. If a time zone is not specified, the default will be in UTC (also known as GMT).

Type

str

create_time

Output only. Time the schedule was created.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Time the schedule was last updated.

Type

google.protobuf.timestamp_pb2.Timestamp

execution_template

Notebook Execution Template corresponding to this schedule.

Type

google.cloud.notebooks_v1.types.ExecutionTemplate

recent_executions

Output only. The most recent execution names triggered from this schedule and their corresponding states.

Type

MutableSequence[google.cloud.notebooks_v1.types.Execution]

class State(value)[source]

Bases: proto.enums.Enum

State of the job.

Values:
STATE_UNSPECIFIED (0):

Unspecified state.

ENABLED (1):

The job is executing normally.

PAUSED (2):

The job is paused by the user. It will not execute. A user can intentionally pause the job using [PauseJobRequest][].

DISABLED (3):

The job is disabled by the system due to error. The user cannot directly set a job to be disabled.

UPDATE_FAILED (4):

The job state resulting from a failed [CloudScheduler.UpdateJob][] operation. To recover a job from this state, retry [CloudScheduler.UpdateJob][] until a successful response is received.

INITIALIZING (5):

The schedule resource is being created.

DELETING (6):

The schedule resource is being deleted.

class google.cloud.notebooks_v1.types.SetInstanceAcceleratorRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for setting instance accelerator.

name

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

Type

str

type_

Required. Type of this accelerator.

Type

google.cloud.notebooks_v1.types.Instance.AcceleratorType

core_count

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.

Type

int

class google.cloud.notebooks_v1.types.SetInstanceLabelsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for setting instance labels.

name

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

Type

str

labels

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

Type

MutableMapping[str, str]

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.notebooks_v1.types.SetInstanceMachineTypeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for setting instance machine type.

name

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

Type

str

machine_type

Required. The Compute Engine machine type.

Type

str

class google.cloud.notebooks_v1.types.StartInstanceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for starting a notebook instance

name

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

Type

str

class google.cloud.notebooks_v1.types.StartRuntimeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for starting a Managed Notebook Runtime.

name

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

Type

str

request_id

Idempotent request UUID.

Type

str

class google.cloud.notebooks_v1.types.StopInstanceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for stopping a notebook instance

name

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

Type

str

class google.cloud.notebooks_v1.types.StopRuntimeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for stopping a Managed Notebook Runtime.

name

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

Type

str

request_id

Idempotent request UUID.

Type

str

class google.cloud.notebooks_v1.types.SwitchRuntimeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for switching a Managed Notebook Runtime.

name

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

Type

str

machine_type

machine type.

Type

str

accelerator_config

accelerator config.

Type

google.cloud.notebooks_v1.types.RuntimeAcceleratorConfig

request_id

Idempotent request UUID.

Type

str

class google.cloud.notebooks_v1.types.TriggerScheduleRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for created scheduled notebooks

name

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

Type

str

class google.cloud.notebooks_v1.types.UpdateInstanceConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for updating instance configurations.

name

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

Type

str

config

The instance configurations to be updated.

Type

google.cloud.notebooks_v1.types.InstanceConfig

class google.cloud.notebooks_v1.types.UpdateInstanceMetadataItemsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for adding/changing metadata items for an instance.

name

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

Type

str

items

Metadata items to add/update for the instance.

Type

MutableMapping[str, str]

class ItemsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.notebooks_v1.types.UpdateInstanceMetadataItemsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for adding/changing metadata items for an instance.

items

Map of items that were added/updated to/in the metadata.

Type

MutableMapping[str, str]

class ItemsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.notebooks_v1.types.UpdateRuntimeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for updating a Managed Notebook configuration.

runtime

Required. The Runtime to be updated.

Type

google.cloud.notebooks_v1.types.Runtime

update_mask

Required. Specifies the path, relative to Runtime, of the field to update. For example, to change the software configuration kernels, the update_mask parameter would be specified as software_config.kernels, and the PATCH request body would specify the new value, as follows:

{
  "software_config":{
    "kernels": [{
       'repository':
       'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag':
       'latest' }],
    }
}

Currently, only the following fields can be updated:

  • software_config.kernels

  • software_config.post_startup_script

  • software_config.custom_gpu_driver_path

  • software_config.idle_shutdown

  • software_config.idle_shutdown_timeout

  • software_config.disable_terminal

Type

google.protobuf.field_mask_pb2.FieldMask

request_id

Idempotent request UUID.

Type

str

class google.cloud.notebooks_v1.types.UpdateShieldedInstanceConfigRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for updating the Shielded Instance config for a notebook instance. You can only use this method on a stopped instance

name

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

Type

str

shielded_instance_config

ShieldedInstance configuration to be updated.

Type

google.cloud.notebooks_v1.types.Instance.ShieldedInstanceConfig

class google.cloud.notebooks_v1.types.UpgradeInstanceInternalRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for upgrading a notebook instance from within the VM

name

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

Type

str

vm_id

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

Type

str

type_

Optional. The optional UpgradeType. Setting this field will search for additional compute images to upgrade this instance.

Type

google.cloud.notebooks_v1.types.UpgradeType

class google.cloud.notebooks_v1.types.UpgradeInstanceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for upgrading a notebook instance

name

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

Type

str

type_

Optional. The optional UpgradeType. Setting this field will search for additional compute images to upgrade this instance.

Type

google.cloud.notebooks_v1.types.UpgradeType

class google.cloud.notebooks_v1.types.UpgradeRuntimeRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for upgrading a Managed Notebook Runtime to the latest version. option (google.api.message_visibility).restriction = “TRUSTED_TESTER,SPECIAL_TESTER”;

name

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

Type

str

request_id

Idempotent request UUID.

Type

str

class google.cloud.notebooks_v1.types.UpgradeType(value)[source]

Bases: proto.enums.Enum

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

Values:
UPGRADE_TYPE_UNSPECIFIED (0):

Upgrade type is not specified.

UPGRADE_FRAMEWORK (1):

Upgrade ML framework.

UPGRADE_OS (2):

Upgrade Operating System.

UPGRADE_CUDA (3):

Upgrade CUDA.

UPGRADE_ALL (4):

Upgrade All (OS, Framework and CUDA).

class google.cloud.notebooks_v1.types.VirtualMachine(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Runtime using Virtual Machine for computing.

instance_name

Output only. The user-friendly name of the Managed Compute Engine instance.

Type

str

instance_id

Output only. The unique identifier of the Managed Compute Engine instance.

Type

str

virtual_machine_config

Virtual Machine configuration settings.

Type

google.cloud.notebooks_v1.types.VirtualMachineConfig

class google.cloud.notebooks_v1.types.VirtualMachineConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The config settings for virtual machine.

zone

Output only. The zone where the virtual machine is located. If using regional request, the notebooks service will pick a location in the corresponding runtime region. On a get request, zone will always be present. Example:

  • us-central1-b

Type

str

machine_type

Required. The Compute Engine machine type used for runtimes. Short name is valid. Examples:

  • n1-standard-2

  • e2-standard-8

Type

str

container_images

Optional. Use a list of container images to use as Kernels in the notebook instance.

Type

MutableSequence[google.cloud.notebooks_v1.types.ContainerImage]

data_disk

Required. Data disk option configuration settings.

Type

google.cloud.notebooks_v1.types.LocalDisk

encryption_config

Optional. Encryption settings for virtual machine data disk.

Type

google.cloud.notebooks_v1.types.EncryptionConfig

shielded_instance_config

Optional. Shielded VM Instance configuration settings.

Type

google.cloud.notebooks_v1.types.RuntimeShieldedInstanceConfig

accelerator_config

Optional. The Compute Engine accelerator configuration for this runtime.

Type

google.cloud.notebooks_v1.types.RuntimeAcceleratorConfig

network

Optional. The Compute Engine network to be used for machine communications. Cannot be specified with subnetwork. If neither network nor subnet is specified, the “default” network of the project is used, if it exists.

A full URL or partial URI. Examples:

  • https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default

  • projects/[project_id]/global/networks/default

Runtimes are managed resources inside Google Infrastructure. Runtimes support the following network configurations:

  • Google Managed Network (Network & subnet are empty)

  • Consumer Project VPC (network & subnet are required). Requires configuring Private Service Access.

  • Shared VPC (network & subnet are required). Requires configuring Private Service Access.

Type

str

subnet

Optional. The Compute Engine subnetwork to be used for machine communications. Cannot be specified with network.

A full URL or partial URI are valid. Examples:

  • https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0

  • projects/[project_id]/regions/us-east1/subnetworks/sub0

Type

str

internal_ip_only

Optional. If true, runtime will only have internal IP addresses. By default, runtimes are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each vm. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all dependencies must be configured to be accessible without external IP addresses.

Type

bool

tags

Optional. The Compute Engine tags to add to runtime (see Tagging instances).

Type

MutableSequence[str]

guest_attributes

Output only. The Compute Engine guest attributes. (see Project and instance guest attributes).

Type

MutableMapping[str, str]

metadata

Optional. The Compute Engine metadata entries to add to virtual machine. (see Project and instance metadata).

Type

MutableMapping[str, str]

labels

Optional. The labels to associate with this runtime. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035. No more than 32 labels can be associated with a cluster.

Type

MutableMapping[str, str]

nic_type

Optional. The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.

Type

google.cloud.notebooks_v1.types.VirtualMachineConfig.NicType

reserved_ip_range

Optional. Reserved IP Range name is used for VPC Peering. The subnetwork allocation will use the range name if it’s assigned.

Example: managed-notebooks-range-c

PEERING_RANGE_NAME_3=managed-notebooks-range-c
gcloud compute addresses create $PEERING_RANGE_NAME_3 \
  --global \
  --prefix-length=24 \
  --description="Google Cloud Managed Notebooks Range 24 c" \
  --network=$NETWORK \
  --addresses=192.168.0.0 \
  --purpose=VPC_PEERING

Field value will be: managed-notebooks-range-c

Type

str

boot_image

Optional. Boot image metadata used for runtime upgradeability.

Type

google.cloud.notebooks_v1.types.VirtualMachineConfig.BootImage

class BootImage(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Definition of the boot image used by the Runtime. Used to facilitate runtime upgradeability.

class GuestAttributesEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class MetadataEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class NicType(value)[source]

Bases: proto.enums.Enum

The type of vNIC driver. Default should be UNSPECIFIED_NIC_TYPE.

Values:
UNSPECIFIED_NIC_TYPE (0):

No type specified.

VIRTIO_NET (1):

VIRTIO

GVNIC (2):

GVNIC

class google.cloud.notebooks_v1.types.VmImage(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

project

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

Type

str

image_name

Use VM image name to find the image.

This field is a member of oneof image.

Type

str

image_family

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

This field is a member of oneof image.

Type

str