I'm trying to change the ConnectionMode of my CosmosClient to Gateway. This is my Run() function:
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "policy")] HttpRequest req,
[CosmosDB( databaseName:"AR", containerName: "Policy", Connection = "CosmosConnectionString")]CosmosClient cosmos, ILogger log)
And I'm wondering, how do I change the ConnectionMode to Gateway in that part of code? Obviously something like
[CosmosDB( databaseName:"AR", containerName: "Policy", Connection = "CosmosConnectionString")]CosmosClient cosmos = new CosmosClient{ConnectionMode.Gateway}
doesn't work.
Any ideas?