Class HeaderMatch
Used to generate header matching methods.
Inheritance
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class HeaderMatch : DeputyBase
Syntax (vb)
Public MustInherit Class HeaderMatch
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
VirtualRouter router;
VirtualNode node;
router.AddRoute("route-http2", new RouteBaseProps {
RouteSpec = RouteSpec.Http2(new HttpRouteSpecOptions {
WeightedTargets = new [] { new WeightedTarget {
VirtualNode = node
} },
Match = new HttpRouteMatch {
Path = HttpRoutePathMatch.Exactly("/exact"),
Method = HttpRouteMethod.POST,
Protocol = HttpRouteProtocol.HTTPS,
Headers = new [] { HeaderMatch.ValueIs("Content-Type", "application/json"), HeaderMatch.ValueIsNot("Content-Type", "application/json") },
QueryParameters = new [] { QueryParameterMatch.ValueIs("query-field", "value") }
}
})
});
Synopsis
Constructors
HeaderMatch() | |
HeaderMatch(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
HeaderMatch(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct) | Returns the header match configuration. |
ValueDoesNotEndWith(String, String) | The value of the header with the given name in the request must not end with the specified characters. |
ValueDoesNotMatchRegex(String, String) | The value of the header with the given name in the request must not include the specified characters. |
ValueDoesNotStartWith(String, String) | The value of the header with the given name in the request must not start with the specified characters. |
ValueEndsWith(String, String) | The value of the header with the given name in the request must end with the specified characters. |
ValueIs(String, String) | The value of the header with the given name in the request must match the specified value exactly. |
ValueIsNot(String, String) | The value of the header with the given name in the request must not match the specified value exactly. |
ValueMatchesRegex(String, String) | The value of the header with the given name in the request must include the specified characters. |
ValuesIsInRange(String, Double, Double) | The value of the header with the given name in the request must be in a range of values. |
ValuesIsNotInRange(String, Double, Double) | The value of the header with the given name in the request must not be in a range of values. |
ValueStartsWith(String, String) | The value of the header with the given name in the request must start with the specified characters. |
Constructors
HeaderMatch()
protected HeaderMatch()
HeaderMatch(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected HeaderMatch(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
HeaderMatch(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected HeaderMatch(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(Construct)
Returns the header match configuration.
public abstract IHeaderMatchConfig Bind(Construct scope)
Parameters
- scope Constructs.Construct
Returns
ValueDoesNotEndWith(String, String)
The value of the header with the given name in the request must not end with the specified characters.
public static HeaderMatch ValueDoesNotEndWith(string headerName, string suffix)
Parameters
- headerName System.String
the name of the header to match against.
- suffix System.String
The suffix to test against.
Returns
ValueDoesNotMatchRegex(String, String)
The value of the header with the given name in the request must not include the specified characters.
public static HeaderMatch ValueDoesNotMatchRegex(string headerName, string regex)
Parameters
- headerName System.String
the name of the header to match against.
- regex System.String
The regex to test against.
Returns
ValueDoesNotStartWith(String, String)
The value of the header with the given name in the request must not start with the specified characters.
public static HeaderMatch ValueDoesNotStartWith(string headerName, string prefix)
Parameters
- headerName System.String
the name of the header to match against.
- prefix System.String
The prefix to test against.
Returns
ValueEndsWith(String, String)
The value of the header with the given name in the request must end with the specified characters.
public static HeaderMatch ValueEndsWith(string headerName, string suffix)
Parameters
- headerName System.String
the name of the header to match against.
- suffix System.String
The suffix to test against.
Returns
ValueIs(String, String)
The value of the header with the given name in the request must match the specified value exactly.
public static HeaderMatch ValueIs(string headerName, string headerValue)
Parameters
- headerName System.String
the name of the header to match against.
- headerValue System.String
The exact value to test against.
Returns
ValueIsNot(String, String)
The value of the header with the given name in the request must not match the specified value exactly.
public static HeaderMatch ValueIsNot(string headerName, string headerValue)
Parameters
- headerName System.String
the name of the header to match against.
- headerValue System.String
The exact value to test against.
Returns
ValueMatchesRegex(String, String)
The value of the header with the given name in the request must include the specified characters.
public static HeaderMatch ValueMatchesRegex(string headerName, string regex)
Parameters
- headerName System.String
the name of the header to match against.
- regex System.String
The regex to test against.
Returns
ValuesIsInRange(String, Double, Double)
The value of the header with the given name in the request must be in a range of values.
public static HeaderMatch ValuesIsInRange(string headerName, double start, double end)
Parameters
- headerName System.String
the name of the header to match against.
- start System.Double
Match on values starting at and including this value.
- end System.Double
Match on values up to but not including this value.
Returns
ValuesIsNotInRange(String, Double, Double)
The value of the header with the given name in the request must not be in a range of values.
public static HeaderMatch ValuesIsNotInRange(string headerName, double start, double end)
Parameters
- headerName System.String
the name of the header to match against.
- start System.Double
Match on values starting at and including this value.
- end System.Double
Match on values up to but not including this value.
Returns
ValueStartsWith(String, String)
The value of the header with the given name in the request must start with the specified characters.
public static HeaderMatch ValueStartsWith(string headerName, string prefix)
Parameters
- headerName System.String
the name of the header to match against.
- prefix System.String
The prefix to test against.
Returns