apphost.machine.destroy ​
Ask reconcile to delete the Machine node and stop metering
Set desired_status=destroyed. Idempotent if already destroyed.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-apphost |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
machine_uuid | uuid | Yes | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
machine_uuid | uuid | Yes | — | — |
site_uuid | uuid | No | — | — |
organization_uuid | uuid | No | — | — |
status | string | Yes | — | — |
desired_status | string | Yes | — | — |
mode | string | No | — | — |
unchanged | boolean | Yes | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
Outcomes ​
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
destroyed | SUCCESS | Machine desired_status set to destroyed | machine_uuid |
failed | FAILURE | Apphost workflow failed | failure_reason |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "apphost.machine.destroy",
"initial_data": {
"machine_uuid": "value"
}
}