DigitalOcean.Volume (digital_ocean v0.1.0)
Link to this section Summary
Functions
Create a volume.
Create a snapshot from a volume.
Delete a volume.
Delete a volume by name.
Retrieve details about a specific volume.
Retrieve details about a specific volume by name.
Retrieve a list of volumes available on your account.
Retrieve a list of snapshots for a volume.
Link to this section Functions
Link to this function
create(opts)
Specs
create(Keyword.t()) :: DigitalOcean.Operation.t()
Create a volume.
Examples
iex> DigitalOcean.Volume.create(
...> name: "example",
...> region: "nyc1",
...> size_gigabytes: 10
...> ) |> DigitalOcean.request()
{ :ok, %DigitalOcean.Response{} }
Link to this function
create_snapshot(volume_id, opts \\ [])
Specs
create_snapshot(String.t(), Keyword.t()) :: DigitalOcean.Operation.t()
Create a snapshot from a volume.
Examples
iex> DigitalOcean.Volume.create_snapshot(
...> "82a48a18-873f-11e6-96bf-000f53315a41",
...> name: "big-data-snapshot1475261774"
...> ) |> DigitalOcean.request()
{ :ok, %DigitalOcean.Response{} }
Link to this function
delete(volume_id)
Specs
delete(String.t()) :: DigitalOcean.Operation.t()
Delete a volume.
Examples
iex> DigitalOcean.Volume.delete("7724db7c-e098-11e5-b522-000f53304e51") |> DigitalOcean.request()
{ :ok, %DigitalOcean.Response{} }
Link to this function
delete_by_name(opts)
Specs
delete_by_name(Keyword.t()) :: DigitalOcean.Operation.t()
Delete a volume by name.
Examples
iex> DigitalOcean.Volume.delete_by_name(
...> name: "example",
...> region: "nyc1"
...> ) |> DigitalOcean.request()
{ :ok, %DigitalOcean.Response{} }
Link to this function
get(volume_id)
Specs
get(String.t()) :: DigitalOcean.Operation.t()
Retrieve details about a specific volume.
Examples
iex> DigitalOcean.Volume.get("7724db7c-e098-11e5-b522-000f53304e51") |> DigitalOcean.request()
{ :ok, DigitalOcean.Response{} }
Link to this function
get_by_name(opts)
Specs
get_by_name(Keyword.t()) :: DigitalOcean.Operation.t()
Retrieve details about a specific volume by name.
Example
iex> DigitalOcean.Volume.get(
...> name: "example",
...> region: "nyc1"
...> ) > DigitalOcean.request()
{ :ok, DigitalOcean.Response{} }
Link to this function
list(opts \\ [])
Specs
list(Keyword.t()) :: DigitalOcean.Operation.t()
Retrieve a list of volumes available on your account.
Examples
iex> DigitalOcean.Volume.list() |> DigitalOcean.request()
{ :ok, %DigitalOcean.Response{} }
Link to this function
list_snapshots(volume_id, opts \\ [])
Retrieve a list of snapshots for a volume.
Examples
iex> DigitalOcean.Volume.list_snapshots("82a48a18-873f-11e6-96bf-000f53315a41") |> DigitalOcean.request()
{ :ok, %DigitalOcean.Response{} }