TopicProps Struct
Properties for a new SNS topic.
| Source | aws-sns/lib/topic.ts |
|---|---|
| Type last changed |
Example
ts
const topic = new sns.Topic(this, 'MyTopic', {
fifo: true,
fifoThroughputScope: sns.FifoThroughputScope.TOPIC,
});
python
topic = sns.Topic(self, "MyTopic",
fifo=True,
fifo_throughput_scope=sns.FifoThroughputScope.TOPIC
)
java
Topic topic = Topic.Builder.create(this, "MyTopic")
.fifo(true)
.fifoThroughputScope(FifoThroughputScope.TOPIC)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var topic = new Topic(this, "MyTopic", new TopicProps {
Fifo = true,
FifoThroughputScope = FifoThroughputScope.TOPIC
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
topic := sns.NewTopic(this, jsii.String("MyTopic"), &TopicProps{
Fifo: jsii.Boolean(true),
FifoThroughputScope: sns.FifoThroughputScope_TOPIC,
})
Properties
contentBasedDeduplicationoptionalbooleancontent_based_deduplicationoptionalboolcontentBasedDeduplicationoptionalBooleanContentBasedDeduplicationoptionalboolContentBasedDeduplicationoptional*bool = None #Enables content-based deduplication for FIFO topics.
displayNameoptionalstringdisplay_nameoptionalstrdisplayNameoptionalStringDisplayNameoptionalstringDisplayNameoptional*string = None #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.
enforceSSLoptionalbooleanenforce_ssloptionalboolenforceSSLoptionalBooleanEnforceSSLoptionalboolEnforceSSLoptional*bool = false #Adds a statement to enforce encryption of data in transit when publishing to the topic.
Set to true to create a FIFO topic.
fifoThroughputScopeoptionalFifoThroughputScopefifo_throughput_scopeoptionalFifoThroughputScopefifoThroughputScopeoptionalFifoThroughputScopeFifoThroughputScopeoptionalFifoThroughputScopeFifoThroughputScopeoptionalFifoThroughputScope #Specifies the throughput quota and deduplication behavior to apply for the FIFO topic.
Default: undefined - SNS default setting is FifoThroughputScope.TOPIC
You can only set this property when fifo is true.
loggingConfigsoptionalLoggingConfig[]logging_configsoptionaltyping.List[LoggingConfig]loggingConfigsoptionalList<LoggingConfig>LoggingConfigsoptionalLoggingConfig[]LoggingConfigsoptional*[]LoggingConfig = None #The list of delivery status logging configurations for the topic.
masterKeyoptionalIKeymaster_keyoptionalIKeymasterKeyoptionalIKeyMasterKeyoptionalIKeyMasterKeyoptionalIKey = None #A KMS Key, either managed by this CDK app, or imported.
messageRetentionPeriodInDaysoptionalnumbermessage_retention_period_in_daysoptionalint | floatmessageRetentionPeriodInDaysoptionalNumberMessageRetentionPeriodInDaysoptionaldoubleMessageRetentionPeriodInDaysoptional*float64 #The number of days Amazon SNS retains messages.
Default: do not archive messages
It can only be set for FIFO topics.
signatureVersionoptionalstringsignature_versionoptionalstrsignatureVersionoptionalStringSignatureVersionoptionalstringSignatureVersionoptional*string = 1 #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.
topicNameoptionalstringtopic_nameoptionalstrtopicNameoptionalStringTopicNameoptionalstringTopicNameoptional*string #A name for the topic.
Default: Generated name
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.
tracingConfigoptionalTracingConfigtracing_configoptionalTracingConfigtracingConfigoptionalTracingConfigTracingConfigoptionalTracingConfigTracingConfigoptionalTracingConfig = TracingConfig.PASS_THROUGH #Tracing mode of an Amazon SNS topic.