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.

ArgumentRequiredDescription
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.

AttributeDescription
rule_nameThe name of the script behavior rule.
rule_descriptionA human-readable description of the rule.
activity_typeThe category of client-side activity the rule governs. Possible value is DATA_ACCESS.
actionAction taken when all rule conditions match. Possible values are:
  • alert. Records the event.
  • deny. Blocks the script from performing the specified activity.
page_conditionHow page_values are evaluated. Possible value is MATCHES. This value triggers the rule when the page URL matches any value in the list.
page_valuesA list of page URL path patterns the rule targets.
script_typeThe script category the rule targets. Possible value is THIRD_PARTY.
script_conditionHow script_values are evaluated. Possible value is MATCHES that targets scripts whose origin matches any value in the list.
script_valuesA 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_conditionHow activity_values are evaluated. Possible value is MATCHES. It applies the rule when the activity involves any of the listed data types.
activity_valuesA list of specific data types the rule targets. Possible values are CREDIT_CARD and PII.

Did this page help you?