Struct digitalocean::prelude::Droplet
source · pub struct Droplet { /* private fields */ }
Expand description
A Droplet is a DigitalOcean virtual machine. By sending requests to the Droplet endpoint, you can list, create, or delete Droplets.
Some of the attributes will have an object value. The region and image objects will all contain the standard attributes of their associated types. Find more information about each of these objects in their respective sections.
Implementations§
source§impl Droplet
impl Droplet
sourcepub fn id(&self) -> &usize
pub fn id(&self) -> &usize
A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation.
sourcepub fn locked(&self) -> &bool
pub fn locked(&self) -> &bool
A boolean value indicating whether the Droplet has been locked, preventing actions by users.
sourcepub fn created_at(&self) -> &DateTime<Utc>
pub fn created_at(&self) -> &DateTime<Utc>
A time value given in ISO8601 combined date and time format that represents when the Droplet was created.
sourcepub fn status(&self) -> &String
pub fn status(&self) -> &String
A status string indicating the state of the Droplet instance. This may be “new”, “active”, “off”, or “archive”.
sourcepub fn backup_ids(&self) -> &Vec<usize>
pub fn backup_ids(&self) -> &Vec<usize>
An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation.
sourcepub fn snapshot_ids(&self) -> &Vec<usize>
pub fn snapshot_ids(&self) -> &Vec<usize>
An array of snapshot IDs of any snapshots created from the Droplet instance.
sourcepub fn region(&self) -> &Region
pub fn region(&self) -> &Region
The region that the Droplet instance is deployed in. When setting a region, the value should be the slug identifier for the region. When you query a Droplet, the entire region object will be returned.
sourcepub fn image(&self) -> &Image
pub fn image(&self) -> &Image
The base image used to create the Droplet instance. When setting an image, the value is set to the image id or slug. When querying the Droplet, the entire image object will be returned.
sourcepub fn size(&self) -> &Size
pub fn size(&self) -> &Size
The current size object describing the Droplet. When setting a size, the value is set to the size slug. When querying the Droplet, the entire size object will be returned. Note that the disk volume of a Droplet may not match the size’s disk due to Droplet resize actions. The disk attribute on the Droplet should always be referenced.
sourcepub fn networks(&self) -> &Networks
pub fn networks(&self) -> &Networks
The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is.
sourcepub fn kernel(&self) -> &Option<Kernel>
pub fn kernel(&self) -> &Option<Kernel>
The current kernel. This will initially be set to the kernel of the base image when the Droplet is created.
sourcepub fn next_backup_window(&self) -> &Option<NextBackupWindow>
pub fn next_backup_window(&self) -> &Option<NextBackupWindow>
The details of the Droplet’s backups feature, if backups are configured for the Droplet. This object contains keys for the start and end times of the window during which the backup will start.
An array of Tags the Droplet has been tagged with.
sourcepub fn volume_ids(&self) -> &Vec<String>
pub fn volume_ids(&self) -> &Vec<String>
A flat array including the unique identifier for each Block Storage volume attached to the Droplet.