RetentionPolicy Class

Definition

Specifies the retention policy for the log.

[System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.RetentionPolicyTypeConverter))]
public class RetentionPolicy : Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.IRetentionPolicy
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.RetentionPolicyTypeConverter))>]
type RetentionPolicy = class
    interface IRetentionPolicy
    interface IJsonSerializable
Public Class RetentionPolicy
Implements IRetentionPolicy
Inheritance
RetentionPolicy
Attributes
Implements

Constructors

RetentionPolicy()

Creates an new RetentionPolicy instance.

Properties

Day

the number of days for the retention in days. A value of 0 will retain the events indefinitely.

Enabled

a value indicating whether the retention policy is enabled.

Methods

DeserializeFromDictionary(IDictionary)

Deserializes a IDictionary into an instance of RetentionPolicy.

DeserializeFromPSObject(PSObject)

Deserializes a PSObject into an instance of RetentionPolicy.

FromJson(JsonNode)

Deserializes a JsonNode into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.DiagnosticSetting.Models.Api20210501Preview.IRetentionPolicy.

FromJsonString(String)

Creates a new instance of RetentionPolicy, deserializing the content from a json string.

ToJson(JsonObject, SerializationMode)

Serializes this instance of RetentionPolicy into a JsonNode.

ToJsonString()

Serializes this instance to a json string.

ToString()

Applies to