CertKeen

Azure AI Cloud Developer (AI-200) · Free practice question 4 of 12

Container TTL for chat history

Chat transcripts at Wildmoor Tutors are stored in a Cosmos DB container and must be removed automatically 30 days after their last update, without a cleanup job. What should the developers configure?

  1. A.Create a change feed processor that deletes old items each night
  2. B.Set the container's default time to live to 2592000 seconds
  3. C.Add a composite index on _ts so that old items are removed faster
  4. D.Set the item's partition key to the creation date and drop old partitions
Show answer and explanation

Correct answer: B. Set the container's default time to live to 2592000 seconds

Why: Time to live in Cosmos DB deletes items automatically once the configured number of seconds has passed since the item's last modification time (_ts); 30 days is 2,592,000 seconds. Expired items are removed in the background with leftover throughput. A nightly processor is the custom job the team wants to avoid, indexes don't delete data, and Cosmos DB has no command to drop a logical partition.

More free Azure AI Cloud Developer (AI-200) questions