RetentionPolicy Class
- java.
lang. Object - com.
microsoft. azure. management. monitor. RetentionPolicy
- com.
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. |
Retention |
withDays(int days)
Set the number of days for the retention in days. |
Retention |
withEnabled(boolean enabled)
Set a value indicating whether the retention policy is enabled. |
Methods inherited from java.lang.Object
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:
enabled
public boolean enabled()
Get a value indicating whether the retention policy is enabled.
Returns:
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:
Returns:
withEnabled
public RetentionPolicy withEnabled(boolean enabled)
Set a value indicating whether the retention policy is enabled.
Parameters:
Returns:
Applies to
Azure SDK for Java