Class TopicBase
- All Implemented Interfaces:
IResource
,INotificationRuleTarget
,ITopic
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
- Direct Known Subclasses:
Topic
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.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 TypeMethodDescriptionaddSubscription
(ITopicSubscription topicSubscription) 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 PolicyStatement
Adds a statement to enforce encryption of data in transit when publishing to the topic.protected abstract Boolean
Controls automatic creation of policy objects.abstract Boolean
Enables content-based deduplication for FIFO topics.protected Boolean
Adds a statement to enforce encryption of data in transit when publishing to the topic.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.grantSubscribe
(IGrantable grantee) Grant topic subscribing 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.protected void
setEnforceSSL
(Boolean value) Adds a statement to enforce encryption of data in transit when publishing to the topic.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, 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.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.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
@Stability(Stable) @NotNull public Subscription addSubscription(@NotNull ITopicSubscription topicSubscription) Subscribe some endpoint to this topic.- Specified by:
addSubscription
in interfaceITopic
- Parameters:
topicSubscription
- 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 toaddToResourcePolicy
. 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.
-
createSSLPolicyDocument
Adds a statement to enforce encryption of data in transit when publishing to the topic.For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-security-best-practices.html#enforce-encryption-data-in-transit.
-
grantPublish
Grant topic publishing permissions to the given identity.- Specified by:
grantPublish
in interfaceITopic
- Parameters:
grantee
- This parameter is required.
-
grantSubscribe
Grant topic subscribing permissions to the given identity.- Specified by:
grantSubscribe
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
-
getAutoCreatePolicy
Controls automatic creation of policy objects.Set by subclasses.
-
getContentBasedDeduplication
Enables content-based deduplication for FIFO topics.- Specified by:
getContentBasedDeduplication
in interfaceITopic
-
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
-
getEnforceSSL
Adds a statement to enforce encryption of data in transit when publishing to the topic. -
setEnforceSSL
Adds a statement to enforce encryption of data in transit when publishing to the topic.
-