Script behavior rule
akamai_appsec_script_behavior_rule
Get the details of a single CPC script behavior rule for a security policy. To list all rules for a policy, see Script behavior rules.
data "akamai_appsec_script_behavior_rule" "my_rule" {
config_id = 12345
security_policy_id = "abcd_123456"
rule_id = 3000601
}
output "my_rule" {
value = data.akamai_appsec_script_behavior_rule.my_rule
}my_rule = {
config_id = 12345
security_policy_id = "abcd_123456"
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 a script behavior rule.
| Argument | Required | Description |
|---|---|---|
config_id | ✔️ | A security configuration ID. |
security_policy_id | ✔️ | A security policy ID. |
rule_id | ✔️ | The ID of the script behavior rule to read. |
Attributes
Returned to you are details about your rule.
| Attribute | Description |
|---|---|
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 less than a minute ago
Did this page help you?
