Skip to content
v2.278.0

RewriteConfigProperty Struct ​

Information about a rewrite transform.

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

Example ​

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
# 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
// 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();
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"
};
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 ​

regexstringregexstrregexStringRegexstringRegex*string required #
The regular expression to match in the input string.

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

replacestringreplacestrreplaceStringReplacestringReplace*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).