Class CfnEventSource

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IEventSourceRef, 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.400Z") @Stability(Stable) public class CfnEventSource extends CfnResource implements IInspectable, IEventSourceRef, ITaggableV2
Resource schema for AWS::EventsV2::EventSource.

A managed event source that forwards AWS service events or partner events onto a custom event bus.

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.*;
 CfnEventSource cfnEventSource = CfnEventSource.Builder.create(this, "MyCfnEventSource")
         .configuration(EventSourceConfigurationProperty.builder()
                 .awsServiceEventsConfiguration(AwsServiceEventsConfigurationProperty.builder()
                         .awsService("awsService")
                         // the properties below are optional
                         .onFailureConfiguration(OnFailureConfigurationProperty.builder()
                                 .arn("arn")
                                 .build())
                         .pattern("pattern")
                         .build())
                 .partnerEventsConfiguration(PartnerEventsConfigurationProperty.builder()
                         .partnerEventSourceArn("partnerEventSourceArn")
                         // the properties below are optional
                         .onFailureConfiguration(OnFailureConfigurationProperty.builder()
                                 .arn("arn")
                                 .build())
                         .partnerBusKmsKeyIdentifier("partnerBusKmsKeyIdentifier")
                         .pattern("pattern")
                         .build())
                 .build())
         .eventBusArn("eventBusArn")
         .name("name")
         // the properties below are optional
         .description("description")
         .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

    • CfnEventSource

      protected CfnEventSource(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnEventSource

      protected CfnEventSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnEventSource

      @Stability(Stable) public CfnEventSource(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnEventSourceProps props)
      Create a new AWS::EventsV2::EventSource.

      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

    • arnForEventSource

      @Stability(Stable) @NotNull public static String arnForEventSource(@NotNull IEventSourceRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnEventSource

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

      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 source was created, as an ISO 8601 timestamp.
    • getAttrEventSourceArn

      @Stability(Stable) @NotNull public String getAttrEventSourceArn()
      The Amazon Resource Name (ARN) of the event source.

      Its resource segment has the form event-sourcev2///. The type segment is set by the service (aws.service for AWS service events, aws.partner for partner events) and is not part of the event source name. The id segment is a 25-character identifier generated by the service.

    • getAttrLastModifiedTime

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

      @Stability(Stable) @NotNull public IResolvable getAttrRevoked()
      Whether the event bus owner has revoked this event source.

      Revocation is permanent: a revoked event source cannot be updated, but it can be deleted.

    • getAttrState

      @Stability(Stable) @NotNull public String getAttrState()
      The lifecycle state of the event source: CREATING, ACTIVE, UPDATING, CREATE_FAILED, UPDATE_FAILED, DELETING, or DELETE_FAILED.

      Revocation by the event bus owner is reported by the Revoked property, not by the state.

    • 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
    • getEventSourceRef

      @Stability(Stable) @NotNull public EventSourceReference getEventSourceRef()
      A reference to a EventSource resource.
      Specified by:
      getEventSourceRef in interface IEventSourceRef
    • getConfiguration

      @Stability(Stable) @NotNull public Object getConfiguration()
      Event source configuration.

      Returns union: either IResolvable or CfnEventSource.EventSourceConfigurationProperty

    • setConfiguration

      @Stability(Stable) public void setConfiguration(@NotNull IResolvable value)
      Event source configuration.
    • setConfiguration

      @Stability(Stable) public void setConfiguration(@NotNull CfnEventSource.EventSourceConfigurationProperty value)
      Event source configuration.
    • getEventBusArn

      @Stability(Stable) @NotNull public String getEventBusArn()
      The ARN of the custom event bus the event source forwards onto.
    • setEventBusArn

      @Stability(Stable) public void setEventBusArn(@NotNull String value)
      The ARN of the custom event bus the event source forwards onto.
    • getName

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

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

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

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

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

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