#[non_exhaustive]pub struct VolumeConfig {
pub name: String,
pub id: String,
pub snapshots_enabled: bool,
pub type: Type,
pub protocol: Protocol,
pub size_gb: i32,
pub lun_ranges: Vec<LunRange>,
pub machine_ids: Vec<String>,
pub nfs_exports: Vec<NfsExport>,
pub user_note: String,
pub gcp_service: String,
pub performance_tier: VolumePerformanceTier,
/* private fields */
}Expand description
Configuration parameters for a new 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: StringOutput only. The name of the volume config.
id: StringA transient unique identifier to identify a volume within an ProvisioningConfig request.
snapshots_enabled: boolWhether snapshots should be enabled.
type: TypeThe type of this Volume.
protocol: ProtocolVolume protocol.
size_gb: i32The requested size of this volume, in GB.
lun_ranges: Vec<LunRange>LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
machine_ids: Vec<String>Machine ids connected to this volume. Set only when protocol is PROTOCOL_FC.
nfs_exports: Vec<NfsExport>NFS exports. Set only when protocol is PROTOCOL_NFS.
user_note: StringUser note field, it can be used by customers to add additional information for the BMS Ops team .
gcp_service: StringThe GCP service of the storage volume. Available gcp_service are in https://cloud.google.com/bare-metal/docs/bms-planning.
performance_tier: VolumePerformanceTierPerformance tier of the Volume. Default is SHARED.
Implementations§
Source§impl VolumeConfig
impl VolumeConfig
pub fn new() -> Self
Sourcepub fn set_snapshots_enabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_snapshots_enabled<T: Into<bool>>(self, v: T) -> Self
Sets the value of snapshots_enabled.
Sourcepub fn set_protocol<T: Into<Protocol>>(self, v: T) -> Self
pub fn set_protocol<T: Into<Protocol>>(self, v: T) -> Self
Sets the value of protocol.
Sourcepub fn set_size_gb<T: Into<i32>>(self, v: T) -> Self
pub fn set_size_gb<T: Into<i32>>(self, v: T) -> Self
Sets the value of size_gb.
Sourcepub fn set_lun_ranges<T, V>(self, v: T) -> Self
pub fn set_lun_ranges<T, V>(self, v: T) -> Self
Sets the value of lun_ranges.
Sourcepub fn set_machine_ids<T, V>(self, v: T) -> Self
pub fn set_machine_ids<T, V>(self, v: T) -> Self
Sets the value of machine_ids.
Sourcepub fn set_nfs_exports<T, V>(self, v: T) -> Self
pub fn set_nfs_exports<T, V>(self, v: T) -> Self
Sets the value of nfs_exports.
Sourcepub fn set_user_note<T: Into<String>>(self, v: T) -> Self
pub fn set_user_note<T: Into<String>>(self, v: T) -> Self
Sets the value of user_note.
Sourcepub fn set_gcp_service<T: Into<String>>(self, v: T) -> Self
pub fn set_gcp_service<T: Into<String>>(self, v: T) -> Self
Sets the value of gcp_service.
Sourcepub fn set_performance_tier<T: Into<VolumePerformanceTier>>(self, v: T) -> Self
pub fn set_performance_tier<T: Into<VolumePerformanceTier>>(self, v: T) -> Self
Sets the value of performance_tier.
Trait Implementations§
Source§impl Clone for VolumeConfig
impl Clone for VolumeConfig
Source§fn clone(&self) -> VolumeConfig
fn clone(&self) -> VolumeConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more