Manage sandbox with YAML

The Manage sandbox action allows you to perform various operations on existing sandboxes such as starting, stopping, deleting, managing applications, and creating snapshots.

YAML parameters for Manage sandbox

Name Type Description
action Required String The ID of the action.
type Required String The type of the action. Must be set to SANDBOX_MANAGE.
operation Required String The operation to perform on the sandbox. Available values: START, STOP, DELETE, APP_START, APP_STOP, CREATE_SNAPSHOT.
targets Required Target[] Array of sandbox targets to perform the operation on. Can be specific sandbox names or filters.
snapshot_name String The name for the snapshot when operation is CREATE_SNAPSHOT. Can use Buddy variables like $BUDDY_RUN_ID.

Target parameters

Name Type Required Description
target String No Specific sandbox name to target.
type String No Target filter type. Available values: MATCH, TAG.
scope String No Scope for the target filter. Available values: PROJECT, WORKSPACE.
tags String[] No Array of tags to filter sandboxes when using tag-based targeting.

Available operations

Operation Description
START Starts a stopped sandbox.
STOP Stops a running sandbox.
DELETE Deletes a sandbox permanently.
APP_START Starts the application within the sandbox.
APP_STOP Stops the application within the sandbox.
CREATE_SNAPSHOT Creates a snapshot of the current sandbox state.

Examples

Start sandbox app

yaml
- action: Start sandbox app type: SANDBOX_MANAGE targets: - create-sb-node operation: APP_START

Stop sandbox

yaml
- action: Stop sandbox type: SANDBOX_MANAGE targets: - create-new-sandbox operation: STOP

Create snapshot with filter

yaml
- action: Create snapshot type: SANDBOX_MANAGE targets: - target: create-* type: MATCH scope: PROJECT tags: - myTag snapshot_name: name-snapshot-$BUDDY_RUN_ID operation: CREATE_SNAPSHOT

Multiple operations on different sandboxes

yaml
- pipeline: manage-my-sandbox name: manage my Sandbox refs: - refs/heads/main fail_on_prepare_env_warning: true actions: - action: Start sandbox app type: SANDBOX_MANAGE targets: - create-sb-node operation: APP_START - action: Stop sandbox type: SANDBOX_MANAGE targets: - create-new-sandbox operation: STOP - action: Create snapshot type: SANDBOX_MANAGE targets: - target: create-* type: MATCH scope: PROJECT tags: - myTag snapshot_name: name-snapshot-$BUDDY_RUN_ID operation: CREATE_SNAPSHOT

Last modified on Sep 3, 2025