Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB — Question 14
You have an Azure Cosmos DB for NoSQL account named account1.
You need to create a container named Container1 in account1 by using the Azure Cosmos DB .NET SDK. The solution must ensure that the items in Container1 never expire.
What should you set?
Answer options
- A. TimeToLivePropertyPath to null
- B. TimeToLivePropertyPath to 0
- C. DefaultTimeToLive to null
- D. DefaultTimeToLive to –1
Correct answer: C
Explanation
The correct choice is C, as setting DefaultTimeToLive to null ensures that items will not expire. The other options either do not properly configure the expiration settings or are not applicable for preventing expiration.