Class RetentionPolicy
Specifies the retention policy for the log.
Namespace: System.Dynamic.ExpandoObject
Assembly: Microsoft.Azure.Management.Monitor.dll
Syntax
public class RetentionPolicy
Constructors
RetentionPolicy()
Initializes a new instance of the RetentionPolicy class.
Declaration
public RetentionPolicy ();
RetentionPolicy(Boolean, Int32)
Initializes a new instance of the RetentionPolicy class.
Declaration
public RetentionPolicy (bool enabled, int days);
Parameters
|
Boolean
enabled
a value indicating whether the retention policy is enabled. |
|
Int32
days
the number of days for the retention in days. A value of 0 will retain the events indefinitely. |
Properties
Days
Gets or sets the number of days for the retention in days. A value of 0 will retain the events indefinitely.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="days")]
public int Days { get; set; }
Property Value
|
Int32
|
Enabled
Gets or sets a value indicating whether the retention policy is enabled.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="enabled")]
public bool Enabled { get; set; }
Property Value
|
Boolean
|
Methods
Validate()
Validate the object.
Declaration
public virtual void Validate ();
Exceptions
|
ValidationException
Thrown if validation fails |