arazzo: 1.0.1 info: title: EventBridge Scheduler Create Then Update Schedule summary: Create a schedule, update its expression and state, then read it back. description: >- Creates a schedule in the default group, then performs an in-place update of its schedule expression and state. Because UpdateSchedule overrides the existing schedule with every value in the request, the flow finishes by reading the schedule back to confirm the new configuration took effect. 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: schedulerApi url: ../openapi/amazon-eventbridge-scheduler-openapi.yml type: openapi workflows: - workflowId: create-then-update-schedule summary: Create a schedule, update its expression and state, then get it. description: >- Provisions a schedule, applies an updated schedule expression and state in a full-replacement UpdateSchedule call, and verifies the change by retrieving the schedule. inputs: type: object required: - scheduleName - scheduleExpression - updatedScheduleExpression - targetArn - roleArn properties: scheduleName: type: string description: The name of the schedule to create and then update. scheduleExpression: type: string description: The initial expression that defines when the schedule runs. updatedScheduleExpression: type: string description: The new expression to apply during the update. updatedState: type: string description: The state to set on the schedule during the update (ENABLED or DISABLED). targetArn: type: string description: The Amazon Resource Name (ARN) of the schedule target. roleArn: type: string description: The ARN of the IAM role EventBridge Scheduler uses to invoke the target. steps: - stepId: createSchedule description: >- Create the initial schedule in the default group with the supplied expression and target. operationId: CreateSchedule parameters: - name: Name in: path value: $inputs.scheduleName requestBody: contentType: application/json payload: ScheduleExpression: $inputs.scheduleExpression FlexibleTimeWindow: Mode: 'OFF' State: ENABLED Target: Arn: $inputs.targetArn RoleArn: $inputs.roleArn successCriteria: - condition: $statusCode == 200 outputs: scheduleArn: $response.body#/ScheduleArn - stepId: updateSchedule description: >- Apply a full-replacement update to the schedule, changing its expression and state. All required fields are re-supplied because UpdateSchedule overrides the existing schedule with the request values. operationId: UpdateSchedule parameters: - name: Name in: path value: $inputs.scheduleName requestBody: contentType: application/json payload: ScheduleExpression: $inputs.updatedScheduleExpression FlexibleTimeWindow: Mode: 'OFF' State: $inputs.updatedState Target: Arn: $inputs.targetArn RoleArn: $inputs.roleArn successCriteria: - condition: $statusCode == 200 outputs: scheduleArn: $response.body#/ScheduleArn - stepId: getSchedule description: >- Read the schedule back to confirm the updated expression and state are in effect. operationId: GetSchedule parameters: - name: Name in: path value: $inputs.scheduleName successCriteria: - condition: $statusCode == 200 outputs: scheduleExpression: $response.body#/ScheduleExpression state: $response.body#/State lastModificationDate: $response.body#/LastModificationDate outputs: scheduleArn: $steps.updateSchedule.outputs.scheduleArn scheduleExpression: $steps.getSchedule.outputs.scheduleExpression state: $steps.getSchedule.outputs.state