Skip to content
Docs Try Aspire

AzureAppServiceComputeResourceExtensions Methods

Class Methods 1 member
Provides extension methods for publishing compute resources as Azure App Service websites.
PublishAsAzureAppServiceWebsite(IResourceBuilder<T>, Action<AzureResourceInfrastructure, WebSite>, Action<AzureResourceInfrastructure, WebSiteSlot>) Section titled PublishAsAzureAppServiceWebsite(IResourceBuilder<T>, Action<AzureResourceInfrastructure, WebSite>, Action<AzureResourceInfrastructure, WebSiteSlot>) extension IResourceBuilder<T>
Publishes the specified compute resource as an Azure App Service or Azure App Service Slot.
public static class AzureAppServiceComputeResourceExtensions
{
public static IResourceBuilder<T> PublishAsAzureAppServiceWebsite<T>(
this IResourceBuilder<T> builder,
Action<AzureResourceInfrastructure, WebSite>? configure = null,
Action<AzureResourceInfrastructure, WebSiteSlot>? configureSlot = null)
{
// ...
}
}
builder IResourceBuilder<T> The compute resource builder.
configure Action<AzureResourceInfrastructure, WebSite> optional The configuration action for the App Service WebSite resource.
configureSlot Action<AzureResourceInfrastructure, WebSiteSlot> optional The configuration action for the App Service WebSite Slot resource.
IResourceBuilder<T> The updated compute resource builder.
builder.AddProject<Projects.Api>(
"name").PublishAsAzureAppServiceWebsite((infrastructure, app) =>
{
// Configure the App Service WebSite resource here
});