次の方法で共有


AzureContainerAppProjectExtensions.PublishAsAzureContainerApp<T> Method

Definition

Allows configuring the specified project resource as a container app.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> PublishAsAzureContainerApp<T> (this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> project, Action<Aspire.Hosting.Azure.AzureResourceInfrastructure,Azure.Provisioning.AppContainers.ContainerApp> configure) where T : Aspire.Hosting.ApplicationModel.ProjectResource;
static member PublishAsAzureContainerApp : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.ProjectResource)> * Action<Aspire.Hosting.Azure.AzureResourceInfrastructure, Azure.Provisioning.AppContainers.ContainerApp> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.ProjectResource)> (requires 'T :> Aspire.Hosting.ApplicationModel.ProjectResource)
<Extension()>
Public Function PublishAsAzureContainerApp(Of T As ProjectResource) (project As IResourceBuilder(Of T), configure As Action(Of AzureResourceInfrastructure, ContainerApp)) As IResourceBuilder(Of T)

Type Parameters

T

The type of the project resource.

Parameters

project
IResourceBuilder<T>

The project resource builder.

configure
Action<AzureResourceInfrastructure,ContainerApp>

The configuration action for the container app.

Returns

The updated project resource builder.

Examples

builder.AddProject<Projects.Api>.PublishAsAzureContainerApp((infrastructure, app) =>
{
    // Configure the container app here
});

Remarks

This method adds the necessary infrastructure for container apps to the application builder and applies the specified configuration to the container app.

Applies to