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

      @Stability(Stable) public Topic.Builder enforceSsl(Boolean enforceSsl)
      Adds a statement to enforce encryption of data in transit when publishing to the topic.

      Default: false

      Parameters:
      enforceSsl - Adds a statement to enforce encryption of data in transit when publishing to the topic. This parameter is required.
      Returns:
      this
      See Also:
    • 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
    • loggingConfigs

      @Stability(Stable) public Topic.Builder loggingConfigs(List<? extends LoggingConfig> loggingConfigs)
      The list of delivery status logging configurations for the topic.

      Default: None

      Parameters:
      loggingConfigs - The list of delivery status logging configurations for the topic. This parameter is required.
      Returns:
      this
      See Also:
    • 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
    • messageRetentionPeriodInDays

      @Stability(Stable) public Topic.Builder messageRetentionPeriodInDays(Number messageRetentionPeriodInDays)
      The number of days Amazon SNS retains messages.

      It can only be set for FIFO topics.

      Default: - do not archive messages

      Parameters:
      messageRetentionPeriodInDays - The number of days Amazon SNS retains messages. This parameter is required.
      Returns:
      this
      See Also:
    • signatureVersion

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

      Default: 1

      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. This parameter is required.
      Returns:
      this
      See Also:
    • 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
    • tracingConfig

      @Stability(Stable) public Topic.Builder tracingConfig(TracingConfig tracingConfig)
      Tracing mode of an Amazon SNS topic.

      Default: TracingConfig.PASS_THROUGH

      Parameters:
      tracingConfig - Tracing mode of an Amazon SNS topic. This parameter is required.
      Returns:
      this
      See Also:
    • build

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