Skip to content
DocsTry Aspire
DocsTry

withGatewayPathRoute

Method
📦 Aspire.Hosting.Kubernetes v13.4.0-preview.1.26281.18
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 all hosts and routes traffic matching the specified path to the given 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

Applies to

This method applies to the following types: