Class: AWSCDK::SNS::TopicProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SNS::TopicProps
- Defined in:
- sns/topic_props.rb
Overview
Properties for a new SNS topic.
Instance Attribute Summary collapse
-
#content_based_deduplication ⇒ Boolean?
readonly
Enables content-based deduplication for FIFO topics.
-
#display_name ⇒ String?
readonly
A developer-defined string that can be used to identify this SNS topic.
-
#enforce_ssl ⇒ Boolean?
readonly
Adds a statement to enforce encryption of data in transit when publishing to the topic.
-
#fifo ⇒ Boolean?
readonly
Set to true to create a FIFO topic.
-
#fifo_throughput_scope ⇒ AWSCDK::SNS::FifoThroughputScope?
readonly
Specifies the throughput quota and deduplication behavior to apply for the FIFO topic.
-
#logging_configs ⇒ Array<AWSCDK::SNS::LoggingConfig>?
readonly
The list of delivery status logging configurations for the topic.
-
#master_key ⇒ AWSCDK::KMS::IKey?
readonly
A KMS Key, either managed by this CDK app, or imported.
-
#message_retention_period_in_days ⇒ Numeric?
readonly
The number of days Amazon SNS retains messages.
-
#signature_version ⇒ String?
readonly
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.
-
#topic_name ⇒ String?
readonly
A name for the topic.
-
#tracing_config ⇒ AWSCDK::SNS::TracingConfig?
readonly
Tracing mode of an Amazon SNS topic.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content_based_deduplication: nil, display_name: nil, enforce_ssl: nil, fifo: nil, fifo_throughput_scope: nil, logging_configs: nil, master_key: nil, message_retention_period_in_days: nil, signature_version: nil, topic_name: nil, tracing_config: nil) ⇒ TopicProps
constructor
A new instance of TopicProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(content_based_deduplication: nil, display_name: nil, enforce_ssl: nil, fifo: nil, fifo_throughput_scope: nil, logging_configs: nil, master_key: nil, message_retention_period_in_days: nil, signature_version: nil, topic_name: nil, tracing_config: nil) ⇒ TopicProps
Returns a new instance of TopicProps.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'sns/topic_props.rb', line 18 def initialize(content_based_deduplication: nil, display_name: nil, enforce_ssl: nil, fifo: nil, fifo_throughput_scope: nil, logging_configs: nil, master_key: nil, message_retention_period_in_days: nil, signature_version: nil, topic_name: nil, tracing_config: nil) @content_based_deduplication = content_based_deduplication Jsii::Type.check_type(@content_based_deduplication, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "contentBasedDeduplication") unless @content_based_deduplication.nil? @display_name = display_name Jsii::Type.check_type(@display_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "displayName") unless @display_name.nil? @enforce_ssl = enforce_ssl Jsii::Type.check_type(@enforce_ssl, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enforceSSL") unless @enforce_ssl.nil? @fifo = fifo Jsii::Type.check_type(@fifo, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "fifo") unless @fifo.nil? @fifo_throughput_scope = fifo_throughput_scope Jsii::Type.check_type(@fifo_throughput_scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLkZpZm9UaHJvdWdocHV0U2NvcGUifQ==")), "fifoThroughputScope") unless @fifo_throughput_scope.nil? @logging_configs = logging_configs.is_a?(Array) ? logging_configs.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::SNS::LoggingConfig.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : logging_configs Jsii::Type.check_type(@logging_configs, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zbnMuTG9nZ2luZ0NvbmZpZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "loggingConfigs") unless @logging_configs.nil? @master_key = master_key Jsii::Type.check_type(@master_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "masterKey") unless @master_key.nil? @message_retention_period_in_days = Jsii::Type.check_type(@message_retention_period_in_days, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "messageRetentionPeriodInDays") unless @message_retention_period_in_days.nil? @signature_version = signature_version Jsii::Type.check_type(@signature_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "signatureVersion") unless @signature_version.nil? @topic_name = topic_name Jsii::Type.check_type(@topic_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "topicName") unless @topic_name.nil? @tracing_config = tracing_config Jsii::Type.check_type(@tracing_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLlRyYWNpbmdDb25maWcifQ==")), "tracingConfig") unless @tracing_config.nil? end |
Instance Attribute Details
#content_based_deduplication ⇒ Boolean? (readonly)
Default: None
Enables content-based deduplication for FIFO topics.
47 48 49 |
# File 'sns/topic_props.rb', line 47 def content_based_deduplication @content_based_deduplication end |
#display_name ⇒ String? (readonly)
Default: None
A developer-defined string that can be used to identify this SNS topic.
The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
55 56 57 |
# File 'sns/topic_props.rb', line 55 def display_name @display_name end |
#enforce_ssl ⇒ Boolean? (readonly)
Default: false
Adds a statement to enforce encryption of data in transit when publishing to the topic.
61 62 63 |
# File 'sns/topic_props.rb', line 61 def enforce_ssl @enforce_ssl end |
#fifo ⇒ Boolean? (readonly)
Default: None
Set to true to create a FIFO topic.
66 67 68 |
# File 'sns/topic_props.rb', line 66 def fifo @fifo end |
#fifo_throughput_scope ⇒ AWSCDK::SNS::FifoThroughputScope? (readonly)
Default: undefined - SNS default setting is FifoThroughputScope.TOPIC
Specifies the throughput quota and deduplication behavior to apply for the FIFO topic.
You can only set this property when fifo is true.
73 74 75 |
# File 'sns/topic_props.rb', line 73 def fifo_throughput_scope @fifo_throughput_scope end |
#logging_configs ⇒ Array<AWSCDK::SNS::LoggingConfig>? (readonly)
Default: None
The list of delivery status logging configurations for the topic.
79 80 81 |
# File 'sns/topic_props.rb', line 79 def logging_configs @logging_configs end |
#master_key ⇒ AWSCDK::KMS::IKey? (readonly)
Default: None
A KMS Key, either managed by this CDK app, or imported.
84 85 86 |
# File 'sns/topic_props.rb', line 84 def master_key @master_key end |
#message_retention_period_in_days ⇒ Numeric? (readonly)
Default: - do not archive messages
The number of days Amazon SNS retains messages.
It can only be set for FIFO topics.
92 93 94 |
# File 'sns/topic_props.rb', line 92 def @message_retention_period_in_days end |
#signature_version ⇒ String? (readonly)
Default: 1
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.
98 99 100 |
# File 'sns/topic_props.rb', line 98 def signature_version @signature_version end |
#topic_name ⇒ String? (readonly)
Default: Generated name
A name for the topic.
If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the topic name. For more information, see Name Type.
107 108 109 |
# File 'sns/topic_props.rb', line 107 def topic_name @topic_name end |
#tracing_config ⇒ AWSCDK::SNS::TracingConfig? (readonly)
Default: TracingConfig.PASS_THROUGH
Tracing mode of an Amazon SNS topic.
113 114 115 |
# File 'sns/topic_props.rb', line 113 def tracing_config @tracing_config end |
Class Method Details
.jsii_properties ⇒ Object
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'sns/topic_props.rb', line 115 def self.jsii_properties { :content_based_deduplication => "contentBasedDeduplication", :display_name => "displayName", :enforce_ssl => "enforceSSL", :fifo => "fifo", :fifo_throughput_scope => "fifoThroughputScope", :logging_configs => "loggingConfigs", :master_key => "masterKey", :message_retention_period_in_days => "messageRetentionPeriodInDays", :signature_version => "signatureVersion", :topic_name => "topicName", :tracing_config => "tracingConfig", } end |
Instance Method Details
#to_jsii ⇒ Object
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'sns/topic_props.rb', line 131 def to_jsii result = {} result.merge!({ "contentBasedDeduplication" => @content_based_deduplication, "displayName" => @display_name, "enforceSSL" => @enforce_ssl, "fifo" => @fifo, "fifoThroughputScope" => @fifo_throughput_scope, "loggingConfigs" => @logging_configs, "masterKey" => @master_key, "messageRetentionPeriodInDays" => @message_retention_period_in_days, "signatureVersion" => @signature_version, "topicName" => @topic_name, "tracingConfig" => @tracing_config, }) result.compact end |