Class MetricSettings

java.lang.Object
com.azure.resourcemanager.monitor.models.MetricSettings

public final class MetricSettings extends Object
Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric.
  • Constructor Details

    • MetricSettings

      public MetricSettings()
      Creates an instance of MetricSettings class.
  • Method Details

    • timeGrain

      public Duration timeGrain()
      Get the timeGrain property: the timegrain of the metric in ISO8601 format.
      Returns:
      the timeGrain value.
    • withTimeGrain

      public MetricSettings withTimeGrain(Duration timeGrain)
      Set the timeGrain property: the timegrain of the metric in ISO8601 format.
      Parameters:
      timeGrain - the timeGrain value to set.
      Returns:
      the MetricSettings object itself.
    • category

      public String category()
      Get the category property: Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
      Returns:
      the category value.
    • withCategory

      public MetricSettings withCategory(String category)
      Set the category property: Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
      Parameters:
      category - the category value to set.
      Returns:
      the MetricSettings object itself.
    • enabled

      public boolean enabled()
      Get the enabled property: a value indicating whether this category is enabled.
      Returns:
      the enabled value.
    • withEnabled

      public MetricSettings withEnabled(boolean enabled)
      Set the enabled property: a value indicating whether this category is enabled.
      Parameters:
      enabled - the enabled value to set.
      Returns:
      the MetricSettings object itself.
    • retentionPolicy

      public RetentionPolicy retentionPolicy()
      Get the retentionPolicy property: the retention policy for this category.
      Returns:
      the retentionPolicy value.
    • withRetentionPolicy

      public MetricSettings withRetentionPolicy(RetentionPolicy retentionPolicy)
      Set the retentionPolicy property: the retention policy for this category.
      Parameters:
      retentionPolicy - the retentionPolicy value to set.
      Returns:
      the MetricSettings object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.