data.network.segment.persist ​
Upsert a NetworkSegment from sync
Create, restore, or update a NetworkSegment by (scope, provider_segment_ref).
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-network |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | UUID of the organization |
network_scope_uuid | uuid | Yes | — | UUID of the parent NetworkScope |
provider_segment_ref | string | Yes | — | Provider-side segment identifier (subnet-..., subnetId, etc.) |
name | string | Yes | — | Human-readable segment name |
cidr_blocks | list | No | — | CIDR blocks for the segment |
availability_zone | string | No | — | AZ / zone where the segment lives |
route_domain | string | No | — | Route table or domain identifier |
classification | string | No | — | public/private/hybrid classification |
is_public | boolean | No | — | Whether the segment is provider-public |
provider_metadata | dict | No | — | Provider-side metadata bag (no secrets) |
actor | string | No | — | Caller initiating the persist |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
segment_uuid | uuid | Yes | — | UUID of the persisted segment |
created | boolean | Yes | — | True when a new row was inserted |
restored | boolean | Yes | — | True when a soft-deleted row was restored |
updated | boolean | Yes | — | True when an existing row was mutated |
persisted_at | string | Yes | — | ISO-8601 timestamp of the persist |
failure_reason | string | No | — | Engine-stamped human-readable failure reason |
failed_at_state | string | No | — | Engine-stamped state when the workflow failed |
failed_step | string | No | — | Engine-stamped step name (DAG path) |
failed_layer | integer | No | — | Engine-stamped layer index (DAG path) |
error | string | No | — | Engine-stamped exception message |
error_type | string | No | — | Engine-stamped exception class name |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | complete | Persist segment |
completed | No | Yes | Yes | — | Persisted |
failed | No | Yes | No | — | Persist failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | complete | completed | — |
pending | fail | failed | — |
Outcomes ​
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
persisted | SUCCESS | Upsert a NetworkSegment from sync | — |
failed | FAILURE | Network workflow failed | failure_reason |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "data.network.segment.persist",
"initial_data": {
"organization_uuid": "value",
"network_scope_uuid": "value",
"provider_segment_ref": "value",
"name": "value"
}
}