LogSettings Class
- java.
lang. Object - com.
azure. resourcemanager. monitor. models. LogSettings
- com.
Implements
public final class LogSettings
implements JsonSerializable<LogSettings>
Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log.
Constructor Summary
Constructor | Description |
---|---|
LogSettings() |
Creates an instance of Log |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
category()
Get the category property: Name of a Diagnostic Log category for a resource type this setting is applied to. |
String |
categoryGroup()
Get the category |
boolean |
enabled()
Get the enabled property: a value indicating whether this log is enabled. |
static
Log |
fromJson(JsonReader jsonReader)
Reads an instance of Log |
Retention |
retentionPolicy()
Get the retention |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Log |
withCategory(String category)
Set the category property: Name of a Diagnostic Log category for a resource type this setting is applied to. |
Log |
withCategoryGroup(String categoryGroup)
Set the category |
Log |
withEnabled(boolean enabled)
Set the enabled property: a value indicating whether this log is enabled. |
Log |
withRetentionPolicy(RetentionPolicy retentionPolicy)
Set the retention |
Methods inherited from java.lang.Object
Constructor Details
LogSettings
public LogSettings()
Creates an instance of LogSettings class.
Method Details
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:
categoryGroup
public String categoryGroup()
Get the categoryGroup property: Name of a Diagnostic Log category group 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:
enabled
public boolean enabled()
Get the enabled property: a value indicating whether this log is enabled.
Returns:
fromJson
public static LogSettings fromJson(JsonReader jsonReader)
Reads an instance of LogSettings from the JsonReader.
Parameters:
Returns:
Throws:
retentionPolicy
public RetentionPolicy retentionPolicy()
Get the retentionPolicy property: the retention policy for this log.
Returns:
toJson
validate
public void validate()
Validates the instance.
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:
Returns:
withCategoryGroup
public LogSettings withCategoryGroup(String categoryGroup)
Set the categoryGroup property: Name of a Diagnostic Log category group 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:
Returns:
withEnabled
public LogSettings withEnabled(boolean enabled)
Set the enabled property: a value indicating whether this log is enabled.
Parameters:
Returns:
withRetentionPolicy
public LogSettings withRetentionPolicy(RetentionPolicy retentionPolicy)
Set the retentionPolicy property: the retention policy for this log.
Parameters:
Returns:
Applies to
Azure SDK for Java