class EventBus
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Events.Targets.EventBus |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awseventstargets#EventBus |
Java | software.amazon.awscdk.services.events.targets.EventBus |
Python | aws_cdk.aws_events_targets.EventBus |
TypeScript (source) | aws-cdk-lib » aws_events_targets » EventBus |
Implements
IRule
Notify an existing Event Bus of an event.
Example
const rule = new events.Rule(this, 'Rule', {
schedule: events.Schedule.expression('rate(1 minute)'),
});
rule.addTarget(new targets.EventBus(
events.EventBus.fromEventBusArn(
this,
'External',
`arn:aws:events:eu-west-1:999999999999:event-bus/test-bus`,
),
));
Initializer
new EventBus(eventBus: IEventBus, props?: EventBusProps)
Parameters
- eventBus
IEvent
Bus - props
Event
Bus Props
Methods
Name | Description |
---|---|
bind(rule, _id?) | Returns the rule target specification. |
bind(rule, _id?)
public bind(rule: IRule, _id?: string): RuleTargetConfig
Parameters
- rule
IRule
- _id
string
Returns
Returns the rule target specification.
NOTE: Do not use the various inputXxx
options. They can be set in a call to addTarget
.