---
updatedAt: 2026-03-01T18:14:02.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/terraform/llms.txt
---

# Rate policy

Available rate policy property options.

## Base structure

A JSON file used to define rate policy properties and property values looks similar to this.

```json
{
  "additionalMatchOptions": [{
    "positiveMatch": true,
    "type": "ResponseStatusCondition",
    "values": ["400", "401", "402", "403", "404", "405", "406", "407", "408", "409", "410", "500", "501", "502", "503", "504"]
  }],
  "averageThreshold": 5,
  "burstThreshold": 8,
  "burstWindow": 3,
  "clientIdentifiers": ["ip"],
  "condition": {
    "atomicConditions": [
      {
        "className": "TlsFingerprintCondition",
        "positiveMatch": true,
        "value": [
          "a123vc456de789fg",
          "ba21dc3e87654f7g8h90i123456j7k8"
        ]
      },
      {
        "className": "ClientReputationCondition",
        "name": [
          "DOSATCK",
          "WEBATCK"
        ],
        "positiveMatch": true,
        "sharedIpHandling": "BOTH",
        "value": 3
      },
      {
        "className": "RequestHeaderCondition",
        "name": [
          "Accept",
          "Content-Type"
        ],
        "nameWildcard": true,
        "positiveMatch": true,
        "value": [
          "json",
          "xml"
        ],
        "valueCase": false,
        "valueWildcard": true
      }
    ],
    "positiveMatch": true
  },
  "description": "An excessive error rate from the origin could indicate malicious activity by a bot scanning the site or a publishing error. In both cases, this would increase the origin traffic and could potentially destabilize it.",
  "matchType": "path",
  "name": "HTTP Response Codes",
  "pathMatchType": "Custom",
  "pathUriPositiveMatch": true,
  "penaltyBoxDuration": "TEN_MINUTES",
  "requestType": "ForwardResponse",
  "sameActionOnIpv6": true,
  "type": "WAF",
  "useXForwardForHeaders": false
}
```

## Required properties

[block:parameters]
{
  "data": {
    "h-0": "Property",
    "h-1": "Description",
    "0-0": "`averageThreshold`",
    "0-1": "Maximum number of allowed hits per second during any two-minute interval.",
    "1-0": "`burstThreshold`",
    "1-1": "Maximum number of allowed hits per second during any five-second interval.",
    "2-0": "`clientIdentifiers`",
    "2-1": "Identifiers used to identify and track request senders; these values are required only when using Web Application Firewall.<br /><br /> If the `counterType`'s value is `per_edge`, you can specify only one of these values: <ul><li><code>api-key</code>. Supported only for API match criteria.</li><li><code>ip-useragent</code>. Typically preferred over ip when identifying a client.</li><li><code>ip</code>. Identifies clients by IP address.</li><li><code>cookie:value</code>. Helps track requests over an individual session, even if the IP address changes.</li></ul> If the `counterType`'s value is `region_aggregated`, you can specify `ip` and `cookie:value` together or individually in the list; `api-key` and `ip-useragent` aren't supported in this case.",
    "3-0": "`matchType`",
    "3-1": "Indicates the type of path matched by the policy allowed values are:<ul><li><code>path</code>. Matches website paths.</li><li><code>api</code>. Matches API paths.</li></ul>",
    "4-0": "`name`",
    "4-1": "Unique name assigned to a rate policy.",
    "5-0": "`pathMatchType`",
    "5-1": "Type of path to match in incoming requests. Allowed values are:<ul><li><code>AllRequests</code>. Matches an empty path or any path that ends in a trailing slash</li><li><code>TopLevel</code>. Matches top-level hostnames only.</li><li><code>Custom</code>. Matches a specific path or path component. This property is only required when the <code>matchType</code> is set to <code>path</code>.</li><ul>",
    "6-0": "`requestType`",
    "6-1": "Type of request to count towards the rate policy's thresholds. Allowed values are:<ul><li><code>ClientRequest</code>. Counts client requests to edge servers.</li><li><code>ClientResponse</code>. Counts edge responses to the client.</li><li><code>ForwardResponse</code>. Counts origin responses to the client.</li><li><code>ForwardRequest</code>. Counts edge requests to your origin.</li></ul>",
    "7-0": "`sameActionOnIpv6`",
    "7-1": "Indicates whether the same rate policy action applies to both IPv6 traffic and IPv4 traffic.",
    "8-0": "`type`",
    "8-1": "Rate policy type. Allowed values are:<ul><li><code>WAF</code>. Web Application Firewall.</li><li><code>BOTMAN</code>. Bot Manager.</li></ul>"
  },
  "cols": 2,
  "rows": 9,
  "align": [
    null,
    null
  ]
}
[/block]

