Class CfnEventBus
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.events.CfnEventBus
- All Implemented Interfaces:
IInspectable,IEventBusRef,IEnvironmentAware,ITaggableV2,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.912Z")
@Stability(Stable)
public class CfnEventBus
extends CfnResource
implements IInspectable, IEventBusRef, ITaggableV2
Specifies an event bus within your account.
This can be a custom event bus which you can use to receive events from your custom applications and services, or it can be a partner event bus which can be matched to a partner event source.
As an aid to help you jumpstart developing CloudFormation templates, the EventBridge console enables you to create templates from the existing event buses in your account. For more information, see Generating CloudFormation templates from an EventBridge event bus in the Amazon EventBridge User Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.events.*;
Object policy;
CfnEventBus cfnEventBus = CfnEventBus.Builder.create(this, "MyCfnEventBus")
.name("name")
// the properties below are optional
.deadLetterConfig(DeadLetterConfigProperty.builder()
.arn("arn")
.build())
.description("description")
.eventSourceName("eventSourceName")
.kmsKeyIdentifier("kmsKeyIdentifier")
.logConfig(LogConfigProperty.builder()
.includeDetail("includeDetail")
.level("level")
.build())
.policy(policy)
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnEventBus.static interfaceConfiguration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).static interfaceThe logging configuration settings for the event bus.Nested 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.interfaces.events.IEventBusRef
IEventBusRef.Jsii$Default, IEventBusRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnEventBus(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnEventBus(software.amazon.jsii.JsiiObjectRef objRef) CfnEventBus(software.constructs.Construct scope, String id, CfnEventBusProps props) Create a newAWS::Events::EventBus. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForEventBus(IEventBusRef resource) static IEventBusReffromEventBusArn(software.constructs.Construct scope, String id, String arn) Creates a new IEventBusRef from an ARN.static IEventBusReffromEventBusName(software.constructs.Construct scope, String id, String eventBusName) Creates a new IEventBusRef from a eventBusName.The ARN of the event bus, such asarn:aws:events:us-east-2:123456789012:event-bus/aws.partner/PartnerName/acct1/repo1.The name of the event bus, such asPartnerName/acct1/repo1.Tag Manager which manages the tags for this resource.Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).The event bus description.A reference to a EventBus resource.If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.The identifier of the AWS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus.The logging configuration settings for the event bus.getName()The name of the new event bus.The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.getTags()Tags to associate with the event bus.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnEventBus.renderProperties(Map<String, Object> props) voidsetDeadLetterConfig(IResolvable value) Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).voidConfiguration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).voidsetDescription(String value) The event bus description.voidsetEventSourceName(String value) If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.voidsetKmsKeyIdentifier(String value) The identifier of the AWS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus.voidsetLogConfig(IResolvable value) The logging configuration settings for the event bus.voidThe logging configuration settings for the event bus.voidThe name of the new event bus.voidThe permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.voidTags to associate with the event bus.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnEventBus
protected CfnEventBus(software.amazon.jsii.JsiiObjectRef objRef) -
CfnEventBus
protected CfnEventBus(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnEventBus
@Stability(Stable) public CfnEventBus(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnEventBusProps props) Create a newAWS::Events::EventBus.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForEventBus
- Parameters:
resource- This parameter is required.
-
fromEventBusArn
@Stability(Stable) @NotNull public static IEventBusRef fromEventBusArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new IEventBusRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromEventBusName
@Stability(Stable) @NotNull public static IEventBusRef fromEventBusName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String eventBusName) Creates a new IEventBusRef from a eventBusName.- Parameters:
scope- This parameter is required.id- This parameter is required.eventBusName- This parameter is required.
-
isCfnEventBus
Checks whether the given object is a CfnEventBus.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The ARN of the event bus, such asarn:aws:events:us-east-2:123456789012:event-bus/aws.partner/PartnerName/acct1/repo1. -
getAttrName
The name of the event bus, such asPartnerName/acct1/repo1. -
getAttrPolicy
-
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getEventBusRef
A reference to a EventBus resource.- Specified by:
getEventBusRefin interfaceIEventBusRef
-
getName
The name of the new event bus. -
setName
The name of the new event bus. -
getDeadLetterConfig
Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).Returns union: either
IResolvableorCfnEventBus.DeadLetterConfigProperty -
setDeadLetterConfig
Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ). -
setDeadLetterConfig
@Stability(Stable) public void setDeadLetterConfig(@Nullable CfnEventBus.DeadLetterConfigProperty value) Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ). -
getDescription
The event bus description. -
setDescription
The event bus description. -
getEventSourceName
If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with. -
setEventSourceName
If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with. -
getKmsKeyIdentifier
The identifier of the AWS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus. -
setKmsKeyIdentifier
The identifier of the AWS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus. -
getLogConfig
The logging configuration settings for the event bus.Returns union: either
IResolvableorCfnEventBus.LogConfigProperty -
setLogConfig
The logging configuration settings for the event bus. -
setLogConfig
The logging configuration settings for the event bus. -
getPolicy
The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus. -
setPolicy
The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus. -
getTags
Tags to associate with the event bus. -
setTags
Tags to associate with the event bus.
-