@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:52.438Z") public abstract class TopicBase extends Resource implements ITopic
ITopic.Jsii$Default
Modifier | Constructor and Description |
---|---|
protected |
TopicBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
TopicBase(software.amazon.jsii.JsiiObjectRef objRef) |
protected |
TopicBase(software.constructs.Construct scope,
java.lang.String id) |
protected |
TopicBase(software.constructs.Construct scope,
java.lang.String id,
ResourceProps props) |
Modifier and Type | Method and Description |
---|---|
void |
addSubscription(ITopicSubscription subscription)
Subscribe some endpoint to this topic.
|
AddToResourcePolicyResult |
addToResourcePolicy(PolicyStatement statement)
Adds a statement to the IAM resource policy associated with this topic.
|
NotificationRuleTargetConfig |
bindAsNotificationRuleTarget(software.constructs.Construct _scope)
Represents a notification target That allows SNS topic to associate with this rule target.
|
protected abstract java.lang.Boolean |
getAutoCreatePolicy()
Controls automatic creation of policy objects.
|
abstract java.lang.Boolean |
getFifo()
Whether this topic is an Amazon SNS FIFO queue.
|
abstract java.lang.String |
getTopicArn()
The ARN of the topic.
|
abstract java.lang.String |
getTopicName()
The name of the topic.
|
Grant |
grantPublish(IGrantable grantee)
Grant topic publishing permissions to the given identity.
|
Metric |
metric(java.lang.String metricName)
Return the given named metric for this Topic.
|
Metric |
metric(java.lang.String metricName,
MetricOptions props)
Return the given named metric for this Topic.
|
Metric |
metricNumberOfMessagesPublished()
The number of messages published to your Amazon SNS topics.
|
Metric |
metricNumberOfMessagesPublished(MetricOptions props)
The number of messages published to your Amazon SNS topics.
|
Metric |
metricNumberOfNotificationsDelivered()
The number of messages successfully delivered from your Amazon SNS topics to subscribing endpoints.
|
Metric |
metricNumberOfNotificationsDelivered(MetricOptions props)
The number of messages successfully delivered from your Amazon SNS topics to subscribing endpoints.
|
Metric |
metricNumberOfNotificationsFailed()
The number of messages that Amazon SNS failed to deliver.
|
Metric |
metricNumberOfNotificationsFailed(MetricOptions props)
The number of messages that Amazon SNS failed to deliver.
|
Metric |
metricNumberOfNotificationsFilteredOut()
The number of messages that were rejected by subscription filter policies.
|
Metric |
metricNumberOfNotificationsFilteredOut(MetricOptions props)
The number of messages that were rejected by subscription filter policies.
|
Metric |
metricNumberOfNotificationsFilteredOutInvalidAttributes()
The number of messages that were rejected by subscription filter policies because the messages' attributes are invalid.
|
Metric |
metricNumberOfNotificationsFilteredOutInvalidAttributes(MetricOptions props)
The number of messages that were rejected by subscription filter policies because the messages' attributes are invalid.
|
Metric |
metricNumberOfNotificationsFilteredOutNoMessageAttributes()
The number of messages that were rejected by subscription filter policies because the messages have no attributes.
|
Metric |
metricNumberOfNotificationsFilteredOutNoMessageAttributes(MetricOptions props)
The number of messages that were rejected by subscription filter policies because the messages have no attributes.
|
Metric |
metricPublishSize()
Metric for the size of messages published through this topic.
|
Metric |
metricPublishSize(MetricOptions props)
Metric for the size of messages published through this topic.
|
Metric |
metricSMSMonthToDateSpentUSD()
The charges you have accrued since the start of the current calendar month for sending SMS messages.
|
Metric |
metricSMSMonthToDateSpentUSD(MetricOptions props)
The charges you have accrued since the start of the current calendar month for sending SMS messages.
|
Metric |
metricSMSSuccessRate()
The rate of successful SMS message deliveries.
|
Metric |
metricSMSSuccessRate(MetricOptions props)
The rate of successful SMS message deliveries.
|
protected java.util.List<java.lang.String> |
validate()
Validate the current construct.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyRemovalPolicy, getEnv, getStack
getNode
protected TopicBase(software.amazon.jsii.JsiiObjectRef objRef)
protected TopicBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
protected TopicBase(software.constructs.Construct scope, java.lang.String id, ResourceProps props)
scope
- This parameter is required.id
- This parameter is required.props
- protected TopicBase(software.constructs.Construct scope, java.lang.String id)
scope
- This parameter is required.id
- This parameter is required.public void addSubscription(ITopicSubscription subscription)
addSubscription
in interface ITopic
subscription
- This parameter is required.public AddToResourcePolicyResult addToResourcePolicy(PolicyStatement statement)
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.
addToResourcePolicy
in interface ITopic
statement
- This parameter is required.public NotificationRuleTargetConfig bindAsNotificationRuleTarget(software.constructs.Construct _scope)
bindAsNotificationRuleTarget
in interface INotificationRuleTarget
_scope
- This parameter is required.public Grant grantPublish(IGrantable grantee)
grantPublish
in interface ITopic
grantee
- This parameter is required.public Metric metric(java.lang.String metricName, MetricOptions props)
public Metric metric(java.lang.String metricName)
public Metric metricNumberOfMessagesPublished(MetricOptions props)
Sum over 5 minutes
metricNumberOfMessagesPublished
in interface ITopic
props
- public Metric metricNumberOfMessagesPublished()
Sum over 5 minutes
metricNumberOfMessagesPublished
in interface ITopic
public Metric metricNumberOfNotificationsDelivered(MetricOptions props)
Sum over 5 minutes
metricNumberOfNotificationsDelivered
in interface ITopic
props
- public Metric metricNumberOfNotificationsDelivered()
Sum over 5 minutes
metricNumberOfNotificationsDelivered
in interface ITopic
public Metric metricNumberOfNotificationsFailed(MetricOptions props)
Sum over 5 minutes
metricNumberOfNotificationsFailed
in interface ITopic
props
- public Metric metricNumberOfNotificationsFailed()
Sum over 5 minutes
metricNumberOfNotificationsFailed
in interface ITopic
public Metric metricNumberOfNotificationsFilteredOut(MetricOptions props)
Sum over 5 minutes
metricNumberOfNotificationsFilteredOut
in interface ITopic
props
- public Metric metricNumberOfNotificationsFilteredOut()
Sum over 5 minutes
metricNumberOfNotificationsFilteredOut
in interface ITopic
public Metric metricNumberOfNotificationsFilteredOutInvalidAttributes(MetricOptions props)
Sum over 5 minutes
metricNumberOfNotificationsFilteredOutInvalidAttributes
in interface ITopic
props
- public Metric metricNumberOfNotificationsFilteredOutInvalidAttributes()
Sum over 5 minutes
metricNumberOfNotificationsFilteredOutInvalidAttributes
in interface ITopic
public Metric metricNumberOfNotificationsFilteredOutNoMessageAttributes(MetricOptions props)
Sum over 5 minutes
metricNumberOfNotificationsFilteredOutNoMessageAttributes
in interface ITopic
props
- public Metric metricNumberOfNotificationsFilteredOutNoMessageAttributes()
Sum over 5 minutes
metricNumberOfNotificationsFilteredOutNoMessageAttributes
in interface ITopic
public Metric metricPublishSize(MetricOptions props)
Average over 5 minutes
metricPublishSize
in interface ITopic
props
- public Metric metricPublishSize()
Average over 5 minutes
metricPublishSize
in interface ITopic
public Metric metricSMSMonthToDateSpentUSD(MetricOptions props)
Maximum over 5 minutes
metricSMSMonthToDateSpentUSD
in interface ITopic
props
- public Metric metricSMSMonthToDateSpentUSD()
Maximum over 5 minutes
metricSMSMonthToDateSpentUSD
in interface ITopic
public Metric metricSMSSuccessRate(MetricOptions props)
Sum over 5 minutes
metricSMSSuccessRate
in interface ITopic
props
- public Metric metricSMSSuccessRate()
Sum over 5 minutes
metricSMSSuccessRate
in interface ITopic
protected java.util.List<java.lang.String> validate()
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
protected abstract java.lang.Boolean getAutoCreatePolicy()
Set by subclasses.
public abstract java.lang.Boolean getFifo()
If false, this is a standard topic.
public abstract java.lang.String getTopicArn()
getTopicArn
in interface ITopic
public abstract java.lang.String getTopicName()
getTopicName
in interface ITopic