ContainerProperties.AnalyticalStoreTimeToLiveInSeconds Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the time to live for analytical store in seconds at container scope for the Azure Cosmos service.
Analytical store when enabled captures all the item changes in the container. AnalyticalStoreTimeToLiveInSeconds defines the time to live for the changes in analytical store.
[Newtonsoft.Json.JsonProperty(NullValueHandling=Newtonsoft.Json.NullValueHandling.Ignore, PropertyName="analyticalStorageTtl")]
public int? AnalyticalStoreTimeToLiveInSeconds { get; set; }
[<Newtonsoft.Json.JsonProperty(NullValueHandling=Newtonsoft.Json.NullValueHandling.Ignore, PropertyName="analyticalStorageTtl")>]
member this.AnalyticalStoreTimeToLiveInSeconds : Nullable<int> with get, set
Public Property AnalyticalStoreTimeToLiveInSeconds As Nullable(Of Integer)
Property Value
It is an optional property.
The unit of measurement is seconds. The maximum allowed value is 2147483647.
A valid value must be either a nonzero positive integer, '-1' or null
.
By default, AnalyticalStoreTimeToLiveInSeconds is set to null meaning analytical store is turned-off.
- Attributes
-
Newtonsoft.Json.JsonPropertyAttribute
Examples
The example below disables analytical store on a container.
container.AnalyticalStoreTimeToLiveInSeconds = null;
The example below enables analytical store on container capturing all changes and never expire.
container.AnalyticalStoreTimeToLiveInSeconds = -1;
The example below enables analytical store on container capturing all changes and expire after 180days.
container.AnalyticalStoreTimeToLiveInSeconds = (int)TimeSpan.FromDays(6 * 30).TotalSeconds;
Remarks
The AnalyticalStoreTimeToLiveInSeconds is applicable to all the item changes in the container. It cannot be overriden or customizable per item.
When the AnalyticalStoreTimeToLiveInSeconds is null
analytical store is turned-off. It means all the item changes in the container are disregarded.
When the AnalyticalStoreTimeToLiveInSeconds is '-1', all the items changes will be captured by analytical store and will never expire.
When the AnalyticalStoreTimeToLiveInSeconds is a nonzero positive integer, all the items changes will be captured by analytical store and expired after the specified time to live.
Applies to
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기