@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:42.244Z") @Stability(value=Stable) public class Topic extends TopicBase
Example:
import software.amazon.awscdk.services.sns.*;
Topic dlt = new Topic(this, "DLQ");
Function fn = Function.Builder.create(this, "MyFunction")
.runtime(Runtime.NODEJS_16_X)
.handler("index.handler")
.code(Code.fromInline("// your code here"))
.deadLetterTopic(dlt)
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
Topic.Builder
A fluent builder for
Topic. |
software.amazon.jsii.JsiiObject.InitializationModeITopic.Jsii$Default| Modifier | Constructor and Description |
|---|---|
|
Topic(software.constructs.Construct scope,
String id) |
|
Topic(software.constructs.Construct scope,
String id,
TopicProps props) |
protected |
Topic(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Topic(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static ITopic |
fromTopicArn(software.constructs.Construct scope,
String id,
String topicArn)
Import an existing SNS topic provided an ARN.
|
protected Boolean |
getAutoCreatePolicy()
Controls automatic creation of policy objects.
|
Boolean |
getFifo()
Whether this topic is an Amazon SNS FIFO queue.
|
String |
getTopicArn()
The ARN of the topic.
|
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, metricSMSSuccessRateapplyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackprotected Topic(software.amazon.jsii.JsiiObjectRef objRef)
protected Topic(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public Topic(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
TopicProps props)
scope - This parameter is required.id - This parameter is required.props - @Stability(value=Stable)
public Topic(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.@Stability(value=Stable) @NotNull public static ITopic fromTopicArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull 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.@Stability(value=Stable) @NotNull protected Boolean getAutoCreatePolicy()
Set by subclasses.
getAutoCreatePolicy in class TopicBase@Stability(value=Stable) @NotNull public Boolean getFifo()
If false, this is a standard topic.
@Stability(value=Stable) @NotNull public String getTopicArn()
getTopicArn in interface ITopicgetTopicArn in class TopicBase@Stability(value=Stable) @NotNull public String getTopicName()
getTopicName in interface ITopicgetTopicName in class TopicBaseCopyright © 2022. All rights reserved.