Class CfnWebACL.RuleProperty
A combination of ByteMatchSet
, IPSet
, and/or SqlInjectionMatchSet
objects that identify the web requests that you want to allow, block, or count.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.WAFRegional
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class RuleProperty : Object, CfnWebACL.IRuleProperty
Syntax (vb)
Public Class RuleProperty
Inherits Object
Implements CfnWebACL.IRuleProperty
Remarks
For example, you might create a Rule
that includes the following predicates:
To match the settings in this Rule
, a request must originate from 192.0.2.44
AND include a User-Agent
header for which the value is BadBot
.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.WAFRegional;
var ruleProperty = new RuleProperty {
Action = new ActionProperty {
Type = "type"
},
Priority = 123,
RuleId = "ruleId"
};
Synopsis
Constructors
RuleProperty() |
Properties
Action | The action that AWS WAF takes when a web request matches all conditions in the rule, such as allow, block, or count the request. |
Priority | The order in which AWS WAF evaluates the rules in a web ACL. |
RuleId | The ID of an AWS WAF Regional rule to associate with a web ACL. |
Constructors
RuleProperty()
public RuleProperty()
Properties
Action
The action that AWS WAF takes when a web request matches all conditions in the rule, such as allow, block, or count the request.
public object Action { get; set; }
Property Value
System.Object
Remarks
Priority
The order in which AWS WAF evaluates the rules in a web ACL.
public double Priority { get; set; }
Property Value
System.Double
Remarks
AWS WAF evaluates rules with a lower value before rules with a higher value. The value must be a unique integer. If you have multiple rules in a web ACL, the priority numbers do not need to be consecutive.
RuleId
The ID of an AWS WAF Regional rule to associate with a web ACL.
public string RuleId { get; set; }
Property Value
System.String