#[non_exhaustive]pub struct DataDisk {
pub disk_size_gb: i64,
pub disk_type: DiskType,
pub disk_encryption: DiskEncryption,
pub kms_key: String,
/* private fields */
}Expand description
An instance-attached disk resource.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.disk_size_gb: i64Optional. The size of the disk in GB attached to this VM instance, up to a maximum of 64000 GB (64 TB). If not specified, this defaults to 100.
disk_type: DiskTypeOptional. Input only. Indicates the type of the disk.
disk_encryption: DiskEncryptionOptional. Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
kms_key: StringOptional. 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.
Implementations§
Source§impl DataDisk
impl DataDisk
pub fn new() -> Self
Sourcepub fn set_disk_size_gb<T: Into<i64>>(self, v: T) -> Self
pub fn set_disk_size_gb<T: Into<i64>>(self, v: T) -> Self
Sets the value of disk_size_gb.
Sourcepub fn set_disk_type<T: Into<DiskType>>(self, v: T) -> Self
pub fn set_disk_type<T: Into<DiskType>>(self, v: T) -> Self
Sets the value of disk_type.
Sourcepub fn set_disk_encryption<T: Into<DiskEncryption>>(self, v: T) -> Self
pub fn set_disk_encryption<T: Into<DiskEncryption>>(self, v: T) -> Self
Sets the value of disk_encryption.
Sourcepub fn set_kms_key<T: Into<String>>(self, v: T) -> Self
pub fn set_kms_key<T: Into<String>>(self, v: T) -> Self
Sets the value of kms_key.
Trait Implementations§
impl StructuralPartialEq for DataDisk
Auto Trait Implementations§
impl Freeze for DataDisk
impl RefUnwindSafe for DataDisk
impl Send for DataDisk
impl Sync for DataDisk
impl Unpin for DataDisk
impl UnwindSafe for DataDisk
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
Mutably borrows from an owned value. Read more