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.
      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
    • 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
    • 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
    • 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