Class: AWSCDK::SNS::CfnTopicPolicyProps

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

Overview

Properties for defining a CfnTopicPolicy.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(policy_document:, topics:) ⇒ CfnTopicPolicyProps

Returns a new instance of CfnTopicPolicyProps.

Parameters:

  • policy_document (Object)

    A policy document that contains permissions to add to the specified SNS topics.

  • topics (Array<String>)

    The Amazon Resource Names (ARN) of the topics to which you want to add the policy.



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

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

Instance Attribute Details

#policy_documentObject (readonly)

A policy document that contains permissions to add to the specified SNS topics.



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

def policy_document
  @policy_document
end

#topicsArray<String> (readonly)

The Amazon Resource Names (ARN) of the topics to which you want to add the policy.

You can use the [Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html) function to specify an [AWS::SNS::Topic](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html) resource.



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

def topics
  @topics
end

Class Method Details

.jsii_propertiesObject



31
32
33
34
35
36
# File 'sns/cfn_topic_policy_props.rb', line 31

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

Instance Method Details

#to_jsiiObject



38
39
40
41
42
43
44
45
# File 'sns/cfn_topic_policy_props.rb', line 38

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