AzureAIFoundryExtensions.AddDeployment Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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>.