@runloop/api-client - v1.4.0
    Preparing search index...

    Class Devboxes

    Hierarchy

    • APIResource
      • Devboxes
    Index

    Constructors

    Properties

    _client: Runloop
    diskSnapshots: DiskSnapshots = ...
    browsers: Browsers = ...
    computers: Computers = ...
    logs: Logs = ...
    executions: Executions = ...

    Accessors

    Methods

    • Create a Devbox and begin the boot process. The Devbox will initially launch in the 'provisioning' state while Runloop allocates the necessary infrastructure. It will transition to the 'initializing' state while the booted Devbox runs any Runloop or user defined set up scripts. Finally, the Devbox will transition to the 'running' state when it is ready for use.

      Parameters

      Returns APIPromise<DevboxView>

    • Create a Devbox and begin the boot process. The Devbox will initially launch in the 'provisioning' state while Runloop allocates the necessary infrastructure. It will transition to the 'initializing' state while the booted Devbox runs any Runloop or user defined set up scripts. Finally, the Devbox will transition to the 'running' state when it is ready for use.

      Parameters

      • Optionaloptions: RequestOptions<unknown>

      Returns APIPromise<DevboxView>

    • Wait for a devbox to reach the running state. Polls the devbox status until it reaches running state or fails with an error.

      Parameters

      • id: string

        Devbox ID

      • Optionaloptions: RequestOptions<unknown> & { polling?: Partial<PollingOptions<DevboxView>> }

        request options to specify retries, timeout, polling, etc.

      Returns Promise<DevboxView>

    • Wait for a devbox to reach the suspended state. Polls the devbox status until it reaches suspended state or fails with an error.

      Parameters

      • id: string

        Devbox ID

      • Optionaloptions: RequestOptions<unknown> & { polling?: Partial<PollingOptions<DevboxView>> }

        request options to specify retries, timeout, polling, etc.

      Returns Promise<DevboxView>

    • Create a devbox and wait for it to reach the running state. This is a convenience method that combines create() and awaitDevboxRunning().

      Parameters

      • Optionalbody: DevboxCreateParams

        DevboxCreateParams

      • Optionaloptions: RequestOptions<unknown> & { polling?: Partial<PollingOptions<DevboxView>> }

        request options to specify retries, timeout, polling, etc.

      Returns Promise<DevboxView>

    • Delete a previously taken disk snapshot of a Devbox.

      Parameters

      • id: string
      • Optionaloptions: RequestOptions<unknown>

      Returns APIPromise<unknown>

    • Send a 'Keep Alive' signal to a running Devbox that is configured to shutdown on idle so the idle time resets.

      Parameters

      • id: string
      • Optionaloptions: RequestOptions<unknown>

      Returns APIPromise<unknown>

    • Read file contents from a file on a Devbox as a UTF-8. Note 'downloadFile' should be used for large files (greater than 100MB). Returns the file contents as a UTF-8 string.

      Parameters

      Returns APIPromise<string>

    • Resume a suspended Devbox with the disk state captured as suspend time. Note that any previously running processes or daemons will need to be restarted using the Devbox shell tools.

      Parameters

      • id: string
      • Optionaloptions: RequestOptions<unknown>

      Returns APIPromise<DevboxView>

    • Shutdown a running Devbox. This will permanently stop the Devbox. If you want to save the state of the Devbox, you should take a snapshot before shutting down or should suspend the Devbox instead of shutting down.

      Parameters

      • id: string
      • Optionaloptions: RequestOptions<unknown>

      Returns APIPromise<DevboxView>

    • Suspend a running Devbox and create a disk snapshot to enable resuming the Devbox later with the same disk. Note this will not snapshot memory state such as running processes.

      Parameters

      • id: string
      • Optionaloptions: RequestOptions<unknown>

      Returns APIPromise<DevboxView>

    • Upload file contents of any type (binary, text, etc) to a Devbox. Note this API is suitable for large files (larger than 100MB) and efficiently uploads files via multipart form data.

      Parameters

      Returns APIPromise<unknown>