Skip to content
Docs Try Aspire

DevTunnelsResourceBuilderExtensions

Class static net10.0
📦 Aspire.Hosting.DevTunnels v13.1.2
Provides extension methods for adding dev tunnels resources to an Hosting.IDistributedApplicationBuilder.
namespace Aspire.Hosting;
public static class DevTunnelsResourceBuilderExtensions
{
// ...
}
AddDevTunnel(IDistributedApplicationBuilder, string, string?, DevTunnelOptions?)extension
IResourceBuilder<DevTunnelResource>
Adds a dev tunnel resource to the application model.
GetEndpoint(IResourceBuilder<DevTunnelResource>, IResourceBuilder<TResource>, string)extension
EndpointReference
Gets the tunnel endpoint reference for the specified target resource and endpoint.
GetEndpoint(IResourceBuilder<DevTunnelResource>, IResource, string)extension
EndpointReference
Gets the tunnel endpoint reference for the specified target resource and endpoint.
GetEndpoint(IResourceBuilder<DevTunnelResource>, EndpointReference)extension
EndpointReference
Gets the tunnel endpoint reference for the specified target endpoint.
WithAnonymousAccess(IResourceBuilder<DevTunnelResource>)extension
IResourceBuilder<DevTunnelResource>
Allows the tunnel to be publicly accessed without authentication.
WithReference(IResourceBuilder<DevTunnelResource>, IResourceBuilder<TResource>, bool)extension
IResourceBuilder<DevTunnelResource>
Adds ports on the dev tunnel for all endpoints found on the referenced resource and sets whether anonymous access is allowed.
WithReference(IResourceBuilder<DevTunnelResource>, IResourceBuilder<TResource>, DevTunnelPortOptions?)extension
IResourceBuilder<DevTunnelResource>
Adds ports on the dev tunnel for all endpoints found on the referenced resource.
WithReference(IResourceBuilder<DevTunnelResource>, EndpointReference)extension
IResourceBuilder<DevTunnelResource>
Exposes the specified endpoint via the dev tunnel.
WithReference(IResourceBuilder<DevTunnelResource>, EndpointReference, bool)extension
IResourceBuilder<DevTunnelResource>
Exposes the specified endpoint via the dev tunnel and sets whether anonymous access is allowed.
WithReference(IResourceBuilder<DevTunnelResource>, EndpointReference, DevTunnelPortOptions?)extension
IResourceBuilder<DevTunnelResource>
Exposes the specified endpoint via the dev tunnel.
WithReference(IResourceBuilder<TResource>, IResourceBuilder<IResourceWithEndpoints>, IResourceBuilder<DevTunnelResource>)extension
IResourceBuilder<TResource>
Injects service discovery and endpoint information as environment variables from the dev tunnel resource into the destination resource, using the tunneled resource's name as the service name. Each endpoint defined on the target resource will be injected using the format defined by the ApplicationModel.ReferenceEnvironmentInjectionAnnotation on the destination resource, i.e. either "services__{sourceResourceName}__{endpointName}__{endpointIndex}={uriString}" for .NET service discovery, or "{RESOURCE_ENDPOINT}={uri}" for endpoint injection.
View all methods