PrometheusRuleGroupResourceInner Class

public final class PrometheusRuleGroupResourceInner
extends Resource

The Prometheus rule group resource.

Constructor Summary

Constructor Description
PrometheusRuleGroupResourceInner()

Creates an instance of PrometheusRuleGroupResourceInner class.

Method Summary

Modifier and Type Method and Description
String clusterName()

Get the clusterName property: the cluster name of the rule group evaluation.

String description()

Get the description property: the description of the Prometheus rule group that will be included in the alert email.

Boolean enabled()

Get the enabled property: the flag that indicates whether the Prometheus rule group is enabled.

static PrometheusRuleGroupResourceInner fromJson(JsonReader jsonReader)

Reads an instance of PrometheusRuleGroupResourceInner from the JsonReader.

String id()

Get the id property: Fully qualified resource Id for the resource.

String interval()

Get the interval property: the interval in which to run the Prometheus rule group represented in ISO 8601 duration format.

String name()

Get the name property: The name of the resource.

List<PrometheusRule> rules()

Get the rules property: defines the rules in the Prometheus rule group.

List<String> scopes()

Get the scopes property: the list of resource id's that this rule group is scoped to.

SystemData systemData()

Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The type of the resource.

void validate()

Validates the instance.

PrometheusRuleGroupResourceInner withClusterName(String clusterName)

Set the clusterName property: the cluster name of the rule group evaluation.

PrometheusRuleGroupResourceInner withDescription(String description)

Set the description property: the description of the Prometheus rule group that will be included in the alert email.

PrometheusRuleGroupResourceInner withEnabled(Boolean enabled)

Set the enabled property: the flag that indicates whether the Prometheus rule group is enabled.

PrometheusRuleGroupResourceInner withInterval(String interval)

Set the interval property: the interval in which to run the Prometheus rule group represented in ISO 8601 duration format.

PrometheusRuleGroupResourceInner withLocation(String location)
PrometheusRuleGroupResourceInner withRules(List<PrometheusRule> rules)

Set the rules property: defines the rules in the Prometheus rule group.

PrometheusRuleGroupResourceInner withScopes(List<String> scopes)

Set the scopes property: the list of resource id's that this rule group is scoped to.

PrometheusRuleGroupResourceInner withTags(Map<String,String> tags)

Methods inherited from ProxyResource

Methods inherited from Resource

Methods inherited from java.lang.Object

Constructor Details

PrometheusRuleGroupResourceInner

public PrometheusRuleGroupResourceInner()

Creates an instance of PrometheusRuleGroupResourceInner class.

Method Details

clusterName

public String clusterName()

Get the clusterName property: the cluster name of the rule group evaluation.

Returns:

the clusterName value.

description

public String description()

Get the description property: the description of the Prometheus rule group that will be included in the alert email.

Returns:

the description value.

enabled

public Boolean enabled()

Get the enabled property: the flag that indicates whether the Prometheus rule group is enabled.

Returns:

the enabled value.

fromJson

public static PrometheusRuleGroupResourceInner fromJson(JsonReader jsonReader)

Reads an instance of PrometheusRuleGroupResourceInner from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

id

public String id()

Get the id property: Fully qualified resource Id for the resource.

Overrides:

PrometheusRuleGroupResourceInner.id()

Returns:

the id value.

interval

public String interval()

Get the interval property: the interval in which to run the Prometheus rule group represented in ISO 8601 duration format. Should be between 1 and 15 minutes.

Returns:

the interval value.

name

public String name()

Get the name property: The name of the resource.

Overrides:

PrometheusRuleGroupResourceInner.name()

Returns:

the name value.

rules

public List<PrometheusRule> rules()

Get the rules property: defines the rules in the Prometheus rule group.

Returns:

the rules value.

scopes

public List<String> scopes()

Get the scopes property: the list of resource id's that this rule group is scoped to.

Returns:

the scopes value.

systemData

public SystemData systemData()

Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.

Returns:

the systemData value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

PrometheusRuleGroupResourceInner.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The type of the resource.

Overrides:

PrometheusRuleGroupResourceInner.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

withClusterName

public PrometheusRuleGroupResourceInner withClusterName(String clusterName)

Set the clusterName property: the cluster name of the rule group evaluation.

Parameters:

clusterName - the clusterName value to set.

Returns:

the PrometheusRuleGroupResourceInner object itself.

withDescription

public PrometheusRuleGroupResourceInner withDescription(String description)

Set the description property: the description of the Prometheus rule group that will be included in the alert email.

Parameters:

description - the description value to set.

Returns:

the PrometheusRuleGroupResourceInner object itself.

withEnabled

public PrometheusRuleGroupResourceInner withEnabled(Boolean enabled)

Set the enabled property: the flag that indicates whether the Prometheus rule group is enabled.

Parameters:

enabled - the enabled value to set.

Returns:

the PrometheusRuleGroupResourceInner object itself.

withInterval

public PrometheusRuleGroupResourceInner withInterval(String interval)

Set the interval property: the interval in which to run the Prometheus rule group represented in ISO 8601 duration format. Should be between 1 and 15 minutes.

Parameters:

interval - the interval value to set.

Returns:

the PrometheusRuleGroupResourceInner object itself.

withLocation

public PrometheusRuleGroupResourceInner withLocation(String location)

Overrides:

PrometheusRuleGroupResourceInner.withLocation(String location)

Parameters:

location

withRules

public PrometheusRuleGroupResourceInner withRules(List<PrometheusRule> rules)

Set the rules property: defines the rules in the Prometheus rule group.

Parameters:

rules - the rules value to set.

Returns:

the PrometheusRuleGroupResourceInner object itself.

withScopes

public PrometheusRuleGroupResourceInner withScopes(List<String> scopes)

Set the scopes property: the list of resource id's that this rule group is scoped to.

Parameters:

scopes - the scopes value to set.

Returns:

the PrometheusRuleGroupResourceInner object itself.

withTags

public PrometheusRuleGroupResourceInner withTags(Map<String,String> tags)

Overrides:

PrometheusRuleGroupResourceInner.withTags(Map<String,String> tags)

Parameters:

tags

Applies to