digitalocean v0.1.1 DigitalOcean.Key

API methods for interacting with the SSH Key module.

See the SSH Key Reference.

Summary

Functions

Create a new SSH Key

Similar to create/2 but returns the response body only

Delete a SSH Key by its id or fingerprint

Similar to delete/1 but returns the response body only

List all SSH Keys

Similar to list/0 but returns the response body only

Get a SSH Key by the key’s id or its fingerprint

Similar to show/1 but returns the response body only

Update a SSH Key’s name

Similar to update/2 but returns the response body only

Functions

create(name, pub_key)

Create a new SSH Key.

Example

iex> DigitalOcean.Key.create("My SSH Public Key", "ssh-rsa AAA...4V example")
create!(name, pub_key)

Similar to create/2 but returns the response body only.

delete(key_id)

Delete a SSH Key by its id or fingerprint.

delete!(key_id)

Similar to delete/1 but returns the response body only.

list()

List all SSH Keys.

list!()

Similar to list/0 but returns the response body only.

show(key_id)

Get a SSH Key by the key’s id or its fingerprint.

Example

iex> DigitalOcean.Key.show(512190)
show!(key_id)

Similar to show/1 but returns the response body only.

update(key_id, name)

Update a SSH Key’s name.

Example

iex> DigitalOcean.Key.update(512190, "Renamed SSH Key")
update!(key_id, name)

Similar to update/2 but returns the response body only.