# TopicProps

Properties for a new SNS topic.

Extends: TopicProps
Used as props by: Topic

- Source: [`aws-sns/lib/topic.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-sns/lib/topic.ts#L20)
- Type last changed: v2.178.0 · 6 Feb 2025

## Example

```ts
const topic = new sns.Topic(this, 'MyTopic', {
  fifo: true,
  fifoThroughputScope: sns.FifoThroughputScope.TOPIC,
});
```

## Properties

- `contentBasedDeduplication`: boolean = None — Enables content-based deduplication for FIFO topics.

- `displayName`: 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.

- `enforceSSL`: boolean = false — Adds a statement to enforce encryption of data in transit when publishing to the topic.

- `fifo`: boolean = None — Set to true to create a FIFO topic.

- `fifoThroughputScope`: [FifoThroughputScope](/cdk/api/v2/docs/aws-cdk-lib.aws_sns.FifoThroughputScope.html) — 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`.

- `loggingConfigs`: [LoggingConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_sns.LoggingConfig.html)[] = None — The list of delivery status logging configurations for the topic.

- `masterKey`: [IKey](/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html) = None — A KMS Key, either managed by this CDK app, or imported.

- `messageRetentionPeriodInDays`: number — The number of days Amazon SNS retains messages.

  **Default:** do not archive messages

  It can only be set for FIFO topics.

- `signatureVersion`: 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.

- `topicName`: 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.

- `tracingConfig`: [TracingConfig](/cdk/api/v2/docs/aws-cdk-lib.aws_sns.TracingConfig.html) = TracingConfig.PASS_THROUGH — Tracing mode of an Amazon SNS topic.
