DigitalOcean.ImageAction (digital_ocean v0.5.0)

Summary

Functions

Create an action for an image.

Retrieve an action for an image.

Retrieve a list of image actions.

Functions

create(image_id, opts)

Create an action for an image.

Example transferring an image to another region

iex> DigitalOcean.ImageAction.create(
...>   7938269,
...>   type: "transfer",
...>   region: "nyc2"
...> ) |> DigitalOcean.request()
{ :ok, %DigitalOcean.Response{} }

Example converting an image from a backup to a snapshot

iex> DigitalOcean.ImageAction.create(
...>   7938291,
...>   type: "convert"
...> ) |> DigitalOcean.request()
{ :ok, %DigitalOcean.Response{} }

get(image_id, action_id)

Retrieve an action for an image.

Examples

iex> DigitalOcean.ImageAction.get(7938269, 36805527) |> DigitalOcean.request()
{ :ok, %DigitalOcean.Response{} }

list(image_id, opts \\ [])

Retrieve a list of image actions.

Examples

iex> DigitalOcean.ImageAction.list() |> DigitalOcean.request()
{ :ok, %DigitalOcean.Response{} }