Class Subscription

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.sns.Subscription
All Implemented Interfaces:
IConstruct, IDependable, IResource, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:38.191Z") @Stability(Stable) public class Subscription extends Resource
A new subscription.

Prefer to use the ITopic.addSubscription() methods to create instances of this class.

Example:

 import software.amazon.awscdk.services.kinesisfirehose.DeliveryStream;
 DeliveryStream stream;
 Topic topic = new Topic(this, "Topic");
 Subscription.Builder.create(this, "Subscription")
         .topic(topic)
         .endpoint(stream.getDeliveryStreamArn())
         .protocol(SubscriptionProtocol.FIREHOSE)
         .subscriptionRoleArn("SAMPLE_ARN")
         .build();
 
  • Constructor Details

    • Subscription

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

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

      @Stability(Stable) public Subscription(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull SubscriptionProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • getDeadLetterQueue

      @Stability(Stable) @Nullable public IQueue getDeadLetterQueue()
      The DLQ associated with this subscription if present.