# Aspire.Hosting.Azure.CosmosDB

- Module: `Aspire.Hosting.Azure.CosmosDB`
- Version: `17.0.0`
- Import path: `apphost/modules/aspire`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)
- Functions: `12`
- Types: `5`

## Handles

- [AzureCosmosDBContainerResource](/reference/api/go/aspire.hosting.azure.cosmosdb/azurecosmosdbcontainerresource.md) -- `handle` - 0 members
- [AzureCosmosDBDatabaseResource](/reference/api/go/aspire.hosting.azure.cosmosdb/azurecosmosdbdatabaseresource.md) -- `handle` - 1 members
- [AzureCosmosDBEmulatorResource](/reference/api/go/aspire.hosting.azure.cosmosdb/azurecosmosdbemulatorresource.md) -- `handle` - 4 members
- [AzureCosmosDBResource](/reference/api/go/aspire.hosting.azure.cosmosdb/azurecosmosdbresource.md) -- `handle` - 6 members
- [AzureKeyVaultResource](/reference/api/go/aspire.hosting.azure.cosmosdb/azurekeyvaultresource.md) -- `interface` `marker` - 0 members

## Functions

- [AddContainer](/reference/api/go/aspire.hosting.azure.cosmosdb/addcontainer.md) -- `method` - on `AzureCosmosDBDatabaseResource` -- Adds an Azure Cosmos DB container resource
- [WithDataExplorer](/reference/api/go/aspire.hosting.azure.cosmosdb/withdataexplorer.md) -- `method` - on `AzureCosmosDBEmulatorResource` -- Configures the Azure Cosmos DB Linux-based (vNext) emulator to expose the Data Explorer endpoint.
- [WithDataVolume](/reference/api/go/aspire.hosting.azure.cosmosdb/withdatavolume.md) -- `method` - on `AzureCosmosDBEmulatorResource` -- Adds a named volume for the data folder to an Azure Cosmos DB emulator resource.
- [WithGatewayPort](/reference/api/go/aspire.hosting.azure.cosmosdb/withgatewayport.md) -- `method` - on `AzureCosmosDBEmulatorResource` -- Configures the gateway port for the Azure Cosmos DB emulator.
- [WithPartitionCount](/reference/api/go/aspire.hosting.azure.cosmosdb/withpartitioncount.md) -- `method` - on `AzureCosmosDBEmulatorResource` -- Configures the partition count for the Azure Cosmos DB emulator.
- [AddCosmosDatabase](/reference/api/go/aspire.hosting.azure.cosmosdb/addcosmosdatabase.md) -- `method` - on `AzureCosmosDBResource` -- Adds a database to the associated Cosmos DB account resource.
- [RunAsClassicEmulator](/reference/api/go/aspire.hosting.azure.cosmosdb/runasclassicemulator.md) -- `method` - on `AzureCosmosDBResource` -- Configures the Azure Cosmos DB resource to run using the classic emulator
- [RunAsEmulator](/reference/api/go/aspire.hosting.azure.cosmosdb/runasemulator.md) -- `method` - on `AzureCosmosDBResource` -- Configures the Azure Cosmos DB resource to run using the local Linux-based (vNext) emulator
- [RunAsPreviewEmulator](/reference/api/go/aspire.hosting.azure.cosmosdb/runaspreviewemulator.md) -- `method` - on `AzureCosmosDBResource` -- Configures the Azure Cosmos DB resource to run using the local Linux-based (vNext) emulator. Use runAsEmulator instead.
- [WithAccessKeyAuthentication](/reference/api/go/aspire.hosting.azure.cosmosdb/withaccesskeyauthentication.md) -- `method` - on `AzureCosmosDBResource` -- Configures Azure Cosmos DB to use access key authentication
- [WithDefaultAzureSku](/reference/api/go/aspire.hosting.azure.cosmosdb/withdefaultazuresku.md) -- `method` - on `AzureCosmosDBResource` -- Configures the Azure Cosmos DB resource to be deployed use the default SKU provided by Azure.
- [AddAzureCosmosDB](/reference/api/go/aspire.hosting.azure.cosmosdb/addazurecosmosdb.md) -- `method` - on `DistributedApplicationBuilder` -- Adds an Azure Cosmos DB connection to the application model.
