Amazon RDS · Arazzo Workflow

Amazon RDS Enable Backup Retention

Version 1.0.0

Set an instance backup retention period immediately and poll until stable.

1 workflow 1 source API 1 provider
View Spec View on GitHub Cloud DatabasesDatabase ServiceDBaaSManaged DatabasesRelational DatabasesArazzoWorkflows

Provider

amazon-rds

Workflows

enable-backup-retention
Set a DB instance backup retention period and wait for it to apply.
Confirms the instance is available, modifies the backup retention period with ApplyImmediately, then polls until DescribeDBInstances reports the instance available again.
3 steps inputs: backupRetentionPeriod, dbInstanceIdentifier outputs: appliedRetention, status
1
confirmInstance
describeDBInstances
Describe the DB instance to confirm it is available before changing the backup retention period.
2
modifyRetention
modifyDBInstance
Submit the modify request setting the backup retention period with the change applied immediately.
3
pollInstance
describeDBInstances
Describe the DB instance and inspect its status. While the instance is still modifying or backing-up the workflow loops back to poll again; once it is available the flow ends.

Source API Descriptions

Arazzo Workflow Specification

amazon-rds-enable-backup-retention-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Amazon RDS Enable Backup Retention
  summary: Set an instance backup retention period immediately and poll until stable.
  description: >-
    Turns on (or extends) automated backups for a DB instance by setting its
    backup retention period and waiting for the change to apply. The workflow
    confirms the instance is available, submits a modify request that sets the
    BackupRetentionPeriod with ApplyImmediately, and polls DescribeDBInstances
    until the status settles back to available, looping while the instance is
    still modifying or backing-up. 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: amazonRdsApi
  url: ../openapi/amazon-rds-openapi.yml
  type: openapi
workflows:
- workflowId: enable-backup-retention
  summary: Set a DB instance backup retention period and wait for it to apply.
  description: >-
    Confirms the instance is available, modifies the backup retention period
    with ApplyImmediately, then polls until DescribeDBInstances reports the
    instance available again.
  inputs:
    type: object
    required:
    - dbInstanceIdentifier
    - backupRetentionPeriod
    properties:
      dbInstanceIdentifier:
        type: string
        description: The identifier of the DB instance to configure backups for.
      backupRetentionPeriod:
        type: integer
        description: The number of days to retain automated backups (0-35).
  steps:
  - stepId: confirmInstance
    description: >-
      Describe the DB instance to confirm it is available before changing the
      backup retention period.
    operationId: describeDBInstances
    parameters:
    - name: DBInstanceIdentifier
      in: query
      value: $inputs.dbInstanceIdentifier
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.dBInstances[0].dBInstanceStatus == 'available'
      type: jsonpath
    outputs:
      currentRetention: $response.body#/dBInstances/0/backupRetentionPeriod
  - stepId: modifyRetention
    description: >-
      Submit the modify request setting the backup retention period with the
      change applied immediately.
    operationId: modifyDBInstance
    parameters:
    - name: DBInstanceIdentifier
      in: query
      value: $inputs.dbInstanceIdentifier
    - name: BackupRetentionPeriod
      in: query
      value: $inputs.backupRetentionPeriod
    - name: ApplyImmediately
      in: query
      value: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      pendingStatus: $response.body#/dBInstance/dBInstanceStatus
  - stepId: pollInstance
    description: >-
      Describe the DB instance and inspect its status. While the instance is
      still modifying or backing-up the workflow loops back to poll again; once
      it is available the flow ends.
    operationId: describeDBInstances
    parameters:
    - name: DBInstanceIdentifier
      in: query
      value: $inputs.dbInstanceIdentifier
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/dBInstances/0/dBInstanceStatus
      appliedRetention: $response.body#/dBInstances/0/backupRetentionPeriod
    onSuccess:
    - name: stillApplying
      type: goto
      stepId: pollInstance
      criteria:
      - context: $response.body
        condition: $.dBInstances[0].dBInstanceStatus != 'available'
        type: jsonpath
    - name: available
      type: end
      criteria:
      - context: $response.body
        condition: $.dBInstances[0].dBInstanceStatus == 'available'
        type: jsonpath
  outputs:
    status: $steps.pollInstance.outputs.status
    appliedRetention: $steps.pollInstance.outputs.appliedRetention