Struct google_api_proto::google::cloud::notebooks::v1::Instance

source ·
pub struct Instance {
Show 35 fields pub name: String, pub post_startup_script: String, pub proxy_uri: String, pub instance_owners: Vec<String>, pub service_account: String, pub service_account_scopes: Vec<String>, pub machine_type: String, pub accelerator_config: Option<AcceleratorConfig>, pub state: i32, pub install_gpu_driver: bool, pub custom_gpu_driver_path: String, pub boot_disk_type: i32, pub boot_disk_size_gb: i64, pub data_disk_type: i32, pub data_disk_size_gb: i64, pub no_remove_data_disk: bool, pub disk_encryption: i32, pub kms_key: String, pub disks: Vec<Disk>, pub shielded_instance_config: Option<ShieldedInstanceConfig>, pub no_public_ip: bool, pub no_proxy_access: bool, pub network: String, pub subnet: String, pub labels: BTreeMap<String, String>, pub metadata: BTreeMap<String, String>, pub tags: Vec<String>, pub upgrade_history: Vec<UpgradeHistoryEntry>, pub nic_type: i32, pub reservation_affinity: Option<ReservationAffinity>, pub creator: String, pub can_ip_forward: bool, pub create_time: Option<Timestamp>, pub update_time: Option<Timestamp>, pub environment: Option<Environment>,
}
Expand description

The definition of a notebook instance.

Fields§

§name: String

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

§post_startup_script: String

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

§proxy_uri: String

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

§instance_owners: Vec<String>

Input only. The owner of this instance after creation. Format: alias@example.com

Currently supports one owner only. If not specified, all of the service account users of your VM instance’s service account can use the instance.

§service_account: String

The service account on this instance, giving access to other Google Cloud services. You can use any service account within the same project, but you must have the service account user permission to use the instance.

If not specified, the Compute Engine default service account is used.

§service_account_scopes: Vec<String>

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

If not specified, the following scopes are defined:

§machine_type: String

Required. The Compute Engine machine type of this instance.

§accelerator_config: Option<AcceleratorConfig>

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

§state: i32

Output only. The state of this instance.

§install_gpu_driver: bool

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

§custom_gpu_driver_path: String

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

§boot_disk_type: i32

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

§boot_disk_size_gb: i64

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

§data_disk_type: i32

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

§data_disk_size_gb: i64

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

§no_remove_data_disk: bool

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

§disk_encryption: i32

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

§kms_key: String

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

Learn more about using your own encryption keys.

§disks: Vec<Disk>

Output only. Attached disks to notebook instance.

§shielded_instance_config: Option<ShieldedInstanceConfig>

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

§no_public_ip: bool

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

§no_proxy_access: bool

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

§network: String

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

§subnet: String

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

§labels: BTreeMap<String, String>

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

§metadata: BTreeMap<String, String>

Custom metadata to apply to this instance.

§tags: Vec<String>

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

§upgrade_history: Vec<UpgradeHistoryEntry>

The upgrade history of this instance.

§nic_type: i32

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

§reservation_affinity: Option<ReservationAffinity>

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

§creator: String

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

§can_ip_forward: bool

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

§create_time: Option<Timestamp>

Output only. Instance creation time.

§update_time: Option<Timestamp>

Output only. Instance update time.

§environment: Option<Environment>

Type of the environment; can be one of VM image, or container image.

Implementations§

source§

impl Instance

source

pub fn state(&self) -> State

Returns the enum value of state, or the default if the field is set to an invalid enum value.

source

pub fn set_state(&mut self, value: State)

Sets state to the provided enum value.

source

pub fn boot_disk_type(&self) -> DiskType

Returns the enum value of boot_disk_type, or the default if the field is set to an invalid enum value.

source

pub fn set_boot_disk_type(&mut self, value: DiskType)

Sets boot_disk_type to the provided enum value.

source

pub fn disk_encryption(&self) -> DiskEncryption

Returns the enum value of disk_encryption, or the default if the field is set to an invalid enum value.

source

pub fn set_disk_encryption(&mut self, value: DiskEncryption)

Sets disk_encryption to the provided enum value.

source

pub fn data_disk_type(&self) -> DiskType

Returns the enum value of data_disk_type, or the default if the field is set to an invalid enum value.

source

pub fn set_data_disk_type(&mut self, value: DiskType)

Sets data_disk_type to the provided enum value.

source

pub fn nic_type(&self) -> NicType

Returns the enum value of nic_type, or the default if the field is set to an invalid enum value.

source

pub fn set_nic_type(&mut self, value: NicType)

Sets nic_type to the provided enum value.

Trait Implementations§

source§

impl Clone for Instance

source§

fn clone(&self) -> Instance

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Instance

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Instance

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Message for Instance

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for Instance

source§

fn eq(&self, other: &Instance) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Instance

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more