Interface CfnWebACL.RuleProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnWebACL.RuleProperty.Jsii$Proxy
- Enclosing class:
CfnWebACL
WebACL or RuleGroup to identify web requests that you want to manage in some way.
Each rule includes one top-level Statement that AWS WAF uses to identify matching web requests, and parameters that govern how AWS WAF handles them.
Example:
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnWebACL.RulePropertystatic final classAn implementation forCfnWebACL.RuleProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default ObjectThe action that AWS WAF should take on a web request when it matches the rule's statement.default ObjectSpecifies how AWS WAF should handleCAPTCHAevaluations.default ObjectSpecifies how AWS WAF should handleChallengeevaluations.getName()The name of the rule.default ObjectThe override action to apply to the rules in a rule group, instead of the individual rule action settings.If you define more than oneRulein aWebACL, AWS WAF evaluates each request against theRulesin order based on the value ofPriority.default ObjectLabels to apply to web requests that match the rule match statement.The AWS WAF processing statement for the rule, for exampleByteMatchStatementorSizeConstraintStatement.Defines and enables Amazon CloudWatch metrics and web request sample collection.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getName
The name of the rule.If you change the name of a
Ruleafter you create it and you want the rule's metric name to reflect the change, update the metric name in the rule'sVisibilityConfigsettings. AWS WAF doesn't automatically update the metric name when you update the rule name.- See Also:
-
getPriority
If you define more than oneRulein aWebACL, AWS WAF evaluates each request against theRulesin order based on the value ofPriority.AWS WAF processes rules with lower priority first. The priorities don't need to be consecutive, but they must all be different.
- See Also:
-
getStatement
The AWS WAF processing statement for the rule, for exampleByteMatchStatementorSizeConstraintStatement.Returns union: either
IResolvableorCfnWebACL.StatementProperty- See Also:
-
getVisibilityConfig
Defines and enables Amazon CloudWatch metrics and web request sample collection.If you change the name of a
Ruleafter you create it and you want the rule's metric name to reflect the change, update the metric name as well. AWS WAF doesn't automatically update the metric name.Returns union: either
IResolvableorCfnWebACL.VisibilityConfigProperty- See Also:
-
getAction
The action that AWS WAF should take on a web request when it matches the rule's statement.Settings at the web ACL level can override the rule action setting.
This is used only for rules whose statements don't reference a rule group. Rule statements that reference a rule group are
RuleGroupReferenceStatementandManagedRuleGroupStatement.You must set either this
Actionsetting or the rule'sOverrideAction, but not both:- If the rule statement doesn't reference a rule group, you must set this rule action setting and you must not set the rule's override action setting.
- If the rule statement references a rule group, you must not set this action setting, because the actions are already set on the rules inside the rule group. You must set the rule's override action setting to indicate specifically whether to override the actions that are set on the rules in the rule group.
Returns union: either
IResolvableorCfnWebACL.RuleActionProperty- See Also:
-
getCaptchaConfig
Specifies how AWS WAF should handleCAPTCHAevaluations.If you don't specify this, AWS WAF uses the
CAPTCHAconfiguration that's defined for the web ACL.Returns union: either
IResolvableorCfnWebACL.CaptchaConfigProperty- See Also:
-
getChallengeConfig
Specifies how AWS WAF should handleChallengeevaluations.If you don't specify this, AWS WAF uses the challenge configuration that's defined for the web ACL.
Returns union: either
IResolvableorCfnWebACL.ChallengeConfigProperty- See Also:
-
getOverrideAction
The override action to apply to the rules in a rule group, instead of the individual rule action settings.This is used only for rules whose statements reference a rule group. Rule statements that reference a rule group are
RuleGroupReferenceStatementandManagedRuleGroupStatement.Set the override action to none to leave the rule group rule actions in effect. Set it to count to only count matches, regardless of the rule action settings.
You must set either this
OverrideActionsetting or theActionsetting, but not both:- If the rule statement references a rule group, you must set this override action setting and you must not set the rule's action setting.
- If the rule statement doesn't reference a rule group, you must set the rule action setting and you must not set the rule's override action setting.
Returns union: either
IResolvableorCfnWebACL.OverrideActionProperty- See Also:
-
getRuleLabels
Labels to apply to web requests that match the rule match statement.AWS WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.
Any rule that isn't a rule group reference statement or managed rule group statement can add labels to matching web requests.
Rules that run after this rule in the web ACL can match against these labels using a
LabelMatchStatement.For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:
- Separate each component of the label with a colon.
- Each namespace or name can have up to 128 characters.
- You can specify up to 5 namespaces in a label.
- Don't use the following reserved words in your label specification:
aws,waf,managed,rulegroup,webacl,regexpatternset, oripset.
For example,
myLabelNameornameSpace1:nameSpace2:myLabelName.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnWebACL.LabelProperty>- See Also:
-
builder
- Returns:
- a
CfnWebACL.RuleProperty.BuilderofCfnWebACL.RuleProperty
-