MetricSettings Class

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

public class MetricSettings

Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric.

Method Summary

Modifier and Type Method and Description
String category()

Get 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.

boolean enabled()

Get a value indicating whether this category is enabled.

RetentionPolicy retentionPolicy()

Get the retention policy for this category.

Period timeGrain()

Get the timegrain of the metric in ISO8601 format.

MetricSettings withCategory(String category)

Set 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.

MetricSettings withEnabled(boolean enabled)

Set a value indicating whether this category is enabled.

MetricSettings withRetentionPolicy(RetentionPolicy retentionPolicy)

Set the retention policy for this category.

MetricSettings withTimeGrain(Period timeGrain)

Set the timegrain of the metric in ISO8601 format.

Method Details

category

public String category()

Get 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

enabled

public boolean enabled()

Get a value indicating whether this category is enabled.

Returns:

the enabled value

retentionPolicy

public RetentionPolicy retentionPolicy()

Get the retention policy for this category.

Returns:

the retentionPolicy value

timeGrain

public Period timeGrain()

Get the timegrain of the metric in ISO8601 format.

Returns:

the timeGrain value

withCategory

public MetricSettings withCategory(String category)

Set 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.

withEnabled

public MetricSettings withEnabled(boolean enabled)

Set a value indicating whether this category is enabled.

Parameters:

enabled - the enabled value to set

Returns:

the MetricSettings object itself.

withRetentionPolicy

public MetricSettings withRetentionPolicy(RetentionPolicy retentionPolicy)

Set the retention policy for this category.

Parameters:

retentionPolicy - the retentionPolicy value to set

Returns:

the MetricSettings object itself.

withTimeGrain

public MetricSettings withTimeGrain(Period timeGrain)

Set the timegrain of the metric in ISO8601 format.

Parameters:

timeGrain - the timeGrain value to set

Returns:

the MetricSettings object itself.

Applies to