Class MetricAlertAction
java.lang.Object
com.azure.resourcemanager.monitor.models.MetricAlertAction
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MetricAlertAction>
public final class MetricAlertAction
extends Object
implements com.azure.json.JsonSerializable<MetricAlertAction>
An alert action.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the actionGroupId property: the id of the action group to use.static MetricAlertAction
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of MetricAlertAction from the JsonReader.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.Get the webhookProperties property: This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.withActionGroupId
(String actionGroupId) Set the actionGroupId property: the id of the action group to use.withWebhookProperties
(Map<String, String> webhookProperties) Set the webhookProperties property: This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
MetricAlertAction
public MetricAlertAction()Creates an instance of MetricAlertAction class.
-
-
Method Details
-
actionGroupId
Get the actionGroupId property: the id of the action group to use.- Returns:
- the actionGroupId value.
-
withActionGroupId
Set the actionGroupId property: the id of the action group to use.- Parameters:
actionGroupId
- the actionGroupId value to set.- Returns:
- the MetricAlertAction object itself.
-
webhookProperties
Get the webhookProperties property: This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.- Returns:
- the webhookProperties value.
-
withWebhookProperties
Set the webhookProperties property: This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.- Parameters:
webhookProperties
- the webhookProperties value to set.- Returns:
- the MetricAlertAction object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<MetricAlertAction>
- Throws:
IOException
-
fromJson
Reads an instance of MetricAlertAction from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of MetricAlertAction 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 MetricAlertAction.
-