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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.contentBasedDeduplication(Boolean contentBasedDeduplication) Sets the value ofTopicProps.getContentBasedDeduplication()displayName(String displayName) Sets the value ofTopicProps.getDisplayName()enforceSsl(Boolean enforceSsl) Sets the value ofinvalid @link
TopicProps#getEnforceSslSets the value ofTopicProps.getFifo()loggingConfigs(List<? extends LoggingConfig> loggingConfigs) Sets the value ofTopicProps.getLoggingConfigs()Sets the value ofTopicProps.getMasterKey()messageRetentionPeriodInDays(Number messageRetentionPeriodInDays) Sets the value ofTopicProps.getMessageRetentionPeriodInDays()Sets the value ofTopicProps.getTopicName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
contentBasedDeduplication
@Stability(Stable) public TopicProps.Builder contentBasedDeduplication(Boolean contentBasedDeduplication) Sets the value ofTopicProps.getContentBasedDeduplication()- Parameters:
contentBasedDeduplication- Enables content-based deduplication for FIFO topics.- Returns:
this
-
displayName
Sets the value ofTopicProps.getDisplayName()- Parameters:
displayName- A developer-defined string that can be used to identify this SNS topic.- Returns:
this
-
enforceSsl
Sets the value ofinvalid @link
TopicProps#getEnforceSsl- Parameters:
enforceSsl- Adds a statement to enforce encryption of data in transit when publishing to the topic. For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-security-best-practices.html#enforce-encryption-data-in-transit.- Returns:
this
-
fifo
Sets the value ofTopicProps.getFifo()- Parameters:
fifo- Set to true to create a FIFO topic.- Returns:
this
-
loggingConfigs
@Stability(Stable) public TopicProps.Builder loggingConfigs(List<? extends LoggingConfig> loggingConfigs) Sets the value ofTopicProps.getLoggingConfigs()- Parameters:
loggingConfigs- The list of delivery status logging configurations for the topic. For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-topic-attributes.html.- Returns:
this
-
masterKey
Sets the value ofTopicProps.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) Sets the value ofTopicProps.getMessageRetentionPeriodInDays()- Parameters:
messageRetentionPeriodInDays- The number of days Amazon SNS retains messages. It can only be set for FIFO topics.- Returns:
this
-
topicName
Sets the value ofTopicProps.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
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<TopicProps>- Returns:
- a new instance of
TopicProps - Throws:
NullPointerException- if any required attribute was not provided
-