bunny_manage_edge_rules
Create, update, delete, or toggle CDN edge rules to control redirects, headers, caching, and origin routing at the edge.
Instructions
Manage edge rules on a CDN pull zone. Edge rules let you control redirects, headers, caching, and origin routing at the edge. Actions: 'upsert' creates or updates a rule, 'delete' removes it, 'enable'/'disable' toggles it. For upsert, provide edge_rule with: ActionType (number), TriggerMatchingType (0=MatchAny, 1=MatchAll), Triggers (array), ActionParameter1, ActionParameter2, Description, Enabled. ActionTypes: 0=ForceSSL, 1=Redirect, 2=OriginUrl, 3=OverrideCacheTime, 4=BlockRequest, 5=SetResponseHeader, 6=SetRequestHeader, 7=ForceDownload, 8=DisableTokenAuth, 9=EnableTokenAuth, 10=OverrideCacheTimePublic, 11=IgnoreQueryString, 14=DisableOptimizer, 15=ForceCompression, 16=SetStatusCode, 17=OriginStorage, 18=SetNetworkRateLimit, 19=SetConnectionLimit, 20=SetRequestsPerSecondLimit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action: upsert, delete, enable, or disable | |
| edge_rule | No | Edge rule object (required for upsert). Use BunnyCDN PascalCase field names. | |
| edge_rule_id | No | Edge rule GUID (required for delete/enable/disable) | |
| pull_zone_id | Yes | Pull Zone ID |