# TrimStringProperty

Struct · External

Use this processor to remove leading and trailing whitespace.

For more information about this processor including examples, see [trimString](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-trimString) 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 trimStringProperty: logs.CfnTransformer.TrimStringProperty = {
  withKeys: ['withKeys'],
};
```

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

trim_string_property = logs.CfnTransformer.TrimStringProperty(
    with_keys=["withKeys"]
)
```

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

TrimStringProperty trimStringProperty = TrimStringProperty.builder()
        .withKeys(List.of("withKeys"))
        .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 trimStringProperty = new TrimStringProperty {
    WithKeys = new [] { "withKeys" }
};
```

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"

trimStringProperty := &TrimStringProperty{
	WithKeys: []*string{
		jsii.String("withKeys"),
	},
}
```

## Properties

- `withKeys`: string[] (required) — The array containing the keys of the fields to trim.
