Skip to content
Docs Try Aspire
Docs Try

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

method withGatewayPathRoute builder
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
path string
endpoint EndpointReference
pathType GatewayPathMatchType optional = PathPrefix
KubernetesGatewayResource

Applies to

This method applies to the following types: