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