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-21T06:34:16.432Z")
@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
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnTopic.static interfaceTheLoggingConfigproperty type specifies theDeliverystatus logging configuration for anAWS::SNS::Topic.static interfaceSubscriptionis 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.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnTopic(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnTopic(software.amazon.jsii.JsiiObjectRef objRef) CfnTopic(software.constructs.Construct scope, String id, CfnTopicProps props) -
Method Summary
Modifier and TypeMethodDescriptionTheArchivePolicydetermines 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.ContentBasedDeduplicationenables deduplication of messages based on their content for FIFO topics.The body of the policy document you want to use for this topic.TheDeliveryStatusLoggingconfiguration 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.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetArchivePolicy(Object value) TheArchivePolicydetermines the number of days Amazon SNS retains messages in FIFO topics.voidContentBasedDeduplicationenables deduplication of messages based on their content for FIFO topics.voidContentBasedDeduplicationenables deduplication of messages based on their content for FIFO topics.voidsetDataProtectionPolicy(Object value) The body of the policy document you want to use for this topic.voidsetDeliveryStatusLogging(List<Object> value) TheDeliveryStatusLoggingconfiguration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:.voidTheDeliveryStatusLoggingconfiguration enables you to log the delivery status of messages sent from your Amazon SNS topic to subscribed endpoints with the following supported delivery protocols:.voidsetDisplayName(String value) The display name to use for an Amazon SNS topic with SMS subscriptions.voidsetFifoTopic(Boolean value) Set to true to create a FIFO topic.voidsetFifoTopic(IResolvable value) Set to true to create a FIFO topic.voidsetKmsMasterKeyId(String value) The ID of an AWS managed customer master key (CMK) for Amazon SNS or a custom CMK.voidsetSignatureVersion(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.voidsetSubscription(List<Object> value) The Amazon SNS subscriptions (endpoints) for this topic.voidsetSubscription(IResolvable value) The Amazon SNS subscriptions (endpoints) for this topic.voidsetTagsRaw(List<CfnTag> value) The list of tags to add to a new topic.voidsetTopicName(String value) The name of the topic you want to create.voidsetTracingConfig(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, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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.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:
inspectin 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:
renderPropertiesin 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:
getCfnPropertiesin classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getArchivePolicy
TheArchivePolicydetermines the number of days Amazon SNS retains messages in FIFO topics. -
setArchivePolicy
TheArchivePolicydetermines the number of days Amazon SNS retains messages in FIFO topics. -
getContentBasedDeduplication
ContentBasedDeduplicationenables deduplication of messages based on their content for FIFO topics. -
setContentBasedDeduplication
ContentBasedDeduplicationenables deduplication of messages based on their content for FIFO topics. -
setContentBasedDeduplication
ContentBasedDeduplicationenables 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
TheDeliveryStatusLoggingconfiguration 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
TheDeliveryStatusLoggingconfiguration 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
TheDeliveryStatusLoggingconfiguration 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.
-