@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.304Z") @Stability(value=Stable) public class EventBus extends Resource implements IEventBus
Example:
EventBus bus = EventBus.Builder.create(this, "bus")
.eventBusName("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());
| Modifier and Type | Class and Description |
|---|---|
static class |
EventBus.Builder
A fluent builder for
EventBus. |
software.amazon.jsii.JsiiObject.InitializationModeIEventBus.Jsii$Default, IEventBus.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
EventBus(software.constructs.Construct scope,
String id) |
|
EventBus(software.constructs.Construct scope,
String id,
EventBusProps props) |
protected |
EventBus(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
EventBus(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Archive |
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.
|
String |
getEventBusArn()
The ARN of the event bus, such as: arn:aws:events:us-east-2:123456789012:event-bus/aws.partner/PartnerName/acct1/repo1.
|
String |
getEventBusName()
The physical ID of this event bus resource.
|
String |
getEventBusPolicy()
The policy for the event bus in JSON form.
|
String |
getEventSourceName()
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.
|
Grant |
grantPutEventsTo(IGrantable grantee)
Grants an IAM Principal to send custom events to the eventBus so that they can be matched to rules.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackprotected EventBus(software.amazon.jsii.JsiiObjectRef objRef)
protected EventBus(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public EventBus(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
EventBusProps props)
scope - This parameter is required.id - This parameter is required.props - @Stability(value=Stable)
public EventBus(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.@Stability(value=Stable) @NotNull public static IEventBus fromEventBusArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String eventBusArn)
scope - Parent construct. This parameter is required.id - Construct ID. This parameter is required.eventBusArn - ARN of imported event bus. This parameter is required.@Stability(value=Stable) @NotNull public static IEventBus fromEventBusAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull EventBusAttributes attrs)
scope - Parent construct. This parameter is required.id - Construct ID. This parameter is required.attrs - Imported event bus properties. This parameter is required.@Stability(value=Stable) @NotNull public static IEventBus fromEventBusName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String eventBusName)
scope - Parent construct. This parameter is required.id - Construct ID. This parameter is required.eventBusName - Name of imported event bus. This parameter is required.@Stability(value=Stable) @NotNull public static Grant grantAllPutEvents(@NotNull IGrantable grantee)
grantee - The principal (no-op if undefined). This parameter is required.@Stability(value=Stable) @NotNull public Archive archive(@NotNull String id, @NotNull BaseArchiveProps props)
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.
@Stability(value=Stable) @NotNull public Grant grantPutEventsTo(@NotNull IGrantable grantee)
grantPutEventsTo in interface IEventBusgrantee - This parameter is required.@Stability(value=Stable) @NotNull public String getEventBusArn()
getEventBusArn in interface IEventBus@Stability(value=Stable) @NotNull public String getEventBusName()
getEventBusName in interface IEventBus@Stability(value=Stable) @NotNull public String getEventBusPolicy()
getEventBusPolicy in interface IEventBus@Stability(value=Stable) @Nullable public String getEventSourceName()
getEventSourceName in interface IEventBusCopyright © 2022. All rights reserved.