# SubstituteStringEntryProperty

Struct · External

This object defines one log field key that will be replaced using the [substituteString](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-substituteString) processor.

- 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 substituteStringEntryProperty: logs.CfnTransformer.SubstituteStringEntryProperty = {
  from: 'from',
  source: 'source',
  to: 'to',
};
```

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

substitute_string_entry_property = logs.CfnTransformer.SubstituteStringEntryProperty(
    from="from",
    source="source",
    to="to"
)
```

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

SubstituteStringEntryProperty substituteStringEntryProperty = SubstituteStringEntryProperty.builder()
        .from("from")
        .source("source")
        .to("to")
        .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 substituteStringEntryProperty = new SubstituteStringEntryProperty {
    From = "from",
    Source = "source",
    To = "to"
};
```

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"

substituteStringEntryProperty := &SubstituteStringEntryProperty{
	From: jsii.String("from"),
	Source: jsii.String("source"),
	To: jsii.String("to"),
}
```

## Properties

- `from`: string (required) — The regular expression string to be replaced.

  Special regex characters such as [ and ] must be escaped using \\ when using double quotes and with \ when using single quotes. For more information, see [Class Pattern](https://docs.aws.amazon.com/https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html) on the Oracle web site.

- `source`: string (required) — The key to modify.

- `to`: string (required) — The string to be substituted for each match of `from`.
