Class HttpRoutePathMatch
Defines HTTP route matching based on the URL path of the request.
Inheritance
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.AWS.AppMesh.dll
Syntax (csharp)
public abstract class HttpRoutePathMatch : DeputyBase
Syntax (vb)
Public MustInherit Class HttpRoutePathMatch
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
VirtualRouter router;
VirtualNode node;
router.AddRoute("route-http", new RouteBaseProps {
RouteSpec = RouteSpec.Http(new HttpRouteSpecOptions {
WeightedTargets = new [] { new WeightedTarget {
VirtualNode = node,
Weight = 50
}, new WeightedTarget {
VirtualNode = node,
Weight = 50
} },
Match = new HttpRouteMatch {
Path = HttpRoutePathMatch.StartsWith("/path-to-app")
}
})
});
Synopsis
Constructors
HttpRoutePathMatch() | |
HttpRoutePathMatch(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
HttpRoutePathMatch(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct) | Returns the route path match configuration. |
Exactly(String) | The value of the path must match the specified value exactly. |
Regex(String) | The value of the path must match the specified regex. |
StartsWith(String) | The value of the path must match the specified prefix. |
Constructors
HttpRoutePathMatch()
protected HttpRoutePathMatch()
HttpRoutePathMatch(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected HttpRoutePathMatch(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
HttpRoutePathMatch(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected HttpRoutePathMatch(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(Construct)
Returns the route path match configuration.
public abstract IHttpRoutePathMatchConfig Bind(Construct scope)
Parameters
- scope Construct
Returns
Exactly(String)
The value of the path must match the specified value exactly.
public static HttpRoutePathMatch Exactly(string path)
Parameters
- path System.String
the exact path to match on.
Returns
Remarks
The provided path
must start with the '/' character.
Regex(String)
The value of the path must match the specified regex.
public static HttpRoutePathMatch Regex(string regex)
Parameters
- regex System.String
the regex used to match the path.
Returns
StartsWith(String)
The value of the path must match the specified prefix.
public static HttpRoutePathMatch StartsWith(string prefix)
Parameters
- prefix System.String
the value to use to match the beginning of the path part of the URL of the request.
Returns