## Optional properties

[block:parameters]
{
  "data": {
    "h-0": "Property",
    "h-1": "Description",
    "0-0": "`burstWindow`",
    "0-1": "The time span for the `burstThreshold` interval.<br /><br />For existing rate policies, [analyze your traffic](https://techdocs.akamai.com/kona-site-defender/docs/rate-thresholds) in `Alert` mode before you reduce the measure window from 5 seconds.",
    "1-0": "`condition`",
    "1-1": "An object containing the criteria that trigger a rate policy.<ul><li><code>positiveMatch</code>. Whether the condition for a match triggers on <code>true</code> or lack of match <code>false</code>.</li><li><code>atomicConditions</code>. An array of your trigger conditions. Include one or all of the condition type objects:<ul><section><p>Request headers condition object</p><ul><li><code>className</code>. <em>Required</em>. The condition type. Value is <code>RequestHeaderCondition</code>.</li><li><code>name</code>. <em>Required</em>. An array of header names. This property checks for the existence of the header. Use with <code>value</code> to check if the header is a match.</li><li><code>nameWildcard</code>. Whether to interpret <code>?</code> and <code>\\*</code> as wildcards.</li><li><code>positiveMatch</code>. Whether the condition for a match triggers on <code>true</code> or lack of match <code>false</code></li><li><code>value</code>. An array of header values. Use with <code>name</code> to check both existence and match.</li><li><code>valueCase</code>. Whether to consider case sensitivity of header values.</li><li><code>valueWildcard</code>. Whether to interpret <code>?</code> and <code>\\*</code> as wildcards.</li></ul></section><br /><section><p>TLS fingerprint condition object</p><ul><li><code>className</code>. <em>Required</em>. The condition type. Value is  <code>TlsFingerprintCondition</code>.</li><li><code>positiveMatch</code>. Whether the condition for a match triggers on <code>true</code> or lack of match <code>false</code>.</li><li><code>value</code>. <em>Required</em>. An array of TLS fingerprints.</li></ul></section><br /><section><p>Client reputation condition object</p><ul><li><code>className</code>. <em>Required</em>. The condition type. Value is <code>ClientReputationCondition</code>.</li><li><code>name</code>. <em>Required</em>. An array of reputation category strings. <code>WBSCRP</code> for webs scrapers or crawlers. <code>DOSATCK</code> for DoS attackers. <code>WEBATCK</code> for Web attackers. <code>SCANTL</code> for scanning tools.</li><li><code>positiveMatch</code>. Whether the condition for a match triggers on <code>true</code> or lack of match <code>false</code>.</li><li><code>sharedIpHandling</code>. <em>Required</em>. The shared IP status. Values are <code>SHARED_ONLY</code>, <code>NON_SHARED</code>, <code>BOTH</code>.</li><li><code>value</code>. <em>Required</em>. The threshold value that causes the trigger.</li></ul></section></ul>",
    "2-0": "`counterType`",
    "2-1": "The rate policy's counter type. Possible values: <ul><li><code>per_edge</code> for rate limiting to work per edge node.</li><li><code>region_aggregated</code> for rate limiting to work using aggregated rate accounting across multiple edge nodes.</li></ul> Defaults to `per_edge` if not set.",
    "3-0": "`description`",
    "3-1": "Descriptive text about the policy.",
    "4-0": "`hostnames`",
    "4-1": "Array of hostnames that trigger a policy match. If a hostname is not in the array  then that request is ignored by the policy.",
    "5-0": "`pathUriPositiveMatch`",
    "5-1": "Indicates whether the policy is triggered if a match is found.",
    "6-0": "`penaltyBoxDuration`",
    "6-1": "The duration of the penalty box. <ul><li>If the <code>counterType</code>'s value is <code>per_edge</code>, it supports only the value of <code>TEN_MINUTES</code>.</li><li>If the <code>counterType</code>'s value is <code>region_aggregated</code>, it support one of these values: <code>TEN_MINUTES</code>, <code>THIRTY_MINUTES</code>, or <code>ONE_HOUR</code>.</li></ul>",
    "7-0": "`useXForwardForHeaders`",
    "7-1": "Indicates whether the policy checks the contents of the `X-Forwarded-For` header in incoming requests."
  },
  "cols": 2,
  "rows": 8,
  "align": [
    null,
    null
  ]
}
[/block]

