@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:42.106Z") public class Topic extends TopicBase
Example:
import software.amazon.awscdk.services.sns.*; Topic topic = new Topic(this, "MyTopic"); TopicRule topicRule = TopicRule.Builder.create(this, "TopicRule") .sql(IotSql.fromStringAsVer20160323("SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'")) .actions(List.of( SnsTopicAction.Builder.create(topic) .messageFormat(SnsActionMessageFormat.JSON) .build())) .build();
Modifier and Type | Class and Description |
---|---|
static class |
Topic.Builder
A fluent builder for
Topic . |
ITopic.Jsii$Default
Modifier | Constructor and Description |
---|---|
protected |
Topic(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Topic(software.amazon.jsii.JsiiObjectRef objRef) |
|
Topic(software.constructs.Construct scope,
java.lang.String id) |
|
Topic(software.constructs.Construct scope,
java.lang.String id,
TopicProps props) |
Modifier and Type | Method and Description |
---|---|
static ITopic |
fromTopicArn(software.constructs.Construct scope,
java.lang.String id,
java.lang.String topicArn)
Import an existing SNS topic provided an ARN.
|
protected java.lang.Boolean |
getAutoCreatePolicy()
Controls automatic creation of policy objects.
|
java.lang.Boolean |
getFifo()
Whether this topic is an Amazon SNS FIFO queue.
|
java.lang.String |
getTopicArn()
The ARN of the topic.
|
java.lang.String |
getTopicName()
The name of the topic.
|
addSubscription, addToResourcePolicy, bindAsNotificationRuleTarget, grantPublish, metric, metric, metricNumberOfMessagesPublished, metricNumberOfMessagesPublished, metricNumberOfNotificationsDelivered, metricNumberOfNotificationsDelivered, metricNumberOfNotificationsFailed, metricNumberOfNotificationsFailed, metricNumberOfNotificationsFilteredOut, metricNumberOfNotificationsFilteredOut, metricNumberOfNotificationsFilteredOutInvalidAttributes, metricNumberOfNotificationsFilteredOutInvalidAttributes, metricNumberOfNotificationsFilteredOutNoMessageAttributes, metricNumberOfNotificationsFilteredOutNoMessageAttributes, metricPublishSize, metricPublishSize, metricSMSMonthToDateSpentUSD, metricSMSMonthToDateSpentUSD, metricSMSSuccessRate, metricSMSSuccessRate, validate
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyRemovalPolicy, getEnv, getStack
getNode
protected Topic(software.amazon.jsii.JsiiObjectRef objRef)
protected Topic(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public Topic(software.constructs.Construct scope, java.lang.String id, TopicProps props)
scope
- This parameter is required.id
- This parameter is required.props
- public Topic(software.constructs.Construct scope, java.lang.String id)
scope
- This parameter is required.id
- This parameter is required.public static ITopic fromTopicArn(software.constructs.Construct scope, java.lang.String id, java.lang.String topicArn)
scope
- The parent creating construct. This parameter is required.id
- The construct's name. This parameter is required.topicArn
- topic ARN (i.e. arn:aws:sns:us-east-2:444455556666:MyTopic). This parameter is required.protected java.lang.Boolean getAutoCreatePolicy()
Set by subclasses.
getAutoCreatePolicy
in class TopicBase
public java.lang.Boolean getFifo()
If false, this is a standard topic.
public java.lang.String getTopicArn()
getTopicArn
in interface ITopic
getTopicArn
in class TopicBase
public java.lang.String getTopicName()
getTopicName
in interface ITopic
getTopicName
in class TopicBase