pub struct NewServer { /* private fields */ }
Expand description
A request to create a server.
Implementations§
source§impl NewServer
impl NewServer
sourcepub async fn create(self) -> Result<ServerCreationWaiter>
pub async fn create(self) -> Result<ServerCreationWaiter>
Request creation of the server.
sourcepub fn add_fixed_ip(&mut self, fixed_ip: Ipv4Addr)
pub fn add_fixed_ip(&mut self, fixed_ip: Ipv4Addr)
Add a virtual NIC with given fixed IP to the new server.
sourcepub fn add_network<N>(&mut self, network: N)where
N: Into<NetworkRef>,
pub fn add_network<N>(&mut self, network: N)where N: Into<NetworkRef>,
Add a virtual NIC from this network to the new server.
sourcepub fn add_port<P>(&mut self, port: P)where
P: Into<PortRef>,
pub fn add_port<P>(&mut self, port: P)where P: Into<PortRef>,
Add a virtual NIC with this port to the new server.
sourcepub fn block_devices(&mut self) -> &mut Vec<BlockDevice> ⓘ
pub fn block_devices(&mut self) -> &mut Vec<BlockDevice> ⓘ
Block devices attached to the server.
sourcepub fn set_image<I>(&mut self, image: I)where
I: Into<ImageRef>,
pub fn set_image<I>(&mut self, image: I)where I: Into<ImageRef>,
Use this image as a source for the new server.
sourcepub fn set_keypair<K>(&mut self, keypair: K)where
K: Into<KeyPairRef>,
pub fn set_keypair<K>(&mut self, keypair: K)where K: Into<KeyPairRef>,
Use this key pair for the new server.
sourcepub fn set_availability_zone<A>(&mut self, availability_zone: A)where
A: Into<String>,
pub fn set_availability_zone<A>(&mut self, availability_zone: A)where A: Into<String>,
Use this availability_zone for the new server.
sourcepub fn with_block_device(self, block_device: BlockDevice) -> Self
pub fn with_block_device(self, block_device: BlockDevice) -> Self
Add a block device to attach to the server.
sourcepub fn with_boot_volume<V>(self, volume: V) -> Selfwhere
V: Into<VolumeRef>,
pub fn with_boot_volume<V>(self, volume: V) -> Selfwhere V: Into<VolumeRef>,
Add a volume to boot from.
sourcepub fn with_fixed_ip(self, fixed_ip: Ipv4Addr) -> NewServer
pub fn with_fixed_ip(self, fixed_ip: Ipv4Addr) -> NewServer
Add a virtual NIC with given fixed IP to the new server.
sourcepub fn with_image<I>(self, image: I) -> NewServerwhere
I: Into<ImageRef>,
pub fn with_image<I>(self, image: I) -> NewServerwhere I: Into<ImageRef>,
Use this image as a source for the new server.
sourcepub fn with_keypair<K>(self, keypair: K) -> NewServerwhere
K: Into<KeyPairRef>,
pub fn with_keypair<K>(self, keypair: K) -> NewServerwhere K: Into<KeyPairRef>,
Use this key pair for the new server.
sourcepub fn with_availability_zone<K>(self, availability_zone: K) -> NewServerwhere
K: Into<String>,
pub fn with_availability_zone<K>(self, availability_zone: K) -> NewServerwhere K: Into<String>,
Use this availability zone for the new server.
sourcepub fn with_metadata<S1, S2>(self, key: S1, value: S2) -> NewServerwhere
S1: Into<String>,
S2: Into<String>,
pub fn with_metadata<S1, S2>(self, key: S1, value: S2) -> NewServerwhere S1: Into<String>, S2: Into<String>,
Add an arbitrary key/value metadata pair.
sourcepub fn with_network<N>(self, network: N) -> NewServerwhere
N: Into<NetworkRef>,
pub fn with_network<N>(self, network: N) -> NewServerwhere N: Into<NetworkRef>,
Add a virtual NIC from this network to the new server.
sourcepub fn with_new_boot_volume<I>(self, image: I, size_gib: u32) -> Selfwhere
I: Into<ImageRef>,
pub fn with_new_boot_volume<I>(self, image: I, size_gib: u32) -> Selfwhere I: Into<ImageRef>,
Create a volume to boot from from an image.
sourcepub fn with_port<P>(self, port: P) -> NewServerwhere
P: Into<PortRef>,
pub fn with_port<P>(self, port: P) -> NewServerwhere P: Into<PortRef>,
Add a virtual NIC with this port to the new server.
sourcepub fn set_user_data<S: Into<String>>(&mut self, value: S)
pub fn set_user_data<S: Into<String>>(&mut self, value: S)
Use this user-data for the new server.
sourcepub fn with_user_data<S: Into<String>>(self, value: S) -> Self
pub fn with_user_data<S: Into<String>>(self, value: S) -> Self
Use this user-data for the new server.
sourcepub fn set_config_drive(&mut self, value: bool)
pub fn set_config_drive(&mut self, value: bool)
Enable/disable config-drive for the new server.
sourcepub fn with_config_drive(self, value: bool) -> Self
pub fn with_config_drive(self, value: bool) -> Self
Enable/disable config-drive for the new server.