Class CfnTopic
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.sns.CfnTopic
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:24:09.880Z")
@Stability(Stable)
public class CfnTopic
extends CfnResource
implements IInspectable, ITaggable
The
AWS::SNS::Topic
resource creates a topic to which notifications can be published.
One account can create a maximum of 100,000 standard topics and 1,000 FIFO topics. For more information, see Amazon SNS endpoints and quotas in the AWS General Reference .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.sns.*; Object archivePolicy; Object dataProtectionPolicy; CfnTopic cfnTopic = CfnTopic.Builder.create(this, "MyCfnTopic") .archivePolicy(archivePolicy) .contentBasedDeduplication(false) .dataProtectionPolicy(dataProtectionPolicy) .deliveryStatusLogging(List.of(LoggingConfigProperty.builder() .protocol("protocol") // the properties below are optional .failureFeedbackRoleArn("failureFeedbackRoleArn") .successFeedbackRoleArn("successFeedbackRoleArn") .successFeedbackSampleRate("successFeedbackSampleRate") .build())) .displayName("displayName") .fifoTopic(false) .kmsMasterKeyId("kmsMasterKeyId") .signatureVersion("signatureVersion") .subscription(List.of(SubscriptionProperty.builder() .endpoint("endpoint") .protocol("protocol") .build())) .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .topicName("topicName") .tracingConfig("tracingConfig") .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnTopic
.static interface
TheLoggingConfig
property type specifies theDelivery
status logging configuration for anAWS::SNS::Topic
.static interface
Subscription
is an embedded property that describes the subscription endpoints of an Amazon SNS topic.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnTopic
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnTopic
(software.amazon.jsii.JsiiObjectRef objRef) CfnTopic
(software.constructs.Construct scope, String id, CfnTopicProps props) -
Method Summary
Modifier and TypeMethodDescriptionTheArchivePolicy
determines the number of days Amazon SNS retains messages in FIFO topics.Returns the ARN of an Amazon SNS topic.Returns the name of an Amazon SNS topic.ContentBasedDeduplication
enables deduplication of messages based on their content for FIFO topics.The body of the policy document you want to use for this topic.TheDeliveryStatusLogging
configuration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:.The display name to use for an Amazon SNS topic with SMS subscriptions.Set to true to create a FIFO topic.The ID of an AWS managed customer master key (CMK) for Amazon SNS or a custom CMK.The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS.The Amazon SNS subscriptions (endpoints) for this topic.getTags()
Tag Manager which manages the tags for this resource.The list of tags to add to a new topic.The name of the topic you want to create.Tracing mode of an Amazon SNS topic.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setArchivePolicy
(Object value) TheArchivePolicy
determines the number of days Amazon SNS retains messages in FIFO topics.void
ContentBasedDeduplication
enables deduplication of messages based on their content for FIFO topics.void
ContentBasedDeduplication
enables deduplication of messages based on their content for FIFO topics.void
setDataProtectionPolicy
(Object value) The body of the policy document you want to use for this topic.void
setDeliveryStatusLogging
(List<Object> value) TheDeliveryStatusLogging
configuration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:.void
TheDeliveryStatusLogging
configuration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:.void
setDisplayName
(String value) The display name to use for an Amazon SNS topic with SMS subscriptions.void
setFifoTopic
(Boolean value) Set to true to create a FIFO topic.void
setFifoTopic
(IResolvable value) Set to true to create a FIFO topic.void
setKmsMasterKeyId
(String value) The ID of an AWS managed customer master key (CMK) for Amazon SNS or a custom CMK.void
setSignatureVersion
(String value) The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS.void
setSubscription
(List<Object> value) The Amazon SNS subscriptions (endpoints) for this topic.void
setSubscription
(IResolvable value) The Amazon SNS subscriptions (endpoints) for this topic.void
setTagsRaw
(List<CfnTag> value) The list of tags to add to a new topic.void
setTopicName
(String value) The name of the topic you want to create.void
setTracingConfig
(String value) Tracing mode of an Amazon SNS topic.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnTopic
protected CfnTopic(software.amazon.jsii.JsiiObjectRef objRef) -
CfnTopic
protected CfnTopic(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnTopic
@Stability(Stable) public CfnTopic(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnTopicProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties.
-
CfnTopic
@Stability(Stable) public CfnTopic(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrTopicArn
Returns the ARN of an Amazon SNS topic. -
getAttrTopicName
Returns the name of an Amazon SNS topic. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getArchivePolicy
TheArchivePolicy
determines the number of days Amazon SNS retains messages in FIFO topics. -
setArchivePolicy
TheArchivePolicy
determines the number of days Amazon SNS retains messages in FIFO topics. -
getContentBasedDeduplication
ContentBasedDeduplication
enables deduplication of messages based on their content for FIFO topics. -
setContentBasedDeduplication
ContentBasedDeduplication
enables deduplication of messages based on their content for FIFO topics. -
setContentBasedDeduplication
ContentBasedDeduplication
enables deduplication of messages based on their content for FIFO topics. -
getDataProtectionPolicy
The body of the policy document you want to use for this topic. -
setDataProtectionPolicy
The body of the policy document you want to use for this topic. -
getDeliveryStatusLogging
TheDeliveryStatusLogging
configuration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:. -
setDeliveryStatusLogging
TheDeliveryStatusLogging
configuration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:. -
setDeliveryStatusLogging
TheDeliveryStatusLogging
configuration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:. -
getDisplayName
The display name to use for an Amazon SNS topic with SMS subscriptions. -
setDisplayName
The display name to use for an Amazon SNS topic with SMS subscriptions. -
getFifoTopic
Set to true to create a FIFO topic. -
setFifoTopic
Set to true to create a FIFO topic. -
setFifoTopic
Set to true to create a FIFO topic. -
getKmsMasterKeyId
The ID of an AWS managed customer master key (CMK) for Amazon SNS or a custom CMK. -
setKmsMasterKeyId
The ID of an AWS managed customer master key (CMK) for Amazon SNS or a custom CMK. -
getSignatureVersion
The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. -
setSignatureVersion
The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. -
getSubscription
The Amazon SNS subscriptions (endpoints) for this topic. -
setSubscription
The Amazon SNS subscriptions (endpoints) for this topic. -
setSubscription
The Amazon SNS subscriptions (endpoints) for this topic. -
getTagsRaw
The list of tags to add to a new topic. -
setTagsRaw
The list of tags to add to a new topic. -
getTopicName
The name of the topic you want to create. -
setTopicName
The name of the topic you want to create. -
getTracingConfig
Tracing mode of an Amazon SNS topic. -
setTracingConfig
Tracing mode of an Amazon SNS topic.
-