Skip to content
Proud to collaborate with Microsoft for Startups

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 ​

PropertyValue
Workflow typeAtomic
LibraryBase
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidNo—Cloud connection holding the Neon credential
neon_project_idstringYes—Neon project id
neon_branch_idstringYes—Neon branch id the role lives on
role_namestringYes—Name of the role to delete

Output Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidNo——
neon_project_idstringNo——
neon_branch_idstringNo——
role_namestringNo——
deletedbooleanNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeDelete-role request accepted
completedNoYesYes—Neon role deleted
failedNoYesNo—Neon role deletion failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompletedDelete Neon role
* (any state)failfailedMark 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"
  }
}