RuleDataSource Class
- java.
lang. Object - com.
azure. resourcemanager. monitor. models. RuleDataSource
- com.
Implements
public class RuleDataSource
implements JsonSerializable<RuleDataSource>
The resource from which the rule collects its data.
Constructor Summary
Constructor | Description |
---|---|
RuleDataSource() |
Creates an instance of Rule |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Rule |
fromJson(JsonReader jsonReader)
Reads an instance of Rule |
String |
legacyResourceId()
Get the legacy |
String |
metricNamespace()
Get the metric |
String |
odataType()
Get the odata |
String |
resourceLocation()
Get the resource |
String |
resourceUri()
Get the resource |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Rule |
withLegacyResourceId(String legacyResourceId)
Set the legacy |
Rule |
withMetricNamespace(String metricNamespace)
Set the metric |
Rule |
withResourceLocation(String resourceLocation)
Set the resource |
Rule |
withResourceUri(String resourceUri)
Set the resource |
Methods inherited from java.lang.Object
Constructor Details
RuleDataSource
public RuleDataSource()
Creates an instance of RuleDataSource class.
Method Details
fromJson
public static RuleDataSource fromJson(JsonReader jsonReader)
Reads an instance of RuleDataSource from the JsonReader.
Parameters:
Returns:
Throws:
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:
metricNamespace
public String metricNamespace()
Get the metricNamespace property: the namespace of the metric.
Returns:
odataType
public String odataType()
Get the odataType property: specifies the type of data source. There are two types of rule data sources: RuleMetricDataSource and RuleManagementEventDataSource.
Returns:
resourceLocation
public String resourceLocation()
Get the resourceLocation property: the location of the resource.
Returns:
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:
toJson
validate
public void validate()
Validates the instance.
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:
Returns:
withMetricNamespace
public RuleDataSource withMetricNamespace(String metricNamespace)
Set the metricNamespace property: the namespace of the metric.
Parameters:
Returns:
withResourceLocation
public RuleDataSource withResourceLocation(String resourceLocation)
Set the resourceLocation property: the location of the resource.
Parameters:
Returns:
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:
Returns:
Applies to
Azure SDK for Java