oceanex v0.2.0 Oceanex.Resource.Volume

DigitalOcean BlockStorage and BlockStorageAction resource api calls.

Summary

Functions

Get a specific action record

Get all action records that have been executed on a volume

List all volume records

Attach a Block Storage volume to a Droplet by volume id or name

Create a volume record

Delete a specific volume record with drive_id or drive_name

Detach a Block Storage volume from a Droplet by volume id or name

Get a specific volume record with drive_id or drive_name

To resize a Block Storage volume

Functions

action(drive_id, action_id)

Get a specific action record.

action!(drive_id, action_id)
actions(drive_id, opts \\ %{})

Get all action records that have been executed on a volume.

actions!(drive_id, opts \\ %{})
all(opts \\ %{})

List all volume records.

all!(opts \\ %{})
attach(opts)
attach(volume_id, opts)

Attach a Block Storage volume to a Droplet by volume id or name.

Examples

Oceanex.Resource.Volume.attach(volume_id, %{droplet_id: droplet_id, region: region})

Oceanex.Resource.Volume.attach(%{droplet_id: droplet_id, volume_name: volume_name, region: region})
attach!(opts)
attach!(volume_id, opts)
create(opts)

Create a volume record.

Optional vars: description

Examples

Oceanex.Resource.Volume.create(%{size_gigabytes: size_gigabytes, name: name, region: region})
create!(opts)
destroy(drive_id_or_name, opts \\ %{})

Delete a specific volume record with drive_id or drive_name.

destroy!(drive_id_or_name, opts \\ %{})
detach(opts)
detach(volume_id, opts)

Detach a Block Storage volume from a Droplet by volume id or name.

Examples

Oceanex.Resource.Volume.detach(volume_id, %{droplet_id: droplet_id, region: region})

Oceanex.Resource.Volume.detach(%{droplet_id: droplet_id, volume_name: volume_name, region: region})
detach!(opts)
detach!(volume_id, opts)
find(drive_id_or_name, opts \\ %{})

Get a specific volume record with drive_id or drive_name.

find!(drive_id_or_name, opts \\ %{})
resize(drive_id, opts)

To resize a Block Storage volume.

Examples

Oceanex.Resource.Volume.resize(drive_id, %{size_gigabytes: size_gigabytes, region: region})
resize!(drive_id, opts)