Microsoft Azure Architect Technologies (2020, legacy) — Question 23

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

To change the partition key for an existing container in Azure Cosmos DB, the first step is to create a new Azure Cosmos DB account. This is because partition keys cannot be altered directly, and creating a new account allows for the establishment of a new container with the desired partition key. The other options either do not address the need to create a new container or involve unnecessary actions.