DistributedApplicationHostingTestingExtensions.GetEndpoint Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the endpoint for the specified resource.
public static Uri GetEndpoint (this Aspire.Hosting.DistributedApplication app, string resourceName, string? endpointName = default);
static member GetEndpoint : Aspire.Hosting.DistributedApplication * string * string -> Uri
<Extension()>
Public Function GetEndpoint (app As DistributedApplication, resourceName As String, Optional endpointName As String = Nothing) As Uri
Parameters
The application.
- resourceName
- String
The resource name.
- endpointName
- String
The optional endpoint name. If none are specified, the single defined endpoint is returned.
Returns
A URI representation of the endpoint.
Exceptions
The resource was not found, no matching endpoint was found, or multiple endpoints were found.
The resource has no endpoints.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for