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 v1beta1 API

class google.cloud.notebooks_v1beta1.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_v1beta1.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_v1beta1.types.Environment

class google.cloud.notebooks_v1beta1.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_v1beta1.types.Instance

class google.cloud.notebooks_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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

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_v1beta1.types.Instance.AcceleratorConfig

state

Output only. The state of this instance.

Type

google.cloud.notebooks_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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

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]

nic_type

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

Type

google.cloud.notebooks_v1beta1.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_v1beta1.types.ReservationAffinity

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_v1beta1.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_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 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.

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.

Values:
UNSPECIFIED_NIC_TYPE (0):

No type specified. Default should be UNSPECIFIED_NIC_TYPE.

VIRTIO_NET (1):

VIRTIO. Default in Notebooks DLVM.

GVNIC (2):

GVNIC. Alternative to VIRTIO. https://github.com/GoogleCloudPlatform/compute-virtual-ethernet-linux

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 google.cloud.notebooks_v1beta1.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

class google.cloud.notebooks_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.types.ResetInstanceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for reseting a notebook instance

name

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

Type

str

class google.cloud.notebooks_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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_v1beta1.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

class google.cloud.notebooks_v1beta1.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

class google.cloud.notebooks_v1beta1.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: projects/{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