Class EmailSubscription

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.sns.subscriptions.EmailSubscription
All Implemented Interfaces:
ITopicSubscription, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:09.915Z") @Stability(Stable) public class EmailSubscription extends software.amazon.jsii.JsiiObject implements ITopicSubscription
Use an email address as a subscription target.

Email subscriptions require confirmation.

Example:

 Topic myTopic = new Topic(this, "Topic");
 CfnParameter emailAddress = new CfnParameter(this, "email-param");
 myTopic.addSubscription(new EmailSubscription(emailAddress.getValueAsString()));
 
  • Constructor Details

    • EmailSubscription

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

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

      @Stability(Stable) public EmailSubscription(@NotNull String emailAddress, @Nullable EmailSubscriptionProps props)
      Parameters:
      emailAddress - This parameter is required.
      props -
    • EmailSubscription

      @Stability(Stable) public EmailSubscription(@NotNull String emailAddress)
      Parameters:
      emailAddress - This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) @NotNull public TopicSubscriptionConfig bind(@NotNull ITopic _topic)
      Returns a configuration for an email address to subscribe to an SNS topic.

      Specified by:
      bind in interface ITopicSubscription
      Parameters:
      _topic - This parameter is required.