interface TopicProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.SNS.TopicProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awssns#TopicProps |
Java | software.amazon.awscdk.services.sns.TopicProps |
Python | aws_cdk.aws_sns.TopicProps |
TypeScript (source) | aws-cdk-lib » aws_sns » TopicProps |
Properties for a new SNS topic.
Example
const topic = new sns.Topic(this, 'MyTopic', {
tracingConfig: sns.TracingConfig.ACTIVE,
});
Properties
Name | Type | Description |
---|---|---|
content | boolean | Enables content-based deduplication for FIFO topics. |
display | string | A developer-defined string that can be used to identify this SNS topic. |
enforce | boolean | Adds a statement to enforce encryption of data in transit when publishing to the topic. |
fifo? | boolean | Set to true to create a FIFO topic. |
logging | Logging [] | The list of delivery status logging configurations for the topic. |
master | IKey | A KMS Key, either managed by this CDK app, or imported. |
message | number | The number of days Amazon SNS retains messages. |
signature | string | 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. |
topic | string | A name for the topic. |
tracing | Tracing | Tracing mode of an Amazon SNS topic. |
contentBasedDeduplication?
Type:
boolean
(optional, default: None)
Enables content-based deduplication for FIFO topics.
displayName?
Type:
string
(optional, default: 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.
enforceSSL?
Type:
boolean
(optional, default: false)
Adds a statement to enforce encryption of data in transit when publishing to the topic.
fifo?
Type:
boolean
(optional, default: None)
Set to true to create a FIFO topic.
loggingConfigs?
Type:
Logging
[]
(optional, default: None)
The list of delivery status logging configurations for the topic.
See also: https://docs.aws.amazon.com/sns/latest/dg/sns-topic-attributes.html.
masterKey?
Type:
IKey
(optional, default: None)
A KMS Key, either managed by this CDK app, or imported.
messageRetentionPeriodInDays?
Type:
number
(optional, default: do not archive messages)
The number of days Amazon SNS retains messages.
It can only be set for FIFO topics.
See also: https://docs.aws.amazon.com/sns/latest/dg/fifo-message-archiving-replay.html
signatureVersion?
Type:
string
(optional, default: 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.
See also: https://docs.aws.amazon.com/sns/latest/dg/sns-verify-signature-of-message.html.
topicName?
Type:
string
(optional, default: Generated name)
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.
tracingConfig?
Type:
Tracing
(optional, default: TracingConfig.PASS_THROUGH)
Tracing mode of an Amazon SNS topic.
See also: https://docs.aws.amazon.com/sns/latest/dg/sns-active-tracing.html