Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AzureCosmosDBResource.AddCosmosDatabase

Method
📦 Aspire.Hosting.Azure.CosmosDB v17.0.0
type AzureCosmosDBResource interface {
// ... omitted for brevity
AddCosmosDatabase(
name string,
options ...*AddCosmosDatabaseOptions,
) AzureCosmosDBDatabaseResource
}

Signature

methodAddCosmosDatabasebuilder
Adds a database to the associated Cosmos DB account resource.
AddCosmosDatabase(
name string,
options ...*AddCosmosDatabaseOptions,
) AzureCosmosDBDatabaseResource
namestringThe name of the database resource.
options...*AddCosmosDatabaseOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddCosmosDatabaseOptions argument.

DatabaseName*stringThe name of the database. If not provided, this defaults to the same value as name.
AzureCosmosDBDatabaseResource

The resource builder.

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

Defined on

This method is defined on the following type: