pub struct Volume {Show 16 fields
pub name: String,
pub urn: String,
pub size_gib: i32,
pub storage_class: String,
pub source_snapshot: String,
pub state: i32,
pub state_reason: String,
pub attachment: String,
pub resize_state: i32,
pub resize_reason: String,
pub pending_size_gib: i32,
pub retention_note: String,
pub iops: i32,
pub throughput_mibps: i32,
pub creator: String,
pub tags: BTreeMap<String, String>,
}Expand description
A block storage volume in one zone.
Fields§
§name: StringThe volume’s resource name.
urn: StringThe volume’s URN, the identifier access policies and the audit log use.
size_gib: i32The size in GiB, at least 1. Growing it resizes the volume; it never shrinks.
storage_class: StringThe storage class, storageClasses/{storage_class}. The default class
when left empty.
source_snapshot: StringThe snapshot the volume was created from, in the same project and zone; empty for an empty volume. The volume is at least the snapshot’s size.
state: i32Where the volume is in its lifecycle.
state_reason: StringWhy the volume is in volume::State::Error; empty otherwise.
attachment: StringWhen state is volume::State::InUse, the id of the volume attachment holding it.
resize_state: i32Where the last resize is.
resize_reason: StringWhy the last resize failed, when resize_state is volume::ResizeState::ResizeFailed.
pending_size_gib: i32The size a resize under way is heading for; 0 when none is.
size_gib changes once the resize is confirmed.
retention_note: StringWhy the volume is still here after the instance it was created with was terminated; empty in every other case. Most often a snapshot of it exists, and a snapshot depends on its volume’s data.
iops: i32The most I/O operations per second the volume serves, reads and writes combined: a ceiling, not a guaranteed rate. 0 when it isn’t limited.
throughput_mibps: i32The most MiB per second the volume transfers, reads and writes combined: a ceiling, not a guaranteed rate. 0 when it isn’t limited.
creator: StringThe principal that created the volume, such as user:<id> or
service_account:<id>.
Labels of your own, at most 50. The origin:name tag is the name the
console shows.
Implementations§
Source§impl Volume
impl Volume
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 resize_state(&self) -> ResizeState
pub fn resize_state(&self) -> ResizeState
Returns the enum value of resize_state, or the default if the field is set to an invalid enum value.
Sourcepub fn set_resize_state(&mut self, value: ResizeState)
pub fn set_resize_state(&mut self, value: ResizeState)
Sets resize_state to the provided enum value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Volume
impl<'de> Deserialize<'de> for Volume
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>,
Source§impl Message for Volume
impl Message for Volume
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.