MetricRules Class

  • java.lang.Object
    • com.azure.resourcemanager.datadog.models.MetricRules

Implements

public final class MetricRules
implements JsonSerializable<MetricRules>

Set of rules for sending metrics for the Monitor resource.

Constructor Summary

Constructor Description
MetricRules()

Creates an instance of MetricRules class.

Method Summary

Modifier and Type Method and Description
List<FilteringTag> filteringTags()

Get the filteringTags property: List of filtering tags to be used for capturing metrics.

static MetricRules fromJson(JsonReader jsonReader)

Reads an instance of MetricRules from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

MetricRules withFilteringTags(List<FilteringTag> filteringTags)

Set the filteringTags property: List of filtering tags to be used for capturing metrics.

Methods inherited from java.lang.Object

Constructor Details

MetricRules

public MetricRules()

Creates an instance of MetricRules class.

Method Details

filteringTags

public List<FilteringTag> filteringTags()

Get the filteringTags property: List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

Returns:

the filteringTags value.

fromJson

public static MetricRules fromJson(JsonReader jsonReader)

Reads an instance of MetricRules from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of MetricRules if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the MetricRules.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withFilteringTags

public MetricRules withFilteringTags(List<FilteringTag> filteringTags)

Set the filteringTags property: List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags.

Parameters:

filteringTags - the filteringTags value to set.

Returns:

the MetricRules object itself.

Applies to