HttpGatewayRouteMatchProperty Struct
An object that represents the criteria for determining a request match.
| Source | |
|---|---|
| Type last changed |
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 httpGatewayRouteMatchProperty: appmesh.CfnGatewayRoute.HttpGatewayRouteMatchProperty = {
headers: [{
name: 'name',
// the properties below are optional
invert: false,
match: {
exact: 'exact',
prefix: 'prefix',
range: {
end: 123,
start: 123,
},
regex: 'regex',
suffix: 'suffix',
},
}],
hostname: {
exact: 'exact',
suffix: 'suffix',
},
method: 'method',
path: {
exact: 'exact',
regex: 'regex',
},
port: 123,
prefix: 'prefix',
queryParameters: [{
name: 'name',
// the properties below are optional
match: {
exact: 'exact',
},
}],
};
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
http_gateway_route_match_property = appmesh.CfnGatewayRoute.HttpGatewayRouteMatchProperty(
headers=[appmesh.CfnGatewayRoute.HttpGatewayRouteHeaderProperty(
name="name",
# the properties below are optional
invert=False,
match=appmesh.CfnGatewayRoute.HttpGatewayRouteHeaderMatchProperty(
exact="exact",
prefix="prefix",
range=appmesh.CfnGatewayRoute.GatewayRouteRangeMatchProperty(
end=123,
start=123
),
regex="regex",
suffix="suffix"
)
)],
hostname=appmesh.CfnGatewayRoute.GatewayRouteHostnameMatchProperty(
exact="exact",
suffix="suffix"
),
method="method",
path=appmesh.CfnGatewayRoute.HttpPathMatchProperty(
exact="exact",
regex="regex"
),
port=123,
prefix="prefix",
query_parameters=[appmesh.CfnGatewayRoute.QueryParameterProperty(
name="name",
# the properties below are optional
match=appmesh.CfnGatewayRoute.HttpQueryParameterMatchProperty(
exact="exact"
)
)]
)
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.*;
HttpGatewayRouteMatchProperty httpGatewayRouteMatchProperty = HttpGatewayRouteMatchProperty.builder()
.headers(List.of(HttpGatewayRouteHeaderProperty.builder()
.name("name")
// the properties below are optional
.invert(false)
.match(HttpGatewayRouteHeaderMatchProperty.builder()
.exact("exact")
.prefix("prefix")
.range(GatewayRouteRangeMatchProperty.builder()
.end(123)
.start(123)
.build())
.regex("regex")
.suffix("suffix")
.build())
.build()))
.hostname(GatewayRouteHostnameMatchProperty.builder()
.exact("exact")
.suffix("suffix")
.build())
.method("method")
.path(HttpPathMatchProperty.builder()
.exact("exact")
.regex("regex")
.build())
.port(123)
.prefix("prefix")
.queryParameters(List.of(QueryParameterProperty.builder()
.name("name")
// the properties below are optional
.match(HttpQueryParameterMatchProperty.builder()
.exact("exact")
.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 httpGatewayRouteMatchProperty = new HttpGatewayRouteMatchProperty {
Headers = new [] { new HttpGatewayRouteHeaderProperty {
Name = "name",
// the properties below are optional
Invert = false,
Match = new HttpGatewayRouteHeaderMatchProperty {
Exact = "exact",
Prefix = "prefix",
Range = new GatewayRouteRangeMatchProperty {
End = 123,
Start = 123
},
Regex = "regex",
Suffix = "suffix"
}
} },
Hostname = new GatewayRouteHostnameMatchProperty {
Exact = "exact",
Suffix = "suffix"
},
Method = "method",
Path = new HttpPathMatchProperty {
Exact = "exact",
Regex = "regex"
},
Port = 123,
Prefix = "prefix",
QueryParameters = new [] { new QueryParameterProperty {
Name = "name",
// the properties below are optional
Match = new HttpQueryParameterMatchProperty {
Exact = "exact"
}
} }
};
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"
httpGatewayRouteMatchProperty := &HttpGatewayRouteMatchProperty{
Headers: []interface{}{
&HttpGatewayRouteHeaderProperty{
Name: jsii.String("name"),
// the properties below are optional
Invert: jsii.Boolean(false),
Match: &HttpGatewayRouteHeaderMatchProperty{
Exact: jsii.String("exact"),
Prefix: jsii.String("prefix"),
Range: &GatewayRouteRangeMatchProperty{
End: jsii.Number(123),
Start: jsii.Number(123),
},
Regex: jsii.String("regex"),
Suffix: jsii.String("suffix"),
},
},
},
Hostname: &GatewayRouteHostnameMatchProperty{
Exact: jsii.String("exact"),
Suffix: jsii.String("suffix"),
},
Method: jsii.String("method"),
Path: &HttpPathMatchProperty{
Exact: jsii.String("exact"),
Regex: jsii.String("regex"),
},
Port: jsii.Number(123),
Prefix: jsii.String("prefix"),
QueryParameters: []interface{}{
&QueryParameterProperty{
Name: jsii.String("name"),
// the properties below are optional
Match: &HttpQueryParameterMatchProperty{
Exact: jsii.String("exact"),
},
},
},
}
Properties
headersoptionalIResolvable | IResolvable | CfnGatewayRoute.headersoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, HttpGatewayRouteHeaderProperty]]]headersoptionalIResolvableHeadersoptionalIResolvableHeadersoptionalinterface{} #The client request headers to match on.
hostnameoptionalIResolvable | CfnGatewayRoute.hostnameoptionaltyping.Union[IResolvable, GatewayRouteHostnameMatchProperty]hostnameoptionalIResolvableHostnameoptionalIResolvableHostnameoptionalinterface{} #The host name to match on.
methodoptionalstringmethodoptionalstrmethodoptionalStringMethodoptionalstringMethodoptional*string #The method to match on.
pathoptionalIResolvable | CfnGatewayRoute.pathoptionaltyping.Union[IResolvable, HttpPathMatchProperty]pathoptionalIResolvablePathoptionalIResolvablePathoptionalinterface{} #The path to match on.
The port number to match on.
prefixoptionalstringprefixoptionalstrprefixoptionalStringPrefixoptionalstringPrefixoptional*string #Specifies the path to match requests with.
notes
This parameter must always start with / , which by itself matches all requests to the virtual service name. You can also match for path-based routing of requests. For example, if your virtual service name is my-service.local and you want the route to match requests to my-service.local/metrics , your prefix should be /metrics .
queryParametersoptionalIResolvable | IResolvable | CfnGatewayRoute.query_parametersoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, QueryParameterProperty]]]queryParametersoptionalIResolvableQueryParametersoptionalIResolvableQueryParametersoptionalinterface{} #The query parameter to match on.