次の方法で共有


ResourceBuilderExtensions.WithHttpsEndpoint<T> Method

Definition

Exposes an HTTPS endpoint on a resource. This endpoint reference can be retrieved using GetEndpoint<T>(IResourceBuilder<T>, String). The endpoint name will be "https" if not specified.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> WithHttpsEndpoint<T> (this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, int? port = default, int? targetPort = default, string? name = default, string? env = default, bool isProxied = true) where T : Aspire.Hosting.ApplicationModel.IResourceWithEndpoints;
static member WithHttpsEndpoint : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEndpoints)> * Nullable<int> * Nullable<int> * string * string * bool -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEndpoints)> (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEndpoints)
<Extension()>
Public Function WithHttpsEndpoint(Of T As IResourceWithEndpoints) (builder As IResourceBuilder(Of T), Optional port As Nullable(Of Integer) = Nothing, Optional targetPort As Nullable(Of Integer) = Nothing, Optional name As String = Nothing, Optional env As String = Nothing, Optional isProxied As Boolean = true) As IResourceBuilder(Of T)

Type Parameters

T

The resource type.

Parameters

builder
IResourceBuilder<T>

The resource builder.

port
Nullable<Int32>

An optional host port.

targetPort
Nullable<Int32>

This is the port the resource is listening on. If the endpoint is used for the container, it is the container port.

name
String

An optional name of the endpoint. Defaults to "https" if not specified.

env
String

An optional name of the environment variable to inject.

isProxied
Boolean

Specifies if the endpoint will be proxied by DCP. Defaults to true.

Returns

The IResourceBuilder<T>.

Exceptions

Throws an exception if an endpoint with the same name already exists on the specified resource.

Applies to