RetentionPolicy Class

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.

Specifies the retention policy for the log.

C#
public class RetentionPolicy : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.Monitor.Models.RetentionPolicy>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.Monitor.Models.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.

Methods

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

Toode Versioonid
Azure SDK for .NET Latest, Preview