Share via


AzureAIFoundryExtensions.AddDeployment Method

Definition

Overloads

AddDeployment(IResourceBuilder<AzureAIFoundryResource>, String, AIFoundryModel)

Adds and returns an Azure AI Foundry Deployment resource to the application model using a AIFoundryModel.

AddDeployment(IResourceBuilder<AzureAIFoundryResource>, String, String, String, String)

Adds and returns an Azure AI Foundry Deployment resource to the application model.

AddDeployment(IResourceBuilder<AzureAIFoundryResource>, String, AIFoundryModel)

Source:
AzureAIFoundryExtensions.cs
Source:
AzureAIFoundryExtensions.cs

Adds and returns an Azure AI Foundry Deployment resource to the application model using a AIFoundryModel.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureAIFoundryDeploymentResource> AddDeployment(this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureAIFoundryResource> builder, string name, Aspire.Hosting.Azure.AIFoundryModel model);
static member AddDeployment : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureAIFoundryResource> * string * Aspire.Hosting.Azure.AIFoundryModel -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureAIFoundryDeploymentResource>
<Extension()>
Public Function AddDeployment (builder As IResourceBuilder(Of AzureAIFoundryResource), name As String, model As AIFoundryModel) As IResourceBuilder(Of AzureAIFoundryDeploymentResource)

Parameters

builder
IResourceBuilder<AzureAIFoundryResource>

The Azure AI Foundry resource builder.

name
String

The name of the Azure AI Foundry Deployment resource.

model
AIFoundryModel

The model descriptor, using the AIFoundryModel class like so: aiFoundry.AddDeployment(name: "chat", model: AIFoundryModel.OpenAI.Gpt5Mini)

Returns

A reference to the IResourceBuilder<T>.

Remarks

Create a deployment for the OpenAI GTP-5-mini model:
var builder = DistributedApplication.CreateBuilder(args);

var aiFoundry = builder.AddAzureAIFoundry("aiFoundry");
var gpt5mini = aiFoundry.AddDeployment("chat", AIFoundryModel.OpenAI.Gpt5Mini);

Applies to

AddDeployment(IResourceBuilder<AzureAIFoundryResource>, String, String, String, String)

Source:
AzureAIFoundryExtensions.cs
Source:
AzureAIFoundryExtensions.cs
Source:
AzureAIFoundryExtensions.cs

Adds and returns an Azure AI Foundry Deployment resource to the application model.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureAIFoundryDeploymentResource> AddDeployment(this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureAIFoundryResource> builder, string name, string modelName, string modelVersion, string format);
static member AddDeployment : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureAIFoundryResource> * string * string * string * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureAIFoundryDeploymentResource>
<Extension()>
Public Function AddDeployment (builder As IResourceBuilder(Of AzureAIFoundryResource), name As String, modelName As String, modelVersion As String, format As String) As IResourceBuilder(Of AzureAIFoundryDeploymentResource)

Parameters

builder
IResourceBuilder<AzureAIFoundryResource>

The Azure AI Foundry resource builder.

name
String

The name of the Azure AI Foundry Deployment resource.

modelName
String

The name of the model to deploy.

modelVersion
String

The version of the model to deploy.

format
String

The format of the model to deploy.

Returns

A reference to the IResourceBuilder<T>.

Applies to