FSharp.CosmosDb
FSharp.CosmosDb copied to clipboard
Feature req: identity-based connection
Do you only support Connection-String connections?
Please add support for identity-based connection.
In the upstream, this is done using the DefaultAzureCredential
class provided by the Azure.Identity
client library.
This would be a function called Cosmos.fromCredential
which works like
open Microsoft.Azure.Cosmos
open Azure.Identity
open FSharp.CosmosDb
let credential = new DefaultAzureCredential()
let insertUsers data =
credential
|> Cosmos.fromCredential
|> Cosmos.database "UserDb"
|> Cosmos.container "UserContainer"
|> Cosmos.insertMany<User> data
|> Cosmos.execAsync
Many thanks.