Skip to content
View as Markdown

Configuration used to initialize a Daytona client.

Contains API authentication settings, API endpoint URL, and the default target region used when creating new Sandboxes.

public String getApiKey()

Returns the API key used to authenticate SDK requests.

Returns:

  • String - API key configured for the client
public String getApiUrl()

Returns the Daytona API base URL.

Returns:

  • String - API URL used for main API requests
public String getTarget()

Returns the default target location for newly created Sandboxes.

Returns:

  • String - target region identifier, or null if not configured
public boolean isOtelEnabled()

Returns whether OpenTelemetry tracing is enabled for SDK operations.

Note: SDK-side OpenTelemetry instrumentation is not yet implemented in the Java SDK. This setter exists for API parity with the other SDKs and to allow code to opt in ahead of instrumentation landing in a future release.

Returns:

  • boolean - true if OpenTelemetry tracing is enabled

Builder for creating immutable DaytonaConfig instances.

public Builder apiKey(String apiKey)

Sets the API key used for authenticating SDK requests.

Parameters:

  • apiKey String - Daytona API key

Returns:

  • Builder - this builder instance
public Builder apiUrl(String apiUrl)

Sets the Daytona API base URL.

Parameters:

  • apiUrl String - API URL to use; defaults to https://app.daytona.io/api when omitted

Returns:

  • Builder - this builder instance
public Builder target(String target)

Sets the default target region for new Sandboxes.

Parameters:

  • target String - target location identifier

Returns:

  • Builder - this builder instance
public Builder otelEnabled(boolean otelEnabled)

Enables OpenTelemetry tracing for SDK operations.

Note: SDK-side OpenTelemetry instrumentation is not yet implemented in the Java SDK. This setter exists for API parity with the other SDKs and to allow code to opt in ahead of instrumentation landing in a future release.

Parameters:

  • otelEnabled boolean - whether to enable OpenTelemetry tracing

Returns:

  • Builder - this builder instance
public DaytonaConfig build()

Builds a new immutable DaytonaConfig.

Returns:

  • DaytonaConfig - configured DaytonaConfig instance