Class: AWSCDK::Pipes::CfnPipe::PipeTargetKinesisStreamParametersProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
pipes/cfn_pipe.rb

Overview

The parameters for using a Kinesis stream as a target.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(partition_key:) ⇒ PipeTargetKinesisStreamParametersProperty

Returns a new instance of PipeTargetKinesisStreamParametersProperty.

Parameters:

  • partition_key (String)

    Determines which shard in the stream the data record is assigned to.



3449
3450
3451
3452
# File 'pipes/cfn_pipe.rb', line 3449

def initialize(partition_key:)
  @partition_key = partition_key
  Jsii::Type.check_type(@partition_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "partitionKey")
end

Instance Attribute Details

#partition_keyString (readonly)

Determines which shard in the stream the data record is assigned to.

Partition keys are Unicode strings with a maximum length limit of 256 characters for each key. Amazon Kinesis Data Streams uses the partition key as input to a hash function that maps the partition key and associated data to a specific shard. Specifically, an MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream.



3460
3461
3462
# File 'pipes/cfn_pipe.rb', line 3460

def partition_key
  @partition_key
end

Class Method Details

.jsii_propertiesObject



3462
3463
3464
3465
3466
# File 'pipes/cfn_pipe.rb', line 3462

def self.jsii_properties
  {
    :partition_key => "partitionKey",
  }
end

Instance Method Details

#to_jsiiObject



3468
3469
3470
3471
3472
3473
3474
# File 'pipes/cfn_pipe.rb', line 3468

def to_jsii
  result = {}
  result.merge!({
    "partitionKey" => @partition_key,
  })
  result.compact
end