Skip to content
Proud to collaborate with Microsoft for Startups

spad.task-definition-update ​

Updates ECS task definition when build configuration changes

Updates ECS task definition when build configuration changes.

Input fields: site_id, organization_id, node_version (optional), output_directory (optional), old_node_version (optional), old_output_directory (optional), build_config_id (optional)

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-spad
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
site_uuidstringYes—SpadSite.id whose task definition should be updated
organization_uuidstringNo—Organization that owns the site
node_versionstringNo—New Node.js version to set on the build container
output_directorystringNo—New build output directory
old_node_versionstringNo—Previous Node.js version (for delta logging)
old_output_directorystringNo—Previous output directory (for delta logging)
build_config_uuidstringNo—SpadBuildConfig.id that triggered the update

Output Schema ​

FieldTypeRequiredDefaultDescription
site_uuidstringYes—Site whose task definition was updated
organization_uuidstringYes—Organization that owns the site
slugstringYes—Site slug
cloud_connection_uuidstringYes—AWS CloudConnection.id the task definition lives in
current_task_definition_arnstringYes—Task definition ARN prior to the update
new_node_versionstringNo—Requested Node.js version (input propagated)
new_output_directorystringNo—Requested output directory (input propagated)
old_node_versionstringNo—Previous Node.js version recorded for delta
old_output_directorystringNo—Previous output directory recorded for delta
build_config_uuidstringNo—SpadBuildConfig.id that triggered the update
current_task_definitiondictYes—Snapshot of the prior task definition (arn/family/revision/cpu/memory/image/node_version/output_directory)
new_task_definition_arnstringYes—Task definition ARN after the update (same as current when no change)
new_revisionintegerYes—Revision number after the update
final_node_versionstringNo—Effective Node.js version after the update
final_output_directorystringYes—Effective output directory after the update
node_version_changedbooleanYes—True when a new revision was registered because node_version changed
initiated_atstringYes—ISO8601 timestamp when the workflow was initiated
updated_atstringYes—ISO8601 timestamp when the revision step completed
completed_atstringNo—ISO8601 timestamp when the workflow reached COMPLETED
failed_atstringNo—ISO8601 timestamp when the workflow reached FAILED
failure_reasonstringNo—Reason recorded on the failure path
node_versionstringNo—New Node.js version to set on the build container
output_directorystringNo—New build output directory
errorstringNo—Engine-stamped failure metadata
error_typestringNo—Engine-stamped failure metadata
failed_at_statejsonNo—Engine-stamped failure metadata
failed_layerjsonNo—Engine-stamped failure metadata
failed_stepjsonNo—Engine-stamped failure metadata

States ​

StateInitialTerminalSuccessAuto-advanceDescription
initiatedYesNo—get_current_definition—
creating_revisionNoNo—complete—
getting_currentNoNo—create_new_revision—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
initiatedget_current_definitiongetting_current—
getting_currentcreate_new_revisioncreating_revision—
creating_revisioncompletecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "spad.task-definition-update",
  "initial_data": {
    "site_uuid": "value"
  }
}