Sign Up

VolumeService

Service for managing persistent volumes.

Constructors

Constructor

new VolumeService(api: AxiosInstance): VolumeService;

Parameters:

  • api AxiosInstance

Returns:

  • VolumeService

Methods

create()

create(name: string, sizeGb?: number): Promise<Volume>;

Creates a disk volume (ready immediately).

Parameters:

  • name string
  • sizeGb? number

Returns:

  • Promise<Volume>

delete()

delete(volume: Volume | string, options?: VolumeRefOptions): Promise<void>;

Requests deletion and returns once the control plane accepts it.

Parameters:

  • volume Volume | string
  • options? 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:

  • nameOrId string
  • create boolean = false
  • options? VolumeRefOptions

Returns:

  • Promise<Volume>

iter()

iter(includeDeleted = false): AsyncIterable<Volume>;

Parameters:

  • includeDeleted boolean = false

Returns:

  • AsyncIterable<Volume>

list()

list(includeDeleted = false): Promise<ListResult<Volume>>;

Parameters:

  • includeDeleted boolean = 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:

  • transport HttpTransport

Returns:

  • SandboxVolumesService

Methods

pull()

pull(volumeId: string, options: PullVolumeOptions): Promise<PullVolumeResult>;

One submission/check only. Pending and errors never trigger automatic retries.

Parameters:

  • volumeId string
  • options PullVolumeOptions

Returns:

  • Promise<PullVolumeResult>

PullVolumeOptions

Properties:

  • requestId string - 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:

  • manifestId string | null
  • requestId string
  • status PullVolumeStatus
  • rawStatus string

Volume

type Volume = VolumeDto

A persistent volume.


VolumeRefOptions

Properties:

  • idOnly? boolean

VolumeMount

Properties:

  • volumeId string
  • mountPath string
  • subpath? string
  • readOnly? boolean - Mount without write access. Bucket volumes only — a disk volume has no read-only drive to give, so true on one is rejected with a 400.

VolumeDto

type VolumeDto = Schema<"VolumeDto">

VolumeState

type VolumeState = 'ready' | 'deleting' | 'deleted' | 'error' | (string & {})