Skip to main content

Volume

Source: src/cwsandbox/_volume.py:107
An org-registered shared volume. Create returns immediately in VALIDATING; poll with wait_until_ready() or get() until READY / ERROR. Mount via RegisteredVolumeOptions on Sandbox.run(volumes=...).

VolumeMount

Source: src/cwsandbox/_types.py:878
Mount of a sandbox-level volume into one container. Attributes
  • read_only (bool) : When True, mount the volume read-only. Default: False.
  • sub_path (str | None) : Optional path within the volume to mount.

PvcVolumeSource

Source: src/cwsandbox/_volume.py:77
Existing PersistentVolumeClaim referenced by a registered Volume.

RegisteredVolumeOptions

Source: src/cwsandbox/_types.py:819
Mount a registered Volume into the sandbox. Attributes
  • sub_path (str | None) : Relative path inside the volume to mount instead of its root. Combined with any volume-level prefix set at registration.
  • read_only (bool) : Mount the volume read-only. Default: False.

ScratchVolumeOptions

Source: src/cwsandbox/_types.py:765
Named scratch volume for snapshot/restore workflows. Volumes are sandbox-level. mount_path is a convenience that mounts this volume on the primary container. For multi-container sandboxes, omit mount_path and declare mounts on Container.volume_mounts. Attributes
  • mount_path (str | None) : Absolute path to mount into the primary container. None declares the volume without mounting it.
  • size (str | None) : Volume size (e.g. "10Gi"). None uses the platform default.
  • restore_from_snapshot_id (str | None) : When set, restore this snapshot at create.
  • medium (StorageMedium | str | None) : Backing store. Unset uses disk. MEMORY is tmpfs and counts against container memory.
  • sub_path (str | None) : Relative path inside the volume to mount instead of its root.
  • read_only (bool) : Mount the volume read-only. Default: False.

Last modified on September 17, 2026