Class: AWSCDK::Kinesis::CfnStreamProps

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

Overview

Properties for defining a CfnStream.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(desired_shard_level_metrics: nil, max_record_size_in_kib: nil, name: nil, retention_period_hours: nil, shard_count: nil, stream_encryption: nil, stream_mode_details: nil, tags: nil, warm_throughput_mi_bps: nil) ⇒ CfnStreamProps

Returns a new instance of CfnStreamProps.

Parameters:

  • desired_shard_level_metrics (Array<String>, nil) (defaults to: nil)

    A list of shard-level metrics in properties to enable enhanced monitoring mode.

  • max_record_size_in_kib (Numeric, nil) (defaults to: nil)

    The maximum record size of a single record in kibibyte (KiB) that you can write to, and read from a stream.

  • name (String, nil) (defaults to: nil)

    The name of the Kinesis stream.

  • retention_period_hours (Numeric, nil) (defaults to: nil)

    The number of hours for the data records that are stored in shards to remain accessible.

  • shard_count (Numeric, nil) (defaults to: nil)

    The number of shards that the stream uses.

  • stream_encryption (AWSCDK::IResolvable, AWSCDK::Kinesis::CfnStream::StreamEncryptionProperty, nil) (defaults to: nil)

    When specified, enables or updates server-side encryption using an AWS KMS key for a specified stream.

  • stream_mode_details (AWSCDK::IResolvable, AWSCDK::Kinesis::CfnStream::StreamModeDetailsProperty, nil) (defaults to: nil)

    Specifies the capacity mode to which you want to set your data stream.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    An arbitrary set of tags (key–value pairs) to associate with the Kinesis stream.

  • warm_throughput_mi_bps (Numeric, nil) (defaults to: nil)

    The target warm throughput in MB/s that the stream should be scaled to handle.



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'kinesis/cfn_stream_props.rb', line 18

