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.Builder
displayName
(String displayName) A developer-defined string that can be used to identify this SNS topic.Set to true to create a FIFO topic.A KMS Key, either managed by this CDK app, or imported.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
-
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
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
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
-