pub struct NewServer { /* private fields */ }
Expand description

A request to create a server.

Implementations§

source§

impl NewServer

source

pub async fn create(self) -> Result<ServerCreationWaiter>

Request creation of the server.

source

pub fn add_fixed_ip(&mut self, fixed_ip: Ipv4Addr)

Add a virtual NIC with given fixed IP to the new server.

source

pub fn add_network<N>(&mut self, network: N)where N: Into<NetworkRef>,

Add a virtual NIC from this network to the new server.

source

pub fn add_port<P>(&mut self, port: P)where P: Into<PortRef>,

Add a virtual NIC with this port to the new server.

source

pub fn metadata(&mut self) -> &mut HashMap<String, String>

Metadata assigned to this server.

source

pub fn nics(&mut self) -> &mut Vec<ServerNIC>

NICs to attach to this server.

source

pub fn block_devices(&mut self) -> &mut Vec<BlockDevice>

Block devices attached to the server.

source

pub fn set_image<I>(&mut self, image: I)where I: Into<ImageRef>,

Use this image as a source for the new server.

source

pub fn set_keypair<K>(&mut self, keypair: K)where K: Into<KeyPairRef>,

Use this key pair for the new server.

source

pub fn set_availability_zone<A>(&mut self, availability_zone: A)where A: Into<String>,

Use this availability_zone for the new server.

source

pub fn with_block_device(self, block_device: BlockDevice) -> Self

Add a block device to attach to the server.

source

pub fn with_boot_volume<V>(self, volume: V) -> Selfwhere V: Into<VolumeRef>,

Add a volume to boot from.

source

pub fn with_fixed_ip(self, fixed_ip: Ipv4Addr) -> NewServer

Add a virtual NIC with given fixed IP to the new server.

source

pub fn with_image<I>(self, image: I) -> NewServerwhere I: Into<ImageRef>,

Use this image as a source for the new server.

source

pub fn with_keypair<K>(self, keypair: K) -> NewServerwhere K: Into<KeyPairRef>,

Use this key pair for the new server.

source

pub fn with_availability_zone<K>(self, availability_zone: K) -> NewServerwhere K: Into<String>,

Use this availability zone for the new server.

source

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.

source

pub fn with_network<N>(self, network: N) -> NewServerwhere N: Into<NetworkRef>,

Add a virtual NIC from this network to the new server.

source

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.

source

pub fn with_port<P>(self, port: P) -> NewServerwhere P: Into<PortRef>,

Add a virtual NIC with this port to the new server.

source

pub fn set_user_data<S: Into<String>>(&mut self, value: S)

Use this user-data for the new server.

source

pub fn with_user_data<S: Into<String>>(self, value: S) -> Self

Use this user-data for the new server.

source

pub fn set_config_drive(&mut self, value: bool)

Enable/disable config-drive for the new server.

source

pub fn with_config_drive(self, value: bool) -> Self

Enable/disable config-drive for the new server.

Trait Implementations§

source§

impl Debug for NewServer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more