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 Summary
Modifier and TypeMethodDescriptionbuild()contentBasedDeduplication(Boolean contentBasedDeduplication) Enables content-based deduplication for FIFO topics.static Topic.BuilderdisplayName(String displayName) A developer-defined string that can be used to identify this SNS topic.enforceSsl(Boolean enforceSsl) Adds a statement to enforce encryption of data in transit when publishing to the topic.Set to true to create a FIFO topic.loggingConfigs(List<? extends LoggingConfig> loggingConfigs) The list of delivery status logging configurations for the topic.A KMS Key, either managed by this CDK app, or imported.messageRetentionPeriodInDays(Number messageRetentionPeriodInDays) The number of days Amazon SNS retains messages.A name for the 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
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
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.
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
-
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.For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-topic-attributes.html.
Default: None
- Parameters:
loggingConfigs- The list of delivery status logging configurations for the topic. This parameter is required.- Returns:
this
-
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:
-
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
-