Struct digitalocean::api::SshKey
source · pub struct SshKey { /* private fields */ }
Expand description
DigitalOcean allows you to add SSH public keys to the interface so that you can embed your public key into a Droplet at the time of creation. Only the public key is required to take advantage of this functionality.
Implementations§
source§impl SshKey
impl SshKey
sourcepub fn id(&self) -> &usize
pub fn id(&self) -> &usize
This is a unique identification number for the key. This can be used to reference a specific SSH key when you wish to embed a key into a Droplet.
Note: This is a String
to allow for id
and fingerprint
to be
used in Get
, Update
, and Delete
calls like the API describes.
sourcepub fn fingerprint(&self) -> &String
pub fn fingerprint(&self) -> &String
This attribute contains the fingerprint value that is generated from the public key. This is a unique identifier that will differentiate it from other keys using a format that SSH recognizes.
sourcepub fn public_key(&self) -> &String
pub fn public_key(&self) -> &String
This attribute contains the entire public key string that was uploaded. This is what is embedded into the root user’s authorized_keys file if you choose to include this SSH key during Droplet creation.