Class TopicBase
- All Implemented Interfaces:
IConstruct
,IDependable
,IResource
,INotificationRuleTarget
,ITopic
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
- Direct Known Subclasses:
Topic
-
Nested Class Summary
Nested classes/interfaces inherited from class software.constructs.Construct
software.constructs.Construct.Builder
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.sns.ITopic
ITopic.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
TopicBase
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
TopicBase
(software.amazon.jsii.JsiiObjectRef objRef) protected
protected
TopicBase
(software.constructs.Construct scope, String id, ResourceProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSubscription
(ITopicSubscription subscription) Subscribe some endpoint to this topic.addToResourcePolicy
(PolicyStatement statement) Adds a statement to the IAM resource policy associated with this topic.bindAsNotificationRuleTarget
(software.constructs.Construct _scope) Represents a notification target That allows SNS topic to associate with this rule target.protected abstract Boolean
Controls automatic creation of policy objects.abstract Boolean
getFifo()
Whether this topic is an Amazon SNS FIFO queue.abstract String
The ARN of the topic.abstract String
The name of the topic.grantPublish
(IGrantable grantee) Grant topic publishing permissions to the given identity.Return the given named metric for this Topic.metric
(String metricName, MetricOptions props) Return the given named metric for this Topic.The number of messages published to your Amazon SNS topics.The number of messages published to your Amazon SNS topics.The number of messages successfully delivered from your Amazon SNS topics to subscribing endpoints.The number of messages successfully delivered from your Amazon SNS topics to subscribing endpoints.The number of messages that Amazon SNS failed to deliver.The number of messages that Amazon SNS failed to deliver.The number of messages that were rejected by subscription filter policies.The number of messages that were rejected by subscription filter policies.The number of messages that were rejected by subscription filter policies because the messages' attributes are invalid.The number of messages that were rejected by subscription filter policies because the messages' attributes are invalid.The number of messages that were rejected by subscription filter policies because the messages have no attributes.The number of messages that were rejected by subscription filter policies because the messages have no attributes.Metric for the size of messages published through this topic.metricPublishSize
(MetricOptions props) Metric for the size of messages published through this topic.The charges you have accrued since the start of the current calendar month for sending SMS messages.The charges you have accrued since the start of the current calendar month for sending SMS messages.The rate of successful SMS message deliveries.The rate of successful SMS message deliveries.validate()
Validate the current construct.Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize
Methods inherited from class software.constructs.Construct
toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
TopicBase
protected TopicBase(software.amazon.jsii.JsiiObjectRef objRef) -
TopicBase
protected TopicBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
TopicBase
@Stability(Stable) protected TopicBase(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ResourceProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
-
-
TopicBase
@Stability(Stable) protected TopicBase(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.
-
-
Method Details
-
addSubscription
Subscribe some endpoint to this topic.- Specified by:
addSubscription
in interfaceITopic
- Parameters:
subscription
- This parameter is required.
-
addToResourcePolicy
@Stability(Stable) @NotNull public AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement) Adds a statement to the IAM resource policy associated with this topic.If this topic was created in this stack (
new Topic
), a topic policy will be automatically created upon the first call toaddToPolicy
. If the topic is imported (Topic.import
), then this is a no-op.- Specified by:
addToResourcePolicy
in interfaceITopic
- Parameters:
statement
- This parameter is required.
-
bindAsNotificationRuleTarget
@Stability(Stable) @NotNull public NotificationRuleTargetConfig bindAsNotificationRuleTarget(@NotNull software.constructs.Construct _scope) Represents a notification target That allows SNS topic to associate with this rule target.- Specified by:
bindAsNotificationRuleTarget
in interfaceINotificationRuleTarget
- Parameters:
_scope
- This parameter is required.
-
grantPublish
Grant topic publishing permissions to the given identity.- Specified by:
grantPublish
in interfaceITopic
- Parameters:
grantee
- This parameter is required.
-
metric
@Stability(Stable) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this Topic. -
metric
Return the given named metric for this Topic. -
metricNumberOfMessagesPublished
@Stability(Stable) @NotNull public Metric metricNumberOfMessagesPublished(@Nullable MetricOptions props) The number of messages published to your Amazon SNS topics.Sum over 5 minutes
- Specified by:
metricNumberOfMessagesPublished
in interfaceITopic
- Parameters:
props
-
-
metricNumberOfMessagesPublished
The number of messages published to your Amazon SNS topics.Sum over 5 minutes
- Specified by:
metricNumberOfMessagesPublished
in interfaceITopic
-
metricNumberOfNotificationsDelivered
@Stability(Stable) @NotNull public Metric metricNumberOfNotificationsDelivered(@Nullable MetricOptions props) The number of messages successfully delivered from your Amazon SNS topics to subscribing endpoints.Sum over 5 minutes
- Specified by:
metricNumberOfNotificationsDelivered
in interfaceITopic
- Parameters:
props
-
-
metricNumberOfNotificationsDelivered
The number of messages successfully delivered from your Amazon SNS topics to subscribing endpoints.Sum over 5 minutes
- Specified by:
metricNumberOfNotificationsDelivered
in interfaceITopic
-
metricNumberOfNotificationsFailed
@Stability(Stable) @NotNull public Metric metricNumberOfNotificationsFailed(@Nullable MetricOptions props) The number of messages that Amazon SNS failed to deliver.Sum over 5 minutes
- Specified by:
metricNumberOfNotificationsFailed
in interfaceITopic
- Parameters:
props
-
-
metricNumberOfNotificationsFailed
The number of messages that Amazon SNS failed to deliver.Sum over 5 minutes
- Specified by:
metricNumberOfNotificationsFailed
in interfaceITopic
-
metricNumberOfNotificationsFilteredOut
@Stability(Stable) @NotNull public Metric metricNumberOfNotificationsFilteredOut(@Nullable MetricOptions props) The number of messages that were rejected by subscription filter policies.Sum over 5 minutes
- Specified by:
metricNumberOfNotificationsFilteredOut
in interfaceITopic
- Parameters:
props
-
-
metricNumberOfNotificationsFilteredOut
The number of messages that were rejected by subscription filter policies.Sum over 5 minutes
- Specified by:
metricNumberOfNotificationsFilteredOut
in interfaceITopic
-
metricNumberOfNotificationsFilteredOutInvalidAttributes
@Stability(Stable) @NotNull public Metric metricNumberOfNotificationsFilteredOutInvalidAttributes(@Nullable MetricOptions props) The number of messages that were rejected by subscription filter policies because the messages' attributes are invalid.Sum over 5 minutes
- Specified by:
metricNumberOfNotificationsFilteredOutInvalidAttributes
in interfaceITopic
- Parameters:
props
-
-
metricNumberOfNotificationsFilteredOutInvalidAttributes
The number of messages that were rejected by subscription filter policies because the messages' attributes are invalid.Sum over 5 minutes
- Specified by:
metricNumberOfNotificationsFilteredOutInvalidAttributes
in interfaceITopic
-
metricNumberOfNotificationsFilteredOutNoMessageAttributes
@Stability(Stable) @NotNull public Metric metricNumberOfNotificationsFilteredOutNoMessageAttributes(@Nullable MetricOptions props) The number of messages that were rejected by subscription filter policies because the messages have no attributes.Sum over 5 minutes
- Specified by:
metricNumberOfNotificationsFilteredOutNoMessageAttributes
in interfaceITopic
- Parameters:
props
-
-
metricNumberOfNotificationsFilteredOutNoMessageAttributes
@Stability(Stable) @NotNull public Metric metricNumberOfNotificationsFilteredOutNoMessageAttributes()The number of messages that were rejected by subscription filter policies because the messages have no attributes.Sum over 5 minutes
- Specified by:
metricNumberOfNotificationsFilteredOutNoMessageAttributes
in interfaceITopic
-
metricPublishSize
Metric for the size of messages published through this topic.Average over 5 minutes
- Specified by:
metricPublishSize
in interfaceITopic
- Parameters:
props
-
-
metricPublishSize
Metric for the size of messages published through this topic.Average over 5 minutes
- Specified by:
metricPublishSize
in interfaceITopic
-
metricSMSMonthToDateSpentUSD
@Stability(Stable) @NotNull public Metric metricSMSMonthToDateSpentUSD(@Nullable MetricOptions props) The charges you have accrued since the start of the current calendar month for sending SMS messages.Maximum over 5 minutes
- Specified by:
metricSMSMonthToDateSpentUSD
in interfaceITopic
- Parameters:
props
-
-
metricSMSMonthToDateSpentUSD
The charges you have accrued since the start of the current calendar month for sending SMS messages.Maximum over 5 minutes
- Specified by:
metricSMSMonthToDateSpentUSD
in interfaceITopic
-
metricSMSSuccessRate
The rate of successful SMS message deliveries.Sum over 5 minutes
- Specified by:
metricSMSSuccessRate
in interfaceITopic
- Parameters:
props
-
-
metricSMSSuccessRate
The rate of successful SMS message deliveries.Sum over 5 minutes
- Specified by:
metricSMSSuccessRate
in interfaceITopic
-
validate
Validate the current construct.This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
-
getAutoCreatePolicy
Controls automatic creation of policy objects.Set by subclasses.
-
getFifo
Whether this topic is an Amazon SNS FIFO queue.If false, this is a standard topic.
-
getTopicArn
The ARN of the topic.- Specified by:
getTopicArn
in interfaceITopic
-
getTopicName
The name of the topic.- Specified by:
getTopicName
in interfaceITopic
-