# AzureContainerAppExtensions

- Kind: `class`
- Package: [Aspire.Hosting.Azure.AppContainers](/reference/api/csharp/aspire.hosting.azure.appcontainers.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppExtensions.cs)

Provides extension methods for customizing Azure Container App definitions for projects.

## Definition

```csharp
namespace Aspire.Hosting;

public static class AzureContainerAppExtensions
{
    // ...
}
```

## Methods

- [AddAzureContainerAppEnvironment(IDistributedApplicationBuilder, string)](/reference/api/csharp/aspire.hosting.azure.appcontainers/azurecontainerappextensions/methods.md#addazurecontainerappenvironment-idistributedapplicationbuilder-string) : `IResourceBuilder<AzureContainerAppEnvironmentResource>` `extension` `ats export` -- Adds a container app environment resource to the distributed application builder.
- [AddAzureContainerAppsInfrastructure(IDistributedApplicationBuilder)](/reference/api/csharp/aspire.hosting.azure.appcontainers/azurecontainerappextensions/methods.md#addazurecontainerappsinfrastructure-idistributedapplicationbuilder) : `IDistributedApplicationBuilder` `extension` `obsolete` -- Adds the necessary infrastructure for Azure Container Apps to the distributed application builder.
- [WithAcrPullIdentity(IResourceBuilder<AzureContainerAppEnvironmentResource>, IResourceBuilder<AzureUserAssignedIdentityResource>)](/reference/api/csharp/aspire.hosting.azure.appcontainers/azurecontainerappextensions/methods.md#withacrpullidentity-iresourcebuilder-azurecontainerappenvironmentresource-iresourcebuilder-azureuserassignedidentityresource) : `IResourceBuilder<AzureContainerAppEnvironmentResource>` `extension` `ats export` -- 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>)](/reference/api/csharp/aspire.hosting.azure.appcontainers/azurecontainerappextensions/methods.md#withazdresourcenaming-iresourcebuilder-azurecontainerappenvironmentresource) : `IResourceBuilder<AzureContainerAppEnvironmentResource>` `extension` `ats export` -- Configures the container app environment resources to use the same naming conventions as azd.
- [WithAzureLogAnalyticsWorkspace(IResourceBuilder<AzureContainerAppEnvironmentResource>, IResourceBuilder<AzureLogAnalyticsWorkspaceResource>)](/reference/api/csharp/aspire.hosting.azure.appcontainers/azurecontainerappextensions/methods.md#withazureloganalyticsworkspace-iresourcebuilder-azurecontainerappenvironmentresource-iresourcebuilder-azureloganalyticsworkspaceresource) : `IResourceBuilder<AzureContainerAppEnvironmentResource>` `extension` `ats export` -- Configures the container app environment resource to use the specified Log Analytics Workspace.
- [WithCompactResourceNaming(IResourceBuilder<AzureContainerAppEnvironmentResource>)](/reference/api/csharp/aspire.hosting.azure.appcontainers/azurecontainerappextensions/methods.md#withcompactresourcenaming-iresourcebuilder-azurecontainerappenvironmentresource) : `IResourceBuilder<AzureContainerAppEnvironmentResource>` `extension` `experimental` `ats export` -- 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)](/reference/api/csharp/aspire.hosting.azure.appcontainers/azurecontainerappextensions/methods.md#withdashboard-iresourcebuilder-azurecontainerappenvironmentresource-bool) : `IResourceBuilder<AzureContainerAppEnvironmentResource>` `extension` `ats export` -- Configures whether the Aspire dashboard should be included in the container app environment.
- [WithHttpsUpgrade(IResourceBuilder<AzureContainerAppEnvironmentResource>, bool)](/reference/api/csharp/aspire.hosting.azure.appcontainers/azurecontainerappextensions/methods.md#withhttpsupgrade-iresourcebuilder-azurecontainerappenvironmentresource-bool) : `IResourceBuilder<AzureContainerAppEnvironmentResource>` `extension` `ats export` -- 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.
