AzureCosmosExtensions.AddCosmosDatabase 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.
Adds a database to the associated Cosmos DB account resource.
public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureCosmosDBDatabaseResource> AddCosmosDatabase(this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.AzureCosmosDBResource> builder, string name, string? databaseName = default);
static member AddCosmosDatabase : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.AzureCosmosDBResource> * string * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureCosmosDBDatabaseResource>
<Extension()>
Public Function AddCosmosDatabase (builder As IResourceBuilder(Of AzureCosmosDBResource), name As String, Optional databaseName As String = Nothing) As IResourceBuilder(Of AzureCosmosDBDatabaseResource)
Parameters
- builder
- IResourceBuilder<AzureCosmosDBResource>
AzureCosmosDB resource builder.
- name
- String
The name of the database resource.
- databaseName
- String
The name of the database. If not provided, this defaults to the same value as name
.
Returns
A reference to the IResourceBuilder<T>.