Cloudflare · Arazzo Workflow

Cloudflare Rotate DNS Record

Version 1.0.0

Create a DNS record, update its content, then delete it.

1 workflow 1 source API 1 provider
View Spec View on GitHub AI GatewayAPI GatewayArtificial IntelligenceCDNCloudContainersDDoS ProtectionDNSEdgeEdge ComputingObject StoragePlatformReal-Time CommunicationSecurityServerlessWeb PerformanceArazzoWorkflows

Provider

cloudflare

Workflows

rotate-dns-record
Create, update, and delete a DNS record in a single lifecycle.
Provisions a DNS record, rotates its content with a partial update, and then deletes it once the rotation is complete.
3 steps inputs: content, name, newContent, type, zoneId outputs: deletedId, recordId, updatedContent
1
createRecord
createDnsRecord
Create the DNS record with its initial content.
2
updateRecord
updateDnsRecord
Patch the record with the replacement content value.
3
deleteRecord
deleteDnsRecord
Delete the record now that the rotation is complete.

Source API Descriptions

Arazzo Workflow Specification

cloudflare-rotate-dns-record-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Cloudflare Rotate DNS Record
  summary: Create a DNS record, update its content, then delete it.
  description: >-
    A full create-update-delete lifecycle for a single DNS record, useful for
    short-lived verification records or rotating a value to a new target. The
    workflow creates a record, patches it with new content, and finally removes
    it, threading the record identifier from step to step. Each step inlines its
    request and asserts the documented HTTP 200 status together with the
    Cloudflare {success, result} envelope flag.
  version: 1.0.0
sourceDescriptions:
- name: cloudflareDnsApi
  url: ../openapi/cloudflare-dns-openapi.yml
  type: openapi
workflows:
- workflowId: rotate-dns-record
  summary: Create, update, and delete a DNS record in a single lifecycle.
  description: >-
    Provisions a DNS record, rotates its content with a partial update, and then
    deletes it once the rotation is complete.
  inputs:
    type: object
    required:
    - zoneId
    - type
    - name
    - content
    - newContent
    properties:
      zoneId:
        type: string
        description: The unique identifier of the zone.
      type:
        type: string
        description: The DNS record type (e.g. A, AAAA, CNAME, TXT).
      name:
        type: string
        description: The DNS record name (e.g. www.example.com).
      content:
        type: string
        description: The initial DNS record content value.
      newContent:
        type: string
        description: The replacement DNS record content value applied during the update.
  steps:
  - stepId: createRecord
    description: Create the DNS record with its initial content.
    operationId: createDnsRecord
    parameters:
    - name: zone_id
      in: path
      value: $inputs.zoneId
    requestBody:
      contentType: application/json
      payload:
        type: $inputs.type
        name: $inputs.name
        content: $inputs.content
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.success == true
      type: jsonpath
    outputs:
      recordId: $response.body#/result/id
  - stepId: updateRecord
    description: Patch the record with the replacement content value.
    operationId: updateDnsRecord
    parameters:
    - name: zone_id
      in: path
      value: $inputs.zoneId
    - name: dns_record_id
      in: path
      value: $steps.createRecord.outputs.recordId
    requestBody:
      contentType: application/json
      payload:
        type: $inputs.type
        name: $inputs.name
        content: $inputs.newContent
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.success == true
      type: jsonpath
    outputs:
      updatedContent: $response.body#/result/content
  - stepId: deleteRecord
    description: Delete the record now that the rotation is complete.
    operationId: deleteDnsRecord
    parameters:
    - name: zone_id
      in: path
      value: $inputs.zoneId
    - name: dns_record_id
      in: path
      value: $steps.createRecord.outputs.recordId
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.success == true
      type: jsonpath
    outputs:
      deletedId: $response.body#/result/id
  outputs:
    recordId: $steps.createRecord.outputs.recordId
    updatedContent: $steps.updateRecord.outputs.updatedContent
    deletedId: $steps.deleteRecord.outputs.deletedId