Show / Hide Table of Contents

Class TopicBase

Either a new or imported Topic.

Inheritance
System.Object
Resource
TopicBase
Topic
Implements
ITopic
IResource
Constructs.IConstruct
Constructs.IDependable
INotificationRuleTarget
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(String, IArnComponents)
Resource.GetResourceNameAttribute(String)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.SNS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class TopicBase : Resource, ITopic, IResource, INotificationRuleTarget
Syntax (vb)
Public MustInherit Class TopicBase
    Inherits Resource
    Implements ITopic, IResource, INotificationRuleTarget

Synopsis

Constructors

TopicBase(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

TopicBase(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

TopicBase(Construct, String, IResourceProps)

Properties

AutoCreatePolicy

Controls automatic creation of policy objects.

ContentBasedDeduplication

Enables content-based deduplication for FIFO topics.

EnforceSSL

Adds a statement to enforce encryption of data in transit when publishing to the topic.

Fifo

Whether this topic is an Amazon SNS FIFO queue.

MasterKey

A KMS Key, either managed by this CDK app, or imported.

TopicArn

The ARN of the topic.

TopicName

The name of the topic.

Methods

AddSSLPolicy()

Adds a SSL policy to the topic resource policy.

AddSubscription(ITopicSubscription)

Subscribe some endpoint to this topic.

AddToResourcePolicy(PolicyStatement)

Adds a statement to the IAM resource policy associated with this topic.

BindAsNotificationRuleTarget(Construct)

Represents a notification target That allows SNS topic to associate with this rule target.

CreateSSLPolicyDocument()

Adds a statement to enforce encryption of data in transit when publishing to the topic.

CreateTopicPolicy()

Creates a topic policy for this topic.

GrantPublish(IGrantable)

Grant topic publishing permissions to the given identity.

GrantSubscribe(IGrantable)

Grant topic subscribing permissions to the given identity.

Metric(String, IMetricOptions)

Return the given named metric for this Topic.

MetricNumberOfMessagesPublished(IMetricOptions)

The number of messages published to your Amazon SNS topics.

MetricNumberOfNotificationsDelivered(IMetricOptions)

The number of messages successfully delivered from your Amazon SNS topics to subscribing endpoints.

MetricNumberOfNotificationsFailed(IMetricOptions)

The number of messages that Amazon SNS failed to deliver.

MetricNumberOfNotificationsFilteredOut(IMetricOptions)

The number of messages that were rejected by subscription filter policies.

MetricNumberOfNotificationsFilteredOutInvalidAttributes(IMetricOptions)

The number of messages that were rejected by subscription filter policies because the messages' attributes are invalid.

MetricNumberOfNotificationsFilteredOutNoMessageAttributes(IMetricOptions)

The number of messages that were rejected by subscription filter policies because the messages have no attributes.

MetricPublishSize(IMetricOptions)

Metric for the size of messages published through this topic.

MetricSMSMonthToDateSpentUSD(IMetricOptions)

The charges you have accrued since the start of the current calendar month for sending SMS messages.

MetricSMSSuccessRate(IMetricOptions)

The rate of successful SMS message deliveries.

Constructors

TopicBase(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected TopicBase(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

TopicBase(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected TopicBase(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

TopicBase(Construct, String, IResourceProps)

protected TopicBase(Construct scope, string id, IResourceProps props = null)
Parameters
scope Constructs.Construct
id System.String
props IResourceProps

Properties

AutoCreatePolicy

Controls automatic creation of policy objects.

protected abstract bool AutoCreatePolicy { get; }
Property Value

System.Boolean

Remarks

Set by subclasses.

ContentBasedDeduplication

Enables content-based deduplication for FIFO topics.

public abstract bool ContentBasedDeduplication { get; }
Property Value

System.Boolean

EnforceSSL

Adds a statement to enforce encryption of data in transit when publishing to the topic.

protected virtual Nullable<bool> EnforceSSL { get; set; }
Property Value

System.Nullable<System.Boolean>

Fifo

Whether this topic is an Amazon SNS FIFO queue.

public abstract bool Fifo { get; }
Property Value

System.Boolean

Remarks

If false, this is a standard topic.

MasterKey

A KMS Key, either managed by this CDK app, or imported.

public abstract IKey MasterKey { get; }
Property Value

IKey

Remarks

This property applies only to server-side encryption.

TopicArn

The ARN of the topic.

public abstract string TopicArn { get; }
Property Value

System.String

TopicName

The name of the topic.

public abstract string TopicName { get; }
Property Value

System.String

Methods

AddSSLPolicy()

Adds a SSL policy to the topic resource policy.

protected virtual void AddSSLPolicy()

AddSubscription(ITopicSubscription)

Subscribe some endpoint to this topic.

public virtual Subscription AddSubscription(ITopicSubscription topicSubscription)
Parameters
topicSubscription ITopicSubscription
Returns

Subscription

AddToResourcePolicy(PolicyStatement)

Adds a statement to the IAM resource policy associated with this topic.

public virtual IAddToResourcePolicyResult AddToResourcePolicy(PolicyStatement statement)
Parameters
statement PolicyStatement
Returns

IAddToResourcePolicyResult

Remarks

If this topic was created in this stack (new Topic), a topic policy will be automatically created upon the first call to addToResourcePolicy. However, if enforceSSL is set to true, the policy has already been created before the first call to this method.

If the topic is imported (Topic.import), then this is a no-op.

BindAsNotificationRuleTarget(Construct)

Represents a notification target That allows SNS topic to associate with this rule target.

public virtual INotificationRuleTargetConfig BindAsNotificationRuleTarget(Construct scope)
Parameters
scope Constructs.Construct
Returns

INotificationRuleTargetConfig

CreateSSLPolicyDocument()

Adds a statement to enforce encryption of data in transit when publishing to the topic.

protected virtual PolicyStatement CreateSSLPolicyDocument()
Returns

PolicyStatement

Remarks

For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-security-best-practices.html#enforce-encryption-data-in-transit.

CreateTopicPolicy()

Creates a topic policy for this topic.

protected virtual void CreateTopicPolicy()

GrantPublish(IGrantable)

Grant topic publishing permissions to the given identity.

public virtual Grant GrantPublish(IGrantable grantee)
Parameters
grantee IGrantable
Returns

Grant

GrantSubscribe(IGrantable)

Grant topic subscribing permissions to the given identity.

public virtual Grant GrantSubscribe(IGrantable grantee)
Parameters
grantee IGrantable
Returns

Grant

Metric(String, IMetricOptions)

Return the given named metric for this Topic.

public virtual Metric Metric(string metricName, IMetricOptions props = null)
Parameters
metricName System.String
props IMetricOptions
Returns

Metric

MetricNumberOfMessagesPublished(IMetricOptions)

The number of messages published to your Amazon SNS topics.

public virtual Metric MetricNumberOfMessagesPublished(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Sum over 5 minutes

MetricNumberOfNotificationsDelivered(IMetricOptions)

The number of messages successfully delivered from your Amazon SNS topics to subscribing endpoints.

public virtual Metric MetricNumberOfNotificationsDelivered(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Sum over 5 minutes

MetricNumberOfNotificationsFailed(IMetricOptions)

The number of messages that Amazon SNS failed to deliver.

public virtual Metric MetricNumberOfNotificationsFailed(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Sum over 5 minutes

MetricNumberOfNotificationsFilteredOut(IMetricOptions)

The number of messages that were rejected by subscription filter policies.

public virtual Metric MetricNumberOfNotificationsFilteredOut(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Sum over 5 minutes

MetricNumberOfNotificationsFilteredOutInvalidAttributes(IMetricOptions)

The number of messages that were rejected by subscription filter policies because the messages' attributes are invalid.

public virtual Metric MetricNumberOfNotificationsFilteredOutInvalidAttributes(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Sum over 5 minutes

MetricNumberOfNotificationsFilteredOutNoMessageAttributes(IMetricOptions)

The number of messages that were rejected by subscription filter policies because the messages have no attributes.

public virtual Metric MetricNumberOfNotificationsFilteredOutNoMessageAttributes(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Sum over 5 minutes

MetricPublishSize(IMetricOptions)

Metric for the size of messages published through this topic.

public virtual Metric MetricPublishSize(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Average over 5 minutes

MetricSMSMonthToDateSpentUSD(IMetricOptions)

The charges you have accrued since the start of the current calendar month for sending SMS messages.

public virtual Metric MetricSMSMonthToDateSpentUSD(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Maximum over 5 minutes

MetricSMSSuccessRate(IMetricOptions)

The rate of successful SMS message deliveries.

public virtual Metric MetricSMSSuccessRate(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Sum over 5 minutes

Implements

ITopic
IResource
Constructs.IConstruct
Constructs.IDependable
INotificationRuleTarget
Back to top Generated by DocFX