RetentionPolicy Class

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

public class RetentionPolicy

Specifies the retention policy for the log.

Method Summary

Modifier and Type Method and Description
int days()

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

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. A value of 0 will retain the events indefinitely.

RetentionPolicy withEnabled(boolean enabled)

Set a value indicating whether the retention policy is enabled.

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