Script behavior rules
akamai_appsec_script_behavior_rules
Get all CPC script behavior rules assigned to a security policy.
data "akamai_appsec_script_behavior_rules" "my_rules" {
config_id = 12345
security_policy_id = "abcd_123456"
}
output "my_rules" {
value = data.akamai_appsec_script_behavior_rules.my_rules
}my_rules = {
config_id = 12345
security_policy_id = "abcd_123456"
rules = [
{
rule_id = 3000601
rule_name = "Block PCI Data Access"
rule_description = "Prevents third-party scripts from accessing payment card data"
activity_type = "DATA_ACCESS"
action = "deny"
page_condition = "MATCHES"
page_values = ["/checkout", "/billing/*"]
script_type = "THIRD_PARTY"
script_condition = "MATCHES"
script_values = ["analytics.example.com/*"]
activity_values_condition = "MATCHES"
activity_values = ["CREDIT_CARD", "PII"]
}
]
}Arguments
Pass all required arguments to get your script behavior rules.
| Argument | Required | Description |
|---|---|---|
config_id | ✔️ | A security configuration ID. |
security_policy_id | ✔️ | A security policy ID. |
Attributes
Returned to you is a rules list.
| Attribute | Description |
|---|---|
rule_id | A script behavior rule's ID. |
rule_name | The name of the script behavior rule. |
rule_description | A human-readable description of the rule. |
activity_type | The category of client-side activity the rule governs. Possible value is DATA_ACCESS. |
action | Action taken when all rule conditions match. Possible values are:
|
page_condition | How page_values are evaluated. Possible value is MATCHES. This value triggers the rule when the page URL matches any value in the list. |
page_values | A list of page URL path patterns the rule targets. |
script_type | The script category the rule targets. Possible value is THIRD_PARTY. |
script_condition | How script_values are evaluated. Possible value is MATCHES that targets scripts whose origin matches any value in the list. |
script_values | A list of script origin host patterns the rule targets. These are values you define, not a fixed set. Supports wildcards; for example, analytics.example.com/* matches all scripts served from that host. |
activity_values_condition | How activity_values are evaluated. Possible value is MATCHES. It applies the rule when the activity involves any of the listed data types. |
activity_values | A list of specific data types the rule targets. Possible values are CREDIT_CARD and PII. |
Updated about 1 hour ago
Did this page help you?
