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 reference
TopicProps#getEnforceSslSets the value ofTopicProps.getFifo()fifoThroughputScope(FifoThroughputScope fifoThroughputScope) Sets the value ofTopicProps.getFifoThroughputScope()loggingConfigs(List<? extends LoggingConfig> loggingConfigs) Sets the value ofTopicProps.getLoggingConfigs()Sets the value ofTopicProps.getMasterKey()messageRetentionPeriodInDays(Number messageRetentionPeriodInDays) Sets the value ofTopicProps.getMessageRetentionPeriodInDays()signatureVersion(String signatureVersion) Sets the value ofTopicProps.getSignatureVersion()Sets the value ofTopicProps.getTopicName()tracingConfig(TracingConfig tracingConfig) Sets the value ofTopicProps.getTracingConfig()
-
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. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.- Returns:
this
-
enforceSsl
Sets the value ofinvalid reference
TopicProps#getEnforceSsl- Parameters:
enforceSsl- Adds a statement to enforce encryption of data in transit when publishing to the topic.- Returns:
this
-
fifo
Sets the value ofTopicProps.getFifo()- Parameters:
fifo- Set to true to create a FIFO topic.- Returns:
this
-
fifoThroughputScope
@Stability(Stable) public TopicProps.Builder fifoThroughputScope(FifoThroughputScope fifoThroughputScope) Sets the value ofTopicProps.getFifoThroughputScope()- Parameters:
fifoThroughputScope- Specifies the throughput quota and deduplication behavior to apply for the FIFO topic. You can only set this property whenfifoistrue.- 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.- 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
-
signatureVersion
Sets the value ofTopicProps.getSignatureVersion()- 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
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
-
tracingConfig
Sets the value ofTopicProps.getTracingConfig()- Parameters:
tracingConfig- Tracing mode of an Amazon SNS topic.- 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
-