VolumeService
Service for managing persistent volumes.
Constructors
Constructor
new VolumeService(api: AxiosInstance): VolumeService;Parameters:
apiAxiosInstance
Returns:
VolumeService
Methods
create()
create(name: string, sizeGb?: number): Promise<Volume>;Creates a disk volume (ready immediately).
Parameters:
namestringsizeGb?number
Returns:
Promise<Volume>
delete()
delete(volume: Volume | string, options?: VolumeRefOptions): Promise<void>;Requests deletion and returns once the control plane accepts it.
Parameters:
volumeVolume | stringoptions?VolumeRefOptions
Returns:
Promise<void>
get()
get(nameOrId: string, create = false, options?: VolumeRefOptions): Promise<Volume>;Gets a volume by id or name. When create is true and the volume does not
exist, creates it first.
Parameters:
nameOrIdstringcreateboolean = falseoptions?VolumeRefOptions
Returns:
Promise<Volume>
iter()
iter(includeDeleted = false): AsyncIterable<Volume>;Parameters:
includeDeletedboolean = false
Returns:
AsyncIterable<Volume>
list()
list(includeDeleted = false): Promise<ListResult<Volume>>;Parameters:
includeDeletedboolean = false
Returns:
Promise<ListResult<Volume>>
SandboxVolumesService
Pull attached volumes in this sandbox; distinct from the platform volume service.
Constructors
Constructor
new SandboxVolumesService(transport: HttpTransport): SandboxVolumesService;Parameters:
transportHttpTransport
Returns:
SandboxVolumesService
Methods
pull()
pull(volumeId: string, options: PullVolumeOptions): Promise<PullVolumeResult>;One submission/check only. Pending and errors never trigger automatic retries.
Parameters:
volumeIdstringoptionsPullVolumeOptions
Returns:
Promise<PullVolumeResult>
PullVolumeOptions
Properties:
requestIdstring - Caller-owned identity. Retain it when checking pending work or retrying.timeout?number - Server wait in milliseconds (0–30000); omitted means 30000. Does not cancel work. Zero submits a new requestId, or returns a known one's last outcome without retrying it; a wait above zero retries pending, unavailable or rate-limited work.
PullVolumeResult
Properties:
manifestIdstring | nullrequestIdstringstatusPullVolumeStatusrawStatusstring
Volume
type Volume = VolumeDtoA persistent volume.
VolumeRefOptions
Properties:
idOnly?boolean
VolumeMount
Properties:
volumeIdstringmountPathstringsubpath?stringreadOnly?boolean - Mount without write access. Bucket volumes only — a disk volume has no read-only drive to give, sotrueon one is rejected with a 400.
VolumeDto
type VolumeDto = Schema<"VolumeDto">VolumeState
type VolumeState = 'ready' | 'deleting' | 'deleted' | 'error' | (string & {})