Skip to content
DocsTry Aspire
DocsTry

Aspire.Hosting.Azure.CosmosDB

Official
📦 Aspire.Hosting.Azure.CosmosDBv13.4.0
11Functions
4Types

Types

Functions

methodaddAzureCosmosDBbuilder
Adds an Azure Cosmos DB connection to the application model.
addAzureCosmosDB(name: string): AzureCosmosDBResource
methodaddContainerbuilder
Adds an Azure Cosmos DB container resource
addContainer(name: string, partitionKeyPaths: string|string[], containerName?: string): AzureCosmosDBContainerResource
methodaddCosmosDatabasebuilder
Adds a database to the associated Cosmos DB account resource.
addCosmosDatabase(name: string, databaseName?: string): AzureCosmosDBDatabaseResource
methodrunAsEmulatorbuilder
Configures the Azure Cosmos DB resource to run using the local emulator
runAsEmulator(configureContainer?: (obj: AzureCosmosDBEmulatorResource) => Promise<void>): AzureCosmosDBResource
methodrunAsPreviewEmulatorbuilder
Configures the Azure Cosmos DB resource to run using the preview emulator
runAsPreviewEmulator(configureContainer?: (obj: AzureCosmosDBEmulatorResource) => Promise<void>): AzureCosmosDBResource
methodwithAccessKeyAuthenticationbuilder
Configures Azure Cosmos DB to use access key authentication
withAccessKeyAuthentication(keyVaultBuilder?: IAzureKeyVaultResource): AzureCosmosDBResource
methodwithDataExplorerbuilder
Configures the Azure Cosmos DB preview emulator to expose the Data Explorer endpoint.
withDataExplorer(port?: number): AzureCosmosDBEmulatorResource
methodwithDataVolumebuilder
Adds a named volume for the data folder to an Azure Cosmos DB emulator resource.
withDataVolume(name?: string): AzureCosmosDBEmulatorResource
methodwithDefaultAzureSkubuilder
Configures the Azure Cosmos DB resource to be deployed use the default SKU provided by Azure.
withDefaultAzureSku(): AzureCosmosDBResource
methodwithGatewayPortbuilder
Configures the gateway port for the Azure Cosmos DB emulator.
withGatewayPort(port: number): AzureCosmosDBEmulatorResource
methodwithPartitionCountbuilder
Configures the partition count for the Azure Cosmos DB emulator.
withPartitionCount(count: number): AzureCosmosDBEmulatorResource