ExDaytona.Api.Secret (ex_daytona v0.1.0)

Copy Markdown View Source

API calls for all endpoints tagged Secret.

Summary

Functions

List secrets This endpoint is deprecated and fails for organizations with more than 1500 secrets. Use listSecretsPaginated instead.

List secrets with pagination

Functions

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

@spec create_secret(Tesla.Env.client(), ExDaytona.Model.CreateSecret.t(), keyword()) ::
  {:ok, ExDaytona.Model.Secret.t()} | {:error, Tesla.Env.t()}

Create secret

Parameters

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

Returns

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

delete_secret(connection, secret_id, opts \\ [])

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

Delete secret

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • secret_id (String.t): ID of the secret
  • 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_secret(connection, secret_id, opts \\ [])

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

Get secret

Parameters

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

Returns

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

list_secrets(connection, opts \\ [])

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

List secrets This endpoint is deprecated and fails for organizations with more than 1500 secrets. Use listSecretsPaginated instead.

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

Returns

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

list_secrets_paginated(connection, opts \\ [])

@spec list_secrets_paginated(
  Tesla.Env.client(),
  keyword()
) :: {:ok, ExDaytona.Model.ListSecretsResponse.t()} | {:error, Tesla.Env.t()}

List secrets with pagination

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
    • :cursor (String.t): Pagination cursor from a previous response
    • :limit (number()): Number of results per page
    • :name (String.t): Filter by partial name match
    • :sort (String.t): Field to sort by
    • :order (String.t): Direction to sort by

Returns

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

update_secret(connection, secret_id, update_secret, opts \\ [])

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

Update secret

Parameters

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

Returns

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