Temporal · Arazzo Workflow

Temporal Delete a Namespace and Confirm Removal

Version 1.0.0

Verify a Namespace exists, delete it, then confirm it is gone.

1 workflow 1 source API 1 provider
View Spec View on GitHub ProCode_API_CompositionWorkflowsArazzoWorkflows

Provider

temporal

Workflows

delete-namespace
Confirm, delete, and verify removal of a Namespace.
Chains getNamespace (confirm it exists), deleteNamespace (remove it), and a final getNamespace that branches on the 404 status to verify deletion.
3 steps inputs: bearerToken, namespace outputs: finalStatus, stateBeforeDelete
1
confirmExists
getNamespace
Read the Namespace to confirm it exists before deleting and capture its current state for the record.
2
deleteNamespace
deleteNamespace
Delete the Namespace. A 200 indicates the control plane accepted the deletion request.
3
verifyGone
getNamespace
Re-read the Namespace expecting a 404 Not Found, which confirms the Namespace has been removed from the account.

Source API Descriptions

Arazzo Workflow Specification

temporal-delete-namespace-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Temporal Delete a Namespace and Confirm Removal
  summary: Verify a Namespace exists, delete it, then confirm it is gone.
  description: >-
    Decommissioning a Temporal Cloud Namespace should be deliberate. This
    workflow first reads the Namespace to confirm it exists and to capture its
    last state, issues the delete, and then re-reads the Namespace expecting a
    404 to confirm the resource was removed. Every step spells out its request
    inline so the flow can be read and executed without opening the underlying
    OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: cloudOpsApi
  url: ../openapi/cloud-ops-api.yml
  type: openapi
workflows:
- workflowId: delete-namespace
  summary: Confirm, delete, and verify removal of a Namespace.
  description: >-
    Chains getNamespace (confirm it exists), deleteNamespace (remove it), and a
    final getNamespace that branches on the 404 status to verify deletion.
  inputs:
    type: object
    required:
    - bearerToken
    - namespace
    properties:
      bearerToken:
        type: string
        description: API key used as the Bearer token for Authorization.
      namespace:
        type: string
        description: The Namespace identifier to delete.
  steps:
  - stepId: confirmExists
    description: >-
      Read the Namespace to confirm it exists before deleting and capture its
      current state for the record.
    operationId: getNamespace
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.bearerToken"
    - name: namespace
      in: path
      value: $inputs.namespace
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      stateBeforeDelete: $response.body#/state
  - stepId: deleteNamespace
    description: >-
      Delete the Namespace. A 200 indicates the control plane accepted the
      deletion request.
    operationId: deleteNamespace
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.bearerToken"
    - name: namespace
      in: path
      value: $inputs.namespace
    successCriteria:
    - condition: $statusCode == 200
  - stepId: verifyGone
    description: >-
      Re-read the Namespace expecting a 404 Not Found, which confirms the
      Namespace has been removed from the account.
    operationId: getNamespace
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.bearerToken"
    - name: namespace
      in: path
      value: $inputs.namespace
    successCriteria:
    - condition: $statusCode == 404
    outputs:
      finalStatus: $statusCode
  outputs:
    stateBeforeDelete: $steps.confirmExists.outputs.stateBeforeDelete
    finalStatus: $steps.verifyGone.outputs.finalStatus