Add Rate Limit Condition
Add one match condition to a rate-limit rule without resending the whole rule. A rule counts only the requests its conditions match; a rule with no conditions counts every request to its endpoint. The new condition goes last in the rule's evaluation order.
Conditions use the same vocabulary and validation as firewall conditions. Note the field names: this route takes type and value, while the conditions array of Create / Update Rate Limit Rule takes condition_type and condition_value. A later Update Rate Limit Rule replaces all of the rule's conditions, including ones added here.
The change is announced to the edges in every region as soon as it is saved. Requires the rate_limits:update permission in the active account and the custom_rate_limits entitlement.
Path parameters
uuid from List Rate Limits.Deprecated: the legacy integer id is still accepted in the path until the sunset, answered with Deprecation and Sunset headers. Use the uuid.
Request body
source_ip, country, asn, browser, user_agent, endpoint, path, method, header, cookie, protocol or port. Case-insensitive; stored lowercased.equals, contains, starts_with, ends_with, regex, in, not_in, exists or not_exists, limited per type: source_ip, method, protocol and port take equals / in / not_in; country and asn add exists / not_exists; endpoint and path take every operator except exists / not_exists; browser, user_agent, header and cookie take all of them. Case-insensitive.exists / not_exists, which take none. For in / not_in, a comma-separated list (stored joined with ", "). Checked per type: country = ISO 3166-1 alpha-2 code (stored uppercased); asn = AS15169 or 15169 (stored as AS15169); method = an HTTP method (stored uppercased); protocol = http, tcp or udp; port = 1–65535; source_ip = an IP or CIDR; endpoint = an endpoint's uuid; regex = a valid regular expression of at most 1000 characters. Other types accept any non-empty text.AND (default) or OR: joins this condition to the next one in the rule. Case-insensitive; stored uppercased.Response (201 Created)
value.AND or OR.Deprecated: until the sunset this response also carries the legacy integer id and *_id fields. Don't use them; read uuid and the *_uuid fields.
Errors
Invalid JSON payload); a condition that fails validation — "error": "Bad request" with the reason in detail (e.g. unknown condition type "geo", operator "contains" is not valid for condition type "country", "ZZ" is not a valid ISO-3166-1 alpha-2 country code); or an integer id after the sunset (integer_id_unsupported).rate_limits:update; your plan doesn't include custom_rate_limits ("code": "entitlement_required"); or the account is suspended (account_suspended).Rate limit rule not found — no such rule in the active account.quota_paused: the rule is paused over your plan's limits and is read-only.Content-Type: application/json header.