共用方式為


AzureCosmosExtensions Class

Definition

Extension methods for adding Azure Cosmos DB resources to the application model.

public static class AzureCosmosExtensions
type AzureCosmosExtensions = class
Public Module AzureCosmosExtensions
Inheritance
AzureCosmosExtensions

Methods

AddAzureCosmosDB(IDistributedApplicationBuilder, String, Action<IResourceBuilder<AzureCosmosDBResource>, ResourceModuleConstruct,CosmosDBAccount,IEnumerable<CosmosDBSqlDatabase>>)

Adds an Azure Cosmos DB connection to the application model.

AddAzureCosmosDB(IDistributedApplicationBuilder, String)

Adds an Azure Cosmos DB connection to the application model.

AddDatabase(IResourceBuilder<AzureCosmosDBResource>, String)

Adds a database to the associated Cosmos DB account resource.

RunAsEmulator(IResourceBuilder<AzureCosmosDBResource>, Action<IResourceBuilder<AzureCosmosDBEmulatorResource>>)

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 .

WithDataVolume(IResourceBuilder<AzureCosmosDBEmulatorResource>, String)

Adds a named volume for the data folder to an Azure Cosmos DB emulator resource.

WithGatewayPort(IResourceBuilder<AzureCosmosDBEmulatorResource>, Nullable<Int32>)

Configures the gateway port for the Azure Cosmos DB emulator.

WithPartitionCount(IResourceBuilder<AzureCosmosDBEmulatorResource>, Int32)

Configures the partition count for the Azure Cosmos DB emulator.

Applies to