Class CfnSubscriber

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ISubscriberRef, 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.405Z") @Stability(Stable) public class CfnSubscriber extends CfnResource implements IInspectable, ISubscriberRef, ITaggableV2
Resource type definition for AWS::EventsV2::Subscriber, an Amazon EventBridge subscription that delivers events from an event bus to a target.

Canonical identity is the combination of bus, name, and target. Replacement uses delete_then_create.

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.*;
 CfnSubscriber cfnSubscriber = CfnSubscriber.Builder.create(this, "MyCfnSubscriber")
         .eventBusArn("eventBusArn")
         .name("name")
         // the properties below are optional
         .batchConfiguration(BatchConfigurationProperty.builder()
                 .maxBatchSize(123)
                 .maxBatchWindowInSeconds(123)
                 .build())
         .description("description")
         .filterConfiguration(FilterConfigurationProperty.builder()
                 .filters(List.of(FilterProperty.builder()
                         .pattern("pattern")
                         .scope("scope")
                         .build()))
                 // the properties below are optional
                 .language("language")
                 .build())
         .logConfiguration(LogConfigurationProperty.builder()
                 .includePayload("includePayload")
                 .level("level")
                 .build())
         .onFailureConfiguration(OnFailureConfigurationProperty.builder()
                 .arn("arn")
                 .build())
         .pointInTimeConfiguration(PointInTimeConfigurationProperty.builder()
                 .pointType("pointType")
                 // the properties below are optional
                 .endPoint(123)
                 .startingPoint(123)
                 .build())
         .resumePosition("resumePosition")
         .retryPolicy(RetryPolicyProperty.builder()
                 .maxEventAgeInSeconds(123)
                 .maxRetryAttempts(123)
                 .retryStrategy("retryStrategy")
                 .build())
         .startingPosition("startingPosition")
         .state("state")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .transformer(TransformerProperty.builder()
                 .jsonataConfiguration(JsonataConfigurationProperty.builder()
                         .expression("expression")
                         .build())
                 .type("type")
                 .build())
         .type("type")
         .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

    • CfnSubscriber

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

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

      @Stability(Stable) public CfnSubscriber(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnSubscriberProps props)
      Create a new AWS::EventsV2::Subscriber.

      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

    • arnForSubscriber

      @Stability(Stable) @NotNull public static String arnForSubscriber(@NotNull ISubscriberRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnSubscriber

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

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

      @Stability(Stable) @NotNull public String getAttrBusName()
      The name of the event bus this subscriber belongs to.

      This property is read-only.

    • getAttrCreationTime

      @Stability(Stable) @NotNull public String getAttrCreationTime()
      Creation timestamp (ISO-8601), read-only.
    • getAttrLastModifiedTime

      @Stability(Stable) @NotNull public String getAttrLastModifiedTime()
      Last-modification timestamp (ISO-8601), read-only.
    • getAttrSubscriberArn

      @Stability(Stable) @NotNull public String getAttrSubscriberArn()
      The Amazon Resource Name (ARN) of the subscriber.
    • 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
    • getSubscriberRef

      @Stability(Stable) @NotNull public SubscriberReference getSubscriberRef()
      A reference to a Subscriber resource.
      Specified by:
      getSubscriberRef in interface ISubscriberRef
    • getEventBusArn

      @Stability(Stable) @NotNull public String getEventBusArn()
      The ARN of the event bus this subscriber belongs to.
    • setEventBusArn

      @Stability(Stable) public void setEventBusArn(@NotNull String value)
      The ARN of the event bus this subscriber belongs to.
    • getName

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

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the subscriber.
    • getBatchConfiguration

      @Stability(Stable) @Nullable public Object getBatchConfiguration()
      Configuration for batching events into a single delivery.

      Returns union: either IResolvable or CfnSubscriber.BatchConfigurationProperty

    • setBatchConfiguration

      @Stability(Stable) public void setBatchConfiguration(@Nullable IResolvable value)
      Configuration for batching events into a single delivery.
    • setBatchConfiguration

      @Stability(Stable) public void setBatchConfiguration(@Nullable CfnSubscriber.BatchConfigurationProperty value)
      Configuration for batching events into a single delivery.
    • getDescription

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

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description of the subscriber.
    • getFilterConfiguration

      @Stability(Stable) @Nullable public Object getFilterConfiguration()
      Configuration for filtering which events are delivered to the target.

      Returns union: either IResolvable or CfnSubscriber.FilterConfigurationProperty

    • setFilterConfiguration

      @Stability(Stable) public void setFilterConfiguration(@Nullable IResolvable value)
      Configuration for filtering which events are delivered to the target.
    • setFilterConfiguration

      @Stability(Stable) public void setFilterConfiguration(@Nullable CfnSubscriber.FilterConfigurationProperty value)
      Configuration for filtering which events are delivered to the target.
    • getLogConfiguration

      @Stability(Stable) @Nullable public Object getLogConfiguration()
      Delivery logging configuration.

      Returns union: either IResolvable or CfnSubscriber.LogConfigurationProperty

    • setLogConfiguration

      @Stability(Stable) public void setLogConfiguration(@Nullable IResolvable value)
      Delivery logging configuration.
    • setLogConfiguration

      @Stability(Stable) public void setLogConfiguration(@Nullable CfnSubscriber.LogConfigurationProperty value)
      Delivery logging configuration.
    • getOnFailureConfiguration

      @Stability(Stable) @Nullable public Object getOnFailureConfiguration()
      The destination for events that could not be delivered.

      Returns union: either IResolvable or CfnSubscriber.OnFailureConfigurationProperty

    • setOnFailureConfiguration

      @Stability(Stable) public void setOnFailureConfiguration(@Nullable IResolvable value)
      The destination for events that could not be delivered.
    • setOnFailureConfiguration

      @Stability(Stable) public void setOnFailureConfiguration(@Nullable CfnSubscriber.OnFailureConfigurationProperty value)
      The destination for events that could not be delivered.
    • getPointInTimeConfiguration

      @Stability(Stable) @Nullable public Object getPointInTimeConfiguration()
      The point in time to start delivering events from, used when StartingPosition is POINT_IN_TIME.

      Returns union: either IResolvable or CfnSubscriber.PointInTimeConfigurationProperty

    • setPointInTimeConfiguration

      @Stability(Stable) public void setPointInTimeConfiguration(@Nullable IResolvable value)
      The point in time to start delivering events from, used when StartingPosition is POINT_IN_TIME.
    • setPointInTimeConfiguration

      @Stability(Stable) public void setPointInTimeConfiguration(@Nullable CfnSubscriber.PointInTimeConfigurationProperty value)
      The point in time to start delivering events from, used when StartingPosition is POINT_IN_TIME.
    • getResumePosition

      @Stability(Stable) @Nullable public String getResumePosition()
      Resume-time control, never returned by the service.
    • setResumePosition

      @Stability(Stable) public void setResumePosition(@Nullable String value)
      Resume-time control, never returned by the service.
    • getRetryPolicy

      @Stability(Stable) @Nullable public Object getRetryPolicy()
      The retry policy for failed deliveries.

      Returns union: either IResolvable or CfnSubscriber.RetryPolicyProperty

    • setRetryPolicy

      @Stability(Stable) public void setRetryPolicy(@Nullable IResolvable value)
      The retry policy for failed deliveries.
    • setRetryPolicy

      @Stability(Stable) public void setRetryPolicy(@Nullable CfnSubscriber.RetryPolicyProperty value)
      The retry policy for failed deliveries.
    • getStartingPosition

      @Stability(Stable) @Nullable public String getStartingPosition()
      Where the subscriber starts reading events: LATEST starts from the newest events;
    • setStartingPosition

      @Stability(Stable) public void setStartingPosition(@Nullable String value)
      Where the subscriber starts reading events: LATEST starts from the newest events;
    • getState

      @Stability(Stable) @Nullable public String getState()
      The run state of the subscriber.
    • setState

      @Stability(Stable) public void setState(@Nullable String value)
      The run state of the subscriber.
    • getTags

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

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

      @Stability(Stable) @Nullable public Object getTransformer()
      Configuration for transforming events before delivery: the raw payload, the payload with its metadata envelope, or the output of a JSONata expression.

      Returns union: either IResolvable or CfnSubscriber.TransformerProperty

    • setTransformer

      @Stability(Stable) public void setTransformer(@Nullable IResolvable value)
      Configuration for transforming events before delivery: the raw payload, the payload with its metadata envelope, or the output of a JSONata expression.
    • setTransformer

      @Stability(Stable) public void setTransformer(@Nullable CfnSubscriber.TransformerProperty value)
      Configuration for transforming events before delivery: the raw payload, the payload with its metadata envelope, or the output of a JSONata expression.
    • getType

      @Stability(Stable) @Nullable public String getType()
      The delivery ordering mode of the subscriber.
    • setType

      @Stability(Stable) public void setType(@Nullable String value)
      The delivery ordering mode of the subscriber.