#[non_exhaustive]pub struct BlockDevice {
pub name: Option<String>,
pub host_groups: Vec<String>,
pub identifier: String,
pub size_gib: Option<i64>,
pub os_type: OsType,
/* private fields */
}Expand description
Block device represents the device(s) which are stored in the block volume.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: Option<String>Optional. User-defined name for the block device, unique within the volume. In case no user input is provided, name will be auto-generated in the backend. The name must meet the following requirements:
- Be between 1 and 255 characters long.
- Contain only uppercase or lowercase letters (A-Z, a-z), numbers (0-9), and the following special characters: “-”, “_”, “}”, “{”, “.”.
- Spaces are not allowed.
host_groups: Vec<String>Optional. A list of host groups that identify hosts that can mount the
block volume. Format:
projects/{project_id}/locations/{location}/hostGroups/{host_group_id}
This field can be updated after the block device is created.
identifier: StringOutput only. Device identifier of the block volume. This represents
lun_serial_number for iSCSI volumes.
size_gib: Option<i64>Optional. The size of the block device in GiB.
Any value provided for the size_gib field during volume creation is
ignored. The block device’s size is system-managed and will be set to match
the parent Volume’s capacity_gib.
os_type: OsTypeRequired. Immutable. The OS type of the volume. This field can’t be changed after the block device is created.
Implementations§
Source§impl BlockDevice
impl BlockDevice
Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_host_groups<T, V>(self, v: T) -> Self
pub fn set_host_groups<T, V>(self, v: T) -> Self
Sets the value of host_groups.
§Example
let x = BlockDevice::new().set_host_groups(["a", "b", "c"]);Sourcepub fn set_identifier<T: Into<String>>(self, v: T) -> Self
pub fn set_identifier<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_size_gib<T>(self, v: T) -> Self
pub fn set_size_gib<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_size_gib<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_size_gib<T>(self, v: Option<T>) -> Self
Sourcepub fn set_os_type<T: Into<OsType>>(self, v: T) -> Self
pub fn set_os_type<T: Into<OsType>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for BlockDevice
impl Clone for BlockDevice
Source§fn clone(&self) -> BlockDevice
fn clone(&self) -> BlockDevice
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BlockDevice
impl Debug for BlockDevice
Source§impl Default for BlockDevice
impl Default for BlockDevice
Source§fn default() -> BlockDevice
fn default() -> BlockDevice
Source§impl Message for BlockDevice
impl Message for BlockDevice
Source§impl PartialEq for BlockDevice
impl PartialEq for BlockDevice
impl StructuralPartialEq for BlockDevice
Auto Trait Implementations§
impl Freeze for BlockDevice
impl RefUnwindSafe for BlockDevice
impl Send for BlockDevice
impl Sync for BlockDevice
impl Unpin for BlockDevice
impl UnsafeUnpin for BlockDevice
impl UnwindSafe for BlockDevice
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> 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