From 43588e00467ad18adbb984791f69080ca06e919c Mon Sep 17 00:00:00 2001 From: Michael Sambol Date: Mon, 23 Sep 2024 15:51:57 -0700 Subject: [PATCH] Update readme with separate input transformation --- .../@aws-cdk/aws-pipes-targets-alpha/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/README.md b/packages/@aws-cdk/aws-pipes-targets-alpha/README.md index 7480130c25dff..a96a3cde25657 100644 --- a/packages/@aws-cdk/aws-pipes-targets-alpha/README.md +++ b/packages/@aws-cdk/aws-pipes-targets-alpha/README.md @@ -182,6 +182,20 @@ The API destination will receive the (enriched/filtered) source payload. declare const sourceQueue: sqs.Queue; declare const dest: events.ApiDestination; +const apiTarget = new targets.ApiDestinationTarget(dest); + +const pipe = new pipes.Pipe(this, 'Pipe', { + source: new SomeSource(sourceQueue), + target: apiTarget, +}); +``` + +The input to the target API destination can be transformed: + +```ts +declare const sourceQueue: sqs.Queue; +declare const dest: events.ApiDestination; + const apiTarget = new targets.ApiDestinationTarget(dest, { inputTransformation: pipes.InputTransformation.fromObject({ body: "👀" }), });