MetricAlertAction Class

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

Implements

public final class MetricAlertAction
implements JsonSerializable<MetricAlertAction>

An alert action.

Constructor Summary

Constructor Description
MetricAlertAction()

Creates an instance of MetricAlertAction class.

Method Summary

Modifier and Type Method and Description
String actionGroupId()

Get the actionGroupId property: the id of the action group to use.

static MetricAlertAction fromJson(JsonReader jsonReader)

Reads an instance of MetricAlertAction from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Map<String,String> 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.

MetricAlertAction withActionGroupId(String actionGroupId)

Set the actionGroupId property: the id of the action group to use.

MetricAlertAction 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 java.lang.Object

Constructor Details

MetricAlertAction

public MetricAlertAction()

Creates an instance of MetricAlertAction class.

Method Details

actionGroupId

public String actionGroupId()

Get the actionGroupId property: the id of the action group to use.

Returns:

the actionGroupId value.

fromJson

public static MetricAlertAction fromJson(JsonReader jsonReader)

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

webhookProperties

public Map 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.

withActionGroupId

public MetricAlertAction withActionGroupId(String actionGroupId)

Set the actionGroupId property: the id of the action group to use.

Parameters:

actionGroupId - the actionGroupId value to set.

Returns:

the MetricAlertAction object itself.

withWebhookProperties

public MetricAlertAction withWebhookProperties(Map 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.

Parameters:

webhookProperties - the webhookProperties value to set.

Returns:

the MetricAlertAction object itself.

Applies to