ExIncus.Profiles (ex_incus v1.0.0)

Copy Markdown

Manage profiles.

{:ok, _} =
  ExIncus.Profiles.create(client, %{
    "name" => "small",
    "config" => %{"limits.cpu" => "1", "limits.memory" => "512MiB"}
  })

Summary

Functions

Creates a profile from a ProfilesPost params map (needs "name").

Fetches a single profile.

Lists profiles (full objects by default).

Partially updates the profile (PATCH).

Replaces the profile (PUT).

Types

result()

@type result() :: {:ok, term()} | {:error, ExIncus.Error.t()}

Functions

create(client, params, opts \\ [])

@spec create(ExIncus.Client.t(), map(), keyword()) :: result()

Creates a profile from a ProfilesPost params map (needs "name").

delete(client, name, opts \\ [])

@spec delete(ExIncus.Client.t(), String.t(), keyword()) :: result()

Deletes a profile.

get(client, name, opts \\ [])

@spec get(ExIncus.Client.t(), String.t(), keyword()) :: result()

Fetches a single profile.

list(client, opts \\ [])

@spec list(
  ExIncus.Client.t(),
  keyword()
) :: result()

Lists profiles (full objects by default).

patch(client, name, params, opts \\ [])

@spec patch(ExIncus.Client.t(), String.t(), map(), keyword()) :: result()

Partially updates the profile (PATCH).

rename(client, name, new_name, opts \\ [])

@spec rename(ExIncus.Client.t(), String.t(), String.t(), keyword()) :: result()

Renames a profile.

update(client, name, params, opts \\ [])

@spec update(ExIncus.Client.t(), String.t(), map(), keyword()) :: result()

Replaces the profile (PUT).