CosmosClientBuilder.WithApplicationRegion(String) 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.
Set the preferred geo-replicated region to be used in the Azure Cosmos DB service.
public Azure.Cosmos.Fluent.CosmosClientBuilder WithApplicationRegion (string applicationRegion);
member this.WithApplicationRegion : string -> Azure.Cosmos.Fluent.CosmosClientBuilder
Public Function WithApplicationRegion (applicationRegion As String) As CosmosClientBuilder
Parameters
- applicationRegion
- String
Azure region where application is running. Regions lists valid Cosmos DB regions.
Returns
The current CosmosClientBuilder.
Examples
The example below creates a new CosmosClientBuilder with a of preferred region.
CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder(
accountEndpoint: "https://testcosmos.documents.azure.com:443/",
authKeyOrResourceToken: "SuperSecretKey")
.WithApplicationRegion("East US 2");
CosmosClient client = cosmosClientBuilder.Build();
Applies to
See also
Współpracuj z nami w serwisie GitHub
Źródło tej zawartości można znaleźć w witrynie GitHub, gdzie można również tworzyć i przeglądać problemy i żądania ściągnięcia. Więcej informacji znajdziesz w naszym przewodniku dla współtwórców.
Azure SDK for .NET