Struct Instance

Source
pub struct Instance {
Show 38 fields pub accelerator_config: Option<AcceleratorConfig>, pub boot_disk_size_gb: Option<i64>, pub boot_disk_type: Option<String>, pub can_ip_forward: Option<bool>, pub container_image: Option<ContainerImage>, pub create_time: Option<DateTime<Utc>>, pub creator: Option<String>, pub custom_gpu_driver_path: Option<String>, pub data_disk_size_gb: Option<i64>, pub data_disk_type: Option<String>, pub disk_encryption: Option<String>, pub disks: Option<Vec<Disk>>, pub install_gpu_driver: Option<bool>, pub instance_migration_eligibility: Option<InstanceMigrationEligibility>, pub instance_owners: Option<Vec<String>>, pub kms_key: Option<String>, pub labels: Option<HashMap<String, String>>, pub machine_type: Option<String>, pub metadata: Option<HashMap<String, String>>, pub migrated: Option<bool>, pub name: Option<String>, pub network: Option<String>, pub nic_type: Option<String>, pub no_proxy_access: Option<bool>, pub no_public_ip: Option<bool>, pub no_remove_data_disk: Option<bool>, pub post_startup_script: Option<String>, pub proxy_uri: Option<String>, pub reservation_affinity: Option<ReservationAffinity>, pub service_account: Option<String>, pub service_account_scopes: Option<Vec<String>>, pub shielded_instance_config: Option<ShieldedInstanceConfig>, pub state: Option<String>, pub subnet: Option<String>, pub tags: Option<Vec<String>>, pub update_time: Option<DateTime<Utc>>, pub upgrade_history: Option<Vec<UpgradeHistoryEntry>>, pub vm_image: Option<VmImage>,
}
Expand description

The definition of a notebook instance.

§Activities

This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).

Fields§

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

§boot_disk_size_gb: Option<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.

§boot_disk_type: Option<String>

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

§can_ip_forward: Option<bool>

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

§container_image: Option<ContainerImage>

Use a container image to start the notebook instance.

§create_time: Option<DateTime<Utc>>

Output only. Instance creation time.

§creator: Option<String>

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

§custom_gpu_driver_path: Option<String>

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

§data_disk_size_gb: Option<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.

§data_disk_type: Option<String>

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

§disk_encryption: Option<String>

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

§disks: Option<Vec<Disk>>

Output only. Attached disks to notebook instance.

§install_gpu_driver: Option<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.

§instance_migration_eligibility: Option<InstanceMigrationEligibility>

Output only. Checks how feasible a migration from UmN to WbI is.

§instance_owners: Option<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.

§kms_key: Option<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.

§labels: Option<HashMap<String, String>>

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

§machine_type: Option<String>

Required. The Compute Engine machine type of this instance.

§metadata: Option<HashMap<String, String>>

Custom metadata to apply to this instance. For example, to specify a Cloud Storage bucket for automatic backup, you can use the gcs-data-bucket metadata tag. Format: "--metadata=gcs-data-bucket=BUCKET".

§migrated: Option<bool>

Output only. Bool indicating whether this notebook has been migrated to a Workbench Instance

§name: Option<String>

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

§network: Option<String>

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

§nic_type: Option<String>

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

§no_proxy_access: Option<bool>

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

§no_public_ip: Option<bool>

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

§no_remove_data_disk: Option<bool>

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

§post_startup_script: Option<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: Option<String>

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

§reservation_affinity: Option<ReservationAffinity>

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

§service_account: Option<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: Option<Vec<String>>

Optional. The URIs of service account scopes to be included in Compute Engine instances. If not specified, the following scopes are defined: - https://www.googleapis.com/auth/cloud-platform - https://www.googleapis.com/auth/userinfo.email If not using default scopes, you need at least: https://www.googleapis.com/auth/compute

§shielded_instance_config: Option<ShieldedInstanceConfig>

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

§state: Option<String>

Output only. The state of this instance.

§subnet: Option<String>

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

§tags: Option<Vec<String>>

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

§update_time: Option<DateTime<Utc>>

Output only. Instance update time.

§upgrade_history: Option<Vec<UpgradeHistoryEntry>>

The upgrade history of this instance.

§vm_image: Option<VmImage>

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

Trait Implementations§

Source§

impl Clone for Instance

Source§

fn clone(&self) -> Instance

Returns a duplicate 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() -> Instance

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

impl<'de> Deserialize<'de> for Instance

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Instance

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl RequestValue for Instance

Source§

impl ResponseResult 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

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

Source§

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

Source§

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.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,