GuideReference
Guide

Rate policies

akamai_appsec_rate_policies

Get information about your rate policies for your security configuration.

Rate policies monitor and moderate the number and rate of all the requests you receive to protect your website from dramatic and unexpected traffic surges. See Rate policy for details of its properties and property values.

// View all rate policies
data "akamai_appsec_rate_policies" "my-rate-policies" {
  config_id = 12345
}

output "rate_policies_output" {
  value = data.akamai_appsec_rate_policies.my-rate-policies
}

// View a rate policy
data "akamai_appsec_rate_policies" "my-rate-policy" {
  config_id      = 12345
  rate_policy_id = 12345
}

output "rate_policy_json" {
  value = data.akamai_appsec_rate_policies.my-rate-policy
}
Changes to Outputs:
  + rate_policies_output = {
      + config_id      = 12345
      + id             = "12345"
      + json           = jsonencode(
            {
              + ratePolicies = [
                  + {
                      + additionalMatchOptions = [
                          + {
                              + positiveMatch = true
                              + type          = "RequestMethodCondition"
                              + values        = [
                                  + "POST",
                                ]
                            },
                        ]
                      + averageThreshold       = 3
                      + burstThreshold         = 5
                      + clientIdentifier       = "ip"
                      + counterType            = "per_edge"
                      + description            = "Mitigating HTTP flood attacks using POST requests"
                      + id                     = 12345
                      + matchType              = "path"
                      + name                   = "POST Page Requests"
                      + pathMatchType          = "Custom"
                      + pathUriPositiveMatch   = true
                      + requestType            = "ClientRequest"
                      + sameActionOnIpv        = false
                      + sameActionOnIpv6       = true
                      + type                   = "WAF"
                      + useXForwardForHeaders  = false
                      + used                   = true
                    },
                ]
            }
        )
      + output_text    = <<-EOT
            +-----------------------------+
            | ratePolicies                |
            +--------+--------------------+
            | ID     | POLICY NAME        |
            +--------+--------------------+
            | 12345  | POST Page Requests |
            +--------+--------------------+
        EOT
      + rate_policy_id = 12345
    }

Arguments

Send your config ID in the body of the declaration to get all your rate policies. Optionally, add a rate policy ID to get a specific rate policy.

ArgumentRequiredDescription
config_idYour security configuration's ID.
rate_policy_idYour rate policy's ID.

Attributes

Returned to you are the rate policy details in JSON format.

AttributeDescription
config_idThe security configuration's ID.
idThe data source's ID.
rate_policy_idThe rate policy's ID.
jsonThe JSON-formatted definition of the rate policy.
output_textThe tabular report showing the ID and name of the rate policy.