Class: AWSCDK::IoT::CfnTopicRule::KafkaActionHeaderProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t/cfn_topic_rule.rb

Overview

Specifies a Kafka header using key-value pairs when you create a Rule’s Kafka Action.

You can use these headers to route data from IoT clients to downstream Kafka clusters without modifying your message payload.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, value:) ⇒ KafkaActionHeaderProperty

Returns a new instance of KafkaActionHeaderProperty.

Parameters:

  • key (String)

    The key of the Kafka header.

  • value (String)

    The value of the Kafka header.



1909
1910
1911
1912
1913
1914
# File 'io_t/cfn_topic_rule.rb', line 1909

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

Instance Attribute Details

#keyString (readonly)

The key of the Kafka header.



1920
1921
1922
# File 'io_t/cfn_topic_rule.rb', line 1920

def key
  @key
end

#valueString (readonly)

The value of the Kafka header.



1925
1926
1927
# File 'io_t/cfn_topic_rule.rb', line 1925

def value
  @value
end

Class Method Details

.jsii_propertiesObject



1927
1928
1929
1930
1931
1932
# File 'io_t/cfn_topic_rule.rb', line 1927

def self.jsii_properties
  {
    :key => "key",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



1934
1935
1936
1937
1938
1939
1940
1941
# File 'io_t/cfn_topic_rule.rb', line 1934

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