timeout
parameter.
After the time passes, the sandbox will be automatically shutdown.
Change sandbox timeout during runtime
You can change the sandbox timeout when it’s running by calling the thesetTimeout
method in JavaScript or set_timeout
method in Python.
When you call the set timeout method, the sandbox timeout will be reset to the new value that you specified.
This can be useful if you want to extend the sandbox lifetime when it’s already running.
You can for example start with a sandbox with 1 minute timeout and then periodically call set timout every time user interacts with it in your app.
Retrieve sandbox information
You can retrieve sandbox information like sandbox ID, template, metadata, started at/end at date by calling thegetInfo
method in JavaScript or get_info
method in Python.
Shutdown sandbox
You can shutdown the sandbox any time even before the timeout is up by calling thekill
method.