Class TopicBase
Either a new or imported Topic.
Inherited Members
Namespace: Amazon.CDK.AWS.SNS
Assembly: Amazon.CDK.AWS.SNS.dll
Syntax (csharp)
public abstract class TopicBase : Resource, ITopic, IResource, IConstruct, IDependable, INotificationRuleTarget
Syntax (vb)
Public MustInherit Class TopicBase
Inherits Resource
Implements ITopic, IResource, IConstruct, IDependable, 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. |
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. |
GrantPublish(IGrantable) | Grant topic publishing 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. |
Validate() | Validate the current construct. |
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.
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 void AddSubscription(ITopicSubscription subscription)
Parameters
- subscription ITopicSubscription
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 addToPolicy
. 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
GrantPublish(IGrantable)
Grant topic publishing permissions to the given identity.
public virtual Grant GrantPublish(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
Validate()
Validate the current construct.
protected override string[] Validate()
Returns
System.String[]
Overrides
Remarks
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.