Watch Aspire live streamsDocsTry Aspire
Watch Aspire live streamsDocsTry

KubernetesGatewayResource.withGatewayHostRoute

Method
📦 Aspire.Hosting.Kubernetes v13.6.0-preview.1.26478.8
interface KubernetesGatewayResource {
// ... omitted for brevity
withGatewayHostRoute(
host: string,
path: string,
endpoint: EndpointReference,
pathType?: GatewayPathMatchType): KubernetesGatewayResource;
}

Signature

methodwithGatewayHostRoutebuilder
Adds a host-and-path-based routing rule to the gateway. The rule matches traffic for the specified host and path, routing it to the given endpoint's backing Kubernetes service. This generates an `HTTPRoute` resource with a `hostnames` filter.
withGatewayHostRoute(
host: string,
path: string,
endpoint: EndpointReference,
pathType?: GatewayPathMatchType): KubernetesGatewayResource
hoststring
pathstring
endpointEndpointReference
pathTypeGatewayPathMatchTypeoptional= PathPrefix
KubernetesGatewayResource

Defined on

This method is defined on the following type: