The current write and read endpoints are available in DocumentClient.WriteEndpoint and DocumentClient.ReadEndpoint respectively.
How to check from the CosmosClient
instead? As giving in the example.
I assume the DocumentClient
is outdated in V3
Each operation you perform with the CosmosClient
returns a response that contains a Diagnostics
property. The Diagnostics
contains a GetContactedRegions()
method that returns the regions were involved in this operation: https://github.com/Azure/azure-cosmos-dotnet-v3/blob/ebd1b91a26547721ef232ef597d878144889b80b/Microsoft.Azure.Cosmos/src/Diagnostics/CosmosDiagnostics.cs#L83
Each operation for different reasons might contact one or more regions.