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.
Argument | Required | Description |
---|---|---|
config_id | ✔ | Your security configuration's ID. |
rate_policy_id | Your rate policy's ID. |
Attributes
Returned to you are the rate policy details in JSON format.
Attribute | Description |
---|---|
config_id | The security configuration's ID. |
id | The data source's ID. |
rate_policy_id | The rate policy's ID. |
json | The JSON-formatted definition of the rate policy. |
output_text | The tabular report showing the ID and name of the rate policy. |
Updated 17 days ago