'How should I extend the TTL of a document in Azure CosmosDB using the Python SDK?
I'm working with a Cosmos DB database with the SQL API. I have a container with TTL policy of 6 months. When a certain action is taken, my code receives an id and need to extend the deletion time for the item with that id in that container to now + 6 months. What is the recommended way to do this? An empty upsert?
- I can assume the document exists.
- The documents only need to be deleted in approximately six months. I'm not worried about exact timing.
- I'm using the Python SDK. I looked through the documentation, but I could not find anything like an "extend" operation.
- Should I not be leveraging the TTL? Should I be doing something else?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
