Skip to content
v2.275.0

GatewayRouteHostnameMatch Class ​

Used to generate host name matching methods.

Example ​

ts
declare const gateway: appmesh.VirtualGateway;
declare const virtualService: appmesh.VirtualService;

gateway.addGatewayRoute('gateway-route-grpc', {
  routeSpec: appmesh.GatewayRouteSpec.grpc({
    routeTarget: virtualService,
    match: {
      hostname: appmesh.GatewayRouteHostnameMatch.endsWith('.example.com'),
    },
  }),
});

Initializer ​

ts
new GatewayRouteHostnameMatch()
python
GatewayRouteHostnameMatch()
java
new GatewayRouteHostnameMatch()
csharp
new GatewayRouteHostnameMatch()
go
NewGatewayRouteHostnameMatch()

Methods ​

bind(scope: Construct): GatewayRouteHostnameMatchConfigdef bind(self, scope: Construct) -> GatewayRouteHostnameMatchConfigpublic GatewayRouteHostnameMatchConfig bind(Construct scope)public GatewayRouteHostnameMatchConfig Bind(Construct scope)func Bind(Scope Construct) GatewayRouteHostnameMatchConfig#
Returns the gateway route host name match configuration.
endsWith(suffix: string): GatewayRouteHostnameMatch // chainable@staticmethod def ends_with(suffix: str) -> GatewayRouteHostnameMatchpublic static GatewayRouteHostnameMatch endsWith(String suffix)public static GatewayRouteHostnameMatch EndsWith(string suffix)func EndsWith(Suffix *string) GatewayRouteHostnameMatchstatic#
The value of the host name with the given name must end with the specified characters.
1 parameter

Parameters

  • suffixsuffixsuffixsuffixSuffix — The specified ending characters of the host name to match on.
exactly(name: string): GatewayRouteHostnameMatch // chainable@staticmethod def exactly(name: str) -> GatewayRouteHostnameMatchpublic static GatewayRouteHostnameMatch exactly(String name)public static GatewayRouteHostnameMatch Exactly(string name)func Exactly(Name *string) GatewayRouteHostnameMatchstatic#
The value of the host name must match the specified value exactly.
1 parameter

Parameters

  • namenamenamenameName — The exact host name to match on.