Apothic Client Storage and Secrets Reference
Reference for Secret, Volume, CloudBucketMount, storage backends, and ephemeral volume helpers.
Last updated: 4/23/2026
API Version: v0.1.0
apothic-clientapireferencestoragesecrets
Apothic Client Storage and Secrets Reference
This page covers the SDK resource types used for credentials and mounted storage.
Secret
Signatures
Secret.from_name(name: str) -> Secret
Secret.create(
name: str,
value: str,
*,
client: ControlPlaneClient | None = None,
base_url: str | None = None,
) -> Secret
Secret.set(
name: str,
value: str,
*,
client: ControlPlaneClient | None = None,
base_url: str | None = None,
) -> Secret
Secret.list(
*,
client: ControlPlaneClient | None = None,
base_url: str | None = None,
) -> list[Secret]
secret.delete(
*,
client: ControlPlaneClient | None = None,
base_url: str | None = None,
) -> SecretResponse
Volume
Constructor-style helpers
Volume.from_name(
name: str,
*,
create_if_missing: bool = False,
backend: str = "cloud_bucket",
size_gb: int | None = None,
mount_path: str | None = None,
mount_path_default: str | None = None,
geolocation: str | list[str] | None = None,
client: ControlPlaneClient | None = None,
base_url: str | None = None,
) -> Volume
Volume.cloud(name: str, *, mount_path: str | None = None) -> Volume
Volume.vast_local(name: str, *, size_gb: int, mount_path: str | None = None) -> Volume
Volume.from_name(..., create_if_missing=True) is the concise reuse-or-create path. If the named volume already exists with an incompatible backend or size, the SDK raises instead of silently changing it.
Managed create/list/delete
Volume.create(
name: str,
*,
backend: str = "cloud_bucket",
size_gb: int | None = None,
mount_path_default: str | None = None,
geolocation: str | list[str] | None = None,
client: ControlPlaneClient | None = None,
base_url: str | None = None,
) -> Volume
Volume.list(
*,
client: ControlPlaneClient | None = None,
base_url: str | None = None,
) -> list[Volume]
volume.delete(
*,
client: ControlPlaneClient | None = None,
base_url: str | None = None,
) -> VolumeResponse
Mount helpers
volume.mount(mount_path: str) -> Volume
volume.mounted_at(mount_path: str) -> Volume
Ephemeral helper
Volume.ephemeral(
*,
prefix: str = "apothic-ephemeral",
mount_path: str | None = None,
client: ControlPlaneClient | None = None,
base_url: str | None = None,
) -> context manager
Fields
name: str
backend: str = "cloud_bucket"
size_gb: int | None = None
mount_path: str | None = None
volume_id: str | None = None
machine_id: str | None = None
mount_path_default: str | None = None
status: str | None = None
Current backend values:
cloud_bucketvast_local
Current vast_local behavior:
- the volume is reserved first and bound on first real host placement
- after binding it is host-affine by design
- the current client/runtime path supports one
vast_localvolume per resource
CloudBucketMount
Constructor
CloudBucketMount(
bucket_name: str,
access_key_secret: Secret | str,
secret_key_secret: Secret | str,
endpoint_url: str,
region: str = "auto",
prefix: str | None = None,
read_only: bool = False,
force_path_style: bool = False,
mount_path: str | None = None,
)
Mount helpers
bucket.mount(mount_path: str) -> CloudBucketMount
bucket.mounted_at(mount_path: str) -> CloudBucketMount
Fields
bucket_name: str
access_key_secret: Secret | str
secret_key_secret: Secret | str
endpoint_url: str
region: str = "auto"
prefix: str | None = None
read_only: bool = False
force_path_style: bool = False
mount_path: str | None = None
Where these types are used
These types can be passed to:
@app.function(...)- service decorators
@app.cls(...)app.sandbox(...)
