# RenameKeysProperty

Use this processor to rename keys in a log event.

For more information about this processor including examples, see renameKeys in the CloudWatch Logs User Guide.

- Source: [`aws-logs/lib/transformer.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-logs/lib/transformer.ts#L490)
- Type last changed: v2.207.0 · 24 Jul 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 renameKeysProperty: logs.RenameKeysProperty = {
  entries: [{
    key: 'key',
    renameTo: 'renameTo',

    // 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

rename_keys_property = logs.RenameKeysProperty(
    entries=[logs.RenameKeyEntryProperty(
        key="key",
        rename_to="renameTo",

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

RenameKeysProperty renameKeysProperty = RenameKeysProperty.builder()
        .entries(List.of(RenameKeyEntryProperty.builder()
                .key("key")
                .renameTo("renameTo")

                // the properties below are optional
                .overwriteIfExists(false)
                .build()))
        .build();
```

C# / .NET:

```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 renameKeysProperty = new RenameKeysProperty {
    Entries = new [] { new RenameKeyEntryProperty {
        Key = "key",
        RenameTo = "renameTo",

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

Golang:

```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"

renameKeysProperty := &RenameKeysProperty{
	Entries: []RenameKeyEntryProperty{
		&RenameKeyEntryProperty{
			Key: jsii.String("key"),
			RenameTo: jsii.String("renameTo"),

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

## Properties

- `entries`: [RenameKeyEntryProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.RenameKeyEntryProperty.html)[] (required) — An array of RenameKeyEntry objects, where each object contains information about one key to rename.
