PrometheusRuleResolveConfiguration Class

  • java.lang.Object
    • com.azure.resourcemanager.alertsmanagement.models.PrometheusRuleResolveConfiguration

Implements

public final class PrometheusRuleResolveConfiguration
implements JsonSerializable<PrometheusRuleResolveConfiguration>

Specifies the Prometheus alert rule configuration.

Constructor Summary

Constructor Description
PrometheusRuleResolveConfiguration()

Creates an instance of PrometheusRuleResolveConfiguration class.

Method Summary

Modifier and Type Method and Description
Boolean autoResolved()

Get the autoResolved property: the flag that indicates whether or not to auto resolve a fired alert.

static PrometheusRuleResolveConfiguration fromJson(JsonReader jsonReader)

Reads an instance of PrometheusRuleResolveConfiguration from the JsonReader.

String timeToResolve()

Get the timeToResolve property: the duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

PrometheusRuleResolveConfiguration withAutoResolved(Boolean autoResolved)

Set the autoResolved property: the flag that indicates whether or not to auto resolve a fired alert.

PrometheusRuleResolveConfiguration withTimeToResolve(String timeToResolve)

Set the timeToResolve property: the duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.

Methods inherited from java.lang.Object

Constructor Details

PrometheusRuleResolveConfiguration

public PrometheusRuleResolveConfiguration()

Creates an instance of PrometheusRuleResolveConfiguration class.

Method Details

autoResolved

public Boolean autoResolved()

Get the autoResolved property: the flag that indicates whether or not to auto resolve a fired alert.

Returns:

the autoResolved value.

fromJson

public static PrometheusRuleResolveConfiguration fromJson(JsonReader jsonReader)

Reads an instance of PrometheusRuleResolveConfiguration from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If an error occurs while reading the PrometheusRuleResolveConfiguration.

timeToResolve

public String timeToResolve()

Get the timeToResolve property: the duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format. Should be between 1 and 15 minutes.

Returns:

the timeToResolve value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAutoResolved

public PrometheusRuleResolveConfiguration withAutoResolved(Boolean autoResolved)

Set the autoResolved property: the flag that indicates whether or not to auto resolve a fired alert.

Parameters:

autoResolved - the autoResolved value to set.

Returns:

the PrometheusRuleResolveConfiguration object itself.

withTimeToResolve

public PrometheusRuleResolveConfiguration withTimeToResolve(String timeToResolve)

Set the timeToResolve property: the duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format. Should be between 1 and 15 minutes.

Parameters:

timeToResolve - the timeToResolve value to set.

Returns:

the PrometheusRuleResolveConfiguration object itself.

Applies to