Skip to content
v2.274.0

Experimental

@aws-cdk/aws-pipes-targets-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

EventBridgeTarget Class ​

An EventBridge Pipes target that sends messages to an EventBridge event bus.

Example ​

ts
declare const sourceQueue: sqs.Queue;
declare const targetEventBus: events.EventBus;

const eventBusTarget = new targets.EventBridgeTarget(targetEventBus);

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)

pipe = pipes.Pipe(self, "Pipe",
    source=SqsSource(source_queue),
    target=event_bus_target
)
java
Queue sourceQueue;
EventBus targetEventBus;


EventBridgeTarget eventBusTarget = new EventBridgeTarget(targetEventBus);

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);

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)

pipe := pipes.NewPipe(this, jsii.String("Pipe"), &PipeProps{
	Source: awscdkpipessourcesalpha.NewSqsSource(sourceQueue),
	Target: eventBusTarget,
})

Initializer ​

ts
new EventBridgeTarget(eventBus: IEventBus, parameters?: EventBridgeTargetParameters)
python
EventBridgeTarget(event_bus: IEventBus, parameters: typing.Optional[EventBridgeTargetParameters] = None)
java
new EventBridgeTarget(IEventBus eventBus, EventBridgeTargetParameters parameters)
csharp
new EventBridgeTarget(IEventBus eventBus, EventBridgeTargetParameters? parameters = null)
go
NewEventBridgeTarget(EventBus IEventBus, Parameters EventBridgeTargetParameters)

Properties ​

targetArnstringtarget_arnstrtargetArnStringTargetArnstringTargetArn*stringrequired#
The ARN of the target resource.

Methods ​

bind(pipe: IPipe): TargetConfigdef bind(self, pipe: IPipe) -> TargetConfigpublic TargetConfig bind(IPipe pipe)public TargetConfig Bind(IPipe pipe)func Bind(Pipe IPipe) TargetConfig#
Bind this target to a pipe.
grantPush(grantee: IRole): voiddef grant_push(self, grantee: IRole) -> Nonepublic void grantPush(IRole grantee)public void GrantPush(IRole grantee)func GrantPush(Grantee IRole)#
Grant the pipe role to push to the target.