oceanex v0.2.4 Oceanex.Resource.Volume
DigitalOcean BlockStorage
and BlockStorageAction
resource api calls.
Link to this section 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.
Link to this section Functions
action(drive_id, action_id)
Get a specific action record.
actions(drive_id, opts \\ %{})
Get all action records that have been executed on a volume.
all(opts \\ %{})
List all volume records.
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})
create(opts)
Create a volume record.
Optional vars: description
Examples
Oceanex.Resource.Volume.create(%{size_gigabytes: size_gigabytes, name: name, region: region})
destroy(drive_id_or_name, opts \\ %{})
Delete a specific volume record with drive_id or drive_name.
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})
find(drive_id_or_name, opts \\ %{})
Get a specific volume record with drive_id or drive_name.
resize(drive_id, opts)
To resize a Block Storage volume.
Examples
Oceanex.Resource.Volume.resize(drive_id, %{size_gigabytes: size_gigabytes, region: region})