Amazon EventBridge · Arazzo Workflow

Amazon EventBridge Decommission Rule

Version 1.0.0

List a rule's targets, remove them, then delete the rule cleanly.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub Amazon Web ServicesEvent BusEvent-DrivenEventIntegrationServerlessArazzoWorkflows

Provider

amazon-eventbridge

Workflows

decommission-rule
Remove a rule's targets and then delete the rule.
Lists the targets on a rule, removes those targets by ID, and deletes the now-empty rule.
3 steps inputs: eventBusName, ruleName, targetIds outputs: deleteStatus, removeFailedEntryCount, removedFromTargets
1
listTargets
List the rule's current targets before removing them.
2
removeTargets
Remove the supplied targets from the rule, forcing removal if needed.
3
deleteRule
Delete the now-empty rule from the event bus.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Amazon EventBridge Decommission Rule
  summary: List a rule's targets, remove them, then delete the rule cleanly.
  description: >-
    Tears down a rule in the order EventBridge requires: a rule cannot be
    deleted while it still has targets, so the workflow first lists the rule's
    targets, removes them by their IDs, and only then deletes the rule. Every
    step spells out its AWS JSON request inline — including the documented
    X-Amz-Target header — so the flow can be read and executed without opening
    the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: rulesApi
  url: ../openapi/amazon-eventbridge-rules-api-openapi.yml
  type: openapi
- name: targetsApi
  url: ../openapi/amazon-eventbridge-targets-api-openapi.yml
  type: openapi
workflows:
- workflowId: decommission-rule
  summary: Remove a rule's targets and then delete the rule.
  description: >-
    Lists the targets on a rule, removes those targets by ID, and deletes the
    now-empty rule.
  inputs:
    type: object
    required:
    - ruleName
    - targetIds
    properties:
      ruleName:
        type: string
        description: The name of the rule to decommission.
      eventBusName:
        type: string
        description: The name or ARN of the event bus the rule lives on.
      targetIds:
        type: array
        description: The IDs of the targets to remove from the rule.
        items:
          type: string
  steps:
  - stepId: listTargets
    description: List the rule's current targets before removing them.
    operationId: ListTargetsByRule
    parameters:
    - name: X-Amz-Target
      in: header
      value: AWSEvents.ListTargetsByRule
    requestBody:
      contentType: application/x-amz-json-1.1
      payload:
        Rule: $inputs.ruleName
        EventBusName: $inputs.eventBusName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      currentTargets: $response.body#/Targets
  - stepId: removeTargets
    description: Remove the supplied targets from the rule, forcing removal if needed.
    operationId: RemoveTargets
    parameters:
    - name: X-Amz-Target
      in: header
      value: AWSEvents.RemoveTargets
    requestBody:
      contentType: application/x-amz-json-1.1
      payload:
        Rule: $inputs.ruleName
        EventBusName: $inputs.eventBusName
        Ids: $inputs.targetIds
        Force: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      failedEntryCount: $response.body#/FailedEntryCount
  - stepId: deleteRule
    description: Delete the now-empty rule from the event bus.
    operationId: DeleteRule
    parameters:
    - name: X-Amz-Target
      in: header
      value: AWSEvents.DeleteRule
    requestBody:
      contentType: application/x-amz-json-1.1
      payload:
        Name: $inputs.ruleName
        EventBusName: $inputs.eventBusName
        Force: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      deleteStatus: $statusCode
  outputs:
    removedFromTargets: $steps.listTargets.outputs.currentTargets
    removeFailedEntryCount: $steps.removeTargets.outputs.failedEntryCount
    deleteStatus: $steps.deleteRule.outputs.deleteStatus

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/amazon-eventbridge-decommission-rule-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.