Class TopicProps.Builder

java.lang.Object
software.amazon.awscdk.services.sns.TopicProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<TopicProps>
Enclosing interface:
TopicProps

@Stability(Stable) public static final class TopicProps.Builder extends Object implements software.amazon.jsii.Builder<TopicProps>
A builder for TopicProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • contentBasedDeduplication

      @Stability(Stable) public TopicProps.Builder contentBasedDeduplication(Boolean contentBasedDeduplication)
      Parameters:
      contentBasedDeduplication - Enables content-based deduplication for FIFO topics.
      Returns:
      this
    • displayName

      @Stability(Stable) public TopicProps.Builder displayName(String displayName)
      Sets the value of TopicProps.getDisplayName()
      Parameters:
      displayName - A developer-defined string that can be used to identify this SNS topic. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
      Returns:
      this
    • enforceSsl

      @Stability(Stable) public TopicProps.Builder enforceSsl(Boolean enforceSsl)
      Sets the value of
      invalid @link
      TopicProps#getEnforceSsl
      Parameters:
      enforceSsl - Adds a statement to enforce encryption of data in transit when publishing to the topic.
      Returns:
      this
    • fifo

      @Stability(Stable) public TopicProps.Builder fifo(Boolean fifo)
      Sets the value of TopicProps.getFifo()
      Parameters:
      fifo - Set to true to create a FIFO topic.
      Returns:
      this
    • loggingConfigs

      @Stability(Stable) public TopicProps.Builder loggingConfigs(List<? extends LoggingConfig> loggingConfigs)
      Parameters:
      loggingConfigs - The list of delivery status logging configurations for the topic.
      Returns:
      this
    • masterKey

      @Stability(Stable) public TopicProps.Builder masterKey(IKey masterKey)
      Sets the value of TopicProps.getMasterKey()
      Parameters:
      masterKey - A KMS Key, either managed by this CDK app, or imported.
      Returns:
      this
    • messageRetentionPeriodInDays

      @Stability(Stable) public TopicProps.Builder messageRetentionPeriodInDays(Number messageRetentionPeriodInDays)
      Parameters:
      messageRetentionPeriodInDays - The number of days Amazon SNS retains messages. It can only be set for FIFO topics.
      Returns:
      this
    • signatureVersion

      @Stability(Stable) public TopicProps.Builder signatureVersion(String signatureVersion)
      Parameters:
      signatureVersion - The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS.
      Returns:
      this
    • topicName

      @Stability(Stable) public TopicProps.Builder topicName(String topicName)
      Sets the value of TopicProps.getTopicName()
      Parameters:
      topicName - A name for the topic. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the topic name. For more information, see Name Type.
      Returns:
      this
    • tracingConfig

      @Stability(Stable) public TopicProps.Builder tracingConfig(TracingConfig tracingConfig)
      Parameters:
      tracingConfig - Tracing mode of an Amazon SNS topic.
      Returns:
      this
    • build

      @Stability(Stable) public TopicProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<TopicProps>
      Returns:
      a new instance of TopicProps
      Throws:
      NullPointerException - if any required attribute was not provided