# EventBridgeDestination

Use an Event Bridge event bus as a Lambda destination.

If no event bus is specified, the default event bus is used.

Implements: [IDestination](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.IDestination.html)

- Source: [`aws-lambda-destinations/lib/event-bridge.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-lambda-destinations/lib/event-bridge.ts#L11)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_events as events } from 'aws-cdk-lib';
import { aws_lambda_destinations as lambda_destinations } from 'aws-cdk-lib';

declare const eventBus: events.EventBus;
const eventBridgeDestination = new lambda_destinations.EventBridgeDestination(/* all optional props */ eventBus);
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_events as events
from aws_cdk import aws_lambda_destinations as lambda_destinations

# event_bus: events.EventBus

event_bridge_destination = lambda_destinations.EventBridgeDestination(event_bus)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.events.*;
import software.amazon.awscdk.services.lambda.destinations.*;

EventBus eventBus;

EventBridgeDestination eventBridgeDestination = new EventBridgeDestination(eventBus);
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Events;
using Amazon.CDK.AWS.Lambda.Destinations;

EventBus eventBus;

var eventBridgeDestination = new EventBridgeDestination(eventBus);
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var eventBus EventBus

eventBridgeDestination := awscdk.Aws_lambda_destinations.NewEventBridgeDestination(eventBus)
```

## Initializer

TypeScript:

```ts
new EventBridgeDestination(eventBus?: IEventBus)
```

Python:

```python
EventBridgeDestination(event_bus: typing.Optional[IEventBus] = None)
```

Java:

```java
new EventBridgeDestination(IEventBus eventBus)
```

C# / .NET:

```csharp
new EventBridgeDestination(IEventBus? eventBus = null)
```

Golang:

```go
NewEventBridgeDestination(EventBus IEventBus)
```

## Methods

- `bind(_scope: Construct, fn: IFunction, _options?: DestinationOptions): DestinationConfig` — Returns a destination configuration.
