Class CfnTopic
The AWS::SNS::Topic
resource creates a topic to which notifications can be published.
Inherited Members
Namespace: Amazon.CDK.AWS.SNS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnTopic : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnTopic
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
One account can create a maximum of 100,000 standard topics and 1,000 FIFO topics. For more information, see Amazon SNS endpoints and quotas in the AWS General Reference .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html
CloudformationResource: AWS::SNS::Topic
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 cfnTopic = new CfnTopic(this, "MyCfnTopic", 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
CfnTopic(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnTopic(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnTopic(Construct, String, ICfnTopicProps) |
Properties
ArchivePolicy | The archive policy determines the number of days Amazon SNS retains messages. |
AttrTopicArn | Returns the ARN of an Amazon SNS topic. |
AttrTopicName | Returns the name of an Amazon SNS topic. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
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 | Tag Manager which manages the tags for this resource. |
TagsRaw | 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. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnTopic(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnTopic(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnTopic(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnTopic(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnTopic(Construct, String, ICfnTopicProps)
public CfnTopic(Construct scope, string id, ICfnTopicProps props = null)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnTopicProps
Resource properties.
Properties
ArchivePolicy
The archive policy determines the number of days Amazon SNS retains messages.
public virtual object ArchivePolicy { get; set; }
Property Value
System.Object
AttrTopicArn
Returns the ARN of an Amazon SNS topic.
public virtual string AttrTopicArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: TopicArn
AttrTopicName
Returns the name of an Amazon SNS topic.
public virtual string AttrTopicName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: TopicName
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
ContentBasedDeduplication
Enables content-based deduplication for FIFO topics.
public virtual object ContentBasedDeduplication { get; set; }
Property Value
System.Object
DataProtectionPolicy
The body of the policy document you want to use for this topic.
public virtual object DataProtectionPolicy { get; set; }
Property Value
System.Object
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 virtual object DeliveryStatusLogging { get; set; }
Property Value
System.Object
DisplayName
The display name to use for an Amazon SNS topic with SMS subscriptions.
public virtual string DisplayName { get; set; }
Property Value
System.String
FifoTopic
Set to true to create a FIFO topic.
public virtual object FifoTopic { get; set; }
Property Value
System.Object
KmsMasterKeyId
The ID of an AWS managed customer master key (CMK) for Amazon SNS or a custom CMK.
public virtual string KmsMasterKeyId { get; set; }
Property Value
System.String
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 virtual string SignatureVersion { get; set; }
Property Value
System.String
Subscription
The Amazon SNS subscriptions (endpoints) for this topic.
public virtual object Subscription { get; set; }
Property Value
System.Object
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
The list of tags to add to a new topic.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
TopicName
The name of the topic you want to create.
public virtual string TopicName { get; set; }
Property Value
System.String
TracingConfig
Tracing mode of an Amazon SNS topic.
public virtual string TracingConfig { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>