Skip to content
DocsTry Aspire
DocsTry

ExternalServiceResource Constructors

ClassConstructors2 members
Represents an external service resource with service discovery capabilities.
Creates a new instance of ExternalServiceResource with a specified name and URI.
public sealed class ExternalServiceResource
{
public ExternalServiceResource(
string name,
Uri uri)
{
// ...
}
}
namestringThe name of the resource.
uriUriThe URI for the external service.
The URI must be an absolute URI with the absolute path ending with '/'. The URI cannot contain a fragment or query string.
Constructor(string, ParameterResource)Section titled Constructor(string, ParameterResource)
Creates a new instance of ExternalServiceResource with a specified name and URL parameter.
public sealed class ExternalServiceResource
{
public ExternalServiceResource(
string name,
ParameterResource urlParameter)
{
// ...
}
}
namestringThe name of the resource.
urlParameterParameterResourceThe parameter to use for the URL of the external service.