AzureContainerAppExtensions
Class static net8.0
Provides extension methods for customizing Azure Container App definitions for projects.
namespace Aspire.Hosting;
public static class AzureContainerAppExtensions{ // ...} 8 members
Methods8
Section titled MethodsAddAzureContainerAppEnvironment(IDistributedApplicationBuilder, string)extensionats exportIResourceBuilder<AzureContainerAppEnvironmentResource> Adds a container app environment resource to the distributed application builder.
AddAzureContainerAppsInfrastructure(IDistributedApplicationBuilder)extensionobsoleteIDistributedApplicationBuilder Adds the necessary infrastructure for Azure Container Apps to the distributed application builder.
WithAcrPullIdentity(IResourceBuilder<AzureContainerAppEnvironmentResource>, IResourceBuilder<AzureUserAssignedIdentityResource>)extensionats exportIResourceBuilder<AzureContainerAppEnvironmentResource> Configures the container app environment to use the supplied
Azure.AzureUserAssignedIdentityResource as the managed identity that container apps in the environment use to pull images from the configured container registry (the AcrPull identity), instead of having Aspire create a new identity and a new AcrPull role assignment. WithAzdResourceNaming(IResourceBuilder<AzureContainerAppEnvironmentResource>)extensionats exportIResourceBuilder<AzureContainerAppEnvironmentResource> Configures the container app environment resources to use the same naming conventions as azd.
WithAzureLogAnalyticsWorkspace(IResourceBuilder<AzureContainerAppEnvironmentResource>, IResourceBuilder<AzureLogAnalyticsWorkspaceResource>)extensionats exportIResourceBuilder<AzureContainerAppEnvironmentResource> Configures the container app environment resource to use the specified Log Analytics Workspace.
WithCompactResourceNaming(IResourceBuilder<AzureContainerAppEnvironmentResource>)extensionexperimentalats exportIResourceBuilder<AzureContainerAppEnvironmentResource> Configures the container app environment to use compact resource naming that maximally preserves the
uniqueString suffix for length-constrained Azure resources such as storage accounts. WithDashboard(IResourceBuilder<AzureContainerAppEnvironmentResource>, bool)extensionats exportIResourceBuilder<AzureContainerAppEnvironmentResource> Configures whether the Aspire dashboard should be included in the container app environment.
WithHttpsUpgrade(IResourceBuilder<AzureContainerAppEnvironmentResource>, bool)extensionats exportIResourceBuilder<AzureContainerAppEnvironmentResource> Configures whether HTTP endpoints should be upgraded to HTTPS in Azure Container Apps. By default, HTTP endpoints are upgraded to HTTPS for security and WebSocket compatibility.