pub struct Disk {
pub auto_delete: Option<bool>,
pub boot: Option<bool>,
pub device_name: Option<String>,
pub disk_size_gb: Option<i64>,
pub guest_os_features: Option<Vec<GuestOsFeature>>,
pub index: Option<i64>,
pub interface: Option<String>,
pub kind: Option<String>,
pub licenses: Option<Vec<String>>,
pub mode: Option<String>,
pub source: Option<String>,
pub type_: Option<String>,
}Expand description
An instance-attached disk resource.
This type is not used in any activity, and only used as part of another schema.
Fields§
§auto_delete: Option<bool>Indicates whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
boot: Option<bool>Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
device_name: Option<String>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.
disk_size_gb: Option<i64>Indicates the size of the disk in base-2 GB.
guest_os_features: Option<Vec<GuestOsFeature>>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.
index: Option<i64>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.
interface: Option<String>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
kind: Option<String>Type of the resource. Always compute#attachedDisk for attached disks.
licenses: Option<Vec<String>>A list of publicly visible licenses. Reserved for Google’s use. A License represents billing and aggregate usage data for public and marketplace images.
mode: Option<String>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
source: Option<String>Indicates a valid partial or full URL to an existing Persistent Disk resource.
type_: Option<String>Indicates the type of the disk, either SCRATCH or PERSISTENT. Valid values: * PERSISTENT * SCRATCH
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Disk
impl<'de> Deserialize<'de> for Disk
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Part for Disk
Auto Trait Implementations§
impl Freeze for Disk
impl RefUnwindSafe for Disk
impl Send for Disk
impl Sync for Disk
impl Unpin for Disk
impl UnwindSafe for Disk
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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