Class RuleMetricDataSource
java.lang.Object
com.azure.resourcemanager.monitor.models.RuleDataSource
com.azure.resourcemanager.monitor.models.RuleMetricDataSource
A rule metric data source. The discriminator value is always RuleMetricDataSource in this case.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the metricName property: the name of the metric that defines what the rule monitors.voidvalidate()Validates the instance.withLegacyResourceId(String legacyResourceId) Set the legacyResourceId property: the legacy resource identifier of the resource the rule monitors.withMetricName(String metricName) Set the metricName property: the name of the metric that defines what the rule monitors.withMetricNamespace(String metricNamespace) Set the metricNamespace property: the namespace of the metric.withResourceLocation(String resourceLocation) Set the resourceLocation property: the location of the resource.withResourceUri(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
-
Constructor Details
-
RuleMetricDataSource
public RuleMetricDataSource()Creates an instance of RuleMetricDataSource class.
-
-
Method Details
-
metricName
Get the metricName property: the name of the metric that defines what the rule monitors.- Returns:
- the metricName value.
-
withMetricName
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
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
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
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
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.
-