Class RuleWebhookAction

java.lang.Object
com.azure.resourcemanager.monitor.models.RuleAction
com.azure.resourcemanager.monitor.models.RuleWebhookAction
All Implemented Interfaces:
com.azure.json.JsonSerializable<RuleAction>

public final class RuleWebhookAction extends RuleAction
Specifies the action to post to service when the rule condition is evaluated. The discriminator is always RuleWebhookAction in this case.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of RuleWebhookAction class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of RuleWebhookAction from the JsonReader.
    Get the odataType property: specifies the type of the action.
    Get the properties property: the dictionary of custom properties to include with the post operation.
    Get the serviceUri property: the service uri to Post the notification when the alert activates or resolves.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the properties property: the dictionary of custom properties to include with the post operation.
    withServiceUri(String serviceUri)
    Set the serviceUri property: the service uri to Post the notification when the alert activates or resolves.

    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

    • RuleWebhookAction

      public RuleWebhookAction()
      Creates an instance of RuleWebhookAction class.
  • Method Details

    • odataType

      public String odataType()
      Get the odataType property: specifies the type of the action. There are two types of actions: RuleEmailAction and RuleWebhookAction.
      Overrides:
      odataType in class RuleAction
      Returns:
      the odataType value.
    • serviceUri

      public String serviceUri()
      Get the serviceUri property: the service uri to Post the notification when the alert activates or resolves.
      Returns:
      the serviceUri value.
    • withServiceUri

      public RuleWebhookAction withServiceUri(String serviceUri)
      Set the serviceUri property: the service uri to Post the notification when the alert activates or resolves.
      Parameters:
      serviceUri - the serviceUri value to set.
      Returns:
      the RuleWebhookAction object itself.
    • properties

      public Map<String,String> properties()
      Get the properties property: the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
      Returns:
      the properties value.
    • withProperties

      public RuleWebhookAction withProperties(Map<String,String> properties)
      Set the properties property: the dictionary of custom properties to include with the post operation. These data are appended to the webhook payload.
      Parameters:
      properties - the properties value to set.
      Returns:
      the RuleWebhookAction object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class RuleAction
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<RuleAction>
      Overrides:
      toJson in class RuleAction
      Throws:
      IOException
    • fromJson

      public static RuleWebhookAction fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of RuleWebhookAction from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of RuleWebhookAction 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 RuleWebhookAction.