Class RuleMetricDataSource
- java.lang.Object
-
- com.azure.resourcemanager.monitor.models.RuleDataSource
-
- com.azure.resourcemanager.monitor.models.RuleMetricDataSource
-
public class RuleMetricDataSource extends RuleDataSource
A rule metric data source. The discriminator value is always RuleMetricDataSource in this case.
-
-
Constructor Summary
Constructors Constructor Description RuleMetricDataSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringmetricName()Get the metricName property: the name of the metric that defines what the rule monitors.voidvalidate()Validates the instance.RuleMetricDataSourcewithLegacyResourceId(String legacyResourceId)Set the legacyResourceId property: the legacy resource identifier of the resource the rule monitors.RuleMetricDataSourcewithMetricName(String metricName)Set the metricName property: the name of the metric that defines what the rule monitors.RuleMetricDataSourcewithMetricNamespace(String metricNamespace)Set the metricNamespace property: the namespace of the metric.RuleMetricDataSourcewithResourceLocation(String resourceLocation)Set the resourceLocation property: the location of the resource.RuleMetricDataSourcewithResourceUri(String resourceUri)Set the resourceUri property: the resource identifier of the resource the rule monitors.-
Methods inherited from class com.azure.resourcemanager.monitor.models.RuleDataSource
legacyResourceId, metricNamespace, resourceLocation, resourceUri
-
-
-
-
Method Detail
-
metricName
public String metricName()
Get the metricName property: the name of the metric that defines what the rule monitors.- Returns:
- the metricName value.
-
withMetricName
public RuleMetricDataSource withMetricName(String metricName)
Set the metricName property: the name of the metric that defines what the rule monitors.- Parameters:
metricName- the metricName value to set.- Returns:
- the RuleMetricDataSource object itself.
-
withResourceUri
public RuleMetricDataSource withResourceUri(String resourceUri)
Set the resourceUri property: the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.- Overrides:
withResourceUriin classRuleDataSource- Parameters:
resourceUri- the resourceUri value to set.- Returns:
- the RuleDataSource object itself.
-
withLegacyResourceId
public RuleMetricDataSource withLegacyResourceId(String legacyResourceId)
Set the legacyResourceId property: the legacy resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.- Overrides:
withLegacyResourceIdin classRuleDataSource- Parameters:
legacyResourceId- the legacyResourceId value to set.- Returns:
- the RuleDataSource object itself.
-
withResourceLocation
public RuleMetricDataSource withResourceLocation(String resourceLocation)
Set the resourceLocation property: the location of the resource.- Overrides:
withResourceLocationin classRuleDataSource- Parameters:
resourceLocation- the resourceLocation value to set.- Returns:
- the RuleDataSource object itself.
-
withMetricNamespace
public RuleMetricDataSource withMetricNamespace(String metricNamespace)
Set the metricNamespace property: the namespace of the metric.- Overrides:
withMetricNamespacein classRuleDataSource- Parameters:
metricNamespace- the metricNamespace value to set.- Returns:
- the RuleDataSource object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validatein classRuleDataSource- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-