Class LogSettings
- java.lang.Object
-
- com.azure.resourcemanager.monitor.models.LogSettings
-
public final class LogSettings extends Object
Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log.
-
-
Constructor Summary
Constructors Constructor Description LogSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcategory()Get the category property: Name of a Diagnostic Log category for a resource type this setting is applied to.booleanenabled()Get the enabled property: a value indicating whether this log is enabled.RetentionPolicyretentionPolicy()Get the retentionPolicy property: the retention policy for this log.voidvalidate()Validates the instance.LogSettingswithCategory(String category)Set the category property: Name of a Diagnostic Log category for a resource type this setting is applied to.LogSettingswithEnabled(boolean enabled)Set the enabled property: a value indicating whether this log is enabled.LogSettingswithRetentionPolicy(RetentionPolicy retentionPolicy)Set the retentionPolicy property: the retention policy for this log.
-
-
-
Method Detail
-
category
public String category()
Get the category property: Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.- Returns:
- the category value.
-
withCategory
public LogSettings withCategory(String category)
Set the category property: Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.- Parameters:
category- the category value to set.- Returns:
- the LogSettings object itself.
-
enabled
public boolean enabled()
Get the enabled property: a value indicating whether this log is enabled.- Returns:
- the enabled value.
-
withEnabled
public LogSettings withEnabled(boolean enabled)
Set the enabled property: a value indicating whether this log is enabled.- Parameters:
enabled- the enabled value to set.- Returns:
- the LogSettings object itself.
-
retentionPolicy
public RetentionPolicy retentionPolicy()
Get the retentionPolicy property: the retention policy for this log.- Returns:
- the retentionPolicy value.
-
withRetentionPolicy
public LogSettings withRetentionPolicy(RetentionPolicy retentionPolicy)
Set the retentionPolicy property: the retention policy for this log.- Parameters:
retentionPolicy- the retentionPolicy value to set.- Returns:
- the LogSettings object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-