deny_access
Version: v2025-02-18 | Includes use: Yes |
---|
Behavior name: Control Access
Assuming a condition in the rule matches, this denies access to the requested content. For example, a user_location
match paired with this behavior would deny requests from a specified part of the world.
By keying on the value of the reason
option, denyAccess
behaviors may override each other when called from nested rules. For example, a parent rule might deny access to a certain geographic area, citing location
as the reason
but another nested rule can then allow access for a set of IPs within that area, so long as the reason
matches.
Default behavior
These samples reflect the behavior's default settings. You can use these as is in your configurations or make adjustments based on the behavior's available options.
data "akamai_property_rules_builder" "deny_access" {
rules_v2025_02_18 {
name = "Control Access"
comments = "Denies access to the requested content."
behavior {
deny_access {
reason = "default-deny-reason"
enabled = true
}
}
}
}
"behaviors": [
{
"name": "denyAccess",
"options": {
"reason": "default-deny-reason",
"enabled": true
}
}
]
Options
Option | Description |
---|---|
reason |
Text message that keys why access is denied. Any subsequent
denyAccess behaviors within the rule tree may refer to the same reason key to override the current behavior.
|
enabled |
Denies access when enabled.
|
Updated 11 days ago