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.BuilderNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.sns.ITopic
ITopic.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTopicBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedTopicBase(software.amazon.jsii.JsiiObjectRef objRef) protectedprotectedTopicBase(software.constructs.Construct scope, String id, ResourceProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubscription(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 BooleanControls automatic creation of policy objects.abstract BooleangetFifo()Whether this topic is an Amazon SNS FIFO queue.abstract StringThe ARN of the topic.abstract StringThe 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, isResourceMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesizeMethods inherited from class software.constructs.Construct
toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.core.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStackMethods 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:
addSubscriptionin 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:
addToResourcePolicyin 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:
bindAsNotificationRuleTargetin interfaceINotificationRuleTarget- Parameters:
_scope- This parameter is required.
-
grantPublish
Grant topic publishing permissions to the given identity.- Specified by:
grantPublishin 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:
metricNumberOfMessagesPublishedin interfaceITopic- Parameters:
props-
-
metricNumberOfMessagesPublished
The number of messages published to your Amazon SNS topics.Sum over 5 minutes
- Specified by:
metricNumberOfMessagesPublishedin 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:
metricNumberOfNotificationsDeliveredin interfaceITopic- Parameters:
props-
-
metricNumberOfNotificationsDelivered
The number of messages successfully delivered from your Amazon SNS topics to subscribing endpoints.Sum over 5 minutes
- Specified by:
metricNumberOfNotificationsDeliveredin 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:
metricNumberOfNotificationsFailedin interfaceITopic- Parameters:
props-
-
metricNumberOfNotificationsFailed
The number of messages that Amazon SNS failed to deliver.Sum over 5 minutes
- Specified by:
metricNumberOfNotificationsFailedin 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:
metricNumberOfNotificationsFilteredOutin interfaceITopic- Parameters:
props-
-
metricNumberOfNotificationsFilteredOut
The number of messages that were rejected by subscription filter policies.Sum over 5 minutes
- Specified by:
metricNumberOfNotificationsFilteredOutin 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:
metricNumberOfNotificationsFilteredOutInvalidAttributesin 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:
metricNumberOfNotificationsFilteredOutInvalidAttributesin 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:
metricNumberOfNotificationsFilteredOutNoMessageAttributesin 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:
metricNumberOfNotificationsFilteredOutNoMessageAttributesin interfaceITopic
-
metricPublishSize
Metric for the size of messages published through this topic.Average over 5 minutes
- Specified by:
metricPublishSizein interfaceITopic- Parameters:
props-
-
metricPublishSize
Metric for the size of messages published through this topic.Average over 5 minutes
- Specified by:
metricPublishSizein 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:
metricSMSMonthToDateSpentUSDin 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:
metricSMSMonthToDateSpentUSDin interfaceITopic
-
metricSMSSuccessRate
The rate of successful SMS message deliveries.Sum over 5 minutes
- Specified by:
metricSMSSuccessRatein interfaceITopic- Parameters:
props-
-
metricSMSSuccessRate
The rate of successful SMS message deliveries.Sum over 5 minutes
- Specified by:
metricSMSSuccessRatein 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:
getTopicArnin interfaceITopic
-
getTopicName
The name of the topic.- Specified by:
getTopicNamein interfaceITopic
-