How can I optimize the integration of CosmosDB for PostgreSQL in a .NET Core API to improve the efficiency of creating roles in the Azure Cosmos database?
Azure.ResourceManager.CosmosDBForPostgreSql within a .NET Core API. I've successfully implemented an update method to create roles, but it's taking more than 5 minutes to complete the task, which is longer than desired. I'm seeking solutions and recommendations to reduce the time it takes to create roles in the Azure Cosmos database.
I am using the below code to create a role which is provided in the Microsoft document, Where you can see I have used 'WaitUntil.Completed' for successful role creation but it is taking a long to create in API.
CosmosDBForPostgreSqlRoleData data = new CosmosDBForPostgreSqlRoleData("password"); ArmOperation<CosmosDBForPostgreSqlRoleResource> lro = await cosmosDBForPostgreSqlRole.UpdateAsync(WaitUntil.Completed, data); CosmosDBForPostgreSqlRoleResource result = lro.Value;
Kindly, Please give me any solution to accomplish my requirement.
Thank you.