Show / Hide Table of Contents

Class TopicBase

Either a new or imported Topic.

Inheritance
object
Resource
TopicBase
Topic
Implements
ITopic
IResource
INotificationRuleTarget
ITopicRef
IConstruct
IDependable
IEncryptedResource
IEnvironmentAware
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyCrossStackReferenceStrength(ReferenceStrength)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.With(params IMixin[])
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, ITopicRef, IConstruct, IDependable, IEncryptedResource, IEnvironmentAware
Syntax (vb)
Public MustInherit Class TopicBase Inherits Resource Implements ITopic, IResource, INotificationRuleTarget, ITopicRef, IConstruct, IDependable, IEncryptedResource, IEnvironmentAware

Synopsis

Constructors

TopicBase(Construct, string, IResourceProps?)

Either a new or imported Topic.

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.

Grants

Collection of grant methods for a Topic.

MasterKey

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

TopicArn

The ARN of the topic.

TopicName

The name of the topic.

TopicRef

A reference to a Topic resource.

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.

GrantOnKey(IGrantable, params string[])

Gives permissions to a grantable entity to perform actions on the encryption key.

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(Construct, string, IResourceProps?)

Either a new or imported Topic.

protected TopicBase(Construct scope, string id, IResourceProps? props = null)
Parameters
scope Construct
id string
props IResourceProps

Properties

AutoCreatePolicy

Controls automatic creation of policy objects.

protected abstract bool AutoCreatePolicy { get; }
Property Value

bool

Remarks

Set by subclasses.

ContentBasedDeduplication

Enables content-based deduplication for FIFO topics.

public abstract bool ContentBasedDeduplication { get; }
Property Value

bool

EnforceSSL

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

protected virtual bool? EnforceSSL { get; set; }
Property Value

bool?

Fifo

Whether this topic is an Amazon SNS FIFO queue.

public abstract bool Fifo { get; }
Property Value

bool

Remarks

If false, this is a standard topic.

Grants

Collection of grant methods for a Topic.

public virtual TopicGrants Grants { get; }
Property Value

TopicGrants

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

string

TopicName

The name of the topic.

public abstract string TopicName { get; }
Property Value

string

TopicRef

A reference to a Topic resource.

public virtual ITopicReference TopicRef { get; }
Property Value

ITopicReference

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 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()

GrantOnKey(IGrantable, params string[])

Gives permissions to a grantable entity to perform actions on the encryption key.

public virtual IGrantOnKeyResult GrantOnKey(IGrantable grantee, params string[] actions)
Parameters
grantee IGrantable
actions string[]
Returns

IGrantOnKeyResult

GrantPublish(IGrantable)

Grant topic publishing permissions to the given identity.

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

Grant

Remarks

The use of this method is discouraged. Please use grants.publish() instead.

[disable-awslint:no-grants]

GrantSubscribe(IGrantable)

Grant topic subscribing permissions to the given identity.

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

Grant

Remarks

The use of this method is discouraged. Please use grants.subscribe() instead.

[disable-awslint:no-grants]

Metric(string, IMetricOptions?)

Return the given named metric for this Topic.

public virtual Metric Metric(string metricName, IMetricOptions? props = null)
Parameters
metricName 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
INotificationRuleTarget
ITopicRef
Constructs.IConstruct
Constructs.IDependable
IEncryptedResource
IEnvironmentAware
Back to top Generated by DocFX