Experimental
@aws-cdk/aws-pipes-targets-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
EventBridgeTargetParameters Struct
EventBridge target properties.
| Stability | Experimental |
|---|---|
| Source | lib/event-bridge.ts |
Example
ts
declare const sourceQueue: sqs.Queue;
declare const targetEventBus: events.EventBus;
const eventBusTarget = new targets.EventBridgeTarget(targetEventBus, {
inputTransformation: pipes.InputTransformation.fromObject({ body: "👀" }),
});
const pipe = new pipes.Pipe(this, 'Pipe', {
source: new SqsSource(sourceQueue),
target: eventBusTarget,
});
python
# source_queue: sqs.Queue
# target_event_bus: events.EventBus
event_bus_target = targets.EventBridgeTarget(target_event_bus,
input_transformation=pipes.InputTransformation.from_object({"body": "👀"})
)
pipe = pipes.Pipe(self, "Pipe",
source=SqsSource(source_queue),
target=event_bus_target
)
java
Queue sourceQueue;
EventBus targetEventBus;
EventBridgeTarget eventBusTarget = EventBridgeTarget.Builder.create(targetEventBus)
.inputTransformation(InputTransformation.fromObject(Map.of("body", "👀")))
.build();
Pipe pipe = Pipe.Builder.create(this, "Pipe")
.source(new SqsSource(sourceQueue))
.target(eventBusTarget)
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Pipes.Targets.Alpha
Queue sourceQueue;
EventBus targetEventBus;
var eventBusTarget = new EventBridgeTarget(targetEventBus, new EventBridgeTargetParameters {
InputTransformation = InputTransformation.FromObject(new Dictionary<string, object> { { "body", "👀" } })
});
var pipe = new Pipe(this, "Pipe", new PipeProps {
Source = new SqsSource(sourceQueue),
Target = eventBusTarget
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdkpipestargetsalpha/v2
var sourceQueue Queue
var targetEventBus EventBus
eventBusTarget := targets.NewEventBridgeTarget(targetEventBus, &EventBridgeTargetParameters{
InputTransformation: pipes.InputTransformation_FromObject(map[string]interface{}{
"body": jsii.String("👀"),
}),
})
pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
Target: eventBusTarget,
})
Properties
detailTypeoptionalstringdetail_typeoptionalstrdetailTypeoptionalStringDetailTypeoptionalstringDetailTypeoptional*string = none #A free-form string used to decide what fields to expect in the event detail.
endpointIdoptionalstringendpoint_idoptionalstrendpointIdoptionalStringEndpointIdoptionalstringEndpointIdoptional*string = none #The URL subdomain of the endpoint.
example
ts
// if the URL for the endpoint is https://abcde.veo.endpoints.event.amazonaws.com
'abcde.veo'
inputTransformationoptionalIInputTransformationinput_transformationoptionalIInputTransformationinputTransformationoptionalIInputTransformationInputTransformationoptionalIInputTransformationInputTransformationoptionalIInputTransformation = none #The input transformation to apply to the message before sending it to the target.
resourcesoptionalstring[]resourcesoptionaltyping.List[str]resourcesoptionalList<String>Resourcesoptionalstring[]Resourcesoptional*[]*string = none #AWS resources, identified by Amazon Resource Name (ARN), which the event primarily concerns.
sourceoptionalstringsourceoptionalstrsourceoptionalStringSourceoptionalstringSourceoptional*string = none #The source of the event.
The time stamp of the event, per RFC3339.
Default: the time stamp of the PutEvents call