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:
- 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
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.
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
impl Instance
sourcepub fn state(&self) -> State
pub fn state(&self) -> State
Returns the enum value of state
, or the default if the field is set to an invalid enum value.
sourcepub fn boot_disk_type(&self) -> DiskType
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.
sourcepub fn set_boot_disk_type(&mut self, value: DiskType)
pub fn set_boot_disk_type(&mut self, value: DiskType)
Sets boot_disk_type
to the provided enum value.
sourcepub fn disk_encryption(&self) -> DiskEncryption
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.
sourcepub fn set_disk_encryption(&mut self, value: DiskEncryption)
pub fn set_disk_encryption(&mut self, value: DiskEncryption)
Sets disk_encryption
to the provided enum value.
sourcepub fn data_disk_type(&self) -> DiskType
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.
sourcepub fn set_data_disk_type(&mut self, value: DiskType)
pub fn set_data_disk_type(&mut self, value: DiskType)
Sets data_disk_type
to the provided enum value.
sourcepub fn nic_type(&self) -> NicType
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.
sourcepub fn set_nic_type(&mut self, value: NicType)
pub fn set_nic_type(&mut self, value: NicType)
Sets nic_type
to the provided enum value.
Trait Implementations§
source§impl Message for Instance
impl Message for Instance
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Instance
impl PartialEq for Instance
impl StructuralPartialEq for Instance
Auto Trait Implementations§
impl Freeze for Instance
impl RefUnwindSafe for Instance
impl Send for Instance
impl Sync for Instance
impl Unpin for Instance
impl UnwindSafe for Instance
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request