arazzo: 1.0.1 info: title: Amazon RDS Upgrade DB Engine Version summary: Resolve a target engine version, upgrade the instance, and poll until stable. description: >- Performs a database engine version upgrade by first discovering valid target versions for the engine, then applying the upgrade and waiting for the instance to finish. The workflow looks up available engine versions, confirms the instance is available, submits a modify request that sets the new EngineVersion with ApplyImmediately, and polls DescribeDBInstances until the status settles back to available. 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: upgrade-engine-version summary: Upgrade a DB instance engine version and wait for it to stabilize. description: >- Resolves available engine versions, confirms the instance is available, modifies the engine version with ApplyImmediately, and polls until DescribeDBInstances reports the instance available again. inputs: type: object required: - dbInstanceIdentifier - engine - engineVersion properties: dbInstanceIdentifier: type: string description: The identifier of the DB instance to upgrade. engine: type: string description: The database engine of the instance (e.g. postgres). engineVersion: type: string description: The target engine version to upgrade to. steps: - stepId: lookupVersions description: >- Describe the available engine versions for the supplied engine so the requested target version can be validated before upgrading. operationId: describeDBEngineVersions parameters: - name: Engine in: query value: $inputs.engine - name: EngineVersion in: query value: $inputs.engineVersion successCriteria: - condition: $statusCode == 200 - stepId: confirmInstance description: >- Describe the DB instance to confirm it is available before applying the engine upgrade. 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: currentVersion: $response.body#/dBInstances/0/engineVersion - stepId: upgradeInstance description: >- Submit the modify request setting the new engine version with the upgrade applied immediately. operationId: modifyDBInstance parameters: - name: DBInstanceIdentifier in: query value: $inputs.dbInstanceIdentifier - name: EngineVersion in: query value: $inputs.engineVersion - 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 upgrading 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 appliedVersion: $response.body#/dBInstances/0/engineVersion onSuccess: - name: stillUpgrading 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 appliedVersion: $steps.pollInstance.outputs.appliedVersion