Skip to content
Start here

Phases

Get an account or zone entry point ruleset
rulesets.phases.get(Phaseruleset_phase, PhaseGetParams**kwargs) -> PhaseGetResponse
GET/{accounts_or_zones}/{account_or_zone_id}/rulesets/phases/{ruleset_phase}/entrypoint
Update an account or zone entry point ruleset
rulesets.phases.update(Phaseruleset_phase, PhaseUpdateParams**kwargs) -> PhaseUpdateResponse
PUT/{accounts_or_zones}/{account_or_zone_id}/rulesets/phases/{ruleset_phase}/entrypoint
ModelsExpand Collapse
One of the following:
class UnionMember0: …
id: Optional[str]

The unique ID of the ruleset.

description: Optional[str]

An informative description of the ruleset.

kind: Optional[Kind]

The kind of the ruleset.

last_updated: Optional[datetime]

The timestamp of when the ruleset was last modified.

formatdate-time
name: Optional[str]

The human-readable name of the ruleset.

minLength1
phase: Optional[Phase]

The phase of the ruleset.

rules: Optional[List[UnionMember0Rule]]

The list of rules in the ruleset.

One of the following:
class UnionMember0RuleBlockRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember0RuleChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember0RuleChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember0RuleResponseCompressionRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleDDoSDynamicRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleExecuteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleForceConnectionCloseRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleJavaScriptChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["js_challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember0RuleJavaScriptChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember0RuleJavaScriptChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember0RuleLogRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleLogCustomFieldRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleManagedChallengeRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleRedirectRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleRewriteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleRouteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleScoreRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleServeErrorRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleSetCacheControlRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_control"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember0RuleSetCacheControlRuleActionParameters]

The parameters configuring the rule’s action.

immutable: Optional[UnionMember0RuleSetCacheControlRuleActionParametersImmutable]

A cache-control directive configuration.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersImmutableSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersImmutableRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

