Class RuleDataSource
- java.lang.Object
-
- com.azure.resourcemanager.monitor.models.RuleDataSource
-
- Direct Known Subclasses:
RuleManagementEventDataSource,RuleMetricDataSource
public class RuleDataSource extends Object
The resource from which the rule collects its data.
-
-
Constructor Summary
Constructors Constructor Description RuleDataSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringlegacyResourceId()Get the legacyResourceId property: the legacy resource identifier of the resource the rule monitors.StringmetricNamespace()Get the metricNamespace property: the namespace of the metric.StringresourceLocation()Get the resourceLocation property: the location of the resource.StringresourceUri()Get the resourceUri property: the resource identifier of the resource the rule monitors.voidvalidate()Validates the instance.RuleDataSourcewithLegacyResourceId(String legacyResourceId)Set the legacyResourceId property: the legacy resource identifier of the resource the rule monitors.RuleDataSourcewithMetricNamespace(String metricNamespace)Set the metricNamespace property: the namespace of the metric.RuleDataSourcewithResourceLocation(String resourceLocation)Set the resourceLocation property: the location of the resource.RuleDataSourcewithResourceUri(String resourceUri)Set the resourceUri property: the resource identifier of the resource the rule monitors.
-
-
-
Method Detail
-
resourceUri
public String resourceUri()
Get the resourceUri property: the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.- Returns:
- the resourceUri value.
-
withResourceUri
public RuleDataSource 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.- Parameters:
resourceUri- the resourceUri value to set.- Returns:
- the RuleDataSource object itself.
-
legacyResourceId
public String legacyResourceId()
Get the legacyResourceId property: the legacy resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule.- Returns:
- the legacyResourceId value.
-
withLegacyResourceId
public RuleDataSource 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.- Parameters:
legacyResourceId- the legacyResourceId value to set.- Returns:
- the RuleDataSource object itself.
-
resourceLocation
public String resourceLocation()
Get the resourceLocation property: the location of the resource.- Returns:
- the resourceLocation value.
-
withResourceLocation
public RuleDataSource withResourceLocation(String resourceLocation)
Set the resourceLocation property: the location of the resource.- Parameters:
resourceLocation- the resourceLocation value to set.- Returns:
- the RuleDataSource object itself.
-
metricNamespace
public String metricNamespace()
Get the metricNamespace property: the namespace of the metric.- Returns:
- the metricNamespace value.
-
withMetricNamespace
public RuleDataSource withMetricNamespace(String metricNamespace)
Set the metricNamespace property: the namespace of the metric.- Parameters:
metricNamespace- the metricNamespace value to set.- Returns:
- the RuleDataSource object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-