Microsoft Azure Architect Technologies (legacy) — Question 68

You have an Azure Cosmos DB account named Account1. Account1 includes a database named DB1 that contains a container named Container1. The partition key for Container1 is set to /city.
You plan to change the partition key for Container1.
What should you do first?

Answer options

Correct answer: B

Explanation

The correct answer is B because changing the partition key in Azure Cosmos DB requires the creation of a new container with the desired partition key, as existing containers cannot have their partition keys altered. The other options are not relevant to changing the partition key; regenerating keys, deleting the container, or implementing an SDK would not achieve the goal.