Class: AWSCDK::Kinesis::StreamAttributes

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

Overview

A reference to a stream.

The easiest way to instantiate is to call stream.export(). Then, the consumer can use Stream.import(this, ref) and get a Stream.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stream_arn:, encryption_key: nil) ⇒ StreamAttributes

Returns a new instance of StreamAttributes.

Parameters:

  • stream_arn (String)

    The ARN of the stream.

  • encryption_key (AWSCDK::KMS::IKey, nil) (defaults to: nil)

    The KMS key securing the contents of the stream if encryption is enabled.



13
14
15
16
17
18
# File 'kinesis/stream_attributes.rb', line 13

def initialize(stream_arn:, encryption_key: nil)
  @stream_arn = stream_arn
  Jsii::Type.check_type(@stream_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "streamArn")
  @encryption_key = encryption_key
  Jsii::Type.check_type(@encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "encryptionKey") unless @encryption_key.nil?
end

Instance Attribute Details

#encryption_keyAWSCDK::KMS::IKey? (readonly)

Note:

Default: - No encryption

The KMS key securing the contents of the stream if encryption is enabled.

Returns:



28
29
30
# File 'kinesis/stream_attributes.rb', line 28

def encryption_key
  @encryption_key
end

#stream_arnString (readonly)

The ARN of the stream.

Returns:

  • (String)


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

def stream_arn
  @stream_arn
end

Class Method Details

.jsii_propertiesObject



30
31
32
33
34
35
# File 'kinesis/stream_attributes.rb', line 30

def self.jsii_properties
  {
    :stream_arn => "streamArn",
    :encryption_key => "encryptionKey",
  }
end

Instance Method Details

#to_jsiiObject



37
38
39
40
41
42
43
44
# File 'kinesis/stream_attributes.rb', line 37

def to_jsii
  result = {}
  result.merge!({
    "streamArn" => @stream_arn,
    "encryptionKey" => @encryption_key,
  })
  result.compact
end