ExDaytona.Api.Volumes (ex_daytona v0.4.0)

Copy Markdown View Source

API calls for all endpoints tagged Volumes.

Summary

Functions

create_volume(connection, create_volume, opts \\ [])

@spec create_volume(Tesla.Env.client(), ExDaytona.Model.CreateVolume.t(), keyword()) ::
  {:ok, ExDaytona.Model.VolumeDto.t()} | {:error, Tesla.Env.t()}

Create a new volume

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • create_volume (CreateVolume):
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.VolumeDto.t} on success
  • {:error, Tesla.Env.t} on failure

delete_volume(connection, volume_id, opts \\ [])

@spec delete_volume(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Delete volume

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • volume_id (String.t): ID of the volume
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

get_volume(connection, volume_id, opts \\ [])

@spec get_volume(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.VolumeDto.t()} | {:error, Tesla.Env.t()}

Get volume details

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • volume_id (String.t): ID of the volume
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.VolumeDto.t} on success
  • {:error, Tesla.Env.t} on failure

get_volume_by_name(connection, name, opts \\ [])

@spec get_volume_by_name(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.VolumeDto.t()} | {:error, Tesla.Env.t()}

Get volume details by name

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • name (String.t): Name of the volume
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.VolumeDto.t} on success
  • {:error, Tesla.Env.t} on failure

list_volumes(connection, opts \\ [])

@spec list_volumes(
  Tesla.Env.client(),
  keyword()
) :: {:ok, [ExDaytona.Model.VolumeDto.t()]} | {:error, Tesla.Env.t()}

List all volumes

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID
    • :includeDeleted (boolean()): Include deleted volumes in the response

Returns

  • {:ok, [%VolumeDto{}, ...]} on success
  • {:error, Tesla.Env.t} on failure