NgrokExtensions Methods
ClassMethods4 members
Extension methods for adding ngrok to the application model.
AddNgrok(IDistributedApplicationBuilder, string, string?, int?, string?, int?) Section titled AddNgrok(IDistributedApplicationBuilder, string, string?, int?, string?, int?)extensionIResourceBuilder<NgrokResource> Configures a container resource for grok which is pre-configured to connect to the resource that this method is used on.
public static class NgrokExtensions{ public static IResourceBuilder<NgrokResource> AddNgrok( this IDistributedApplicationBuilder builder, string name, string? configurationFolder = null, int? endpointPort = null, string? endpointName = null, int? configurationVersion = null) { // ... }}Parameters
builderIDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder to add the resource to.namestringThe name of the resource.configurationFolder string?optionalThe folder where temporary ngrok configuration files will be stored; defaults to .ngrokendpointPort int?optionalThe port of the endpoint for this resource, defaults to a randomly assigned port.endpointName string?optionalThe name of the endpoint for this resource, defaults to http.configurationVersion int?optionalThe output version of the ngrok configuration file.Returns
IResourceBuilder<NgrokResource> A reference to the ApplicationModel.IResourceBuilder`1 .WithAuthToken(IResourceBuilder<NgrokResource>, string) Section titled WithAuthToken(IResourceBuilder<NgrokResource>, string)extensionIResourceBuilder<NgrokResource> Adds a ngrok auth token to a ngrok resource.
public static class NgrokExtensions{ public static IResourceBuilder<NgrokResource> WithAuthToken( this IResourceBuilder<NgrokResource> builder, string ngrokAuthToken) { // ... }}Parameters
builderIResourceBuilder<NgrokResource> The ngrok resource builder.ngrokAuthToken stringThe ngrok auth token.Returns
IResourceBuilder<NgrokResource> The same reference to ngrok resource builder.WithAuthToken(IResourceBuilder<NgrokResource>, IResourceBuilder<ParameterResource>) Section titled WithAuthToken(IResourceBuilder<NgrokResource>, IResourceBuilder<ParameterResource>)extensionIResourceBuilder<NgrokResource> Adds a ngrok auth token to a ngrok resource.
public static class NgrokExtensions{ public static IResourceBuilder<NgrokResource> WithAuthToken( this IResourceBuilder<NgrokResource> builder, IResourceBuilder<ParameterResource> ngrokAuthToken) { // ... }}Parameters
builderIResourceBuilder<NgrokResource> The ngrok resource builder.ngrokAuthToken IResourceBuilder<ParameterResource> The ngrok auth token as a parameter resource.Returns
IResourceBuilder<NgrokResource> The same reference to ngrok resource builder.WithTunnelEndpoint(IResourceBuilder<NgrokResource>, IResourceBuilder<TResource>, string, string?, IDictionary<string, string>) Section titled WithTunnelEndpoint(IResourceBuilder<NgrokResource>, IResourceBuilder<TResource>, string, string?, IDictionary<string, string>)extensionIResourceBuilder<NgrokResource> Configures a resource with endpoints as a ngrok tunnel endpoint.
public static class NgrokExtensions{ public static IResourceBuilder<NgrokResource> WithTunnelEndpoint<TResource>( this IResourceBuilder<NgrokResource> builder, IResourceBuilder<TResource> resource, string endpointName, string? ngrokUrl = null, IDictionary<string, string>? labels = null) { // ... }}Parameters
builderIResourceBuilder<NgrokResource> The ngrok resource builder.resourceIResourceBuilder<TResource> The resource whose endpoint should be exposed through ngrok.endpointName stringThe endpoint name to expose.ngrokUrl string?optionalThe ngrok URL to use, or null to allow ngrok to choose one.labelsIDictionary<string, string> optionalOptional endpoint labels.Returns
IResourceBuilder<NgrokResource> The same reference to ngrok resource builder.Remarks
This overload is not available in polyglot AppHosts. Use the overload that accepts
Generic.IReadOnlyDictionary`2 labels instead.