Partager via


CustomRule Class

Definition

Defines contents of a web application rule

public class CustomRule
type CustomRule = class
Public Class CustomRule
Inheritance
CustomRule

Constructors

CustomRule()

Initializes a new instance of the CustomRule class.

CustomRule(Int32, String, IList<MatchCondition>, String, String, String, Nullable<Int32>, Nullable<Int32>, IList<GroupByVariable>)

Initializes a new instance of the CustomRule class.

Properties

Action

Gets or sets describes what action to be applied when rule matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect', 'AnomalyScoring', 'JSChallenge'

EnabledState

Gets or sets describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. Possible values include: 'Disabled', 'Enabled'

GroupBy

Gets or sets describes the list of variables to group the rate limit requests

MatchConditions

Gets or sets list of match conditions.

Name

Gets or sets describes the name of the rule.

Priority

Gets or sets describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.

RateLimitDurationInMinutes

Gets or sets time window for resetting the rate limit count. Default is 1 minute.

RateLimitThreshold

Gets or sets number of allowed requests per client within the time window.

RuleType

Gets or sets describes type of rule. Possible values include: 'MatchRule', 'RateLimitRule'

Methods

Validate()

Validate the object.

Extension Methods

ToPSCustomRule(CustomRule)

Applies to