ContainerProperties.AnalyticalStoreTimeToLiveInSeconds プロパティ

定義

Azure Cosmos サービスのコンテナー スコープでの分析ストアの有効期間を秒単位で取得または設定します。

有効になっている場合の分析ストアでは、コンテナー内のすべての項目の変更がキャプチャされます。 AnalyticalStoreTimeToLiveInSeconds は、分析ストアの変更の有効期間を定義します。

[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)

プロパティ値

これは省略可能なプロパティです。

測定単位は秒です。 許容される最大値は2147483647。 有効な値は、0 以外の正の整数 '-1' または nullのいずれかである必要があります。

既定では、AnalyticalStoreTimeToLiveInSeconds は null に設定されています。これは、分析ストアがオフになっていることを意味します。

属性
Newtonsoft.Json.JsonPropertyAttribute

次の例では、コンテナーの分析ストアを無効にします。

container.AnalyticalStoreTimeToLiveInSeconds = null;

次の例では、すべての変更をキャプチャするコンテナーの分析ストアを有効にし、期限切れになることはありません。

container.AnalyticalStoreTimeToLiveInSeconds = -1;

次の例では、すべての変更をキャプチャし、180 日後に期限切れになるコンテナーの分析ストアを有効にします。

container.AnalyticalStoreTimeToLiveInSeconds = (int)TimeSpan.FromDays(6 * 30).TotalSeconds;

注釈

AnalyticalStoreTimeToLiveInSecondsは、コンテナー内のすべての項目の変更に適用されます。 アイテムごとにオーバーライドしたりカスタマイズしたりすることはできません。

AnalyticalStoreTimeToLiveInSeconds is null 分析ストアがオフになっている場合。 つまり、コンテナー内のすべての項目の変更は無視されます。

AnalyticalStoreTimeToLiveInSecondsが '-1' の場合、すべての項目の変更は分析ストアによってキャプチャされ、期限切れになることはありません。

AnalyticalStoreTimeToLiveInSecondsが 0 以外の正の整数の場合、すべての項目の変更は分析ストアによってキャプチャされ、指定された有効期間後に期限切れになります。

適用対象