AzureContainerAppExtensions Methods
Class Methods 5 members
Provides extension methods for customizing Azure Container App definitions for projects.
AddAzureContainerAppEnvironment(IDistributedApplicationBuilder, string) Section titled AddAzureContainerAppEnvironment(IDistributedApplicationBuilder, string) extension IResourceBuilder<AzureContainerAppEnvironmentResource> Adds a container app environment resource to the distributed application builder.
public static class AzureContainerAppExtensions{ public static IResourceBuilder<AzureContainerAppEnvironmentResource> AddAzureContainerAppEnvironment( this IDistributedApplicationBuilder builder, string name) { // ... }}Parameters
builder IDistributedApplicationBuilder The distributed application builder. name string The name of the resource. Returns
IResourceBuilder<AzureContainerAppEnvironmentResource> ApplicationModel.IResourceBuilder`1 AddAzureContainerAppsInfrastructure(IDistributedApplicationBuilder) Section titled AddAzureContainerAppsInfrastructure(IDistributedApplicationBuilder) extension IDistributedApplicationBuilder Adds the necessary infrastructure for Azure Container Apps to the distributed application builder.
public static class AzureContainerAppExtensions{ public static IDistributedApplicationBuilder AddAzureContainerAppsInfrastructure( this IDistributedApplicationBuilder builder) { // ... }}Parameters
builder IDistributedApplicationBuilder The distributed application builder. WithAzdResourceNaming(IResourceBuilder<AzureContainerAppEnvironmentResource>) Section titled WithAzdResourceNaming(IResourceBuilder<AzureContainerAppEnvironmentResource>) extension IResourceBuilder<AzureContainerAppEnvironmentResource> Configures the container app environment resources to use the same naming conventions as azd.
public static class AzureContainerAppExtensions{ public static IResourceBuilder<AzureContainerAppEnvironmentResource> WithAzdResourceNaming( this IResourceBuilder<AzureContainerAppEnvironmentResource> builder) { // ... }}Parameters
builder IResourceBuilder<AzureContainerAppEnvironmentResource> The AzureContainerAppEnvironmentResource to configure. Returns
IResourceBuilder<AzureContainerAppEnvironmentResource> ApplicationModel.IResourceBuilder`1 Remarks
By default, the container app environment resources use a different naming convention than azd. This method allows for reusing the previously deployed resources if the application was deployed using azd without calling
AzureContainerAppExtensions.AddAzureContainerAppEnvironmentWithAzureLogAnalyticsWorkspace(IResourceBuilder<AzureContainerAppEnvironmentResource>, IResourceBuilder<AzureLogAnalyticsWorkspaceResource>) Section titled WithAzureLogAnalyticsWorkspace(IResourceBuilder<AzureContainerAppEnvironmentResource>, IResourceBuilder<AzureLogAnalyticsWorkspaceResource>) extension IResourceBuilder<AzureContainerAppEnvironmentResource> Configures the container app environment resource to use the specified Log Analytics Workspace.
public static class AzureContainerAppExtensions{ public static IResourceBuilder<AzureContainerAppEnvironmentResource> WithAzureLogAnalyticsWorkspace( this IResourceBuilder<AzureContainerAppEnvironmentResource> builder, IResourceBuilder<AzureLogAnalyticsWorkspaceResource> workspaceBuilder) { // ... }}Parameters
builder IResourceBuilder<AzureContainerAppEnvironmentResource> The AzureContainerAppEnvironmentResource to configure. workspaceBuilder IResourceBuilder<AzureLogAnalyticsWorkspaceResource> The resource builder for the Azure.AzureLogAnalyticsWorkspaceResource to use. Returns
IResourceBuilder<AzureContainerAppEnvironmentResource> ApplicationModel.IResourceBuilder`1 Exceptions
ArgumentNullException Thrown when builder or workspaceBuilder is null. WithDashboard(IResourceBuilder<AzureContainerAppEnvironmentResource>, bool) Section titled WithDashboard(IResourceBuilder<AzureContainerAppEnvironmentResource>, bool) extension IResourceBuilder<AzureContainerAppEnvironmentResource> Configures whether the Aspire dashboard should be included in the container app environment.
public static class AzureContainerAppExtensions{ public static IResourceBuilder<AzureContainerAppEnvironmentResource> WithDashboard( this IResourceBuilder<AzureContainerAppEnvironmentResource> builder, bool enable = true) { // ... }}Parameters
builder IResourceBuilder<AzureContainerAppEnvironmentResource> The AzureContainerAppEnvironmentResource to configure. enable bool optional Whether to include the Aspire dashboard. Default is true. Returns
IResourceBuilder<AzureContainerAppEnvironmentResource> ApplicationModel.IResourceBuilder`1