Skip to content
v2.277.0

TopicAttributes Struct ​

Represents an SNS topic defined outside of this stack.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sns as sns } from 'aws-cdk-lib';
const topicAttributes: sns.TopicAttributes = {
  topicArn: 'topicArn',

  // the properties below are optional
  contentBasedDeduplication: false,
  keyArn: 'keyArn',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sns as sns

topic_attributes = sns.TopicAttributes(
    topic_arn="topicArn",

    # the properties below are optional
    content_based_deduplication=False,
    key_arn="keyArn"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sns.*;

TopicAttributes topicAttributes = TopicAttributes.builder()
        .topicArn("topicArn")

        // the properties below are optional
        .contentBasedDeduplication(false)
        .keyArn("keyArn")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SNS;

var topicAttributes = new TopicAttributes {
    TopicArn = "topicArn",

    // the properties below are optional
    ContentBasedDeduplication = false,
    KeyArn = "keyArn"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

topicAttributes := &TopicAttributes{
	TopicArn: jsii.String("topicArn"),

	// the properties below are optional
	ContentBasedDeduplication: jsii.Boolean(false),
	KeyArn: jsii.String("keyArn"),
}

Properties ​

contentBasedDeduplicationoptionalbooleancontent_based_deduplicationoptionalboolcontentBasedDeduplicationoptionalBooleanContentBasedDeduplicationoptionalboolContentBasedDeduplicationoptional*bool = false #
Whether content-based deduplication is enabled.

Only applicable for FIFO topics.

keyArnoptionalstringkey_arnoptionalstrkeyArnoptionalStringKeyArnoptionalstringKeyArnoptional*string = None #
KMS encryption key, if this topic is server-side encrypted by a KMS key.
topicArnstringtopic_arnstrtopicArnStringTopicArnstringTopicArn*string required #
The ARN of the SNS topic.