Watch Aspire live streamsDocsTry Aspire
Watch Aspire live streamsDocsTry

KubernetesGatewayResource.withGatewayPathRoute

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

Signature

methodwithGatewayPathRoutebuilder
Adds a path-based routing rule to the gateway. The rule matches each hostname configured with `WithHostname`, or all hosts when no hostname is configured, and routes matching traffic to the endpoint's backing Kubernetes service. This generates an `HTTPRoute` resource attached to the Gateway.
withGatewayPathRoute(
path: string,
endpoint: EndpointReference,
pathType?: GatewayPathMatchType): KubernetesGatewayResource
pathstring
endpointEndpointReference
pathTypeGatewayPathMatchTypeoptional= PathPrefix
KubernetesGatewayResource

Defined on

This method is defined on the following type: