Create a sandbox with a timeout
Set the timeout at creation time when you know how long the work should run.Update the timeout
You can use thesetTimeout method to reset how much longer the sandbox should stay alive. This is useful when user activity continues after the original timeout would have expired.
Get sandbox information
You can use thegetInfo method in JavaScript or get_info method in Python to inspect the sandbox ID, template, metadata, current state, and expiration time.
Kill a sandbox
You can use thekill method to shut down a sandbox before its timeout expires when you no longer need it.
Next steps
- To keep a sandbox state for later use, see Sandbox Persistence.
- To create reusable saved states, see Sandbox Snapshot.