# AddKeysProperty

Struct · External

This processor adds new key-value pairs to the log event.

For more information about this processor including examples, see [addKeys](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-addKeys) in the *CloudWatch Logs User Guide* .

- Source: Generated at build time
- Type last changed: v2.174.0 · 4 Jan 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_logs as logs } from 'aws-cdk-lib';
const addKeysProperty: logs.CfnTransformer.AddKeysProperty = {
  entries: [{
    key: 'key',
    value: 'value',

    // the properties below are optional
    overwriteIfExists: false,
  }],
};
```

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_logs as logs

add_keys_property = logs.CfnTransformer.AddKeysProperty(
    entries=[logs.CfnTransformer.AddKeyEntryProperty(
        key="key",
        value="value",

        # the properties below are optional
        overwrite_if_exists=False
    )]
)
```

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.logs.*;

AddKeysProperty addKeysProperty = AddKeysProperty.builder()
        .entries(List.of(AddKeyEntryProperty.builder()
                .key("key")
                .value("value")

                // the properties below are optional
                .overwriteIfExists(false)
                .build()))
        .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.Logs;

var addKeysProperty = new AddKeysProperty {
    Entries = new [] { new AddKeyEntryProperty {
        Key = "key",
        Value = "value",

        // the properties below are optional
        OverwriteIfExists = false
    } }
};
```

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"

addKeysProperty := &AddKeysProperty{
	Entries: []interface{}{
		&AddKeyEntryProperty{
			Key: jsii.String("key"),
			Value: jsii.String("value"),

			// the properties below are optional
			OverwriteIfExists: jsii.Boolean(false),
		},
	},
}
```

## Properties

- `entries`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTransformer.AddKeyEntryProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.CfnTransformer.AddKeyEntryProperty.html)[] (required) — An array of objects, where each object contains the information about one key to add to the log event.
