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 Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithApplicationRegion (string applicationRegion);
member this.WithApplicationRegion : string -> Microsoft.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
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.
Azure SDK for .NET