EventBusPolicyProps Struct
Properties to associate Event Buses with a policy.
| Source | aws-events/lib/event-bus.ts |
|---|---|
| Type last changed |
Example
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
# 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
// 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();
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"
};
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
The event bus to which the policy applies.
statementPolicyStatementstatementPolicyStatementstatementPolicyStatementStatementPolicyStatementStatementPolicyStatement required #An IAM Policy Statement to apply to the Event Bus.
An identifier string for the external account that you are granting permissions to.