Struct vultr::CreateInstanceBuilder
source · pub struct CreateInstanceBuilder { /* private fields */ }
Expand description
Builder struct for creating instances.
A detailed documentation can be found at https://www.vultr.com/api/#tag/instances/operation/create-instance
Implementations§
source§impl CreateInstanceBuilder
impl CreateInstanceBuilder
pub fn new<S1, S2>( api: VultrApi, region_id: S1, plan_id: S2, instance_type: VultrInstanceType ) -> Self
pub fn enable_ipv6(self, enable_ipv6: bool) -> Self
sourcepub fn ddos_protection(self, ddos_protection: bool) -> Self
pub fn ddos_protection(self, ddos_protection: bool) -> Self
Enable DDoS protection (there is an additional charge for this).
sourcepub fn activation_email(self, activation_email: bool) -> Self
pub fn activation_email(self, activation_email: bool) -> Self
Notify by email after deployment.
sourcepub fn hostname<S>(self, hostname: S) -> Self
pub fn hostname<S>(self, hostname: S) -> Self
The hostname to use when deploying this instance.
sourcepub fn ipxe_chain_url<S>(self, ipxe_chain_url: S) -> Self
pub fn ipxe_chain_url<S>(self, ipxe_chain_url: S) -> Self
The URL location of the iPXE chainloader.
pub fn script_id<S>(self, script_id: S) -> Self
sourcepub fn disable_public_ipv4(self, disable_public_ipv4: bool) -> Self
pub fn disable_public_ipv4(self, disable_public_ipv4: bool) -> Self
Don’t set up a public IPv4 address when IPv6 is enabled. Will not do anything unless enable_ipv6 is also true.
sourcepub fn attach_vpc(self, attach_vpc: Vec<String>) -> Self
pub fn attach_vpc(self, attach_vpc: Vec<String>) -> Self
An array of VPC IDs to attach to this Instance. This parameter takes precedence over enable_vpc. Please choose one parameter.
sourcepub fn attach_vpc2(self, attach_vpc2: Vec<String>) -> Self
pub fn attach_vpc2(self, attach_vpc2: Vec<String>) -> Self
An array of VPC IDs to attach to this Instance. This parameter takes precedence over enable_vpc2. Please choose one parameter.
sourcepub fn user_data<S>(self, user_data: S) -> Self
pub fn user_data<S>(self, user_data: S) -> Self
The user-supplied, base64 encoded user data to attach to this instance.
sourcepub fn firewall_group_id<S>(self, firewall_group_id: S) -> Self
pub fn firewall_group_id<S>(self, firewall_group_id: S) -> Self
The Firewall Group id to attach to this Instance.
sourcepub fn reserved_ipv4<S>(self, reserved_ipv4: S) -> Self
pub fn reserved_ipv4<S>(self, reserved_ipv4: S) -> Self
ID of the floating IP to use as the main IP of this server.
sourcepub fn enable_vpc(self, enable_vpc: bool) -> Self
pub fn enable_vpc(self, enable_vpc: bool) -> Self
If true, VPC support will be added to the new server.
This parameter attaches a single VPC. When no VPC exists in the region, it will be automatically created.
If there are multiple VPCs in the instance’s region, use attach_vpc instead to specify a network.
sourcepub fn enable_vpc2(self, enable_vpc2: bool) -> Self
pub fn enable_vpc2(self, enable_vpc2: bool) -> Self
If true, VPC 2.0 support will be added to the new server.
This parameter attaches a single VPC 2.0 network. When no VPC 2.0 network exists in the region, it will be automatically created.
If there are multiple VPC 2.0 networks in the instance’s region, use attach_vpc2 instead to specify a network.
sourcepub fn user_scheme<S>(self, user_scheme: LinuxUserScheme) -> Self
pub fn user_scheme<S>(self, user_scheme: LinuxUserScheme) -> Self
Linux-only: The user scheme used for logging into this instance. By default, the “root” user is configured. Alternatively, a limited user with sudo permissions can be selected.
Tags to apply to the instance