ppio.sandbox.connect() attaches the SDK to a running or paused sandbox and continues controlling it. Connect when work resumes somewhere else: another serverless function invocation, a user’s web app session, long-running work to reconnect to, or a paused sandbox after a short period of inactivity.
Install the SDK, or the CLI for
ppio commands, and set the PPIO_API_KEY and PPIO_DOMAIN environment variables before running these examples. See Quickstart and Install and authenticate.Connect to a sandbox
Before connecting, the sandbox ID is required. Get it withppio.sandbox.list(), then pass it to ppio.sandbox.connect().
1
Find the sandbox ID
List the sandboxes in the Running state and take the ID of the first one.
2
Connect to the sandbox
Pass the ID to
connect(), then use the sandbox as usual.Full example
In the CLI example,<sandbox-id> is the sandbox ID.