spad.configure_bucket_policy ​
Configure bucket policy (DAG step)
Configure bucket policy (DAG step).
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-spad |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | string | Yes | — | SpadSite.id for context propagation |
s3_bucket_name | string | Yes | — | Bucket whose policy should be set |
cloudfront_distribution_ref | string | Yes | — | CloudFront distribution ID granted access via the policy |
cloud_connection_uuid | string | Yes | — | AWS CloudConnection.id |
organization_uuid | string | No | — | Organization that owns the site |
s3_region | string | No | — | Bucket region |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
bucket_policy_configured | boolean | Yes | — | True once the bucket policy grants CloudFront OAC access |
resources_created | list | No | — | Accumulator list of created resource tags (adds 's3_bucket_policy') |
completed_at | string | No | — | ISO8601 timestamp when the step reached COMPLETED |
failed_at | string | No | — | ISO8601 timestamp when the step reached FAILED |
site_uuid | string | No | — | SpadSite.id for context propagation |
s3_bucket_name | string | No | — | Bucket whose policy should be set |
cloudfront_distribution_ref | string | No | — | CloudFront distribution ID granted access via the policy |
cloud_connection_uuid | string | No | — | AWS CloudConnection.id |
organization_uuid | string | No | — | Organization that owns the site |
s3_region | string | No | — | Bucket region |
error | string | No | — | Engine-stamped failure metadata |
error_type | string | No | — | Engine-stamped failure metadata |
failed_at_state | json | No | — | Engine-stamped failure metadata |
failed_layer | json | No | — | Engine-stamped failure metadata |
failed_step | json | No | — | Engine-stamped failure metadata |
failure_reason | string | No | — | Engine-stamped failure metadata |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | run | Step accepted |
run | No | No | — | complete | Executing site creation action |
completed | No | Yes | Yes | — | Step completed successfully |
failed | No | Yes | No | — | Step failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | run | run | Start step execution |
run | complete | completed | Mark step completed |
* (any state) | fail | failed | Mark step failed |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "spad.configure_bucket_policy",
"initial_data": {
"site_uuid": "value",
"s3_bucket_name": "value",
"cloudfront_distribution_ref": "value",
"cloud_connection_uuid": "value"
}
}