DigitalOcean.VolumeAction.create_by_name
You're seeing just the function
create_by_name
, go back to DigitalOcean.VolumeAction module for more information.
Link to this function
create_by_name(opts)
Specs
create_by_name(Keyword.t()) :: DigitalOcean.Operation.t()
Create an action for a volume by name.
Example for attaching a volume to a droplet
iex> DigitalOcean.VolumeAction.create(
...> type: "attach",
...> volume_name: "example",
...> region: "nyc1",
...> droplet_id: 11612190,
...> tags: ["aninterestingname"]
...> ) |> DigitalOcean.request()
{ :ok, %DigitalOcean.Response{} }
Example for detaching a volume from a droplet
iex> DigitalOcean.VolumeAction.create(
...> type: "detach",
...> droplet_id: 11612190,
...> volume_name: "example",
...> region: "nyc1"
...> ) |> DigitalOcean.request()
{ :ok, %DigitalOcean.Response{} }