storage.media-bucket.ensure ​
Create or reconcile a customer-owned media bucket through the selected CloudConnection and append it to allowed_buckets (aws/gcp only)
Ensure a named media bucket exists and is allow-listed on the connection.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-storage |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
workflow_run_id | string | No | — | DAG-stamped parent run identifier; ignored by the Storage-owned media bucket ensure action. |
organization_uuid | uuid | Yes | — | — |
storage_connection_uuid | uuid | Yes | — | — |
bucket | string | Yes | — | Explicit media bucket name chosen by the caller; not derived or hashed. |
region | string | No | — | Optional AWS region / GCS location override. When omitted, uses the storage connection config region (or GCS default US). |
location | string | No | — | Alias for region (GCS location). Prefer region when both are set; region wins. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
bucket | string | No | — | — |
storage_connection_uuid | uuid | No | — | — |
created | boolean | No | — | — |
allowed_buckets | list | No | — | — |
provider | string | No | — | — |
failure_reason | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
failed_at_state | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | ensure | — |
ensuring | No | No | — | complete | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | ensure | ensuring | — |
ensuring | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "storage.media-bucket.ensure",
"initial_data": {
"organization_uuid": "value",
"storage_connection_uuid": "value",
"bucket": "value"
}
}