Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithUrlForEndpoint

Method
📦 Aspire.Hosting v17.0.0
func (Resource) WithUrlForEndpoint(
endpointName string,
callback func(obj *ResourceUrlAnnotation),
) Resource

Signature

methodWithUrlForEndpointbuilder
Registers a callback to update the URL displayed for the endpoint with the specified name.
WithUrlForEndpoint(
endpointName string,
callback func(obj *ResourceUrlAnnotation),
) Resource
endpointNamestringThe name of the endpoint to customize the URL for.
callbackfunc(obj *ResourceUrlAnnotation)callbackThe callback that will customize the URL.
Resource

The resource builder.

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

Applies to

This method applies to the following types: