pub struct AttachedDisk {
Show 18 fields pub architecture: Option<String>, pub auto_delete: Option<bool>, pub boot: Option<bool>, pub device_name: Option<String>, pub disk_encryption_key: Option<CustomerEncryptionKey>, pub disk_size_gb: Option<i64>, pub force_attach: Option<bool>, pub guest_os_features: Vec<GuestOsFeature>, pub index: Option<i32>, pub initialize_params: Option<AttachedDiskInitializeParams>, pub interface: Option<String>, pub kind: Option<String>, pub licenses: Vec<String>, pub mode: Option<String>, pub saved_state: Option<String>, pub shielded_instance_initial_state: Option<InitialStateConfig>, pub source: Option<String>, pub type: Option<String>,
}
Expand description

An instance-attached disk resource.

Fields§

§architecture: Option<String>

[Output Only] The architecture of the attached disk. Valid values are ARM64 or X86_64. Check the Architecture enum for the list of possible values.

§auto_delete: Option<bool>

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

Specifies 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_encryption_key: Option<CustomerEncryptionKey>

Encrypts or decrypts a disk using a customer-supplied encryption key. If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key. If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance. If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.

§disk_size_gb: Option<i64>

The size of the disk in GB.

§force_attach: Option<bool>

[Input Only] Whether to force attach the regional disk even if it’s currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error.

§guest_os_features: Vec<GuestOsFeature>

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

[Output Only] 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.

§initialize_params: Option<AttachedDiskInitializeParams>

[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. This property is mutually exclusive with the source property; you can only define one or the other, but not both.

§interface: Option<String>

Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. For most machine types, the default is SCSI. Local SSDs can use either NVME or SCSI. In certain configurations, persistent disks can use NVMe. For more information, see About persistent disks. Check the Interface enum for the list of possible values.

§kind: Option<String>

[Output Only] Type of the resource. Always compute#attachedDisk for attached disks.

§licenses: Vec<String>

[Output Only] Any valid publicly visible licenses.

§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. Check the Mode enum for the list of possible values.

§saved_state: Option<String>

For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api. Check the SavedState enum for the list of possible values.

§shielded_instance_initial_state: Option<InitialStateConfig>

[Output Only] shielded vm initial state stored on disk

§source: Option<String>

Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. Note that for InstanceTemplate, specify the disk name for zonal disk, and the URL for regional disk.

§type: Option<String>

Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. Check the Type enum for the list of possible values.

Implementations§

source§

impl AttachedDisk

source

pub fn boot(&self) -> bool

Returns the value of boot, or the default value if boot is unset.

source

pub fn kind(&self) -> &str

Returns the value of kind, or the default value if kind is unset.

source

pub fn mode(&self) -> &str

Returns the value of mode, or the default value if mode is unset.

source

pub fn type(&self) -> &str

Returns the value of type, or the default value if type is unset.

source

pub fn device_name(&self) -> &str

Returns the value of device_name, or the default value if device_name is unset.

source

pub fn index(&self) -> i32

Returns the value of index, or the default value if index is unset.

source

pub fn force_attach(&self) -> bool

Returns the value of force_attach, or the default value if force_attach is unset.

source

pub fn source(&self) -> &str

Returns the value of source, or the default value if source is unset.

source

pub fn architecture(&self) -> &str

Returns the value of architecture, or the default value if architecture is unset.

source

pub fn disk_size_gb(&self) -> i64

Returns the value of disk_size_gb, or the default value if disk_size_gb is unset.

source

pub fn saved_state(&self) -> &str

Returns the value of saved_state, or the default value if saved_state is unset.

source

pub fn auto_delete(&self) -> bool

Returns the value of auto_delete, or the default value if auto_delete is unset.

source

pub fn interface(&self) -> &str

Returns the value of interface, or the default value if interface is unset.

Trait Implementations§

source§

impl Clone for AttachedDisk

source§

fn clone(&self) -> AttachedDisk

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 AttachedDisk

source§

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

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

impl Default for AttachedDisk

source§

fn default() -> Self

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

impl Message for AttachedDisk

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<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, 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<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, 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<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

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

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

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

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

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

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

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

impl PartialEq for AttachedDisk

source§

fn eq(&self, other: &AttachedDisk) -> 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 AttachedDisk

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