## additionalMatchOptions

Specifies additional matching conditions for the rate policy.

[block:parameters]
{
  "data": {
    "h-0": "Property",
    "h-1": "Required",
    "h-2": "Description",
    "0-0": "`properties`",
    "0-1": "✔️",
    "0-2": "Match condition type. Allowed values are:<ul><li><code>IpAddressCondition</code></li><li><code>NetworkListCondition</code></li><li><code>RequestHeaderCondition</code></li><li><code>RequestMethodCondition</code></li><li><code>ResponseStatusCondition</code></li><li><code>UserAgentCondition</code></li><li><code>AsNumberCondition</code></li></ul>",
    "1-0": "`positiveMatch`",
    "1-1": "✔️",
    "1-2": "Indicates the match condition for a policy's trigger.",
    "2-0": "`values`",
    "2-1": "✔️",
    "2-2": "List of values to match."
  },
  "cols": 3,
  "rows": 3,
  "align": [
    null,
    "center",
    null
  ]
}
[/block]

## apiSelectors

Specifies the API endpoints to match on. Note that this object can only be used if the `matchType` is set to `api`.

| Property             | Required | Description                                                                                                                                                                                                  |
| -------------------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `apiDefinitionId`    |    ✔️    | Unique identifier of the API endpoint.                                                                                                                                                                       |
| `resourceIds`        |          | Unique identifiers of one or more API endpoint resources.                                                                                                                                                    |
| `undefinedResources` |          | If true, matches any resource not explicitly added to your API definition without having to include the resource ID. If false, matches only those undefined resources listed in the `resourceIds`  property. |
| `definedResources`   |          | If true, this matches any resource explicitly added to your API definition without having to include the resource ID. If false, matches only those defined resources listed in the `resourceIds` property.   |

## bodyParameters

Specifies the request body parameters on which to match.

| Property        | Required | Description                                                                                                                                                                                              |
| --------------- | :------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`          |    ✔️    | Body parameter name to match.                                                                                                                                                                            |
| `values`        |    ✔️    | Body parameter values to match.                                                                                                                                                                          |
| `positiveMatch` |          | Indicates the match condition for a policy's trigger.                                                                                                                                                    |
| `valueInRange`  |          | When true, this matches values inside the `values` range. Note that your values must be specified as a range to use this property. When false this matches values that fall outside the specified range. |

## fileExtensions

Specifies the file extensions on which to match.

| Property        | Required | Description                                           |
| --------------- | :------: | ----------------------------------------------------- |
| `positiveMatch` |    ✔️    | Indicates the match condition for a policy's trigger. |
| `values`        |    ✔️    | List of file extensions to match.                     |

## path

| Property        | Required | Description                                           |
| --------------- | :------: | ----------------------------------------------------- |
| `positiveMatch` |    ✔️    | Indicates the match condition for a policy's trigger. |
| `values`        |    ✔️    | List of paths to match.                               |

## queryParameters

| Property        | Required | Description                                                                                                                                                                                     |
| --------------- | :------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`          |    ✔️    | Query parameter name to match.                                                                                                                                                                  |
| `values`        |    ✔️    | List of query parameter values to match.                                                                                                                                                        |
| `positiveMatch` |    ✔️    | Indicates the match condition for a policy's trigger.                                                                                                                                           |
| `valueInRange`  |          | When true, this matches values inside the `values` range. Your values must be specified as a range to use this property. When false, this matches values that fall outside the specified range. |

# Sibling pages

* [Configure AppSec](https://techdocs.akamai.com/terraform/docs/configure-appsec.md)
* [Match targets](https://techdocs.akamai.com/terraform/docs/match-target-options.md)
* [Attack group migration](https://techdocs.akamai.com/terraform/docs/attack-group-migration.md)
* [Data sources](https://techdocs.akamai.com/terraform/docs/appsec-datasources.md)
* [Resources](https://techdocs.akamai.com/terraform/docs/appsec-resources.md)