Struct LinodeCreateInstanceBuilder

Source
pub struct LinodeCreateInstanceBuilder { /* private fields */ }

Implementations§

Source§

impl LinodeCreateInstanceBuilder

Source

pub fn new(api: LinodeApi, region: &str, ltype: &str) -> Self

region: The Region where the Linode will be located.

ltype: The Linode Type of the Linode you are creating.

Source

pub fn authorized_keys( self, authorized_keys: Vec<String>, ) -> LinodeCreateInstanceBuilder

A list of public SSH keys that will be automatically appended to the root user’s ~/.ssh/authorized_keys file when deploying from an Image.

Source

pub fn authorized_users( self, authorized_users: Vec<String>, ) -> LinodeCreateInstanceBuilder

A list of usernames. If the usernames have associated SSH keys, the keys will be appended to the root users ~/.ssh/authorized_keys file automatically when deploying from an Image.

Source

pub fn backup_id(self, backup_id: u64) -> LinodeCreateInstanceBuilder

A Backup ID from another Linode’s available backups. Your User must have read_write access to that Linode, the Backup must have a status of successful, and the Linode must be deployed to the same region as the Backup. See GET /linode/instances/{linodeId}/backups for a Linode’s available backups.

This field and the image field are mutually exclusive.

Source

pub fn backups_enabled( self, backups_enabled: bool, ) -> LinodeCreateInstanceBuilder

If this field is set to true, the created Linode will automatically be enrolled in the Linode Backup service. This will incur an additional charge. The cost for the Backup service is dependent on the Type of Linode deployed.

This option is always treated as true if the account-wide backups_enabled setting is true. See account settings for more information.

Backup pricing is included in the response from /linodes/types

Source

pub fn booted(self, booted: bool) -> LinodeCreateInstanceBuilder

This field defaults to true if the Linode is created with an Image or from a Backup. If it is deployed from an Image or a Backup and you wish it to remain offline after deployment, set this to false.

Source

pub fn firewall_id(self, firewall_id: u64) -> LinodeCreateInstanceBuilder

The id of the Firewall to attach this Linode to upon creation.

Source

pub fn group(self, group: &str) -> LinodeCreateInstanceBuilder

A deprecated property denoting a group label for this Linode.

Source

pub fn image(self, image: &str) -> LinodeCreateInstanceBuilder

An Image ID to deploy the Linode Disk from.

Access the Images List (GET /images) endpoint with authentication to view all available Images. Official Linode Images start with linode/, while your Account’s Images start with private/. Creating a disk from a Private Image requires read_only or read_write permissions for that Image. Access the User’s Grant Update (PUT /account/users/{username}/grants) endpoint to adjust permissions for an Account Image.

Source

pub fn label(self, label: &str) -> LinodeCreateInstanceBuilder

The Linode’s label is for display purposes only. If no label is provided for a Linode, a default will be assigned.

Linode labels have the following constraints:

  • 3..64 characters
  • Must begin and end with an alphanumeric character.
  • May only consist of alphanumeric characters, dashes (-), underscores (_) or periods (.).
  • Cannot have two dashes (–), underscores (__) or periods (..) in a row.
Source

pub fn user_data(self, user_data: &str) -> LinodeCreateInstanceBuilder

Base64-encoded cloud-config data.

Cannot be modified after provisioning. To update, use either the Linode Clone or Linode Rebuild commands.

Must not be included when cloning to an existing Linode.

Unencoded data must not exceed 65535 bytes, or about 16kb encoded.

Source

pub fn private_ip(self, private_ip: bool) -> LinodeCreateInstanceBuilder

If true, the created Linode will have private networking enabled and assigned a private IPv4 address.

Source

pub fn root_pass(self, root_pass: &str) -> LinodeCreateInstanceBuilder

If true, the created Linode will have private networking enabled and assigned a private IPv4 address.

Source

pub fn swap_size(self, swap_size: u64) -> LinodeCreateInstanceBuilder

Default: 512

When deploying from an Image, this field is optional, otherwise it is ignored. This is used to set the swap disk size for the newly-created Linode.

Source

pub fn tags(self, tags: Vec<String>) -> LinodeCreateInstanceBuilder

An array of tags applied to this object. Tags are for organizational purposes only.

Source

pub async fn run_async(self) -> Result<LinodeInstance, LinodeError>

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

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 T
where U: From<T>,

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 T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
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
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T