cf_get_rule
Retrieve a specific Cloudflare rule by its ID from a ruleset to identify the rule behind a firewall event.
Instructions
Look up a single rule by ID.
Cloudflare exposes rule lookup via the parent ruleset; this is a
convenience wrapper that fetches the ruleset and projects the matching
rule. Used heavily for "what does rule X do" resolution when a firewall
event reports an unknown rule ID.
Args:
scope: 'zone' or 'account'.
scope_id: matching CF ID.
ruleset_id: parent ruleset ID.
rule_id: rule ID to extract.
Calls: GET /{zones|accounts}/{scope_id}/rulesets/{ruleset_id} → project rule.
Errors:
not_found when the ruleset returns 200 but no rule matches the ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | Yes | ||
| scope_id | Yes | ||
| ruleset_id | Yes | ||
| rule_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |