I want to set the time to live for the items in a container in cosmosDB, but I am not sure how to do so using the config of cosmosdb storage in bot framework v4. I would appreciate some help on this matter.
I have read about setting time to live using DocumentClient() as documented here . However I set up my storage like this:
var storage = new CosmosDbStorage(new CosmosDbStorageOptions
{
AuthKey = CosmosDBKey,
CollectionId = CosmosDBCollectionName,
CosmosDBEndpoint = new Uri(CosmosServiceEndpoint),
DatabaseId = CosmosDBDatabaseName,
});
How can I set time to live with this config of my cosmosDB storage?
BotBuilder SDK doesn't currently allow you to create a Collection with DefaultTimeToLive
.
However, you can do so in the Azure Portal once your Collection has been created and then set it:
Adjust Settings > Time to Live
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.