Sandbox.list() method.
Once you have information about running sandbox, you can connect to it using the
Sandbox.connect() method.Listing sandboxes
TheSandbox.list() method supports pagination. In the advanced pagination section, you can find more information about pagination techniques using the updated method.
Filtering sandboxes
Filter sandboxes by their current state. The state parameter can contain either “running” for running sandboxes or “paused” for paused sandboxes, or both.Advanced pagination
For more granular pagination, you can set custom per-page item limit (default and maximum is 100) and specify an offset parameter (nextToken or next_token) to start paginating from.
hasNext or has_next property) and fetching until there are no more pages left to fetch:
Old SDK (v1.x.y)
If you’re using SDK with version lower than
2.0.0, the Sandbox.list() method behaves differently.