Compartilhar via


AzureCosmosExtensions.RunAsEmulator Method

Definition

Configures an Azure Cosmos DB resource to be emulated using the Azure Cosmos DB emulator with the NoSQL API. This resource requires an AzureCosmosDBResource to be added to the application model. For more information on the Azure Cosmos DB emulator, see .

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.AzureCosmosDBResource> RunAsEmulator (this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.AzureCosmosDBResource> builder, Action<Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureCosmosDBEmulatorResource>>? configureContainer = default);
static member RunAsEmulator : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.AzureCosmosDBResource> * Action<Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureCosmosDBEmulatorResource>> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.AzureCosmosDBResource>
<Extension()>
Public Function RunAsEmulator (builder As IResourceBuilder(Of AzureCosmosDBResource), Optional configureContainer As Action(Of IResourceBuilder(Of AzureCosmosDBEmulatorResource)) = Nothing) As IResourceBuilder(Of AzureCosmosDBResource)

Parameters

builder
IResourceBuilder<AzureCosmosDBResource>

The Azure Cosmos DB resource builder.

configureContainer
Action<IResourceBuilder<AzureCosmosDBEmulatorResource>>

Callback that exposes underlying container used for emulation to allow for customization.

Returns

A reference to the IResourceBuilder<T>.

Remarks

When using the Azure Cosmos DB emulator, the container requires a TLS/SSL certificate. For more information, see . This version of the package defaults to the tag of the / container image.

Applies to