Class CfnEventBus

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IEventBusRef, IEnvironmentAware, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.140.0 (build 79fd58c)", date="2026-09-30T11:04:52.398Z") @Stability(Stable) public class CfnEventBus extends CfnResource implements IInspectable, IEventBusRef, ITaggableV2
Resource type definition for AWS::EventsV2::EventBus, an Amazon EventBridge custom event bus that receives events and delivers them to matching subscribers.

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.eventsv2.*;
 CfnEventBus cfnEventBus = CfnEventBus.Builder.create(this, "MyCfnEventBus")
         .name("name")
         // the properties below are optional
         .description("description")
         .encryptionConfiguration(EncryptionConfigurationProperty.builder()
                 .kmsKeyIdentifier("kmsKeyIdentifier")
                 .build())
         .storageConfiguration(StorageConfigurationProperty.builder()
                 .retentionPeriodInDays(123)
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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 new AWS::EventsV2::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

      @Stability(Stable) @NotNull public static String arnForEventBus(@NotNull IEventBusRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnEventBus

      @Stability(Stable) @NotNull public static Boolean isCfnEventBus(@NotNull Object x)
      Checks whether the given object is a CfnEventBus.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrCreationTime

      @Stability(Stable) @NotNull public String getAttrCreationTime()
      The time the event bus was created, as an ISO 8601 timestamp.
    • getAttrEventBusArn

      @Stability(Stable) @NotNull public String getAttrEventBusArn()
      The Amazon Resource Name (ARN) of the event bus.
    • getAttrLastModifiedTime

      @Stability(Stable) @NotNull public String getAttrLastModifiedTime()
      The time the event bus was last modified, as an ISO 8601 timestamp.
    • getAttrState

      @Stability(Stable) @NotNull public String getAttrState()
      The lifecycle state of the event bus.

      The settled operational state is ACTIVE.

    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getEventBusRef

      @Stability(Stable) @NotNull public EventBusReference getEventBusRef()
      A reference to a EventBus resource.
      Specified by:
      getEventBusRef in interface IEventBusRef
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the event bus.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the event bus.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description of the event bus.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description of the event bus.
    • getEncryptionConfiguration

      @Stability(Stable) @Nullable public Object getEncryptionConfiguration()
      Encryption configuration for an event bus.

      Returns union: either IResolvable or CfnEventBus.EncryptionConfigurationProperty

    • setEncryptionConfiguration

      @Stability(Stable) public void setEncryptionConfiguration(@Nullable IResolvable value)
      Encryption configuration for an event bus.
    • setEncryptionConfiguration

      @Stability(Stable) public void setEncryptionConfiguration(@Nullable CfnEventBus.EncryptionConfigurationProperty value)
      Encryption configuration for an event bus.
    • getStorageConfiguration

      @Stability(Stable) @Nullable public Object getStorageConfiguration()
      Storage (retention) configuration for the event bus.

      Returns union: either IResolvable or CfnEventBus.StorageConfigurationProperty

    • setStorageConfiguration

      @Stability(Stable) public void setStorageConfiguration(@Nullable IResolvable value)
      Storage (retention) configuration for the event bus.
    • setStorageConfiguration

      @Stability(Stable) public void setStorageConfiguration(@Nullable CfnEventBus.StorageConfigurationProperty value)
      Storage (retention) configuration for the event bus.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      The tags assigned to the event bus.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      The tags assigned to the event bus.