Skip to content

Commit

Permalink
Update readme with separate input transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
msambol committed Sep 23, 2024
1 parent dcc6ced commit 43588e0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/@aws-cdk/aws-pipes-targets-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: "👀" }),
});
Expand Down

0 comments on commit 43588e0

Please sign in to comment.