Skip to content

RuleAction

Source code in docs_src/capo_wafv2/types/rule_action.py
class RuleAction(TypedDict, closed=True):
    block: NotRequired["capo_wafv2.types.block_action.BlockAction"]
    """<p>Instructs WAF to block the web request.</p>"""
    allow: NotRequired["capo_wafv2.types.allow_action.AllowAction"]
    """<p>Instructs WAF to allow the web request.</p>"""
    count: NotRequired["capo_wafv2.types.count_action.CountAction"]
    """<p>Instructs WAF to count the web request and then continue evaluating the request using the remaining rules in the web ACL.</p>"""
    captcha: NotRequired["capo_wafv2.types.captcha_action.CaptchaAction"]
    """<p>Instructs WAF to run a <code>CAPTCHA</code> check against the web request.</p>"""
    challenge: NotRequired["capo_wafv2.types.challenge_action.ChallengeAction"]
    """<p>Instructs WAF to run a <code>Challenge</code> check against the web request.</p>"""
    monetize: NotRequired["capo_wafv2.types.monetize_action.MonetizeAction"]
    """<p>Instructs WAF to return an HTTP 402 Payment Required response with a price manifest. The requesting client can complete payment and resubmit the request to gain access. This is a terminating action-requests that do not complete payment are blocked. This action is available only for web ACLs associated with Amazon CloudFront distributions and requires a <code>MonetizationConfig</code> on the web ACL.</p>"""

allow instance-attribute

allow: NotRequired[AllowAction]

Instructs WAF to allow the web request.

block instance-attribute

block: NotRequired[BlockAction]

Instructs WAF to block the web request.

captcha instance-attribute

captcha: NotRequired[CaptchaAction]

Instructs WAF to run a CAPTCHA check against the web request.

challenge instance-attribute

challenge: NotRequired[ChallengeAction]

Instructs WAF to run a Challenge check against the web request.

count instance-attribute

count: NotRequired[CountAction]

Instructs WAF to count the web request and then continue evaluating the request using the remaining rules in the web ACL.

monetize instance-attribute

monetize: NotRequired[MonetizeAction]

Instructs WAF to return an HTTP 402 Payment Required response with a price manifest. The requesting client can complete payment and resubmit the request to gain access. This is a terminating action-requests that do not complete payment are blocked. This action is available only for web ACLs associated with Amazon CloudFront distributions and requires a MonetizationConfig on the web ACL.