Skip to content
v2.277.0

HeaderMatchConfig Struct ​

Configuration for HeaderMatch.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appmesh as appmesh } from 'aws-cdk-lib';
const headerMatchConfig: appmesh.HeaderMatchConfig = {
  headerMatch: {
    name: 'name',

    // the properties below are optional
    invert: false,
    match: {
      exact: 'exact',
      prefix: 'prefix',
      range: {
        end: 123,
        start: 123,
      },
      regex: 'regex',
      suffix: 'suffix',
    },
  },
};
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_appmesh as appmesh

header_match_config = appmesh.HeaderMatchConfig(
    header_match=appmesh.CfnRoute.HttpRouteHeaderProperty(
        name="name",

        # the properties below are optional
        invert=False,
        match=appmesh.CfnRoute.HeaderMatchMethodProperty(
            exact="exact",
            prefix="prefix",
            range=appmesh.CfnRoute.MatchRangeProperty(
                end=123,
                start=123
            ),
            regex="regex",
            suffix="suffix"
        )
    )
)
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.appmesh.*;

HeaderMatchConfig headerMatchConfig = HeaderMatchConfig.builder()
        .headerMatch(HttpRouteHeaderProperty.builder()
                .name("name")

                // the properties below are optional
                .invert(false)
                .match(HeaderMatchMethodProperty.builder()
                        .exact("exact")
                        .prefix("prefix")
                        .range(MatchRangeProperty.builder()
                                .end(123)
                                .start(123)
                                .build())
                        .regex("regex")
                        .suffix("suffix")
                        .build())
                .build())
        .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.AppMesh;

var headerMatchConfig = new HeaderMatchConfig {
    HeaderMatch = new HttpRouteHeaderProperty {
        Name = "name",

        // the properties below are optional
        Invert = false,
        Match = new HeaderMatchMethodProperty {
            Exact = "exact",
            Prefix = "prefix",
            Range = new MatchRangeProperty {
                End = 123,
                Start = 123
            },
            Regex = "regex",
            Suffix = "suffix"
        }
    }
};
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"

headerMatchConfig := &HeaderMatchConfig{
	HeaderMatch: &HttpRouteHeaderProperty{
		Name: jsii.String("name"),

		// the properties below are optional
		Invert: jsii.Boolean(false),
		Match: &HeaderMatchMethodProperty{
			Exact: jsii.String("exact"),
			Prefix: jsii.String("prefix"),
			Range: &MatchRangeProperty{
				End: jsii.Number(123),
				Start: jsii.Number(123),
			},
			Regex: jsii.String("regex"),
			Suffix: jsii.String("suffix"),
		},
	},
}

Properties ​

Route CFN configuration for the route header match.