ExIncus.Projects (ex_incus v1.0.0)

Copy Markdown

Manage projects.

Projects partition instances, images, networks etc. Scope a client to a project with ExIncus.Client.new(project: "myproject") or per call with the project: option.

Summary

Functions

Creates a project from a ProjectsPost params map (needs "name").

Fetches a single project.

Lists projects (full objects by default).

Partially updates the project configuration (PATCH).

Replaces the project configuration (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 project from a ProjectsPost params map (needs "name").

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

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

Deletes a project.

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

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

Fetches a single project.

list(client, opts \\ [])

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

Lists projects (full objects by default).

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

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

Partially updates the project configuration (PATCH).

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

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

Renames a project.

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

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

Replaces the project configuration (PUT).