Class: AWSCDK::Kinesis::StreamProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Kinesis::StreamProps
- Defined in:
- kinesis/stream_props.rb
Overview
Properties for a Kinesis Stream.
Instance Attribute Summary collapse
-
#encryption ⇒ AWSCDK::Kinesis::StreamEncryption?
readonly
The kind of server-side encryption to apply to this stream.
-
#encryption_key ⇒ AWSCDK::KMS::IKey?
readonly
External KMS key to use for stream encryption.
-
#removal_policy ⇒ AWSCDK::RemovalPolicy?
readonly
Policy to apply when the stream is removed from the stack.
-
#retention_period ⇒ AWSCDK::Duration?
readonly
The number of hours for the data records that are stored in shards to remain accessible.
-
#shard_count ⇒ Numeric?
readonly
The number of shards for the stream.
-
#shard_level_metrics ⇒ Array<AWSCDK::Kinesis::ShardLevelMetrics>?
readonly
A list of shard-level metrics in properties to enable enhanced monitoring mode.
-
#stream_mode ⇒ AWSCDK::Kinesis::StreamMode?
readonly
The capacity mode of this stream.
-
#stream_name ⇒ String?
readonly
Enforces a particular physical stream name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(encryption: nil, encryption_key: nil, removal_policy: nil, retention_period: nil, shard_count: nil, shard_level_metrics: nil, stream_mode: nil, stream_name: nil) ⇒ StreamProps
constructor
A new instance of StreamProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(encryption: nil, encryption_key: nil, removal_policy: nil, retention_period: nil, shard_count: nil, shard_level_metrics: nil, stream_mode: nil, stream_name: nil) ⇒ StreamProps
Returns a new instance of StreamProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'kinesis/stream_props.rb', line 15 def initialize(encryption: nil, encryption_key: nil, removal_policy: nil, retention_period: nil, shard_count: nil, shard_level_metrics: nil, stream_mode: nil, stream_name: nil) @encryption = encryption Jsii::Type.check_type(@encryption, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2luZXNpcy5TdHJlYW1FbmNyeXB0aW9uIn0=")), "encryption") unless @encryption.nil? @encryption_key = encryption_key Jsii::Type.check_type(@encryption_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "encryptionKey") unless @encryption_key.nil? @removal_policy = removal_policy Jsii::Type.check_type(@removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "removalPolicy") unless @removal_policy.nil? @retention_period = retention_period Jsii::Type.check_type(@retention_period, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "retentionPeriod") unless @retention_period.nil? @shard_count = shard_count Jsii::Type.check_type(@shard_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "shardCount") unless @shard_count.nil? @shard_level_metrics = shard_level_metrics Jsii::Type.check_type(@shard_level_metrics, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19raW5lc2lzLlNoYXJkTGV2ZWxNZXRyaWNzIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "shardLevelMetrics") unless @shard_level_metrics.nil? @stream_mode = stream_mode Jsii::Type.check_type(@stream_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2luZXNpcy5TdHJlYW1Nb2RlIn0=")), "streamMode") unless @stream_mode.nil? @stream_name = stream_name Jsii::Type.check_type(@stream_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "streamName") unless @stream_name.nil? end |
Instance Attribute Details
#encryption ⇒ AWSCDK::Kinesis::StreamEncryption? (readonly)
Default: - StreamEncryption.KMS if encrypted Streams are supported in the region or StreamEncryption.UNENCRYPTED otherwise. StreamEncryption.KMS if an encryption key is supplied through the encryptionKey property
The kind of server-side encryption to apply to this stream.
If you choose KMS, you can specify a KMS key via encryption_key. If
encryption key is not specified, a key will automatically be created.
41 42 43 |
# File 'kinesis/stream_props.rb', line 41 def encryption @encryption end |
#encryption_key ⇒ AWSCDK::KMS::IKey? (readonly)
Default: - Kinesis Data Streams master key ('/alias/aws/kinesis'). If encryption is set to StreamEncryption.KMS and this property is undefined, a new KMS key will be created and associated with this stream.
External KMS key to use for stream encryption.
The 'encryption' property must be set to "Kms".
48 49 50 |
# File 'kinesis/stream_props.rb', line 48 def encryption_key @encryption_key end |
#removal_policy ⇒ AWSCDK::RemovalPolicy? (readonly)
Default: RemovalPolicy.RETAIN
Policy to apply when the stream is removed from the stack.
53 54 55 |
# File 'kinesis/stream_props.rb', line 53 def removal_policy @removal_policy end |
#retention_period ⇒ AWSCDK::Duration? (readonly)
Default: Duration.hours(24)
The number of hours for the data records that are stored in shards to remain accessible.
58 59 60 |
# File 'kinesis/stream_props.rb', line 58 def retention_period @retention_period end |
#shard_count ⇒ Numeric? (readonly)
Default: 1
The number of shards for the stream.
Can only be provided if streamMode is Provisioned.
65 66 67 |
# File 'kinesis/stream_props.rb', line 65 def shard_count @shard_count end |
#shard_level_metrics ⇒ Array<AWSCDK::Kinesis::ShardLevelMetrics>? (readonly)
Default: undefined - AWS Kinesis default is disabled
A list of shard-level metrics in properties to enable enhanced monitoring mode.
71 72 73 |
# File 'kinesis/stream_props.rb', line 71 def shard_level_metrics @shard_level_metrics end |
#stream_mode ⇒ AWSCDK::Kinesis::StreamMode? (readonly)
Default: StreamMode.PROVISIONED
The capacity mode of this stream.
76 77 78 |
# File 'kinesis/stream_props.rb', line 76 def stream_mode @stream_mode end |
#stream_name ⇒ String? (readonly)
Default:
Enforces a particular physical stream name.
81 82 83 |
# File 'kinesis/stream_props.rb', line 81 def stream_name @stream_name end |
Class Method Details
.jsii_properties ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'kinesis/stream_props.rb', line 83 def self.jsii_properties { :encryption => "encryption", :encryption_key => "encryptionKey", :removal_policy => "removalPolicy", :retention_period => "retentionPeriod", :shard_count => "shardCount", :shard_level_metrics => "shardLevelMetrics", :stream_mode => "streamMode", :stream_name => "streamName", } end |
Instance Method Details
#to_jsii ⇒ Object
96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'kinesis/stream_props.rb', line 96 def to_jsii result = {} result.merge!({ "encryption" => @encryption, "encryptionKey" => @encryption_key, "removalPolicy" => @removal_policy, "retentionPeriod" => @retention_period, "shardCount" => @shard_count, "shardLevelMetrics" => @shard_level_metrics, "streamMode" => @stream_mode, "streamName" => @stream_name, }) result.compact end |