neon.roles.delete ​
Delete a role from a Neon branch
Deletes a role from a Neon branch.
Issues DELETE /projects/{neon_project_id}/branches/{neon_branch_id}/roles/{role_name}.
Idempotency: HTTP 404 (role already gone) is treated as success so re-running the atomic converges instead of failing. HTTP 409 (protected role) is a permanent failure -> WorkflowNotRetryableError("Cannot delete protected Neon role").
Inputs:
- neon_project_id: Neon project id (required)
- neon_branch_id: Neon branch id the role lives on (required)
- role_name: name of the role to delete (required)
Outputs (terminal state_data):
- neon_project_id: str — pass-through project id
- neon_branch_id: str — pass-through branch id
- role_name: str — confirmed role name
- deleted: bool — always true on success (including the 404 idempotent path)
Plugin required: context.get_plugin("neon") must expose .api_token.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | Base |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | Cloud connection holding the Neon credential |
neon_project_id | string | Yes | — | Neon project id |
neon_branch_id | string | Yes | — | Neon branch id the role lives on |
role_name | string | Yes | — | Name of the role to delete |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | — |
neon_project_id | string | No | — | — |
neon_branch_id | string | No | — | — |
role_name | string | No | — | — |
deleted | boolean | No | — | — |
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 | Delete-role request accepted |
completed | No | Yes | Yes | — | Neon role deleted |
failed | No | Yes | No | — | Neon role deletion failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | Delete Neon role |
* (any state) | fail | failed | Mark workflow failed |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "neon.roles.delete",
"initial_data": {
"neon_project_id": "value",
"neon_branch_id": "value",
"role_name": "value"
}
}