Class: AWSCDK::Kinesis::ResourcePolicyProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
kinesis/resource_policy_props.rb

Overview

Properties to associate a data stream with a policy.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(policy_document: nil, stream: nil, stream_consumer: nil) ⇒ ResourcePolicyProps

Returns a new instance of ResourcePolicyProps.

Parameters:



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

def initialize(policy_document: nil, stream: nil, stream_consumer: nil)
  @policy_document = policy_document
  Jsii::Type.check_type(@policy_document, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlBvbGljeURvY3VtZW50In0=")), "policyDocument") unless @policy_document.nil?
  @stream = stream
  Jsii::Type.check_type(@stream, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2luZXNpcy5JU3RyZWFtIn0=")), "stream") unless @stream.nil?
  @stream_consumer = stream_consumer
  Jsii::Type.check_type(@stream_consumer, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2luZXNpcy5JU3RyZWFtQ29uc3VtZXIifQ==")), "streamConsumer") unless @stream_consumer.nil?
end

Instance Attribute Details

#policy_documentAWSCDK::IAM::PolicyDocument? (readonly)

Note:

Default: - empty policy document

IAM policy document to apply to a data stream.

Returns:



23
24
25
# File 'kinesis/resource_policy_props.rb', line 23

def policy_document
  @policy_document
end

#streamAWSCDK::Kinesis::IStream? (readonly)

Note:

Default: - policy is not associated to a stream

The stream this policy applies to.

Note: only one of stream and stream_consumer must be set.

Returns:



30
31
32
# File 'kinesis/resource_policy_props.rb', line 30

def stream
  @stream
end

#stream_consumerAWSCDK::Kinesis::IStreamConsumer? (readonly)

Note:

Default: - policy is not associated to a consumer

The stream consumer this policy applies to.

Note: only one of stream and stream_consumer must be set.



37
38
39
# File 'kinesis/resource_policy_props.rb', line 37

def stream_consumer
  @stream_consumer
end

Class Method Details

.jsii_propertiesObject



39
40
41
42
43
44
45
# File 'kinesis/resource_policy_props.rb', line 39

def self.jsii_properties
  {
    :policy_document => "policyDocument",
    :stream => "stream",
    :stream_consumer => "streamConsumer",
  }
end

Instance Method Details

#to_jsiiObject



47
48
49
50
51
52
53
54
55
# File 'kinesis/resource_policy_props.rb', line 47

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