Show / Hide Table of Contents

Class CfnTopicProps

Properties for defining a CfnTopic.

Inheritance
object
CfnTopicProps
Implements
ICfnTopicProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.SNS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnTopicProps : ICfnTopicProps
Syntax (vb)
Public Class CfnTopicProps 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",
                 FifoThroughputScope = "fifoThroughputScope",
                 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 for defining a CfnTopic.

Properties

ArchivePolicy

The ArchivePolicy determines the number of days Amazon retains messages in FIFO topics.

ContentBasedDeduplication

ContentBasedDeduplication enables deduplication of messages based on their content for FIFO topics.

DataProtectionPolicy

The body of the policy document you want to use for this topic.

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

DisplayName

The display name to use for an Amazon topic with SMS subscriptions.

FifoThroughputScope

Specifies the throughput quota and deduplication behavior to apply for the FIFO topic.

FifoTopic

Set to true to create a FIFO topic.

KmsMasterKeyId

The ID of an AWS managed customer master key (CMK) for Amazon 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 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 topic.

Constructors

CfnTopicProps()

Properties for defining a CfnTopic.

public CfnTopicProps()
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",
                 FifoThroughputScope = "fifoThroughputScope",
                 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"
             };

Properties

ArchivePolicy

The ArchivePolicy determines the number of days Amazon retains messages in FIFO topics.

public object? ArchivePolicy { get; set; }
Property Value

object

Remarks

You can set a retention period ranging from 1 to 365 days. This property is only applicable to FIFO topics; attempting to use it with standard topics will result in a creation failure.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html#cfn-sns-topic-archivepolicy

ContentBasedDeduplication

ContentBasedDeduplication enables deduplication of messages based on their content for FIFO topics.

public object? ContentBasedDeduplication { get; set; }
Property Value

object

Remarks

By default, this property is set to false. If you create a FIFO topic with ContentBasedDeduplication set to false, you must provide a MessageDeduplicationId for each Publish action. When set to true, Amazon automatically generates a MessageDeduplicationId using a SHA-256 hash of the message body (excluding message attributes). You can optionally override this generated value by specifying a MessageDeduplicationId in the Publish action. Note that this property only applies to FIFO topics; using it with standard topics will cause the creation to fail.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html#cfn-sns-topic-contentbaseddeduplication

Type union: either bool or IResolvable

DataProtectionPolicy

The body of the policy document you want to use for this topic.

public object? DataProtectionPolicy { get; set; }
Property Value

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.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html#cfn-sns-topic-dataprotectionpolicy

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

object

Remarks

    Once configured, log entries are sent to Amazon CloudWatch Logs.

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html#cfn-sns-topic-deliverystatuslogging

    Type union: either IResolvable or (either IResolvable or CfnTopic.ILoggingConfigProperty)[]

    DisplayName

    The display name to use for an Amazon topic with SMS subscriptions.

    public string? DisplayName { get; set; }
    Property Value

    string

    Remarks

    The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html#cfn-sns-topic-displayname

    FifoThroughputScope

    Specifies the throughput quota and deduplication behavior to apply for the FIFO topic.

    public string? FifoThroughputScope { get; set; }
    Property Value

    string

    Remarks

    Valid values are Topic or MessageGroup .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html#cfn-sns-topic-fifothroughputscope

    FifoTopic

    Set to true to create a FIFO topic.

    public object? FifoTopic { get; set; }
    Property Value

    object

    Remarks

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html#cfn-sns-topic-fifotopic

    Type union: either bool or IResolvable

    KmsMasterKeyId

    The ID of an AWS managed customer master key (CMK) for Amazon or a custom CMK.

    public object? KmsMasterKeyId { get; set; }
    Property Value

    object

    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 .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html#cfn-sns-topic-kmsmasterkeyid

    Type union: either string or IAliasRef or IKeyRef

    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

    string

    Remarks

    By default, SignatureVersion is set to 1 .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html#cfn-sns-topic-signatureversion

    Subscription

    The Amazon subscriptions (endpoints) for this topic.

    public object? Subscription { get; set; }
    Property Value

    object

    Remarks
    If you specify the <code>Subscription</code> property in the <code>AWS::SNS::Topic</code> resource and it creates an associated subscription resource, the associated subscription is not deleted when the <code>AWS::SNS::Topic</code> resource is deleted.
    

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html#cfn-sns-topic-subscription

    Type union: either IResolvable or (either IResolvable or CfnTopic.ISubscriptionProperty)[]

    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 <code>sns:CreateTopic</code> and <code>sns:TagResource</code> permissions.
    

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html#cfn-sns-topic-tags

    TopicName

    The name of the topic you want to create.

    public string? TopicName { get; set; }
    Property Value

    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, 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.
    

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html#cfn-sns-topic-topicname

    TracingConfig

    Tracing mode of an Amazon topic.

    public string? TracingConfig { get; set; }
    Property Value

    string

    Remarks

    By default TracingConfig is set to PassThrough , and the topic passes through the tracing header it receives from an Amazon publisher to its subscriptions. If set to Active , Amazon will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html#cfn-sns-topic-tracingconfig

    Implements

    ICfnTopicProps
    Back to top Generated by DocFX