DigitalOcean.ImageAction.create
You're seeing just the function
create
, go back to DigitalOcean.ImageAction module for more information.
Link to this function
create(image_id, opts)
Specs
create(DigitalOcean.id_t(), Keyword.t()) :: DigitalOcean.Operation.t()
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{} }