Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

KubernetesIngressResource.WithHostname

Method
📦 Aspire.Hosting.Kubernetes v13.6.5-preview.1.26559.7
type KubernetesIngressResource interface {
// ... omitted for brevity
WithHostname(hostname string) KubernetesIngressResource
}

Signature

methodWithHostnamebuilder
Adds a hostname that this ingress matches. Multiple hostnames can be added by calling this method repeatedly. Path rules without an explicit host apply to each configured hostname. If no hostnames are configured, those rules match all hosts.
WithHostname(hostname string) KubernetesIngressResource
hostnamestringThe hostname to match (e.g., "api.example.com").
KubernetesIngressResource

The resource builder.

Returns a handle; failures surface later via Err().

Defined on

This method is defined on the following type: