Interface SnsProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
SnsProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:09.838Z") @Stability(Stable) public interface SnsProps extends software.amazon.jsii.JsiiSerializable
Construction properties for a SNS action.

Example:

 import software.amazon.awscdk.services.s3.*;
 import software.amazon.awscdk.services.ses.actions.*;
 Bucket bucket = new Bucket(this, "Bucket");
 Topic topic = new Topic(this, "Topic");
 ReceiptRuleSet.Builder.create(this, "RuleSet")
         .rules(List.of(ReceiptRuleOptions.builder()
                 .recipients(List.of("hello@aws.com"))
                 .actions(List.of(
                     AddHeader.Builder.create()
                             .name("X-Special-Header")
                             .value("aws")
                             .build(),
                     S3.Builder.create()
                             .bucket(bucket)
                             .objectKeyPrefix("emails/")
                             .topic(topic)
                             .build()))
                 .build(), ReceiptRuleOptions.builder()
                 .recipients(List.of("aws.com"))
                 .actions(List.of(
                     Sns.Builder.create()
                             .topic(topic)
                             .build()))
                 .build()))
         .build();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder for SnsProps
    static final class 
    An implementation for SnsProps
  • Method Summary

    Modifier and Type
    Method
    Description
     
    The encoding to use for the email within the Amazon SNS notification.
    The SNS topic to notify.

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Method Details

    • getTopic

      @Stability(Stable) @NotNull ITopic getTopic()
      The SNS topic to notify.
    • getEncoding

      @Stability(Stable) @Nullable default EmailEncoding getEncoding()
      The encoding to use for the email within the Amazon SNS notification.

      Default: UTF-8

    • builder

      @Stability(Stable) static SnsProps.Builder builder()
      Returns:
      a SnsProps.Builder of SnsProps