oki*_*iok 2 .net c# azure ttl azure-cosmosdb
我用此代码更新了我的 cosmos db 容器
var containerResponse = await _cosmosContainer.ReadContainerAsync();
var containerProperties = containerResponse.Resource;
if (containerProperties.DefaultTimeToLive == null)
{
containerProperties.DefaultTimeToLive = 60 * 60 * 24 * 180; // set 180 days default TTL
await _cosmosContainer.ReplaceContainerAsync(containerProperties);
}
Run Code Online (Sandbox Code Playgroud)
更新 Cosmos DB TTL 容器设置是否会对旧项目产生影响?
| 归档时间: |
|
| 查看次数: |
671 次 |
| 最近记录: |