RuleEmailAction Class

public final class RuleEmailAction
extends RuleAction

Specifies the action to send email when the rule condition is evaluated. The discriminator is always RuleEmailAction in this case.

Constructor Summary

Constructor Description
RuleEmailAction()

Creates an instance of RuleEmailAction class.

Method Summary

Modifier and Type Method and Description
List<String> customEmails()

Get the customEmails property: the list of administrator's custom email addresses to notify of the activation of the alert.

static RuleEmailAction fromJson(JsonReader jsonReader)

Reads an instance of RuleEmailAction from the JsonReader.

String odataType()

Get the odataType property: specifies the type of the action.

Boolean sendToServiceOwners()

Get the sendToServiceOwners property: Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

RuleEmailAction withCustomEmails(List<String> customEmails)

Set the customEmails property: the list of administrator's custom email addresses to notify of the activation of the alert.

RuleEmailAction withSendToServiceOwners(Boolean sendToServiceOwners)

Set the sendToServiceOwners property: Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.

Methods inherited from RuleAction

Methods inherited from java.lang.Object

Constructor Details

RuleEmailAction

public RuleEmailAction()

Creates an instance of RuleEmailAction class.

Method Details

customEmails

public List customEmails()

Get the customEmails property: the list of administrator's custom email addresses to notify of the activation of the alert.

Returns:

the customEmails value.

fromJson

public static RuleEmailAction fromJson(JsonReader jsonReader)

Reads an instance of RuleEmailAction from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

odataType

public String odataType()

Get the odataType property: specifies the type of the action. There are two types of actions: RuleEmailAction and RuleWebhookAction.

Overrides:

RuleEmailAction.odataType()

Returns:

the odataType value.

sendToServiceOwners

public Boolean sendToServiceOwners()

Get the sendToServiceOwners property: Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.

Returns:

the sendToServiceOwners value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

RuleEmailAction.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Overrides:

RuleEmailAction.validate()

withCustomEmails

public RuleEmailAction withCustomEmails(List customEmails)

Set the customEmails property: the list of administrator's custom email addresses to notify of the activation of the alert.

Parameters:

customEmails - the customEmails value to set.

Returns:

the RuleEmailAction object itself.

withSendToServiceOwners

public RuleEmailAction withSendToServiceOwners(Boolean sendToServiceOwners)

Set the sendToServiceOwners property: Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.

Parameters:

sendToServiceOwners - the sendToServiceOwners value to set.

Returns:

the RuleEmailAction object itself.

Applies to

Azure SDK for Java

Latest