Class EventBus
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.events.EventBus
- All Implemented Interfaces:
IEventBusRef,IEnvironmentAware,IResource,IEventBus,IResourceWithPolicy,IResourceWithPolicyV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:36.952Z")
@Stability(Stable)
public class EventBus
extends Resource
implements IEventBus, IResourceWithPolicy
Define an EventBridge EventBus.
Example:
import software.amazon.awscdk.services.events.*;
ConfigurationSet myConfigurationSet;
IEventBus bus = EventBus.fromEventBusName(this, "EventBus", "default");
myConfigurationSet.addEventDestination("ToEventBus", ConfigurationSetEventDestinationOptions.builder()
.destination(EventDestination.eventBus(bus))
.build());
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.events.IEventBus
IEventBus.Jsii$Default, IEventBus.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IResourceWithPolicy
IResourceWithPolicy.Jsii$Default, IResourceWithPolicy.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEventBus(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedEventBus(software.amazon.jsii.JsiiObjectRef objRef) EventBus(software.constructs.Construct scope, String id, EventBusProps props) -
Method Summary
Modifier and TypeMethodDescriptionaddToResourcePolicy(PolicyStatement statement) Adds a statement to the IAM resource policy associated with this event bus.archive(String id, BaseArchiveProps props) Create an EventBridge archive to send events to.static IEventBusfromEventBusArn(software.constructs.Construct scope, String id, String eventBusArn) Import an existing event bus resource.static IEventBusfromEventBusAttributes(software.constructs.Construct scope, String id, EventBusAttributes attrs) Import an existing event bus resource.static IEventBusfromEventBusName(software.constructs.Construct scope, String id, String eventBusName) Import an existing event bus resource.The ARN of the event bus, such as: arn:aws:events:us-east-2:123456789012:event-bus/aws.partner/PartnerName/acct1/repo1.The physical ID of this event bus resource.The policy for the event bus in JSON form.A reference to a EventBus resource.The name of the partner event source.Collection of grant methods for an EventBus.static GrantgrantAllPutEvents(IGrantable grantee) Permits an IAM Principal to send custom events to EventBridge so that they can be matched to rules.grantPutEventsTo(IGrantable grantee) Grants an IAM Principal to send custom events to the eventBus so that they can be matched to rules.grantPutEventsTo(IGrantable grantee, String sid) Grants an IAM Principal to send custom events to the eventBus so that they can be matched to rules.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.awscdk.services.iam.IResourceWithPolicy
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
EventBus
protected EventBus(software.amazon.jsii.JsiiObjectRef objRef) -
EventBus
protected EventBus(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
EventBus
@Stability(Stable) public EventBus(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable EventBusProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
EventBus
@Stability(Stable) public EventBus(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
fromEventBusArn
@Stability(Stable) @NotNull public static IEventBus fromEventBusArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String eventBusArn) Import an existing event bus resource.- Parameters:
scope- Parent construct. This parameter is required.id- Construct ID. This parameter is required.eventBusArn- ARN of imported event bus. This parameter is required.
-
fromEventBusAttributes
@Stability(Stable) @NotNull public static IEventBus fromEventBusAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull EventBusAttributes attrs) Import an existing event bus resource.- Parameters:
scope- Parent construct. This parameter is required.id- Construct ID. This parameter is required.attrs- Imported event bus properties. This parameter is required.
-
fromEventBusName
@Stability(Stable) @NotNull public static IEventBus fromEventBusName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String eventBusName) Import an existing event bus resource.- Parameters:
scope- Parent construct. This parameter is required.id- Construct ID. This parameter is required.eventBusName- Name of imported event bus. This parameter is required.
-
grantAllPutEvents
Permits an IAM Principal to send custom events to EventBridge so that they can be matched to rules.- Parameters:
grantee- The principal (no-op if undefined). This parameter is required.
-
addToResourcePolicy
@Stability(Stable) @NotNull public AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement) Adds a statement to the IAM resource policy associated with this event bus.- Specified by:
addToResourcePolicyin interfaceIResourceWithPolicyV2- Parameters:
statement- This parameter is required.
-
archive
@Stability(Stable) @NotNull public Archive archive(@NotNull String id, @NotNull BaseArchiveProps props) 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.
-
grantPutEventsTo
@Stability(Stable) @NotNull public Grant grantPutEventsTo(@NotNull IGrantable grantee, @Nullable String sid) Grants an IAM Principal to send custom events to the eventBus so that they can be matched to rules.- Specified by:
grantPutEventsToin interfaceIEventBus- Parameters:
grantee- This parameter is required.sid-
-
grantPutEventsTo
Grants an IAM Principal to send custom events to the eventBus so that they can be matched to rules.- Specified by:
grantPutEventsToin interfaceIEventBus- Parameters:
grantee- This parameter is required.
-
getEventBusArn
The ARN of the event bus, such as: arn:aws:events:us-east-2:123456789012:event-bus/aws.partner/PartnerName/acct1/repo1.- Specified by:
getEventBusArnin interfaceIEventBus
-
getEventBusName
The physical ID of this event bus resource.- Specified by:
getEventBusNamein interfaceIEventBus
-
getEventBusPolicy
The policy for the event bus in JSON form.- Specified by:
getEventBusPolicyin interfaceIEventBus
-
getEventBusRef
A reference to a EventBus resource.- Specified by:
getEventBusRefin interfaceIEventBusRef
-
getGrants
Collection of grant methods for an EventBus. -
getEventSourceName
The name of the partner event source.- Specified by:
getEventSourceNamein interfaceIEventBus
-