Class TopicBase
- All Implemented Interfaces:
IEnvironmentAware,ITopicRef,IResource,INotificationRuleTarget,IEncryptedResource,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.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IEncryptedResource
IEncryptedResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.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 TypeMethodDescriptionprotected voidAdds a SSL policy to the topic resource policy.addSubscription(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 PolicyStatementAdds a statement to enforce encryption of data in transit when publishing to the topic.protected voidCreates a topic policy for this topic.protected abstract BooleanControls automatic creation of policy objects.abstract BooleanEnables content-based deduplication for FIFO topics.protected BooleanAdds a statement to enforce encryption of data in transit when publishing to the topic.abstract BooleangetFifo()Whether this topic is an Amazon SNS FIFO queue.Collection of grant methods for a Topic.abstract IKeyA KMS Key, either managed by this CDK app, or imported.abstract StringThe ARN of the topic.abstract StringThe name of the topic.A reference to a Topic resource.grantOnKey(IGrantable grantee, String... actions) Gives permissions to a grantable entity to perform actions on the encryption key.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 voidsetEnforceSSL(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, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, 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.IResource
applyRemovalPolicy, 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
-
addSSLPolicy
@Stability(Stable) protected void addSSLPolicy()Adds a SSL policy to the topic resource policy. -
addSubscription
@Stability(Stable) @NotNull public Subscription addSubscription(@NotNull ITopicSubscription topicSubscription) Subscribe some endpoint to this topic.- Specified by:
addSubscriptionin 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. However, ifenforceSSLis set totrue, the policy has already been created before the first call to this method.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.
-
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.
-
createTopicPolicy
@Stability(Stable) protected void createTopicPolicy()Creates a topic policy for this topic. -
grantOnKey
@Stability(Stable) @NotNull public GrantOnKeyResult grantOnKey(@NotNull IGrantable grantee, @NotNull String... actions) Gives permissions to a grantable entity to perform actions on the encryption key.- Specified by:
grantOnKeyin interfaceIEncryptedResource- Parameters:
grantee- This parameter is required.actions- This parameter is required.
-
grantPublish
Grant topic publishing permissions to the given identity.- Specified by:
grantPublishin interfaceITopic- Parameters:
grantee- This parameter is required.
-
grantSubscribe
Grant topic subscribing permissions to the given identity.- Specified by:
grantSubscribein 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
-
getAutoCreatePolicy
Controls automatic creation of policy objects.Set by subclasses.
-
getContentBasedDeduplication
Enables content-based deduplication for FIFO topics.- Specified by:
getContentBasedDeduplicationin interfaceITopic
-
getFifo
Whether this topic is an Amazon SNS FIFO queue.If false, this is a standard topic.
-
getGrants
Collection of grant methods for a Topic. -
getTopicArn
The ARN of the topic.- Specified by:
getTopicArnin interfaceITopic
-
getTopicName
The name of the topic.- Specified by:
getTopicNamein interfaceITopic
-
getTopicRef
A reference to a Topic resource.- Specified by:
getTopicRefin interfaceITopicRef
-
getMasterKey
A KMS Key, either managed by this CDK app, or imported.This property applies only to server-side encryption.
- Specified by:
getMasterKeyin interfaceITopic- See Also:
-
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.
-