Class: AWSCDK::Events::CfnRule::KinesisParametersProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
events/cfn_rule.rb

Overview

This object enables you to specify a JSON path to extract from the event and use as the partition key for the Amazon Kinesis data stream, so that you can control the shard to which the event goes.

If you do not include this parameter, the default is to use the event_id as the partition key.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(partition_key_path:) ⇒ KinesisParametersProperty

Returns a new instance of KinesisParametersProperty.

Parameters:

  • partition_key_path (String)

    The JSON path to be extracted from the event and used as the partition key.



1326
1327
1328
1329
# File 'events/cfn_rule.rb', line 1326

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

Instance Attribute Details

#partition_key_pathString (readonly)

The JSON path to be extracted from the event and used as the partition key.

For more information, see Amazon Kinesis Streams Key Concepts in the Amazon Kinesis Streams Developer Guide .



1337
1338
1339
# File 'events/cfn_rule.rb', line 1337

def partition_key_path
  @partition_key_path
end

Class Method Details

.jsii_propertiesObject



1339
1340
1341
1342
1343
# File 'events/cfn_rule.rb', line 1339

def self.jsii_properties
  {
    :partition_key_path => "partitionKeyPath",
  }
end

Instance Method Details

#to_jsiiObject



1345
1346
1347
1348
1349
1350
1351
# File 'events/cfn_rule.rb', line 1345

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