# RewriteConfigProperty

Information about a rewrite transform.

This transform matches a pattern and replaces it with the specified string.

- Source: Generated at build time
- Type last changed: v2.221.0 · 24 Oct 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_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';
const rewriteConfigProperty: elbv2.CfnListenerRule.RewriteConfigProperty = {
  regex: 'regex',
  replace: 'replace',
};
```

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_elasticloadbalancingv2 as elbv2

rewrite_config_property = elbv2.CfnListenerRule.RewriteConfigProperty(
    regex="regex",
    replace="replace"
)
```

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

RewriteConfigProperty rewriteConfigProperty = RewriteConfigProperty.builder()
        .regex("regex")
        .replace("replace")
        .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.ElasticLoadBalancingV2;

var rewriteConfigProperty = new RewriteConfigProperty {
    Regex = "regex",
    Replace = "replace"
};
```

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"

rewriteConfigProperty := &RewriteConfigProperty{
	Regex: jsii.String("regex"),
	Replace: jsii.String("replace"),
}
```

## Properties

- `regex`: string (required) — The regular expression to match in the input string.

  The maximum length of the string is 1,024 characters.

- `replace`: string (required) — The replacement string to use when rewriting the matched input.

  The maximum length of the string is 1,024 characters. You can specify capture groups in the regular expression (for example, $1 and $2).
