Class: AWSCDK::SNS::CfnTopicInlinePolicyProps

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

Overview

Properties for defining a CfnTopicInlinePolicy.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(policy_document:, topic_arn:) ⇒ CfnTopicInlinePolicyProps

Returns a new instance of CfnTopicInlinePolicyProps.

Parameters:

  • policy_document (Object)

    A policy document that contains permissions to add to the specified Amazon topic.

  • topic_arn (String)

    The Amazon Resource Name (ARN) of the topic to which you want to add the policy.



11
12
13
14
15
16
# File 'sns/cfn_topic_inline_policy_props.rb', line 11

def initialize(policy_document:, topic_arn:)
  @policy_document = policy_document
  Jsii::Type.check_type(@policy_document, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "policyDocument")
  @topic_arn = topic_arn
  Jsii::Type.check_type(@topic_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "topicArn")
end

Instance Attribute Details

#policy_documentObject (readonly)

A policy document that contains permissions to add to the specified Amazon topic.



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

def policy_document
  @policy_document
end

#topic_arnString (readonly)

The Amazon Resource Name (ARN) of the topic to which you want to add the policy.



27
28
29
# File 'sns/cfn_topic_inline_policy_props.rb', line 27

def topic_arn
  @topic_arn
end

Class Method Details

.jsii_propertiesObject



29
30
31
32
33
34
# File 'sns/cfn_topic_inline_policy_props.rb', line 29

def self.jsii_properties
  {
    :policy_document => "policyDocument",
    :topic_arn => "topicArn",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "policyDocument" => @policy_document,
    "topicArn" => @topic_arn,
  })
  result.compact
end