interface IEventBus
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Events.IEventBus |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsevents#IEventBus |
Java | software.amazon.awscdk.services.events.IEventBus |
Python | aws_cdk.aws_events.IEventBus |
TypeScript (source) | aws-cdk-lib » aws_events » IEventBus |
Implemented by
Event
Obtainable from
Event
.fromEventBusArn()
, Event
.fromEventBusAttributes()
, Event
.fromEventBusName()
Interface which all EventBus based classes MUST implement.
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
event | string | The ARN of this event bus resource. |
event | string | The physical ID of this event bus resource. |
event | string | The JSON policy of this event bus resource. |
node | Node | The tree node. |
stack | Stack | The stack in which this resource is defined. |
event | string | The partner event source to associate with this event bus resource. |
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
eventBusArn
Type:
string
The ARN of this event bus resource.
eventBusName
Type:
string
The physical ID of this event bus resource.
eventBusPolicy
Type:
string
The JSON policy of this event bus resource.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
eventSourceName?
Type:
string
(optional)
The partner event source to associate with this event bus resource.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
archive(id, props) | Create an EventBridge archive to send events to. |
grant | Grants an IAM Principal to send custom events to the eventBus so that they can be matched to rules. |
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
archive(id, props)
public archive(id: string, props: BaseArchiveProps): Archive
Parameters
- id
string
- props
Base
— Properties of the archive.Archive Props
Returns
Create an EventBridge archive to send events to.
When you create an archive, incoming events might not immediately start being sent to the archive. Allow a short period of time for changes to take effect.
PutEventsTo(grantee)
grantpublic grantPutEventsTo(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
— The principal (no-op if undefined).
Returns
Grants an IAM Principal to send custom events to the eventBus so that they can be matched to rules.