Class CfnEventBus

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

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-11T03:45:54.732Z") @Stability(Stable) public class CfnEventBus extends CfnResource implements IInspectable, 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")
         .policy(policy)
         .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)
      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

    • 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.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The ARN of the event bus, such as arn:aws:events:us-east-2:123456789012:event-bus/aws.partner/PartnerName/acct1/repo1 .
    • getAttrName

      @Stability(Stable) @NotNull public String getAttrName()
      The name of the event bus, such as PartnerName/acct1/repo1 .
    • getAttrPolicy

      @Stability(Stable) @NotNull public String getAttrPolicy()
    • 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
    • getName

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

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

      @Stability(Stable) @Nullable public Object getDeadLetterConfig()
      Configuration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ).
    • setDeadLetterConfig

      @Stability(Stable) public void setDeadLetterConfig(@Nullable IResolvable value)
      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

      @Stability(Stable) @Nullable public String getDescription()
      The event bus description.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The event bus description.
    • getEventSourceName

      @Stability(Stable) @Nullable public String 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

      @Stability(Stable) public void setEventSourceName(@Nullable 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.
    • getKmsKeyIdentifier

      @Stability(Stable) @Nullable public String getKmsKeyIdentifier()
      The identifier of the AWS KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus.
    • setKmsKeyIdentifier

      @Stability(Stable) public void setKmsKeyIdentifier(@Nullable String value)
      The identifier of the AWS KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus.
    • getPolicy

      @Stability(Stable) @Nullable public Object getPolicy()
      The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.
    • setPolicy

      @Stability(Stable) public void setPolicy(@Nullable Object value)
      The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      Tags to associate with the event bus.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      Tags to associate with the event bus.