RetentionPolicy Class

  • java.lang.Object
    • com.microsoft.azure.management.monitor.RetentionPolicy

public class RetentionPolicy

Specifies the retention policy for the log.

Constructor Summary

Constructor Description
RetentionPolicy()

Method Summary

Modifier and Type Method and Description
int days()

Get the number of days for the retention in days.

boolean enabled()

Get a value indicating whether the retention policy is enabled.

RetentionPolicy withDays(int days)

Set the number of days for the retention in days.

RetentionPolicy withEnabled(boolean enabled)

Set a value indicating whether the retention policy is enabled.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

RetentionPolicy

public RetentionPolicy()

Method Details

days

public int days()

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

Returns:

the days value

enabled

public boolean enabled()

Get a value indicating whether the retention policy is enabled.

Returns:

the enabled value

withDays

public RetentionPolicy withDays(int days)

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

Parameters:

days - the days value to set

Returns:

the RetentionPolicy object itself.

withEnabled

public RetentionPolicy withEnabled(boolean enabled)

Set a value indicating whether the retention policy is enabled.

Parameters:

enabled - the enabled value to set

Returns:

the RetentionPolicy object itself.

Applies to