1212
1313class AdvancedRuleCreateParams (TypedDict , total = False ):
1414 action : Required [Action ]
15- """The action that the rule takes when triggered"""
15+ """The action that the rule takes when triggered.
16+
17+ Only one action can be set per rule.
18+ """
1619
1720 enabled : Required [bool ]
1821 """Whether or not the rule is enabled"""
@@ -28,7 +31,7 @@ class AdvancedRuleCreateParams(TypedDict, total=False):
2831 https://gcore.com/docs/waap/waap-rules/advanced-rules
2932 """
3033
31- description : Optional [ str ]
34+ description : str
3235 """The description assigned to the rule"""
3336
3437 phase : Optional [Literal ["access" , "header_filter" , "body_filter" ]]
@@ -43,16 +46,16 @@ class AdvancedRuleCreateParams(TypedDict, total=False):
4346
4447
4548class ActionBlock (TypedDict , total = False ):
46- action_duration : Optional [ str ]
49+ action_duration : str
4750 """How long a rule's block action will apply to subsequent requests.
4851
4952 Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or
5053 'd' to represent time format (seconds, minutes, hours, or days). Empty time
5154 intervals are not allowed.
5255 """
5356
54- status_code : Optional [ Literal [403 , 405 , 418 , 429 ] ]
55- """Designates the HTTP status code to deliver when a request is blocked. """
57+ status_code : Literal [403 , 405 , 418 , 429 ]
58+ """A custom HTTP status code that the WAAP returns if a rule blocks a request """
5659
5760
5861class ActionTag (TypedDict , total = False ):
@@ -61,23 +64,23 @@ class ActionTag(TypedDict, total=False):
6164
6265
6366class Action (TypedDict , total = False ):
64- allow : Optional [ object ]
67+ allow : object
6568 """The WAAP allowed the request"""
6669
67- block : Optional [ ActionBlock ]
70+ block : ActionBlock
6871 """
6972 WAAP block action behavior could be configured with response status code and
7073 action duration.
7174 """
7275
73- captcha : Optional [ object ]
76+ captcha : object
7477 """The WAAP presented the user with a captcha"""
7578
76- handshake : Optional [ object ]
79+ handshake : object
7780 """The WAAP performed automatic browser validation"""
7881
79- monitor : Optional [ object ]
82+ monitor : object
8083 """The WAAP monitored the request but took no action"""
8184
82- tag : Optional [ ActionTag ]
85+ tag : ActionTag
8386 """WAAP tag action gets a list of tags to tag the request scope with"""
0 commit comments