Operate sandbox with YAML

YAML parameters for Start sandbox

NameTypeDescription
action
Required
StringThe ID of the action.
type
Required
StringThe type of the action. Must be set to SANDBOX_START.
sandbox_references RequiredStringDefines the sandbox selection method. Available values: BY_TAGS, BY_NAME, BY_PROJECT, BY_DAYS, BY_ID, BY_ACTION.
sandbox_idStringID of the sandbox to which the files are uploaded. Required when sandbox_references is set to BY_ID.
referenced_action_idIntID of the action that creates the target sandbox.Required when sandbox_references is set to BY_ACTION.
referenced_sanbox_nameStringName of the target sandbox. Required when sandbox_references is set to BY_NAME.
tagsString[]List of tags applied to the target sandbox. Required when sandbox_references is set to BY_TAGS.
sandbox_project_idIntID of the project with the target sandbox. Required when sandbox_references is set to BY_PROJECT.
daysIntNumber 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

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

YAML parameters for Stop sandbox

NameTypeDescription
action
Required
StringThe ID of the action.
type
Required
StringThe type of the action. Must be set to SANDBOX_STOP.
sandbox_references RequiredStringDefines the sandbox selection method. Available values: BY_TAGS, BY_NAME, BY_PROJECT, BY_DAYS, BY_ID, BY_ACTION.
sandbox_idStringID of the sandbox to which the files are uploaded. Required when sandbox_references is set to BY_ID.
referenced_action_idIntID of the action that creates the target sandbox.Required when sandbox_references is set to BY_ACTION.
referenced_sanbox_nameStringName of the target sandbox. Required when sandbox_references is set to BY_NAME.
tagsString[]List of tags applied to the target sandbox. Required when sandbox_references is set to BY_TAGS.
sandbox_project_idIntID of the project with the target sandbox. Required when sandbox_references is set to BY_PROJECT.
daysIntNumber 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

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

YAML parameters for Destroy sandbox

NameTypeDescription
action
Required
StringThe ID of the action.
type
Required
StringThe type of the action. Must be set to SANDBOX_DELETE.
sandbox_references RequiredStringDefines the sandbox selection method. Available values: BY_TAGS, BY_NAME, BY_PROJECT, BY_DAYS, BY_ID, BY_ACTION.
sandbox_idStringID of the sandbox to which the files are uploaded. Required when sandbox_references is set to BY_ID.
referenced_action_idIntID of the action that creates the target sandbox.Required when sandbox_references is set to BY_ACTION.
referenced_sanbox_nameStringName of the target sandbox. Required when sandbox_references is set to BY_NAME.
tagsString[]List of tags applied to the target sandbox. Required when sandbox_references is set to BY_TAGS.
sandbox_project_idIntID of the project with the target sandbox. Required when sandbox_references is set to BY_PROJECT.
daysIntNumber 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

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

YAML parameters for Snapshot

NameTypeDescription
action
Required
StringThe ID of the action.
type
Required
StringThe type of the action. Must be set to SANDBOX_SNAPSHOT.
sandbox_references RequiredStringDefines the sandbox selection method. Available values: BY_TAGS, BY_NAME, BY_PROJECT, BY_DAYS, BY_ID, BY_ACTION.
sandbox_idStringID of the sandbox to which the files are uploaded. Required when sandbox_references is set to BY_ID.
referenced_action_idIntID of the action that creates the target sandbox.Required when sandbox_references is set to BY_ACTION.
referenced_sanbox_nameStringName of the target sandbox. Required when sandbox_references is set to BY_NAME.
tagsString[]List of tags applied to the target sandbox. Required when sandbox_references is set to BY_TAGS.
sandbox_project_idIntID of the project with the target sandbox. Required when sandbox_references is set to BY_PROJECT.
daysIntNumber 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 RequiredStringDefines the name of the created snapshot.

YAML example for Snapshot

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

Last modified on April 26, 2022

Get Started

Sign up for free and deploy your project in less than 10 minutes.