AlertRuleResourcePatch Class

  • java.lang.Object
    • com.azure.resourcemanager.monitor.models.AlertRuleResourcePatch

Implements

public final class AlertRuleResourcePatch
implements JsonSerializable<AlertRuleResourcePatch>

The alert rule object for patch operations.

Constructor Summary

Constructor Description
AlertRuleResourcePatch()

Creates an instance of AlertRuleResourcePatch class.

Method Summary

Modifier and Type Method and Description
RuleAction action()

Get the action property: action that is performed when the alert rule becomes active, and when an alert condition is resolved.

List<RuleAction> actions()

Get the actions property: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.

RuleCondition condition()

Get the condition property: the condition that results in the alert rule being activated.

String description()

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

static AlertRuleResourcePatch fromJson(JsonReader jsonReader)

Reads an instance of AlertRuleResourcePatch from the JsonReader.

Boolean isEnabled()

Get the isEnabled property: the flag that indicates whether the alert rule is enabled.

OffsetDateTime lastUpdatedTime()

Get the lastUpdatedTime property: Last time the rule was updated in ISO8601 format.

String name()

Get the name property: the name of the alert rule.

String provisioningState()

Get the provisioningState property: the provisioning state.

Map<String,String> tags()

Get the tags property: Resource tags.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

AlertRuleResourcePatch withAction(RuleAction action)

Set the action property: action that is performed when the alert rule becomes active, and when an alert condition is resolved.

AlertRuleResourcePatch withActions(List<RuleAction> actions)

Set the actions property: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.

AlertRuleResourcePatch withCondition(RuleCondition condition)

Set the condition property: the condition that results in the alert rule being activated.

AlertRuleResourcePatch withDescription(String description)

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

AlertRuleResourcePatch withIsEnabled(Boolean isEnabled)

Set the isEnabled property: the flag that indicates whether the alert rule is enabled.

AlertRuleResourcePatch withName(String name)

Set the name property: the name of the alert rule.

AlertRuleResourcePatch withProvisioningState(String provisioningState)

Set the provisioningState property: the provisioning state.

AlertRuleResourcePatch withTags(Map<String,String> tags)

Set the tags property: Resource tags.

Methods inherited from java.lang.Object

Constructor Details

AlertRuleResourcePatch

public AlertRuleResourcePatch()

Creates an instance of AlertRuleResourcePatch class.

Method Details

action

public RuleAction action()

Get the action property: action that is performed when the alert rule becomes active, and when an alert condition is resolved.

Returns:

the action value.

actions

public List actions()

Get the actions property: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.

Returns:

the actions value.

condition

public RuleCondition condition()

Get the condition property: the condition that results in the alert rule being activated.

Returns:

the condition value.

description

public String description()

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

Returns:

the description value.

fromJson

public static AlertRuleResourcePatch fromJson(JsonReader jsonReader)

Reads an instance of AlertRuleResourcePatch from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AlertRuleResourcePatch 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 AlertRuleResourcePatch.

isEnabled

public Boolean isEnabled()

Get the isEnabled property: the flag that indicates whether the alert rule is enabled.

Returns:

the isEnabled value.

lastUpdatedTime

public OffsetDateTime lastUpdatedTime()

Get the lastUpdatedTime property: Last time the rule was updated in ISO8601 format.

Returns:

the lastUpdatedTime value.

name

public String name()

Get the name property: the name of the alert rule.

Returns:

the name value.

provisioningState

public String provisioningState()

Get the provisioningState property: the provisioning state.

Returns:

the provisioningState value.

tags

public Map tags()

Get the tags property: Resource tags.

Returns:

the tags value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAction

public AlertRuleResourcePatch withAction(RuleAction action)

Set the action property: action that is performed when the alert rule becomes active, and when an alert condition is resolved.

Parameters:

action - the action value to set.

Returns:

the AlertRuleResourcePatch object itself.

withActions

public AlertRuleResourcePatch withActions(List actions)

Set the actions property: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.

Parameters:

actions - the actions value to set.

Returns:

the AlertRuleResourcePatch object itself.

withCondition

public AlertRuleResourcePatch withCondition(RuleCondition condition)

Set the condition property: the condition that results in the alert rule being activated.

Parameters:

condition - the condition value to set.

Returns:

the AlertRuleResourcePatch object itself.

withDescription

public AlertRuleResourcePatch withDescription(String description)

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

Parameters:

description - the description value to set.

Returns:

the AlertRuleResourcePatch object itself.

withIsEnabled

public AlertRuleResourcePatch withIsEnabled(Boolean isEnabled)

Set the isEnabled property: the flag that indicates whether the alert rule is enabled.

Parameters:

isEnabled - the isEnabled value to set.

Returns:

the AlertRuleResourcePatch object itself.

withName

public AlertRuleResourcePatch withName(String name)

Set the name property: the name of the alert rule.

Parameters:

name - the name value to set.

Returns:

the AlertRuleResourcePatch object itself.

withProvisioningState

public AlertRuleResourcePatch withProvisioningState(String provisioningState)

Set the provisioningState property: the provisioning state.

Parameters:

provisioningState - the provisioningState value to set.

Returns:

the AlertRuleResourcePatch object itself.

withTags

public AlertRuleResourcePatch withTags(Map tags)

Set the tags property: Resource tags.

Parameters:

tags - the tags value to set.

Returns:

the AlertRuleResourcePatch object itself.

Applies to

Azure SDK for Java

Latest