Class TopicBase
Either a new or imported Topic.
Inherited Members
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. |
TopicArn | The ARN of the topic. |
TopicName | The name of the topic. |
Methods
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. |
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.
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
AddSubscription(ITopicSubscription)
Subscribe some endpoint to this topic.
public virtual Subscription AddSubscription(ITopicSubscription topicSubscription)
Parameters
- topicSubscription ITopicSubscription
Returns
AddToResourcePolicy(PolicyStatement)
Adds a statement to the IAM resource policy associated with this topic.
public virtual IAddToResourcePolicyResult AddToResourcePolicy(PolicyStatement statement)
Parameters
- statement PolicyStatement
Returns
Remarks
If this topic was created in this stack (new Topic
), a topic policy
will be automatically created upon the first call to addToResourcePolicy
. 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
CreateSSLPolicyDocument()
Adds a statement to enforce encryption of data in transit when publishing to the topic.
protected virtual PolicyStatement CreateSSLPolicyDocument()
Returns
Remarks
GrantPublish(IGrantable)
Grant topic publishing permissions to the given identity.
public virtual Grant GrantPublish(IGrantable grantee)
Parameters
- grantee IGrantable
Returns
GrantSubscribe(IGrantable)
Grant topic subscribing permissions to the given identity.
public virtual Grant GrantSubscribe(IGrantable grantee)
Parameters
- grantee IGrantable
Returns
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
MetricNumberOfMessagesPublished(IMetricOptions)
The number of messages published to your Amazon SNS topics.
public virtual Metric MetricNumberOfMessagesPublished(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
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
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
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
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
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
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
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
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
Remarks
Sum over 5 minutes