pub struct LinodeCreateInstanceBuilder { /* private fields */ }
Implementations§
Source§impl LinodeCreateInstanceBuilder
impl LinodeCreateInstanceBuilder
Sourcepub fn new(api: LinodeApi, region: &str, ltype: &str) -> Self
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.
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.
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.
Sourcepub fn backup_id(self, backup_id: u64) -> LinodeCreateInstanceBuilder
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.
Sourcepub fn backups_enabled(
self,
backups_enabled: bool,
) -> LinodeCreateInstanceBuilder
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
Sourcepub fn booted(self, booted: bool) -> LinodeCreateInstanceBuilder
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.
Sourcepub fn firewall_id(self, firewall_id: u64) -> LinodeCreateInstanceBuilder
pub fn firewall_id(self, firewall_id: u64) -> LinodeCreateInstanceBuilder
The id of the Firewall to attach this Linode to upon creation.
Sourcepub fn group(self, group: &str) -> LinodeCreateInstanceBuilder
pub fn group(self, group: &str) -> LinodeCreateInstanceBuilder
A deprecated property denoting a group label for this Linode.
Sourcepub fn image(self, image: &str) -> LinodeCreateInstanceBuilder
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.
Sourcepub fn label(self, label: &str) -> LinodeCreateInstanceBuilder
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.
Sourcepub fn user_data(self, user_data: &str) -> LinodeCreateInstanceBuilder
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.
Sourcepub fn private_ip(self, private_ip: bool) -> LinodeCreateInstanceBuilder
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.
Sourcepub fn root_pass(self, root_pass: &str) -> LinodeCreateInstanceBuilder
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.
Sourcepub fn swap_size(self, swap_size: u64) -> LinodeCreateInstanceBuilder
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.
An array of tags applied to this object. Tags are for organizational purposes only.