public static interface ITopic.Jsii$Default extends ITopic, IResource.Jsii$Default, INotificationRuleTarget.Jsii$Default
ITopic
.ITopic.Jsii$Default, ITopic.Jsii$Proxy
Modifier and Type | Method and Description |
---|---|
default void |
addSubscription(ITopicSubscription subscription)
Subscribe some endpoint to this topic.
|
default AddToResourcePolicyResult |
addToResourcePolicy(PolicyStatement statement)
Adds a statement to the IAM resource policy associated with this topic.
|
default void |
applyRemovalPolicy(RemovalPolicy policy)
Apply the given removal policy to this resource.
|
default NotificationRuleTargetConfig |
bindAsNotificationRuleTarget(software.constructs.Construct scope)
Returns a target configuration for notification rule.
|
default ResourceEnvironment |
getEnv()
The environment this resource belongs to.
|
default java.lang.Boolean |
getFifo()
Whether this topic is an Amazon SNS FIFO queue.
|
default ConstructNode |
getNode()
The construct tree node for this construct.
|
default Stack |
getStack()
The stack in which this resource is defined.
|
default java.lang.String |
getTopicArn()
The ARN of the topic.
|
default java.lang.String |
getTopicName()
The name of the topic.
|
default Grant |
grantPublish(IGrantable identity)
Grant topic publishing permissions to the given identity.
|
default Metric |
metric(java.lang.String metricName,
MetricOptions props)
Return the given named metric for this Topic.
|
default Metric |
metricNumberOfMessagesPublished(MetricOptions props)
The number of messages published to your Amazon SNS topics.
|
default Metric |
metricNumberOfNotificationsDelivered(MetricOptions props)
The number of messages successfully delivered from your Amazon SNS topics to subscribing endpoints.
|
default Metric |
metricNumberOfNotificationsFailed(MetricOptions props)
The number of messages that Amazon SNS failed to deliver.
|
default Metric |
metricNumberOfNotificationsFilteredOut(MetricOptions props)
The number of messages that were rejected by subscription filter policies.
|
default Metric |
metricNumberOfNotificationsFilteredOutInvalidAttributes(MetricOptions props)
The number of messages that were rejected by subscription filter policies because the messages' attributes are invalid.
|
default Metric |
metricNumberOfNotificationsFilteredOutNoMessageAttributes(MetricOptions props)
The number of messages that were rejected by subscription filter policies because the messages have no attributes.
|
default Metric |
metricPublishSize(MetricOptions props)
Metric for the size of messages published through this topic.
|
default Metric |
metricSMSMonthToDateSpentUSD(MetricOptions props)
The charges you have accrued since the start of the current calendar month for sending SMS messages.
|
default Metric |
metricSMSSuccessRate(MetricOptions props)
The rate of successful SMS message deliveries.
|
metric, metricNumberOfMessagesPublished, metricNumberOfNotificationsDelivered, metricNumberOfNotificationsFailed, metricNumberOfNotificationsFilteredOut, metricNumberOfNotificationsFilteredOutInvalidAttributes, metricNumberOfNotificationsFilteredOutNoMessageAttributes, metricPublishSize, metricSMSMonthToDateSpentUSD, metricSMSSuccessRate
default ConstructNode getNode()
getNode
in interface IConstruct
getNode
in interface IConstruct.Jsii$Default
getNode
in interface IResource.Jsii$Default
default ResourceEnvironment getEnv()
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
getEnv
in interface IResource
getEnv
in interface IResource.Jsii$Default
default Stack getStack()
getStack
in interface IResource
getStack
in interface IResource.Jsii$Default
default java.lang.Boolean getFifo()
If false, this is a standard topic.
default java.lang.String getTopicArn()
getTopicArn
in interface ITopic
default java.lang.String getTopicName()
getTopicName
in interface ITopic
default void applyRemovalPolicy(RemovalPolicy policy)
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
applyRemovalPolicy
in interface IResource
applyRemovalPolicy
in interface IResource.Jsii$Default
policy
- This parameter is required.default NotificationRuleTargetConfig bindAsNotificationRuleTarget(software.constructs.Construct scope)
bindAsNotificationRuleTarget
in interface INotificationRuleTarget
bindAsNotificationRuleTarget
in interface INotificationRuleTarget.Jsii$Default
scope
- This parameter is required.default void addSubscription(ITopicSubscription subscription)
addSubscription
in interface ITopic
subscription
- This parameter is required.default 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.default Grant grantPublish(IGrantable identity)
grantPublish
in interface ITopic
identity
- This parameter is required.default Metric metric(java.lang.String metricName, MetricOptions props)
default Metric metricNumberOfMessagesPublished(MetricOptions props)
Sum over 5 minutes
metricNumberOfMessagesPublished
in interface ITopic
props
- default Metric metricNumberOfNotificationsDelivered(MetricOptions props)
Sum over 5 minutes
metricNumberOfNotificationsDelivered
in interface ITopic
props
- default Metric metricNumberOfNotificationsFailed(MetricOptions props)
Sum over 5 minutes
metricNumberOfNotificationsFailed
in interface ITopic
props
- default Metric metricNumberOfNotificationsFilteredOut(MetricOptions props)
Sum over 5 minutes
metricNumberOfNotificationsFilteredOut
in interface ITopic
props
- default Metric metricNumberOfNotificationsFilteredOutInvalidAttributes(MetricOptions props)
Sum over 5 minutes
metricNumberOfNotificationsFilteredOutInvalidAttributes
in interface ITopic
props
- default Metric metricNumberOfNotificationsFilteredOutNoMessageAttributes(MetricOptions props)
Sum over 5 minutes
metricNumberOfNotificationsFilteredOutNoMessageAttributes
in interface ITopic
props
- default Metric metricPublishSize(MetricOptions props)
Average over 5 minutes
metricPublishSize
in interface ITopic
props
- default Metric metricSMSMonthToDateSpentUSD(MetricOptions props)
Maximum over 5 minutes
metricSMSMonthToDateSpentUSD
in interface ITopic
props
- default Metric metricSMSSuccessRate(MetricOptions props)
Sum over 5 minutes
metricSMSSuccessRate
in interface ITopic
props
-