arazzo: 1.0.1 info: title: Amazon S3 Upload and List Objects summary: Upload an object then list the bucket contents to confirm it appears. description: >- A common verification flow after writing data to Amazon S3. The workflow uploads an object into an existing bucket and then runs ListObjectsV2 with a key prefix to confirm the freshly written object shows up in the bucket listing. 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: s3RestApi url: ../openapi/amazon-s3-rest-api-openapi.yml type: openapi workflows: - workflowId: upload-and-list-objects summary: Put an object then list objects under its prefix. description: >- Writes a single object to a bucket and lists the bucket contents filtered by a prefix to confirm the object is present. inputs: type: object required: - bucket - objectKey - objectBody - prefix properties: bucket: type: string description: The bucket to write to and list. objectKey: type: string description: The key the object will be stored under. objectBody: type: string description: The raw object payload to upload. prefix: type: string description: The key prefix to filter the listing by. steps: - stepId: putObject description: >- Upload the object's binary body to the bucket under the supplied key. operationId: PutObject parameters: - name: Bucket in: path value: $inputs.bucket - name: Key+ in: path value: $inputs.objectKey requestBody: contentType: application/octet-stream payload: $inputs.objectBody successCriteria: - condition: $statusCode == 200 outputs: etag: $response.header.ETag - stepId: listObjects description: >- List the bucket contents filtered to the prefix to confirm the new object is present. operationId: ListObjectsV2 parameters: - name: Bucket in: path value: $inputs.bucket - name: list-type in: query value: 2 - name: prefix in: query value: $inputs.prefix - name: max-keys in: query value: 100 successCriteria: - condition: $statusCode == 200 outputs: keyCount: $response.body#/KeyCount firstKey: $response.body#/Contents/0/Key isTruncated: $response.body#/IsTruncated outputs: etag: $steps.putObject.outputs.etag keyCount: $steps.listObjects.outputs.keyCount firstKey: $steps.listObjects.outputs.firstKey