def initialize(desired_shard_level_metrics: nil, max_record_size_in_kib: nil, name: nil, retention_period_hours: nil, shard_count: nil, stream_encryption: nil, stream_mode_details: nil, tags: nil, warm_throughput_mi_bps: nil)
  @desired_shard_level_metrics = desired_shard_level_metrics
  Jsii::Type.check_type(@desired_shard_level_metrics, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "desiredShardLevelMetrics") unless @desired_shard_level_metrics.nil?
  @max_record_size_in_kib = max_record_size_in_kib
  Jsii::Type.check_type(@max_record_size_in_kib, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxRecordSizeInKiB") unless @max_record_size_in_kib.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @retention_period_hours = retention_period_hours
  Jsii::Type.check_type(@retention_period_hours, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "retentionPeriodHours") unless @retention_period_hours.nil?
  @shard_count = shard_count
  Jsii::Type.check_type(@shard_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "shardCount") unless @shard_count.nil?
  @stream_encryption = stream_encryption.is_a?(Hash) ? ::AWSCDK::Kinesis::CfnStream::StreamEncryptionProperty.new(**stream_encryption.transform_keys(&:to_sym)) : stream_encryption
  Jsii::Type.check_type(@stream_encryption, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19raW5lc2lzLkNmblN0cmVhbS5TdHJlYW1FbmNyeXB0aW9uUHJvcGVydHkifV19fQ==")), "streamEncryption") unless @stream_encryption.nil?
  @stream_mode_details = stream_mode_details.is_a?(Hash) ? ::AWSCDK::Kinesis::CfnStream::StreamModeDetailsProperty.new(**stream_mode_details.transform_keys(&:to_sym)) : stream_mode_details
  Jsii::Type.check_type(@stream_mode_details, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19raW5lc2lzLkNmblN0cmVhbS5TdHJlYW1Nb2RlRGV0YWlsc1Byb3BlcnR5In1dfX0=")), "streamModeDetails") unless @stream_mode_details.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
  @warm_throughput_mi_bps = warm_throughput_mi_bps
  Jsii::Type.check_type(@warm_throughput_mi_bps, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "warmThroughputMiBps") unless @warm_throughput_mi_bps.nil?
end

Instance Attribute Details

#desired_shard_level_metricsArray<String>? (readonly)

A list of shard-level metrics in properties to enable enhanced monitoring mode.



43
44
45
# File 'kinesis/cfn_stream_props.rb', line 43

def desired_shard_level_metrics
  @desired_shard_level_metrics
end

#max_record_size_in_kibNumeric? (readonly)

The maximum record size of a single record in kibibyte (KiB) that you can write to, and read from a stream.



48
49
50
# File 'kinesis/cfn_stream_props.rb', line 48

def max_record_size_in_kib
  @max_record_size_in_kib
end

#nameString? (readonly)

The name of the Kinesis stream.

If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the stream name. For more information, see Name Type .

If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.



57
58
59
# File 'kinesis/cfn_stream_props.rb', line 57

def name
  @name
end

#retention_period_hoursNumeric? (readonly)

The number of hours for the data records that are stored in shards to remain accessible.

The default value is 24. For more information about the stream retention period, see Changing the Data Retention Period in the Amazon Kinesis Developer Guide.



64
65
66
# File 'kinesis/cfn_stream_props.rb', line 64

def retention_period_hours
  @retention_period_hours
end

#shard_countNumeric? (readonly)

The number of shards that the stream uses.

For greater provisioned throughput, increase the number of shards.



71
72
73
# File 'kinesis/cfn_stream_props.rb', line 71

def shard_count
  @shard_count
end

#stream_encryptionAWSCDK::IResolvable, ... (readonly)

When specified, enables or updates server-side encryption using an AWS KMS key for a specified stream.

Removing this property from your stack template and updating your stack disables encryption.



78
79
80
# File 'kinesis/cfn_stream_props.rb', line 78

def stream_encryption
  @stream_encryption
end

#stream_mode_detailsAWSCDK::IResolvable, ... (readonly)

Specifies the capacity mode to which you want to set your data stream.

Currently, in Kinesis Data Streams, you can choose between an on-demand capacity mode and a provisioned capacity mode for your data streams.



85
86
87
# File 'kinesis/cfn_stream_props.rb', line 85

def stream_mode_details
  @stream_mode_details
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An arbitrary set of tags (key–value pairs) to associate with the Kinesis stream.

For information about constraints for this property, see Tag Restrictions in the Amazon Kinesis Developer Guide .



92
93
94
# File 'kinesis/cfn_stream_props.rb', line 92

def tags
  @tags
end

#warm_throughput_mi_bpsNumeric? (readonly)

The target warm throughput in MB/s that the stream should be scaled to handle.

This represents the throughput capacity that will be immediately available for write operations.



99
100
101
# File 'kinesis/cfn_stream_props.rb', line 99

def warm_throughput_mi_bps
  @warm_throughput_mi_bps
end

Class Method Details

.jsii_propertiesObject



101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'kinesis/cfn_stream_props.rb', line 101

def self.jsii_properties
  {
    :desired_shard_level_metrics => "desiredShardLevelMetrics",
    :max_record_size_in_kib => "maxRecordSizeInKiB",
    :name => "name",
    :retention_period_hours => "retentionPeriodHours",
    :shard_count => "shardCount",
    :stream_encryption => "streamEncryption",
    :stream_mode_details => "streamModeDetails",
    :tags => "tags",
    :warm_throughput_mi_bps => "warmThroughputMiBps",
  }
end

Instance Method Details

#to_jsiiObject



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'kinesis/cfn_stream_props.rb', line 115

def to_jsii
  result = {}
  result.merge!({
    "desiredShardLevelMetrics" => @desired_shard_level_metrics,
    "maxRecordSizeInKiB" => @max_record_size_in_kib,
    "name" => @name,
    "retentionPeriodHours" => @retention_period_hours,
    "shardCount" => @shard_count,
    "streamEncryption" => @stream_encryption,
    "streamModeDetails" => @stream_mode_details,
    "tags" => @tags,
    "warmThroughputMiBps" => @warm_throughput_mi_bps,
  })
  result.compact
end