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.

data "akamai_appsec_rate_policies" "my-rate-policy" {
  config_id      = 12345
  rate_policy_id = 98765
}

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

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.