max_age: Optional[UnionMember0RuleSetCacheControlRuleActionParametersMaxAge]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersMaxAgeSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersMaxAgeRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_revalidate: Optional[UnionMember0RuleSetCacheControlRuleActionParametersMustRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersMustRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersMustRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_understand: Optional[UnionMember0RuleSetCacheControlRuleActionParametersMustUnderstand]

A cache-control directive configuration.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersMustUnderstandSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersMustUnderstandRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_cache: Optional[UnionMember0RuleSetCacheControlRuleActionParametersNoCache]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersNoCacheSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember0RuleSetCacheControlRuleActionParametersNoCacheRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_store: Optional[UnionMember0RuleSetCacheControlRuleActionParametersNoStore]

A cache-control directive configuration.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersNoStoreSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersNoStoreRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_transform: Optional[UnionMember0RuleSetCacheControlRuleActionParametersNoTransform]

A cache-control directive configuration.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersNoTransformSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersNoTransformRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

private: Optional[UnionMember0RuleSetCacheControlRuleActionParametersPrivate]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersPrivateSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember0RuleSetCacheControlRuleActionParametersPrivateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

proxy_revalidate: Optional[UnionMember0RuleSetCacheControlRuleActionParametersProxyRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersProxyRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

public: Optional[UnionMember0RuleSetCacheControlRuleActionParametersPublic]

A cache-control directive configuration.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersPublicSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersPublicRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

s_maxage: Optional[UnionMember0RuleSetCacheControlRuleActionParametersSMaxage]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersSMaxageSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersSMaxageRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_if_error: Optional[UnionMember0RuleSetCacheControlRuleActionParametersStaleIfError]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersStaleIfErrorSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_while_revalidate: Optional[UnionMember0RuleSetCacheControlRuleActionParametersStaleWhileRevalidate]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember0RuleSetCacheControlRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember0RuleSetCacheControlRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember0RuleSetCacheSettingsRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleSetCacheTagsRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_tags"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember0RuleSetCacheTagsRuleActionParameters]

The parameters configuring the rule’s action.

One of the following:
class UnionMember0RuleSetCacheTagsRuleActionParametersAddCacheTagsValues: …

Add cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember0RuleSetCacheTagsRuleActionParametersAddCacheTagsExpression: …

Add cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember0RuleSetCacheTagsRuleActionParametersRemoveCacheTagsValues: …

Remove cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember0RuleSetCacheTagsRuleActionParametersRemoveCacheTagsExpression: …

Remove cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember0RuleSetCacheTagsRuleActionParametersSetCacheTagsValues: …

Set cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember0RuleSetCacheTagsRuleActionParametersSetCacheTagsExpression: …

Set cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember0RuleSetCacheTagsRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember0RuleSetCacheTagsRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember0RuleSetConfigurationRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleSkipRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleTransformResponseHTMLRule: …
id: str

The unique ID of the rule.

action: Literal["transform_response_html"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember0RuleTransformResponseHTMLRuleActionParameters]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember0RuleTransformResponseHTMLRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember0RuleTransformResponseHTMLRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
version: Optional[str]

The version of the ruleset.

class UnionMember1: …
id: Optional[str]

The unique ID of the ruleset.

description: Optional[str]

An informative description of the ruleset.

kind: Optional[Kind]

The kind of the ruleset.

last_updated: Optional[datetime]

The timestamp of when the ruleset was last modified.

formatdate-time
name: Optional[str]

The human-readable name of the ruleset.

minLength1
phase: Optional[Phase]

The phase of the ruleset.

rules: Optional[List[UnionMember1Rule]]

The list of rules in the ruleset.

One of the following:
class UnionMember1RuleBlockRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember1RuleChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember1RuleChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember1RuleResponseCompressionRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleDDoSDynamicRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleExecuteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleForceConnectionCloseRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleJavaScriptChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["js_challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember1RuleJavaScriptChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember1RuleJavaScriptChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember1RuleLogRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleLogCustomFieldRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleManagedChallengeRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleRedirectRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleRewriteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleRouteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleScoreRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleServeErrorRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleSetCacheControlRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_control"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember1RuleSetCacheControlRuleActionParameters]

The parameters configuring the rule’s action.

immutable: Optional[UnionMember1RuleSetCacheControlRuleActionParametersImmutable]

A cache-control directive configuration.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersImmutableSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersImmutableRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

max_age: Optional[UnionMember1RuleSetCacheControlRuleActionParametersMaxAge]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersMaxAgeSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersMaxAgeRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_revalidate: Optional[UnionMember1RuleSetCacheControlRuleActionParametersMustRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersMustRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersMustRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_understand: Optional[UnionMember1RuleSetCacheControlRuleActionParametersMustUnderstand]

A cache-control directive configuration.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersMustUnderstandSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersMustUnderstandRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_cache: Optional[UnionMember1RuleSetCacheControlRuleActionParametersNoCache]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersNoCacheSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember1RuleSetCacheControlRuleActionParametersNoCacheRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_store: Optional[UnionMember1RuleSetCacheControlRuleActionParametersNoStore]

A cache-control directive configuration.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersNoStoreSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersNoStoreRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_transform: Optional[UnionMember1RuleSetCacheControlRuleActionParametersNoTransform]

A cache-control directive configuration.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersNoTransformSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersNoTransformRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

private: Optional[UnionMember1RuleSetCacheControlRuleActionParametersPrivate]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersPrivateSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember1RuleSetCacheControlRuleActionParametersPrivateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

proxy_revalidate: Optional[UnionMember1RuleSetCacheControlRuleActionParametersProxyRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersProxyRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

public: Optional[UnionMember1RuleSetCacheControlRuleActionParametersPublic]

A cache-control directive configuration.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersPublicSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersPublicRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

s_maxage: Optional[UnionMember1RuleSetCacheControlRuleActionParametersSMaxage]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersSMaxageSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersSMaxageRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_if_error: Optional[UnionMember1RuleSetCacheControlRuleActionParametersStaleIfError]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersStaleIfErrorSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_while_revalidate: Optional[UnionMember1RuleSetCacheControlRuleActionParametersStaleWhileRevalidate]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember1RuleSetCacheControlRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember1RuleSetCacheControlRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember1RuleSetCacheSettingsRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleSetCacheTagsRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_tags"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember1RuleSetCacheTagsRuleActionParameters]

The parameters configuring the rule’s action.

One of the following:
class UnionMember1RuleSetCacheTagsRuleActionParametersAddCacheTagsValues: …

Add cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember1RuleSetCacheTagsRuleActionParametersAddCacheTagsExpression: …

Add cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember1RuleSetCacheTagsRuleActionParametersRemoveCacheTagsValues: …

Remove cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember1RuleSetCacheTagsRuleActionParametersRemoveCacheTagsExpression: …

Remove cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember1RuleSetCacheTagsRuleActionParametersSetCacheTagsValues: …

Set cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember1RuleSetCacheTagsRuleActionParametersSetCacheTagsExpression: …

Set cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember1RuleSetCacheTagsRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember1RuleSetCacheTagsRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember1RuleSetConfigurationRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleSkipRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleTransformResponseHTMLRule: …
id: str

The unique ID of the rule.

action: Literal["transform_response_html"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember1RuleTransformResponseHTMLRuleActionParameters]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember1RuleTransformResponseHTMLRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember1RuleTransformResponseHTMLRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
version: Optional[str]

The version of the ruleset.

class UnionMember2: …
id: Optional[str]

The unique ID of the ruleset.

description: Optional[str]

An informative description of the ruleset.

kind: Optional[Kind]

The kind of the ruleset.

last_updated: Optional[datetime]

The timestamp of when the ruleset was last modified.

formatdate-time
name: Optional[str]

The human-readable name of the ruleset.

minLength1
phase: Optional[Phase]

The phase of the ruleset.

rules: Optional[List[UnionMember2Rule]]

The list of rules in the ruleset.

One of the following:
class UnionMember2RuleBlockRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember2RuleChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember2RuleChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember2RuleResponseCompressionRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleDDoSDynamicRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleExecuteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleForceConnectionCloseRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleJavaScriptChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["js_challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember2RuleJavaScriptChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember2RuleJavaScriptChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember2RuleLogRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleLogCustomFieldRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleManagedChallengeRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleRedirectRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleRewriteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleRouteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleScoreRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleServeErrorRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleSetCacheControlRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_control"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember2RuleSetCacheControlRuleActionParameters]

The parameters configuring the rule’s action.

immutable: Optional[UnionMember2RuleSetCacheControlRuleActionParametersImmutable]

A cache-control directive configuration.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersImmutableSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersImmutableRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

max_age: Optional[UnionMember2RuleSetCacheControlRuleActionParametersMaxAge]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersMaxAgeSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersMaxAgeRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_revalidate: Optional[UnionMember2RuleSetCacheControlRuleActionParametersMustRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersMustRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersMustRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_understand: Optional[UnionMember2RuleSetCacheControlRuleActionParametersMustUnderstand]

A cache-control directive configuration.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersMustUnderstandSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersMustUnderstandRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_cache: Optional[UnionMember2RuleSetCacheControlRuleActionParametersNoCache]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersNoCacheSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember2RuleSetCacheControlRuleActionParametersNoCacheRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_store: Optional[UnionMember2RuleSetCacheControlRuleActionParametersNoStore]

A cache-control directive configuration.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersNoStoreSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersNoStoreRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_transform: Optional[UnionMember2RuleSetCacheControlRuleActionParametersNoTransform]

A cache-control directive configuration.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersNoTransformSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersNoTransformRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

private: Optional[UnionMember2RuleSetCacheControlRuleActionParametersPrivate]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersPrivateSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember2RuleSetCacheControlRuleActionParametersPrivateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

proxy_revalidate: Optional[UnionMember2RuleSetCacheControlRuleActionParametersProxyRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersProxyRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

public: Optional[UnionMember2RuleSetCacheControlRuleActionParametersPublic]

A cache-control directive configuration.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersPublicSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersPublicRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

s_maxage: Optional[UnionMember2RuleSetCacheControlRuleActionParametersSMaxage]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersSMaxageSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersSMaxageRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_if_error: Optional[UnionMember2RuleSetCacheControlRuleActionParametersStaleIfError]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersStaleIfErrorSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_while_revalidate: Optional[UnionMember2RuleSetCacheControlRuleActionParametersStaleWhileRevalidate]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember2RuleSetCacheControlRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember2RuleSetCacheControlRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember2RuleSetCacheSettingsRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleSetCacheTagsRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_tags"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember2RuleSetCacheTagsRuleActionParameters]

The parameters configuring the rule’s action.

One of the following:
class UnionMember2RuleSetCacheTagsRuleActionParametersAddCacheTagsValues: …

Add cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember2RuleSetCacheTagsRuleActionParametersAddCacheTagsExpression: …

Add cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember2RuleSetCacheTagsRuleActionParametersRemoveCacheTagsValues: …

Remove cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember2RuleSetCacheTagsRuleActionParametersRemoveCacheTagsExpression: …

Remove cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember2RuleSetCacheTagsRuleActionParametersSetCacheTagsValues: …

Set cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember2RuleSetCacheTagsRuleActionParametersSetCacheTagsExpression: …

Set cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember2RuleSetCacheTagsRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember2RuleSetCacheTagsRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember2RuleSetConfigurationRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleSkipRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleTransformResponseHTMLRule: …
id: str

The unique ID of the rule.

action: Literal["transform_response_html"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember2RuleTransformResponseHTMLRuleActionParameters]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember2RuleTransformResponseHTMLRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember2RuleTransformResponseHTMLRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
version: Optional[str]

The version of the ruleset.

class UnionMember3: …
id: Optional[str]

The unique ID of the ruleset.

description: Optional[str]

An informative description of the ruleset.

kind: Optional[Kind]

The kind of the ruleset.

last_updated: Optional[datetime]

The timestamp of when the ruleset was last modified.

formatdate-time
name: Optional[str]

The human-readable name of the ruleset.

minLength1
phase: Optional[Phase]

The phase of the ruleset.

rules: Optional[List[UnionMember3Rule]]

The list of rules in the ruleset.

One of the following:
class UnionMember3RuleBlockRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember3RuleChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember3RuleChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember3RuleResponseCompressionRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleDDoSDynamicRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleExecuteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleForceConnectionCloseRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleJavaScriptChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["js_challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember3RuleJavaScriptChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember3RuleJavaScriptChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember3RuleLogRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleLogCustomFieldRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleManagedChallengeRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleRedirectRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleRewriteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleRouteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleScoreRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleServeErrorRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleSetCacheControlRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_control"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember3RuleSetCacheControlRuleActionParameters]

The parameters configuring the rule’s action.

immutable: Optional[UnionMember3RuleSetCacheControlRuleActionParametersImmutable]

A cache-control directive configuration.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersImmutableSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersImmutableRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

max_age: Optional[UnionMember3RuleSetCacheControlRuleActionParametersMaxAge]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersMaxAgeSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersMaxAgeRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_revalidate: Optional[UnionMember3RuleSetCacheControlRuleActionParametersMustRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersMustRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersMustRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_understand: Optional[UnionMember3RuleSetCacheControlRuleActionParametersMustUnderstand]

A cache-control directive configuration.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersMustUnderstandSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersMustUnderstandRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_cache: Optional[UnionMember3RuleSetCacheControlRuleActionParametersNoCache]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersNoCacheSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember3RuleSetCacheControlRuleActionParametersNoCacheRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_store: Optional[UnionMember3RuleSetCacheControlRuleActionParametersNoStore]

A cache-control directive configuration.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersNoStoreSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersNoStoreRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_transform: Optional[UnionMember3RuleSetCacheControlRuleActionParametersNoTransform]

A cache-control directive configuration.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersNoTransformSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersNoTransformRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

private: Optional[UnionMember3RuleSetCacheControlRuleActionParametersPrivate]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersPrivateSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember3RuleSetCacheControlRuleActionParametersPrivateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

proxy_revalidate: Optional[UnionMember3RuleSetCacheControlRuleActionParametersProxyRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersProxyRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

public: Optional[UnionMember3RuleSetCacheControlRuleActionParametersPublic]

A cache-control directive configuration.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersPublicSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersPublicRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

s_maxage: Optional[UnionMember3RuleSetCacheControlRuleActionParametersSMaxage]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersSMaxageSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersSMaxageRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_if_error: Optional[UnionMember3RuleSetCacheControlRuleActionParametersStaleIfError]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersStaleIfErrorSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_while_revalidate: Optional[UnionMember3RuleSetCacheControlRuleActionParametersStaleWhileRevalidate]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember3RuleSetCacheControlRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember3RuleSetCacheControlRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember3RuleSetCacheSettingsRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleSetCacheTagsRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_tags"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember3RuleSetCacheTagsRuleActionParameters]

The parameters configuring the rule’s action.

One of the following:
class UnionMember3RuleSetCacheTagsRuleActionParametersAddCacheTagsValues: …

Add cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember3RuleSetCacheTagsRuleActionParametersAddCacheTagsExpression: …

Add cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember3RuleSetCacheTagsRuleActionParametersRemoveCacheTagsValues: …

Remove cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember3RuleSetCacheTagsRuleActionParametersRemoveCacheTagsExpression: …

Remove cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember3RuleSetCacheTagsRuleActionParametersSetCacheTagsValues: …

Set cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember3RuleSetCacheTagsRuleActionParametersSetCacheTagsExpression: …

Set cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember3RuleSetCacheTagsRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember3RuleSetCacheTagsRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember3RuleSetConfigurationRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleSkipRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleTransformResponseHTMLRule: …
id: str

The unique ID of the rule.

action: Literal["transform_response_html"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember3RuleTransformResponseHTMLRuleActionParameters]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember3RuleTransformResponseHTMLRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember3RuleTransformResponseHTMLRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
version: Optional[str]

The version of the ruleset.

class UnionMember4: …
id: Optional[str]

The unique ID of the ruleset.

description: Optional[str]

An informative description of the ruleset.

kind: Optional[Kind]

The kind of the ruleset.

last_updated: Optional[datetime]

The timestamp of when the ruleset was last modified.

formatdate-time
name: Optional[str]

The human-readable name of the ruleset.

minLength1
phase: Optional[Phase]

The phase of the ruleset.

rules: Optional[List[UnionMember4Rule]]

The list of rules in the ruleset.

One of the following:
class UnionMember4RuleBlockRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember4RuleChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember4RuleChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember4RuleResponseCompressionRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleDDoSDynamicRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleExecuteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleForceConnectionCloseRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleJavaScriptChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["js_challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember4RuleJavaScriptChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember4RuleJavaScriptChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember4RuleLogRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleLogCustomFieldRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleManagedChallengeRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleRedirectRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleRewriteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleRouteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleScoreRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleServeErrorRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleSetCacheControlRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_control"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember4RuleSetCacheControlRuleActionParameters]

The parameters configuring the rule’s action.

immutable: Optional[UnionMember4RuleSetCacheControlRuleActionParametersImmutable]

A cache-control directive configuration.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersImmutableSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersImmutableRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

max_age: Optional[UnionMember4RuleSetCacheControlRuleActionParametersMaxAge]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersMaxAgeSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersMaxAgeRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_revalidate: Optional[UnionMember4RuleSetCacheControlRuleActionParametersMustRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersMustRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersMustRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_understand: Optional[UnionMember4RuleSetCacheControlRuleActionParametersMustUnderstand]

A cache-control directive configuration.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersMustUnderstandSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersMustUnderstandRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_cache: Optional[UnionMember4RuleSetCacheControlRuleActionParametersNoCache]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersNoCacheSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember4RuleSetCacheControlRuleActionParametersNoCacheRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_store: Optional[UnionMember4RuleSetCacheControlRuleActionParametersNoStore]

A cache-control directive configuration.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersNoStoreSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersNoStoreRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_transform: Optional[UnionMember4RuleSetCacheControlRuleActionParametersNoTransform]

A cache-control directive configuration.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersNoTransformSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersNoTransformRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

private: Optional[UnionMember4RuleSetCacheControlRuleActionParametersPrivate]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersPrivateSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember4RuleSetCacheControlRuleActionParametersPrivateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

proxy_revalidate: Optional[UnionMember4RuleSetCacheControlRuleActionParametersProxyRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersProxyRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

public: Optional[UnionMember4RuleSetCacheControlRuleActionParametersPublic]

A cache-control directive configuration.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersPublicSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersPublicRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

s_maxage: Optional[UnionMember4RuleSetCacheControlRuleActionParametersSMaxage]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersSMaxageSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersSMaxageRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_if_error: Optional[UnionMember4RuleSetCacheControlRuleActionParametersStaleIfError]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersStaleIfErrorSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_while_revalidate: Optional[UnionMember4RuleSetCacheControlRuleActionParametersStaleWhileRevalidate]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember4RuleSetCacheControlRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember4RuleSetCacheControlRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember4RuleSetCacheSettingsRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleSetCacheTagsRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_tags"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember4RuleSetCacheTagsRuleActionParameters]

The parameters configuring the rule’s action.

One of the following:
class UnionMember4RuleSetCacheTagsRuleActionParametersAddCacheTagsValues: …

Add cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember4RuleSetCacheTagsRuleActionParametersAddCacheTagsExpression: …

Add cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember4RuleSetCacheTagsRuleActionParametersRemoveCacheTagsValues: …

Remove cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember4RuleSetCacheTagsRuleActionParametersRemoveCacheTagsExpression: …

Remove cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember4RuleSetCacheTagsRuleActionParametersSetCacheTagsValues: …

Set cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember4RuleSetCacheTagsRuleActionParametersSetCacheTagsExpression: …

Set cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember4RuleSetCacheTagsRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember4RuleSetCacheTagsRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember4RuleSetConfigurationRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleSkipRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleTransformResponseHTMLRule: …
id: str

The unique ID of the rule.

action: Literal["transform_response_html"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember4RuleTransformResponseHTMLRuleActionParameters]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember4RuleTransformResponseHTMLRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember4RuleTransformResponseHTMLRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
version: Optional[str]

The version of the ruleset.

One of the following:
List[object]
str
float
bool
class Ruleset: …

A ruleset object.

id: str

The unique ID of the ruleset.

kind: Kind

The kind of the ruleset.

last_updated: datetime

The timestamp of when the ruleset was last modified.

formatdate-time
name: str

The human-readable name of the ruleset.

minLength1
phase: Phase

The phase of the ruleset.

rules: List[RulesetRule]

The list of rules in the ruleset.

One of the following:
class RulesetRuleBlockRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[RulesetRuleChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[RulesetRuleChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class RulesetRuleResponseCompressionRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleDDoSDynamicRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleExecuteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleForceConnectionCloseRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleJavaScriptChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["js_challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[RulesetRuleJavaScriptChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[RulesetRuleJavaScriptChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class RulesetRuleLogRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleLogCustomFieldRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleManagedChallengeRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleRedirectRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleRewriteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleRouteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleScoreRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleServeErrorRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleSetCacheControlRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_control"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[RulesetRuleSetCacheControlRuleActionParameters]

The parameters configuring the rule’s action.

immutable: Optional[RulesetRuleSetCacheControlRuleActionParametersImmutable]

A cache-control directive configuration.

One of the following:
class RulesetRuleSetCacheControlRuleActionParametersImmutableSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class RulesetRuleSetCacheControlRuleActionParametersImmutableRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

max_age: Optional[RulesetRuleSetCacheControlRuleActionParametersMaxAge]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class RulesetRuleSetCacheControlRuleActionParametersMaxAgeSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class RulesetRuleSetCacheControlRuleActionParametersMaxAgeRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_revalidate: Optional[RulesetRuleSetCacheControlRuleActionParametersMustRevalidate]

A cache-control directive configuration.

One of the following:
class RulesetRuleSetCacheControlRuleActionParametersMustRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class RulesetRuleSetCacheControlRuleActionParametersMustRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_understand: Optional[RulesetRuleSetCacheControlRuleActionParametersMustUnderstand]

A cache-control directive configuration.

One of the following:
class RulesetRuleSetCacheControlRuleActionParametersMustUnderstandSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class RulesetRuleSetCacheControlRuleActionParametersMustUnderstandRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_cache: Optional[RulesetRuleSetCacheControlRuleActionParametersNoCache]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class RulesetRuleSetCacheControlRuleActionParametersNoCacheSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class RulesetRuleSetCacheControlRuleActionParametersNoCacheRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_store: Optional[RulesetRuleSetCacheControlRuleActionParametersNoStore]

A cache-control directive configuration.

One of the following:
class RulesetRuleSetCacheControlRuleActionParametersNoStoreSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class RulesetRuleSetCacheControlRuleActionParametersNoStoreRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_transform: Optional[RulesetRuleSetCacheControlRuleActionParametersNoTransform]

A cache-control directive configuration.

One of the following:
class RulesetRuleSetCacheControlRuleActionParametersNoTransformSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class RulesetRuleSetCacheControlRuleActionParametersNoTransformRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

private: Optional[RulesetRuleSetCacheControlRuleActionParametersPrivate]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class RulesetRuleSetCacheControlRuleActionParametersPrivateSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class RulesetRuleSetCacheControlRuleActionParametersPrivateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

proxy_revalidate: Optional[RulesetRuleSetCacheControlRuleActionParametersProxyRevalidate]

A cache-control directive configuration.

One of the following:
class RulesetRuleSetCacheControlRuleActionParametersProxyRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class RulesetRuleSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

public: Optional[RulesetRuleSetCacheControlRuleActionParametersPublic]

A cache-control directive configuration.

One of the following:
class RulesetRuleSetCacheControlRuleActionParametersPublicSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class RulesetRuleSetCacheControlRuleActionParametersPublicRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

s_maxage: Optional[RulesetRuleSetCacheControlRuleActionParametersSMaxage]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class RulesetRuleSetCacheControlRuleActionParametersSMaxageSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class RulesetRuleSetCacheControlRuleActionParametersSMaxageRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_if_error: Optional[RulesetRuleSetCacheControlRuleActionParametersStaleIfError]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class RulesetRuleSetCacheControlRuleActionParametersStaleIfErrorSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class RulesetRuleSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_while_revalidate: Optional[RulesetRuleSetCacheControlRuleActionParametersStaleWhileRevalidate]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class RulesetRuleSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class RulesetRuleSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[RulesetRuleSetCacheControlRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[RulesetRuleSetCacheControlRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class RulesetRuleSetCacheSettingsRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleSetCacheTagsRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_tags"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[RulesetRuleSetCacheTagsRuleActionParameters]

The parameters configuring the rule’s action.

One of the following:
class RulesetRuleSetCacheTagsRuleActionParametersAddCacheTagsValues: …

Add cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class RulesetRuleSetCacheTagsRuleActionParametersAddCacheTagsExpression: …

Add cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class RulesetRuleSetCacheTagsRuleActionParametersRemoveCacheTagsValues: …

Remove cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class RulesetRuleSetCacheTagsRuleActionParametersRemoveCacheTagsExpression: …

Remove cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class RulesetRuleSetCacheTagsRuleActionParametersSetCacheTagsValues: …

Set cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class RulesetRuleSetCacheTagsRuleActionParametersSetCacheTagsExpression: …

Set cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[RulesetRuleSetCacheTagsRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[RulesetRuleSetCacheTagsRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class RulesetRuleSetConfigurationRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleSkipRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class RulesetRuleTransformResponseHTMLRule: …
id: str

The unique ID of the rule.

action: Literal["transform_response_html"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[RulesetRuleTransformResponseHTMLRuleActionParameters]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[RulesetRuleTransformResponseHTMLRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[RulesetRuleTransformResponseHTMLRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
version: str

The version of the ruleset.

description: Optional[str]

An informative description of the ruleset.

Optional[object]
Optional[object]

Returned when dry_run is true.

PhasesVersions

List an account or zone entry point ruleset's versions
rulesets.phases.versions.list(Phaseruleset_phase, VersionListParams**kwargs) -> VersionListResponse
GET/{accounts_or_zones}/{account_or_zone_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions
Get an account or zone entry point ruleset version
rulesets.phases.versions.get(strruleset_version, VersionGetParams**kwargs) -> VersionGetResponse
GET/{accounts_or_zones}/{account_or_zone_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions/{ruleset_version}
ModelsExpand Collapse
Union[List[object], str, float, 2 more]

A result.

One of the following:
List[object]
str
float
bool
Optional[object]
One of the following:
class UnionMember0: …
id: Optional[str]

The unique ID of the ruleset.

description: Optional[str]

An informative description of the ruleset.

kind: Optional[Kind]

The kind of the ruleset.

last_updated: Optional[datetime]

The timestamp of when the ruleset was last modified.

formatdate-time
name: Optional[str]

The human-readable name of the ruleset.

minLength1
phase: Optional[Phase]

The phase of the ruleset.

rules: Optional[List[UnionMember0Rule]]

The list of rules in the ruleset.

One of the following:
class UnionMember0RuleBlockRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember0RuleChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember0RuleChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember0RuleResponseCompressionRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleDDoSDynamicRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleExecuteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleForceConnectionCloseRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleJavaScriptChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["js_challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember0RuleJavaScriptChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember0RuleJavaScriptChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember0RuleLogRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleLogCustomFieldRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleManagedChallengeRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleRedirectRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleRewriteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleRouteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleScoreRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleServeErrorRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleSetCacheControlRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_control"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember0RuleSetCacheControlRuleActionParameters]

The parameters configuring the rule’s action.

immutable: Optional[UnionMember0RuleSetCacheControlRuleActionParametersImmutable]

A cache-control directive configuration.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersImmutableSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersImmutableRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

max_age: Optional[UnionMember0RuleSetCacheControlRuleActionParametersMaxAge]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersMaxAgeSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersMaxAgeRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_revalidate: Optional[UnionMember0RuleSetCacheControlRuleActionParametersMustRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersMustRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersMustRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_understand: Optional[UnionMember0RuleSetCacheControlRuleActionParametersMustUnderstand]

A cache-control directive configuration.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersMustUnderstandSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersMustUnderstandRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_cache: Optional[UnionMember0RuleSetCacheControlRuleActionParametersNoCache]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersNoCacheSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember0RuleSetCacheControlRuleActionParametersNoCacheRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_store: Optional[UnionMember0RuleSetCacheControlRuleActionParametersNoStore]

A cache-control directive configuration.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersNoStoreSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersNoStoreRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_transform: Optional[UnionMember0RuleSetCacheControlRuleActionParametersNoTransform]

A cache-control directive configuration.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersNoTransformSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersNoTransformRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

private: Optional[UnionMember0RuleSetCacheControlRuleActionParametersPrivate]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersPrivateSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember0RuleSetCacheControlRuleActionParametersPrivateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

proxy_revalidate: Optional[UnionMember0RuleSetCacheControlRuleActionParametersProxyRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersProxyRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

public: Optional[UnionMember0RuleSetCacheControlRuleActionParametersPublic]

A cache-control directive configuration.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersPublicSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersPublicRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

s_maxage: Optional[UnionMember0RuleSetCacheControlRuleActionParametersSMaxage]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersSMaxageSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersSMaxageRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_if_error: Optional[UnionMember0RuleSetCacheControlRuleActionParametersStaleIfError]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersStaleIfErrorSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_while_revalidate: Optional[UnionMember0RuleSetCacheControlRuleActionParametersStaleWhileRevalidate]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember0RuleSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember0RuleSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember0RuleSetCacheControlRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember0RuleSetCacheControlRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember0RuleSetCacheSettingsRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleSetCacheTagsRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_tags"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember0RuleSetCacheTagsRuleActionParameters]

The parameters configuring the rule’s action.

One of the following:
class UnionMember0RuleSetCacheTagsRuleActionParametersAddCacheTagsValues: …

Add cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember0RuleSetCacheTagsRuleActionParametersAddCacheTagsExpression: …

Add cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember0RuleSetCacheTagsRuleActionParametersRemoveCacheTagsValues: …

Remove cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember0RuleSetCacheTagsRuleActionParametersRemoveCacheTagsExpression: …

Remove cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember0RuleSetCacheTagsRuleActionParametersSetCacheTagsValues: …

Set cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember0RuleSetCacheTagsRuleActionParametersSetCacheTagsExpression: …

Set cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember0RuleSetCacheTagsRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember0RuleSetCacheTagsRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember0RuleSetConfigurationRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleSkipRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember0RuleTransformResponseHTMLRule: …
id: str

The unique ID of the rule.

action: Literal["transform_response_html"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember0RuleTransformResponseHTMLRuleActionParameters]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember0RuleTransformResponseHTMLRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember0RuleTransformResponseHTMLRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
version: Optional[str]

The version of the ruleset.

class UnionMember1: …
id: Optional[str]

The unique ID of the ruleset.

description: Optional[str]

An informative description of the ruleset.

kind: Optional[Kind]

The kind of the ruleset.

last_updated: Optional[datetime]

The timestamp of when the ruleset was last modified.

formatdate-time
name: Optional[str]

The human-readable name of the ruleset.

minLength1
phase: Optional[Phase]

The phase of the ruleset.

rules: Optional[List[UnionMember1Rule]]

The list of rules in the ruleset.

One of the following:
class UnionMember1RuleBlockRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember1RuleChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember1RuleChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember1RuleResponseCompressionRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleDDoSDynamicRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleExecuteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleForceConnectionCloseRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleJavaScriptChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["js_challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember1RuleJavaScriptChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember1RuleJavaScriptChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember1RuleLogRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleLogCustomFieldRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleManagedChallengeRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleRedirectRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleRewriteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleRouteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleScoreRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleServeErrorRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleSetCacheControlRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_control"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember1RuleSetCacheControlRuleActionParameters]

The parameters configuring the rule’s action.

immutable: Optional[UnionMember1RuleSetCacheControlRuleActionParametersImmutable]

A cache-control directive configuration.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersImmutableSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersImmutableRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

max_age: Optional[UnionMember1RuleSetCacheControlRuleActionParametersMaxAge]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersMaxAgeSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersMaxAgeRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_revalidate: Optional[UnionMember1RuleSetCacheControlRuleActionParametersMustRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersMustRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersMustRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_understand: Optional[UnionMember1RuleSetCacheControlRuleActionParametersMustUnderstand]

A cache-control directive configuration.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersMustUnderstandSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersMustUnderstandRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_cache: Optional[UnionMember1RuleSetCacheControlRuleActionParametersNoCache]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersNoCacheSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember1RuleSetCacheControlRuleActionParametersNoCacheRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_store: Optional[UnionMember1RuleSetCacheControlRuleActionParametersNoStore]

A cache-control directive configuration.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersNoStoreSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersNoStoreRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_transform: Optional[UnionMember1RuleSetCacheControlRuleActionParametersNoTransform]

A cache-control directive configuration.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersNoTransformSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersNoTransformRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

private: Optional[UnionMember1RuleSetCacheControlRuleActionParametersPrivate]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersPrivateSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember1RuleSetCacheControlRuleActionParametersPrivateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

proxy_revalidate: Optional[UnionMember1RuleSetCacheControlRuleActionParametersProxyRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersProxyRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

public: Optional[UnionMember1RuleSetCacheControlRuleActionParametersPublic]

A cache-control directive configuration.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersPublicSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersPublicRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

s_maxage: Optional[UnionMember1RuleSetCacheControlRuleActionParametersSMaxage]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersSMaxageSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersSMaxageRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_if_error: Optional[UnionMember1RuleSetCacheControlRuleActionParametersStaleIfError]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersStaleIfErrorSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_while_revalidate: Optional[UnionMember1RuleSetCacheControlRuleActionParametersStaleWhileRevalidate]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember1RuleSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember1RuleSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember1RuleSetCacheControlRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember1RuleSetCacheControlRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember1RuleSetCacheSettingsRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleSetCacheTagsRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_tags"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember1RuleSetCacheTagsRuleActionParameters]

The parameters configuring the rule’s action.

One of the following:
class UnionMember1RuleSetCacheTagsRuleActionParametersAddCacheTagsValues: …

Add cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember1RuleSetCacheTagsRuleActionParametersAddCacheTagsExpression: …

Add cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember1RuleSetCacheTagsRuleActionParametersRemoveCacheTagsValues: …

Remove cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember1RuleSetCacheTagsRuleActionParametersRemoveCacheTagsExpression: …

Remove cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember1RuleSetCacheTagsRuleActionParametersSetCacheTagsValues: …

Set cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember1RuleSetCacheTagsRuleActionParametersSetCacheTagsExpression: …

Set cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember1RuleSetCacheTagsRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember1RuleSetCacheTagsRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember1RuleSetConfigurationRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleSkipRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember1RuleTransformResponseHTMLRule: …
id: str

The unique ID of the rule.

action: Literal["transform_response_html"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember1RuleTransformResponseHTMLRuleActionParameters]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember1RuleTransformResponseHTMLRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember1RuleTransformResponseHTMLRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
version: Optional[str]

The version of the ruleset.

class UnionMember2: …
id: Optional[str]

The unique ID of the ruleset.

description: Optional[str]

An informative description of the ruleset.

kind: Optional[Kind]

The kind of the ruleset.

last_updated: Optional[datetime]

The timestamp of when the ruleset was last modified.

formatdate-time
name: Optional[str]

The human-readable name of the ruleset.

minLength1
phase: Optional[Phase]

The phase of the ruleset.

rules: Optional[List[UnionMember2Rule]]

The list of rules in the ruleset.

One of the following:
class UnionMember2RuleBlockRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember2RuleChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember2RuleChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember2RuleResponseCompressionRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleDDoSDynamicRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleExecuteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleForceConnectionCloseRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleJavaScriptChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["js_challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember2RuleJavaScriptChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember2RuleJavaScriptChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember2RuleLogRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleLogCustomFieldRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleManagedChallengeRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleRedirectRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleRewriteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleRouteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleScoreRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleServeErrorRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleSetCacheControlRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_control"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember2RuleSetCacheControlRuleActionParameters]

The parameters configuring the rule’s action.

immutable: Optional[UnionMember2RuleSetCacheControlRuleActionParametersImmutable]

A cache-control directive configuration.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersImmutableSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersImmutableRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

max_age: Optional[UnionMember2RuleSetCacheControlRuleActionParametersMaxAge]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersMaxAgeSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersMaxAgeRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_revalidate: Optional[UnionMember2RuleSetCacheControlRuleActionParametersMustRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersMustRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersMustRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_understand: Optional[UnionMember2RuleSetCacheControlRuleActionParametersMustUnderstand]

A cache-control directive configuration.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersMustUnderstandSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersMustUnderstandRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_cache: Optional[UnionMember2RuleSetCacheControlRuleActionParametersNoCache]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersNoCacheSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember2RuleSetCacheControlRuleActionParametersNoCacheRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_store: Optional[UnionMember2RuleSetCacheControlRuleActionParametersNoStore]

A cache-control directive configuration.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersNoStoreSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersNoStoreRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_transform: Optional[UnionMember2RuleSetCacheControlRuleActionParametersNoTransform]

A cache-control directive configuration.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersNoTransformSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersNoTransformRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

private: Optional[UnionMember2RuleSetCacheControlRuleActionParametersPrivate]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersPrivateSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember2RuleSetCacheControlRuleActionParametersPrivateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

proxy_revalidate: Optional[UnionMember2RuleSetCacheControlRuleActionParametersProxyRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersProxyRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

public: Optional[UnionMember2RuleSetCacheControlRuleActionParametersPublic]

A cache-control directive configuration.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersPublicSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersPublicRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

s_maxage: Optional[UnionMember2RuleSetCacheControlRuleActionParametersSMaxage]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersSMaxageSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersSMaxageRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_if_error: Optional[UnionMember2RuleSetCacheControlRuleActionParametersStaleIfError]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersStaleIfErrorSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_while_revalidate: Optional[UnionMember2RuleSetCacheControlRuleActionParametersStaleWhileRevalidate]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember2RuleSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember2RuleSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember2RuleSetCacheControlRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember2RuleSetCacheControlRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember2RuleSetCacheSettingsRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleSetCacheTagsRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_tags"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember2RuleSetCacheTagsRuleActionParameters]

The parameters configuring the rule’s action.

One of the following:
class UnionMember2RuleSetCacheTagsRuleActionParametersAddCacheTagsValues: …

Add cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember2RuleSetCacheTagsRuleActionParametersAddCacheTagsExpression: …

Add cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember2RuleSetCacheTagsRuleActionParametersRemoveCacheTagsValues: …

Remove cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember2RuleSetCacheTagsRuleActionParametersRemoveCacheTagsExpression: …

Remove cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember2RuleSetCacheTagsRuleActionParametersSetCacheTagsValues: …

Set cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember2RuleSetCacheTagsRuleActionParametersSetCacheTagsExpression: …

Set cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember2RuleSetCacheTagsRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember2RuleSetCacheTagsRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember2RuleSetConfigurationRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleSkipRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember2RuleTransformResponseHTMLRule: …
id: str

The unique ID of the rule.

action: Literal["transform_response_html"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember2RuleTransformResponseHTMLRuleActionParameters]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember2RuleTransformResponseHTMLRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember2RuleTransformResponseHTMLRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
version: Optional[str]

The version of the ruleset.

class UnionMember3: …
id: Optional[str]

The unique ID of the ruleset.

description: Optional[str]

An informative description of the ruleset.

kind: Optional[Kind]

The kind of the ruleset.

last_updated: Optional[datetime]

The timestamp of when the ruleset was last modified.

formatdate-time
name: Optional[str]

The human-readable name of the ruleset.

minLength1
phase: Optional[Phase]

The phase of the ruleset.

rules: Optional[List[UnionMember3Rule]]

The list of rules in the ruleset.

One of the following:
class UnionMember3RuleBlockRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember3RuleChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember3RuleChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember3RuleResponseCompressionRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleDDoSDynamicRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleExecuteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleForceConnectionCloseRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleJavaScriptChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["js_challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember3RuleJavaScriptChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember3RuleJavaScriptChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember3RuleLogRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleLogCustomFieldRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleManagedChallengeRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleRedirectRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleRewriteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleRouteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleScoreRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleServeErrorRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleSetCacheControlRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_control"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember3RuleSetCacheControlRuleActionParameters]

The parameters configuring the rule’s action.

immutable: Optional[UnionMember3RuleSetCacheControlRuleActionParametersImmutable]

A cache-control directive configuration.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersImmutableSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersImmutableRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

max_age: Optional[UnionMember3RuleSetCacheControlRuleActionParametersMaxAge]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersMaxAgeSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersMaxAgeRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_revalidate: Optional[UnionMember3RuleSetCacheControlRuleActionParametersMustRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersMustRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersMustRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_understand: Optional[UnionMember3RuleSetCacheControlRuleActionParametersMustUnderstand]

A cache-control directive configuration.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersMustUnderstandSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersMustUnderstandRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_cache: Optional[UnionMember3RuleSetCacheControlRuleActionParametersNoCache]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersNoCacheSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember3RuleSetCacheControlRuleActionParametersNoCacheRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_store: Optional[UnionMember3RuleSetCacheControlRuleActionParametersNoStore]

A cache-control directive configuration.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersNoStoreSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersNoStoreRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_transform: Optional[UnionMember3RuleSetCacheControlRuleActionParametersNoTransform]

A cache-control directive configuration.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersNoTransformSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersNoTransformRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

private: Optional[UnionMember3RuleSetCacheControlRuleActionParametersPrivate]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersPrivateSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember3RuleSetCacheControlRuleActionParametersPrivateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

proxy_revalidate: Optional[UnionMember3RuleSetCacheControlRuleActionParametersProxyRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersProxyRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

public: Optional[UnionMember3RuleSetCacheControlRuleActionParametersPublic]

A cache-control directive configuration.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersPublicSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersPublicRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

s_maxage: Optional[UnionMember3RuleSetCacheControlRuleActionParametersSMaxage]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersSMaxageSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersSMaxageRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_if_error: Optional[UnionMember3RuleSetCacheControlRuleActionParametersStaleIfError]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersStaleIfErrorSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_while_revalidate: Optional[UnionMember3RuleSetCacheControlRuleActionParametersStaleWhileRevalidate]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember3RuleSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember3RuleSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember3RuleSetCacheControlRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember3RuleSetCacheControlRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember3RuleSetCacheSettingsRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleSetCacheTagsRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_tags"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember3RuleSetCacheTagsRuleActionParameters]

The parameters configuring the rule’s action.

One of the following:
class UnionMember3RuleSetCacheTagsRuleActionParametersAddCacheTagsValues: …

Add cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember3RuleSetCacheTagsRuleActionParametersAddCacheTagsExpression: …

Add cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember3RuleSetCacheTagsRuleActionParametersRemoveCacheTagsValues: …

Remove cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember3RuleSetCacheTagsRuleActionParametersRemoveCacheTagsExpression: …

Remove cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember3RuleSetCacheTagsRuleActionParametersSetCacheTagsValues: …

Set cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember3RuleSetCacheTagsRuleActionParametersSetCacheTagsExpression: …

Set cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember3RuleSetCacheTagsRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember3RuleSetCacheTagsRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember3RuleSetConfigurationRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleSkipRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember3RuleTransformResponseHTMLRule: …
id: str

The unique ID of the rule.

action: Literal["transform_response_html"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember3RuleTransformResponseHTMLRuleActionParameters]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember3RuleTransformResponseHTMLRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember3RuleTransformResponseHTMLRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
version: Optional[str]

The version of the ruleset.

class UnionMember4: …
id: Optional[str]

The unique ID of the ruleset.

description: Optional[str]

An informative description of the ruleset.

kind: Optional[Kind]

The kind of the ruleset.

last_updated: Optional[datetime]

The timestamp of when the ruleset was last modified.

formatdate-time
name: Optional[str]

The human-readable name of the ruleset.

minLength1
phase: Optional[Phase]

The phase of the ruleset.

rules: Optional[List[UnionMember4Rule]]

The list of rules in the ruleset.

One of the following:
class UnionMember4RuleBlockRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember4RuleChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember4RuleChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember4RuleResponseCompressionRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleDDoSDynamicRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleExecuteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleForceConnectionCloseRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleJavaScriptChallengeRule: …
id: str

The unique ID of the rule.

action: Literal["js_challenge"]

The action to perform when the rule matches.

enabled: bool

Whether the rule should be executed.

expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[object]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember4RuleJavaScriptChallengeRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember4RuleJavaScriptChallengeRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember4RuleLogRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleLogCustomFieldRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleManagedChallengeRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleRedirectRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleRewriteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleRouteRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleScoreRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleServeErrorRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleSetCacheControlRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_control"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember4RuleSetCacheControlRuleActionParameters]

The parameters configuring the rule’s action.

immutable: Optional[UnionMember4RuleSetCacheControlRuleActionParametersImmutable]

A cache-control directive configuration.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersImmutableSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersImmutableRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

max_age: Optional[UnionMember4RuleSetCacheControlRuleActionParametersMaxAge]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersMaxAgeSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersMaxAgeRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_revalidate: Optional[UnionMember4RuleSetCacheControlRuleActionParametersMustRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersMustRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersMustRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

must_understand: Optional[UnionMember4RuleSetCacheControlRuleActionParametersMustUnderstand]

A cache-control directive configuration.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersMustUnderstandSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersMustUnderstandRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_cache: Optional[UnionMember4RuleSetCacheControlRuleActionParametersNoCache]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersNoCacheSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember4RuleSetCacheControlRuleActionParametersNoCacheRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_store: Optional[UnionMember4RuleSetCacheControlRuleActionParametersNoStore]

A cache-control directive configuration.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersNoStoreSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersNoStoreRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

no_transform: Optional[UnionMember4RuleSetCacheControlRuleActionParametersNoTransform]

A cache-control directive configuration.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersNoTransformSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersNoTransformRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

private: Optional[UnionMember4RuleSetCacheControlRuleActionParametersPrivate]

A cache-control directive configuration that accepts optional qualifiers (header names).

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersPrivateSetDirective: …

Set the directive with optional qualifiers.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

qualifiers: Optional[List[str]]

Optional list of header names to qualify the directive (e.g., for “private” or “no-cache” directives).

class UnionMember4RuleSetCacheControlRuleActionParametersPrivateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

proxy_revalidate: Optional[UnionMember4RuleSetCacheControlRuleActionParametersProxyRevalidate]

A cache-control directive configuration.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersProxyRevalidateSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersProxyRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

public: Optional[UnionMember4RuleSetCacheControlRuleActionParametersPublic]

A cache-control directive configuration.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersPublicSetDirective: …

Set the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersPublicRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

s_maxage: Optional[UnionMember4RuleSetCacheControlRuleActionParametersSMaxage]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersSMaxageSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersSMaxageRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_if_error: Optional[UnionMember4RuleSetCacheControlRuleActionParametersStaleIfError]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersStaleIfErrorSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersStaleIfErrorRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

stale_while_revalidate: Optional[UnionMember4RuleSetCacheControlRuleActionParametersStaleWhileRevalidate]

A cache-control directive configuration that accepts a duration value in seconds.

One of the following:
class UnionMember4RuleSetCacheControlRuleActionParametersStaleWhileRevalidateSetDirective: …

Set the directive with a duration value in seconds.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
value: int

The duration value in seconds for the directive.

minimum0
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

class UnionMember4RuleSetCacheControlRuleActionParametersStaleWhileRevalidateRemoveDirective: …

Remove the directive.

operation: Literal["set", "remove"]

The operation to perform on the cache-control directive.

One of the following:
"set"
"remove"
cloudflare_only: Optional[bool]

Whether the directive should only be applied to the Cloudflare CDN cache.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember4RuleSetCacheControlRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember4RuleSetCacheControlRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember4RuleSetCacheSettingsRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleSetCacheTagsRule: …
id: str

The unique ID of the rule.

action: Literal["set_cache_tags"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember4RuleSetCacheTagsRuleActionParameters]

The parameters configuring the rule’s action.

One of the following:
class UnionMember4RuleSetCacheTagsRuleActionParametersAddCacheTagsValues: …

Add cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember4RuleSetCacheTagsRuleActionParametersAddCacheTagsExpression: …

Add cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember4RuleSetCacheTagsRuleActionParametersRemoveCacheTagsValues: …

Remove cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember4RuleSetCacheTagsRuleActionParametersRemoveCacheTagsExpression: …

Remove cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
class UnionMember4RuleSetCacheTagsRuleActionParametersSetCacheTagsValues: …

Set cache tags using a list of values.

operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
values: List[str]

A list of cache tag values.

class UnionMember4RuleSetCacheTagsRuleActionParametersSetCacheTagsExpression: …

Set cache tags using an expression.

expression: str

An expression that evaluates to an array of cache tag values.

minLength1
operation: Literal["add", "remove", "set"]

The operation to perform on the cache tags.

One of the following:
"add"
"remove"
"set"
categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember4RuleSetCacheTagsRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember4RuleSetCacheTagsRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
class UnionMember4RuleSetConfigurationRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleSkipRule: …
id: str
action: str
enabled: bool
expression: str
ref: str
class UnionMember4RuleTransformResponseHTMLRule: …
id: str

The unique ID of the rule.

action: Literal["transform_response_html"]

The action to perform when the rule matches.

enabled: bool
expression: str

The expression defining which traffic will match the rule.

minLength1
last_updated: datetime

The timestamp of when the rule was last modified.

formatdate-time
ref: str

The reference of the rule (the rule’s ID by default).

minLength1
version: str

The version of the rule.

action_parameters: Optional[UnionMember4RuleTransformResponseHTMLRuleActionParameters]

The parameters configuring the rule’s action.

categories: Optional[List[str]]

The categories of the rule.

description: Optional[str]

An informative description of the rule.

exposed_credential_check: Optional[UnionMember4RuleTransformResponseHTMLRuleExposedCredentialCheck]

Configuration for exposed credential checking.

password_expression: str

An expression that selects the password used in the credentials check.

minLength1
username_expression: str

An expression that selects the user ID used in the credentials check.

minLength1
logging: Optional[Logging]

An object configuring the rule’s logging behavior.

ratelimit: Optional[UnionMember4RuleTransformResponseHTMLRuleRatelimit]

An object configuring the rule’s rate limit behavior.

characteristics: List[str]

Characteristics of the request on which the rate limit counter will be incremented.

period: int

Period in seconds over which the counter is being incremented.

minimum0
counting_expression: Optional[str]

An expression that defines when the rate limit counter should be incremented. It defaults to the same as the rule’s expression.

minLength1
mitigation_timeout: Optional[int]

Period of time in seconds after which the action will be disabled following its first execution.

requests_per_period: Optional[int]

The threshold of requests per period after which the action will be executed for the first time.

minimum1
requests_to_origin: Optional[bool]

Whether counting is only performed when an origin is reached.

score_per_period: Optional[int]

The score threshold per period for which the action will be executed the first time.

score_response_header_name: Optional[str]

A response header name provided by the origin, which contains the score to increment rate limit counter with.

minLength1
version: Optional[str]

The version of the ruleset.