Class: AWSCDK::SNS::TopicAttributes

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
sns/topic_attributes.rb

Overview

Represents an SNS topic defined outside of this stack.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(topic_arn:, content_based_deduplication: nil, key_arn: nil) ⇒ TopicAttributes

Returns a new instance of TopicAttributes.

Parameters:

  • topic_arn (String)

    The ARN of the SNS topic.

  • content_based_deduplication (Boolean, nil) (defaults to: nil)

    Whether content-based deduplication is enabled.

  • key_arn (String, nil) (defaults to: nil)

    KMS encryption key, if this topic is server-side encrypted by a KMS key.



10
11
12
13
14
15
16
17
# File 'sns/topic_attributes.rb', line 10

def initialize(topic_arn:, content_based_deduplication: nil, key_arn: nil)
  @topic_arn = topic_arn
  Jsii::Type.check_type(@topic_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "topicArn")
  @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?
  @key_arn = key_arn
  Jsii::Type.check_type(@key_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyArn") unless @key_arn.nil?
end

Instance Attribute Details

#content_based_deduplicationBoolean? (readonly)

Note:

Default: false

Whether content-based deduplication is enabled.

Only applicable for FIFO topics.

Returns:

  • (Boolean, nil)


29
30
31
# File 'sns/topic_attributes.rb', line 29

def content_based_deduplication
  @content_based_deduplication
end

#key_arnString? (readonly)

Note:

Default: - None

KMS encryption key, if this topic is server-side encrypted by a KMS key.

Returns:

  • (String, nil)


34
35
36
# File 'sns/topic_attributes.rb', line 34

def key_arn
  @key_arn
end

#topic_arnString (readonly)

The ARN of the SNS topic.

Returns:

  • (String)


22
23
24
# File 'sns/topic_attributes.rb', line 22

def topic_arn
  @topic_arn
end

Class Method Details

.jsii_propertiesObject



36
37
38
39
40
41
42
# File 'sns/topic_attributes.rb', line 36

def self.jsii_properties
  {
    :topic_arn => "topicArn",
    :content_based_deduplication => "contentBasedDeduplication",
    :key_arn => "keyArn",
  }
end

Instance Method Details

#to_jsiiObject



44
45
46
47
48
49
50
51
52
# File 'sns/topic_attributes.rb', line 44

def to_jsii
  result = {}
  result.merge!({
    "topicArn" => @topic_arn,
    "contentBasedDeduplication" => @content_based_deduplication,
    "keyArn" => @key_arn,
  })
  result.compact
end