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:
IResource
,IEventBus
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-21T06:34:08.500Z")
@Stability(Stable)
public class EventBus
extends Resource
implements IEventBus
Define an EventBridge EventBus.
Example:
EventBus bus = EventBus.Builder.create(this, "bus") .eventBusName("MyCustomEventBus") .description("MyCustomEventBus") .build(); bus.archive("MyArchive", BaseArchiveProps.builder() .archiveName("MyCustomEventBusArchive") .description("MyCustomerEventBus Archive") .eventPattern(EventPattern.builder() .account(List.of(Stack.of(this).getAccount())) .build()) .retention(Duration.days(365)) .build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.events.IEventBus
IEventBus.Jsii$Default, IEventBus.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
EventBus
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
EventBus
(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 IEventBus
fromEventBusArn
(software.constructs.Construct scope, String id, String eventBusArn) Import an existing event bus resource.static IEventBus
fromEventBusAttributes
(software.constructs.Construct scope, String id, EventBusAttributes attrs) Import an existing event bus resource.static IEventBus
fromEventBusName
(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.The name of the partner event source.static Grant
grantAllPutEvents
(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.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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.- 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
Grants an IAM Principal to send custom events to the eventBus so that they can be matched to rules.- Specified by:
grantPutEventsTo
in 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:
getEventBusArn
in interfaceIEventBus
-
getEventBusName
The physical ID of this event bus resource.- Specified by:
getEventBusName
in interfaceIEventBus
-
getEventBusPolicy
The policy for the event bus in JSON form.- Specified by:
getEventBusPolicy
in interfaceIEventBus
-
getEventSourceName
The name of the partner event source.- Specified by:
getEventSourceName
in interfaceIEventBus
-