Operate sandbox with YAML

YAML parameters for Start 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_START.
sandbox_references Required String Defines the sandbox selection method. Available values: BY_TAGS, BY_NAME, BY_PROJECT, BY_DAYS, BY_ID, BY_ACTION.
sandbox_id String ID of the sandbox to which the files are uploaded. Required when sandbox_references is set to BY_ID.
referencedactionid Int ID of the action that creates the target sandbox.Required when sandbox_references is set to BY_ACTION.
referencedsanboxname String Name of the target sandbox. Required when sandbox_references is set to BY_NAME.
tags String[] List of tags applied to the target sandbox. Required when sandbox_references is set to BY_TAGS.
sandboxprojectname String Name of the project with the target sandbox. Required when sandbox_references is set to BY_PROJECT.
days Int Number of days passed since the creation of the target sandbox. One of 1, 2, 3, 7, 14, 30. Required when sandbox_references is set to BY_DAYS.

YAML example for Start sandbox

yaml
actions: - action: "Start sandbox" type: "SANDBOX_START" sandbox_references: - "BY_ID" sandbox_id: "BJ7YnoUVtfGdo"

YAML parameters for Stop 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_STOP.
sandbox_references Required String Defines the sandbox selection method. Available values: BY_TAGS, BY_NAME, BY_PROJECT, BY_DAYS, BY_ID, BY_ACTION.
sandbox_id String ID of the sandbox to which the files are uploaded. Required when sandbox_references is set to BY_ID.
referencedactionid Int ID of the action that creates the target sandbox.Required when sandbox_references is set to BY_ACTION.
referencedsanboxname String Name of the target sandbox. Required when sandbox_references is set to BY_NAME.
tags String[] List of tags applied to the target sandbox. Required when sandbox_references is set to BY_TAGS.
sandboxprojectname String Name of the project with the target sandbox. Required when sandbox_references is set to BY_PROJECT.
days Int Number of days passed since the creation of the target sandbox. One of 1, 2, 3, 7, 14, 30. Required when sandbox_references is set to BY_DAYS.

YAML example for Stop sandbox

yaml
actions: - action: "Stop sandbox" type: "SANDBOX_STOP" sandbox_references: - "BY_ID" sandbox_id: "Cgn3QO34klUri"

YAML parameters for Destroy 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_DELETE.
sandbox_references Required String Defines the sandbox selection method. Available values: BY_TAGS, BY_NAME, BY_PROJECT, BY_DAYS, BY_ID, BY_ACTION.
sandbox_id String ID of the sandbox to which the files are uploaded. Required when sandbox_references is set to BY_ID.
referencedactionid Int ID of the action that creates the target sandbox.Required when sandbox_references is set to BY_ACTION.
referencedsanboxname String Name of the target sandbox. Required when sandbox_references is set to BY_NAME.
tags String[] List of tags applied to the target sandbox. Required when sandbox_references is set to BY_TAGS.
sandboxprojectname String Name of the project with the target sandbox. Required when sandbox_references is set to BY_PROJECT.
days Int Number of days passed since the creation of the target sandbox. One of 1, 2, 3, 7, 14, 30. Required when sandbox_references is set to BY_DAYS.

YAML example for Destroy sandbox

yaml
actions: - action: "Destroy sandbox" type: "SANDBOX_DELETE" sandbox_references: - "BY_ID" sandbox_id: "Cgn3QO34klUri"

YAML parameters for Snapshot

Name Type Description
action Required String The ID of the action.
type Required String The type of the action. Must be set to SANDBOX_SNAPSHOT.
sandbox_references Required String Defines the sandbox selection method. Available values: BY_TAGS, BY_NAME, BY_PROJECT, BY_DAYS, BY_ID, BY_ACTION.
sandbox_id String ID of the sandbox to which the files are uploaded. Required when sandbox_references is set to BY_ID.
referencedactionid Int ID of the action that creates the target sandbox.Required when sandbox_references is set to BY_ACTION.
referencedsanboxname String Name of the target sandbox. Required when sandbox_references is set to BY_NAME.
tags String[] List of tags applied to the target sandbox. Required when sandbox_references is set to BY_TAGS.
sandboxprojectname String Name of the project with the target sandbox. Required when sandbox_references is set to BY_PROJECT.
days Int Number of days passed since the creation of the target sandbox. One of 1, 2, 3, 7, 14, 30. Required when sandbox_references is set to BY_DAYS.
snapshot_name Required String Defines the name of the created snapshot.

YAML example for Snapshot

yaml
actions: - action: "Take snapshot" type: "SANDBOX_SNAPSHOT" sandbox_references: - "BY_ID" sandbox_id: "Cgn3QO34klUri" snapshot_name: "snapshot-$BUDDY_RUN_ID

Last modified on Mar 4, 2025