# KafkaActionHeaderProperty

Struct · External

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.

- Source: Generated at build time
- Type last changed: v2.103.0 · 26 Oct 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iot as iot } from 'aws-cdk-lib';
const kafkaActionHeaderProperty: iot.CfnTopicRule.KafkaActionHeaderProperty = {
  key: 'key',
  value: 'value',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot

kafka_action_header_property = iot.CfnTopicRule.KafkaActionHeaderProperty(
    key="key",
    value="value"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iot.*;

KafkaActionHeaderProperty kafkaActionHeaderProperty = KafkaActionHeaderProperty.builder()
        .key("key")
        .value("value")
        .build();
```

C#:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoT;

var kafkaActionHeaderProperty = new KafkaActionHeaderProperty {
    Key = "key",
    Value = "value"
};
```

Go:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

kafkaActionHeaderProperty := &KafkaActionHeaderProperty{
	Key: jsii.String("key"),
	Value: jsii.String("value"),
}
```

## Properties

- `key`: string (required) — The key of the Kafka header.

- `value`: string (required) — The value of the Kafka header.
