#[non_exhaustive]pub struct InstanceConfig {Show 13 fields
pub name: String,
pub id: String,
pub instance_type: String,
pub hyperthreading: bool,
pub os_image: String,
pub client_network: Option<NetworkAddress>,
pub private_network: Option<NetworkAddress>,
pub user_note: String,
pub account_networks_enabled: bool,
pub network_config: NetworkConfig,
pub network_template: String,
pub logical_interfaces: Vec<LogicalInterface>,
pub ssh_key_names: Vec<String>,
/* private fields */
}Expand description
Configuration parameters for a new instance.
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 instance config.
id: StringA transient unique identifier to idenfity an instance within an ProvisioningConfig request.
instance_type: StringInstance type. Available types
hyperthreading: boolWhether the instance should be provisioned with Hyperthreading enabled.
os_image: StringOS image to initialize the instance. Available images
client_network: Option<NetworkAddress>Client network address. Filled if InstanceConfig.multivlan_config is false.
private_network: Option<NetworkAddress>Private network address, if any. Filled if InstanceConfig.multivlan_config is false.
user_note: StringUser note field, it can be used by customers to add additional information for the BMS Ops team .
account_networks_enabled: boolIf true networks can be from different projects of the same vendor account.
network_config: NetworkConfigThe type of network configuration on the instance.
network_template: StringServer network template name. Filled if InstanceConfig.multivlan_config is true.
logical_interfaces: Vec<LogicalInterface>List of logical interfaces for the instance. The number of logical interfaces will be the same as number of hardware bond/nic on the chosen network template. Filled if InstanceConfig.multivlan_config is true.
ssh_key_names: Vec<String>List of names of ssh keys used to provision the instance.
Implementations§
Source§impl InstanceConfig
impl InstanceConfig
pub fn new() -> Self
Sourcepub fn set_instance_type<T: Into<String>>(self, v: T) -> Self
pub fn set_instance_type<T: Into<String>>(self, v: T) -> Self
Sets the value of instance_type.
Sourcepub fn set_hyperthreading<T: Into<bool>>(self, v: T) -> Self
pub fn set_hyperthreading<T: Into<bool>>(self, v: T) -> Self
Sets the value of hyperthreading.
Sourcepub fn set_os_image<T: Into<String>>(self, v: T) -> Self
pub fn set_os_image<T: Into<String>>(self, v: T) -> Self
Sets the value of os_image.
Sourcepub fn set_client_network<T>(self, v: T) -> Selfwhere
T: Into<NetworkAddress>,
👎Deprecated
pub fn set_client_network<T>(self, v: T) -> Selfwhere
T: Into<NetworkAddress>,
Sets the value of client_network.
Sourcepub fn set_or_clear_client_network<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkAddress>,
👎Deprecated
pub fn set_or_clear_client_network<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkAddress>,
Sets or clears the value of client_network.
Sourcepub fn set_private_network<T>(self, v: T) -> Selfwhere
T: Into<NetworkAddress>,
👎Deprecated
pub fn set_private_network<T>(self, v: T) -> Selfwhere
T: Into<NetworkAddress>,
Sets the value of private_network.
Sourcepub fn set_or_clear_private_network<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkAddress>,
👎Deprecated
pub fn set_or_clear_private_network<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkAddress>,
Sets or clears the value of private_network.
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_account_networks_enabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_account_networks_enabled<T: Into<bool>>(self, v: T) -> Self
Sets the value of account_networks_enabled.
Sourcepub fn set_network_config<T: Into<NetworkConfig>>(self, v: T) -> Self
pub fn set_network_config<T: Into<NetworkConfig>>(self, v: T) -> Self
Sets the value of network_config.
Sourcepub fn set_network_template<T: Into<String>>(self, v: T) -> Self
pub fn set_network_template<T: Into<String>>(self, v: T) -> Self
Sets the value of network_template.
Sourcepub fn set_logical_interfaces<T, V>(self, v: T) -> Self
pub fn set_logical_interfaces<T, V>(self, v: T) -> Self
Sets the value of logical_interfaces.
Sourcepub fn set_ssh_key_names<T, V>(self, v: T) -> Self
pub fn set_ssh_key_names<T, V>(self, v: T) -> Self
Sets the value of ssh_key_names.
Trait Implementations§
Source§impl Clone for InstanceConfig
impl Clone for InstanceConfig
Source§fn clone(&self) -> InstanceConfig
fn clone(&self) -> InstanceConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more