Class CfnTopicProps
Properties for defining a CfnTopic
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.SNS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnTopicProps : Object, ICfnTopicProps
Syntax (vb)
Public Class CfnTopicProps
Inherits Object
Implements ICfnTopicProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html
ExampleMetadata: fixture=_generated
Examples
// 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 archivePolicy;
var dataProtectionPolicy;
var cfnTopicProps = new CfnTopicProps {
ArchivePolicy = archivePolicy,
ContentBasedDeduplication = false,
DataProtectionPolicy = dataProtectionPolicy,
DeliveryStatusLogging = new [] { new LoggingConfigProperty {
Protocol = "protocol",
// the properties below are optional
FailureFeedbackRoleArn = "failureFeedbackRoleArn",
SuccessFeedbackRoleArn = "successFeedbackRoleArn",
SuccessFeedbackSampleRate = "successFeedbackSampleRate"
} },
DisplayName = "displayName",
FifoTopic = false,
KmsMasterKeyId = "kmsMasterKeyId",
SignatureVersion = "signatureVersion",
Subscription = new [] { new SubscriptionProperty {
Endpoint = "endpoint",
Protocol = "protocol"
} },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TopicName = "topicName",
TracingConfig = "tracingConfig"
};
Synopsis
Constructors
CfnTopicProps() |
Properties
ArchivePolicy | The archive policy determines the number of days Amazon SNS retains messages. |
ContentBasedDeduplication | Enables content-based deduplication for FIFO topics. |
DataProtectionPolicy | The body of the policy document you want to use for this topic. |
DeliveryStatusLogging | The |
DisplayName | The display name to use for an Amazon SNS topic with SMS subscriptions. |
FifoTopic | Set to true to create a FIFO topic. |
KmsMasterKeyId | The ID of an AWS managed customer master key (CMK) for Amazon SNS or a custom CMK. |
SignatureVersion | 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. |
Subscription | The Amazon SNS subscriptions (endpoints) for this topic. |
Tags | The list of tags to add to a new topic. |
TopicName | The name of the topic you want to create. |
TracingConfig | Tracing mode of an Amazon SNS topic. |
Constructors
CfnTopicProps()
public CfnTopicProps()
Properties
ArchivePolicy
The archive policy determines the number of days Amazon SNS retains messages.
public object ArchivePolicy { get; set; }
Property Value
System.Object
Remarks
You can set a retention period from 1 to 365 days.
ContentBasedDeduplication
Enables content-based deduplication for FIFO topics.
public object ContentBasedDeduplication { get; set; }
Property Value
System.Object
Remarks
(Optional) To override the generated value, you can specify a value for the the MessageDeduplicationId
parameter for the Publish
action.
DataProtectionPolicy
The body of the policy document you want to use for this topic.
public object DataProtectionPolicy { get; set; }
Property Value
System.Object
Remarks
You can only add one policy per topic.
The policy must be in JSON string format.
Length Constraints: Maximum length of 30,720.
DeliveryStatusLogging
The DeliveryStatusLogging
configuration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:.
public object DeliveryStatusLogging { get; set; }
Property Value
System.Object
Remarks
Once configured, log entries are sent to Amazon CloudWatch Logs.
DisplayName
The display name to use for an Amazon SNS topic with SMS subscriptions.
public string DisplayName { get; set; }
Property Value
System.String
Remarks
The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
FifoTopic
Set to true to create a FIFO topic.
public object FifoTopic { get; set; }
Property Value
System.Object
Remarks
KmsMasterKeyId
The ID of an AWS managed customer master key (CMK) for Amazon SNS or a custom CMK.
public string KmsMasterKeyId { get; set; }
Property Value
System.String
Remarks
For more information, see Key terms . For more examples, see KeyId
in the AWS Key Management Service API Reference .
This property applies only to server-side-encryption .
SignatureVersion
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.
public string SignatureVersion { get; set; }
Property Value
System.String
Remarks
By default, SignatureVersion
is set to 1
.
Subscription
The Amazon SNS subscriptions (endpoints) for this topic.
public object Subscription { get; set; }
Property Value
System.Object
Remarks
If you specify the Subscription
property in the AWS::SNS::Topic
resource and it creates an associated subscription resource, the associated subscription is not deleted when the AWS::SNS::Topic
resource is deleted.
Tags
The list of tags to add to a new topic.
public ICfnTag[] Tags { get; set; }
Property Value
ICfnTag[]
Remarks
To be able to tag a topic on creation, you must have the sns:CreateTopic
and sns:TagResource
permissions.
TopicName
The name of the topic you want to create.
public string TopicName { get; set; }
Property Value
System.String
Remarks
Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with .fifo
.
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 .
If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
TracingConfig
Tracing mode of an Amazon SNS topic.
public string TracingConfig { get; set; }
Property Value
System.String
Remarks
By default TracingConfig
is set to PassThrough
, and the topic passes through the tracing header it receives from an Amazon SNS publisher to its subscriptions. If set to Active
, Amazon SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.