Share via


CustomRule Class

Definition

Defines the common attributes for a custom rule that can be included in a waf policy.

public class CustomRule : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.Cdn.Models.CustomRule>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.Cdn.Models.CustomRule>
public class CustomRule
type CustomRule = class
    interface IJsonModel<CustomRule>
    interface IPersistableModel<CustomRule>
type CustomRule = class
Public Class CustomRule
Implements IJsonModel(Of CustomRule), IPersistableModel(Of CustomRule)
Public Class CustomRule
Inheritance
CustomRule
Derived
Implements

Constructors

CustomRule(String, Int32, IEnumerable<CustomRuleMatchCondition>, OverrideActionType)

Initializes a new instance of CustomRule.

Properties

Action

Describes what action to be applied when rule matches.

EnabledState

Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.

MatchConditions

List of match conditions.

Name

Defines the name of the custom rule.

Priority

Defines in what order this rule be evaluated in the overall list of custom rules.

Explicit Interface Implementations

IJsonModel<CustomRule>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<CustomRule>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<CustomRule>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<CustomRule>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<CustomRule>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to