# AddDeployment

- Module: [Aspire.Hosting.Azure.CognitiveServices](/reference/api/go/aspire.hosting.azure.cognitiveservices.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`AzureOpenAIResource`](/reference/api/go/aspire.hosting.azure.cognitiveservices/azureopenairesource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

Adds an Azure OpenAI deployment resource

## Definition

```go
func (AzureOpenAIResource) AddDeployment(
    name string,
    modelName string,
    modelVersion string,
) AzureOpenAIDeploymentResource
```

## Parameters

- `name` (`string`) -- The name of the Azure OpenAI Deployment resource.
- `modelName` (`string`) -- The name of the model to deploy.
- `modelVersion` (`string`) -- The version of the model to deploy.

## Returns

[`AzureOpenAIDeploymentResource`](/reference/api/go/aspire.hosting.azure.cognitiveservices/azureopenaideploymentresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`AzureOpenAIResource`](/reference/api/go/aspire.hosting.azure.cognitiveservices/azureopenairesource.md)
