Skip to content
Docs Try Aspire

DevTunnelsResourceBuilderExtensions

Class static net8.0
📦 Aspire.Hosting.DevTunnels v13.2.0
Provides extension methods for adding dev tunnels resources to an Hosting.IDistributedApplicationBuilder.
namespace Aspire.Hosting;
public static class DevTunnelsResourceBuilderExtensions
{
// ...
}
AddDevTunnel(IDistributedApplicationBuilder, string, string?, DevTunnelOptions?)extensionats ignored
IResourceBuilder<DevTunnelResource>
Adds a dev tunnel resource to the application model.
GetEndpoint(IResourceBuilder<DevTunnelResource>, IResourceBuilder<TResource>, string)extensionats ignored
EndpointReference
Gets the tunnel endpoint reference for the specified target resource and endpoint.
GetEndpoint(IResourceBuilder<DevTunnelResource>, IResource, string)extensionats ignored
EndpointReference
Gets the tunnel endpoint reference for the specified target resource and endpoint.
GetEndpoint(IResourceBuilder<DevTunnelResource>, EndpointReference)extensionats export
EndpointReference
Gets the tunnel endpoint reference for the specified target endpoint.
WithAnonymousAccess(IResourceBuilder<DevTunnelResource>)extensionats export
IResourceBuilder<DevTunnelResource>
Allows the tunnel to be publicly accessed without authentication.
WithReference(IResourceBuilder<DevTunnelResource>, IResourceBuilder<TResource>, bool)extensionats export
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?)extensionats ignored
IResourceBuilder<DevTunnelResource>
Adds ports on the dev tunnel for all endpoints found on the referenced resource.
WithReference(IResourceBuilder<DevTunnelResource>, EndpointReference)extensionats export
IResourceBuilder<DevTunnelResource>
Exposes the specified endpoint via the dev tunnel.
WithReference(IResourceBuilder<DevTunnelResource>, EndpointReference, bool)extensionats export
IResourceBuilder<DevTunnelResource>
Exposes the specified endpoint via the dev tunnel and sets whether anonymous access is allowed.
WithReference(IResourceBuilder<DevTunnelResource>, EndpointReference, DevTunnelPortOptions?)extensionats ignored
IResourceBuilder<DevTunnelResource>
Exposes the specified endpoint via the dev tunnel.
WithReference(IResourceBuilder<TResource>, IResourceBuilder<IResourceWithEndpoints>, IResourceBuilder<DevTunnelResource>)extensionats ignored
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}__{endpointScheme}__{endpointIndex}={uriString}" for .NET service discovery, or "{RESOURCE_ENDPOINT}={uri}" for endpoint injection.
View all methods