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.103.1 (build bef2dea)", date="2024-10-25T14:21:24.056Z") @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.