Class Topic.Builder

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

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

    • create

      @Stability(Stable) public static Topic.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of Topic.Builder.
    • contentBasedDeduplication

      @Stability(Stable) public Topic.Builder contentBasedDeduplication(Boolean contentBasedDeduplication)
      Enables content-based deduplication for FIFO topics.

      Default: None

      Parameters:
      contentBasedDeduplication - Enables content-based deduplication for FIFO topics. This parameter is required.
      Returns:
      this
    • displayName

      @Stability(Stable) public Topic.Builder displayName(String displayName)
      A developer-defined string that can be used to identify this SNS topic.

      Default: None

      Parameters:
      displayName - A developer-defined string that can be used to identify this SNS topic. This parameter is required.
      Returns:
      this
    • fifo

      @Stability(Stable) public Topic.Builder fifo(Boolean fifo)
      Set to true to create a FIFO topic.

      Default: None

      Parameters:
      fifo - Set to true to create a FIFO topic. This parameter is required.
      Returns:
      this
    • masterKey

      @Stability(Stable) public Topic.Builder masterKey(IKey masterKey)
      A KMS Key, either managed by this CDK app, or imported.

      Default: None

      Parameters:
      masterKey - A KMS Key, either managed by this CDK app, or imported. This parameter is required.
      Returns:
      this
    • topicName

      @Stability(Stable) public Topic.Builder topicName(String 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.

      Default: Generated name

      Parameters:
      topicName - A name for the topic. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public Topic build()
      Specified by:
      build in interface software.amazon.jsii.Builder<Topic>
      Returns:
      a newly built instance of Topic.