CosmosDB PowerShell Module - Updating existing context

Kothai Ramanathan 946 Reputation points Microsoft Employee
2021-03-01T13:25:04.813+00:00

In the CosmosDB module, I see commands to create a context. Is there one to update an existing context ?

Thanks,
Kothai.

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,902 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anurag Sharma 17,631 Reputation points
    2021-03-02T03:46:52.657+00:00

    Hi @Kothai Ramanathan , welcome to Microsoft Q&A forum.

    We create a context object by passing the necessary details to be able to connect to Cosmos DB like account name, database name, key values. We cannot directly update the context object but can override it by initiating a new command like the one used for creation.

    Please refer to below links on the PowerShell command:
    New-CosmosDbContext
    CosmosDB PowerShell Module

    Please let me know if this helps or we can discuss further.

    ----------

    If answer helps, please mark it 'Accept Answer'


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.