Condividi tramite


RetentionPolicy Class

Definition

Specifies the retention policy for the log.

public class RetentionPolicy : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.Monitor.Models.RetentionPolicy>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.Monitor.Models.RetentionPolicy>
type RetentionPolicy = class
    interface IJsonModel<RetentionPolicy>
    interface IPersistableModel<RetentionPolicy>
Public Class RetentionPolicy
Implements IJsonModel(Of RetentionPolicy), IPersistableModel(Of RetentionPolicy)
Inheritance
RetentionPolicy
Implements

Constructors

RetentionPolicy(Boolean, Int32)

Initializes a new instance of RetentionPolicy.

Properties

Days

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

IsEnabled

a value indicating whether the retention policy is enabled.

Explicit Interface Implementations

IJsonModel<RetentionPolicy>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<RetentionPolicy>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<RetentionPolicy>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<RetentionPolicy>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<RetentionPolicy>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to