# EventBusPolicyProps

Properties to associate Event Buses with a policy.

Used as props by: [EventBusPolicy](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.EventBusPolicy.html)

- Source: [`aws-events/lib/event-bus.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-events/lib/event-bus.ts#L608)
- Type last changed: v2.54.0 · 7 Dec 2022

## 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_iam as iam } from 'aws-cdk-lib';

declare const eventBus: events.EventBus;
declare const policyStatement: iam.PolicyStatement;
const eventBusPolicyProps: events.EventBusPolicyProps = {
  eventBus: eventBus,
  statement: policyStatement,
  statementId: 'statementId',
};
```

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_iam as iam

# event_bus: events.EventBus
# policy_statement: iam.PolicyStatement

event_bus_policy_props = events.EventBusPolicyProps(
    event_bus=event_bus,
    statement=policy_statement,
    statement_id="statementId"
)
```

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.iam.*;

EventBus eventBus;
PolicyStatement policyStatement;

EventBusPolicyProps eventBusPolicyProps = EventBusPolicyProps.builder()
        .eventBus(eventBus)
        .statement(policyStatement)
        .statementId("statementId")
        .build();
```

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.IAM;

EventBus eventBus;
PolicyStatement policyStatement;

var eventBusPolicyProps = new EventBusPolicyProps {
    EventBus = eventBus,
    Statement = policyStatement,
    StatementId = "statementId"
};
```

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
var policyStatement PolicyStatement

eventBusPolicyProps := &EventBusPolicyProps{
	EventBus: eventBus,
	Statement: policyStatement,
	StatementId: jsii.String("statementId"),
}
```

## Properties

- `eventBus`: [IEventBus](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.IEventBus.html) (required) — The event bus to which the policy applies.

- `statement`: [PolicyStatement](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.PolicyStatement.html) (required) — An IAM Policy Statement to apply to the Event Bus.

- `statementId`: string (required) — An identifier string for the external account that you are granting permissions to.
