Skip to main content

Cloudflare/firewall

@swamp/cloudflare/firewallv2026.05.29.1· 5d agoMODELS
01README

Cloudflare firewall infrastructure models

02Release Notes
  • Updated: rules
  • Updated: lockdowns
  • Updated: ua_rules
  • Updated: overrides
  • Updated: rate_limits
03Models5
@swamp/cloudflare/firewall/lockdownsv2026.05.29.1lockdowns.ts

Global Arguments

ArgumentTypeDescription
zone_idstringCloudflare zone ID
configurationsarrayA list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations.
urlsarrayThe URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.
description?stringAn informative summary of the rule. This value is sanitized and any tags will be removed.
paused?booleanWhen true, indicates that the rule is currently paused.
priority?numberThe priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.
apiToken?stringCloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiKey?stringCloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email.
email?stringCloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey.
fn create()
Create a Lockdowns
fn get(id: string)
Get a Lockdowns
ArgumentTypeDescription
idstringThe ID of the Lockdowns
fn update()
Update Lockdowns attributes
fn delete(id: string)
Delete the Lockdowns
ArgumentTypeDescription
idstringThe ID of the Lockdowns
fn sync()
Sync Lockdowns state from Cloudflare

Resources

state(infinite)— Lockdowns resource state
@swamp/cloudflare/firewall/overridesv2026.05.29.1overrides.ts

Global Arguments

ArgumentTypeDescription
zone_idstringCloudflare zone ID
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
id?stringDefines an identifier.
rewrite_action?objectSpecifies that, when a WAF rule matches, its configured action will be replaced by the action configured in this object.
rules?recordAn object that allows you to override the action of specific WAF rules. Each key of this object must be the ID of a WAF rule, and each value must be a valid WAF action. Unless you are disabling a rule, ensure that you also enable the rule group that this WAF rule belongs to. When creating a new URI-based WAF override, you must provide a `groups` object or a `rules` object.
urlsarrayThe URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.
apiToken?stringCloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiKey?stringCloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email.
email?stringCloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey.
fn create()
Create a Overrides
fn get(id: string)
Get a Overrides
ArgumentTypeDescription
idstringThe ID of the Overrides
fn update()
Update Overrides attributes
fn delete(id: string)
Delete the Overrides
ArgumentTypeDescription
idstringThe ID of the Overrides
fn sync()
Sync Overrides state from Cloudflare

Resources

state(infinite)— Overrides resource state
@swamp/cloudflare/firewall/rate-limitsv2026.05.29.1rate_limits.ts

Global Arguments

ArgumentTypeDescription
zone_idstringCloudflare zone ID
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
actionobject
matchobject
periodnumberThe time in seconds (an integer value) to count matching traffic. If the count exceeds the configured threshold within this period, Cloudflare will perform the configured action.
thresholdnumberThe threshold that will trigger the configured mitigation action. Configure this value along with the `period` property to establish a threshold per period.
apiToken?stringCloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiKey?stringCloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email.
email?stringCloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey.
fn create()
Create a Rate Limits
fn get(id: string)
Get a Rate Limits
ArgumentTypeDescription
idstringThe ID of the Rate Limits
fn update()
Update Rate Limits attributes
fn delete(id: string)
Delete the Rate Limits
ArgumentTypeDescription
idstringThe ID of the Rate Limits
fn sync()
Sync Rate Limits state from Cloudflare

Resources

state(infinite)— Rate Limits resource state
@swamp/cloudflare/firewall/rulesv2026.05.29.1rules.ts

Global Arguments

ArgumentTypeDescription
account_id?stringCloudflare account ID (provide account_id or zone_id)
zone_id?stringCloudflare zone ID (provide account_id or zone_id)
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
allowed_modes?arrayThe available actions that a rule can apply to a matched request.
configurationobject
created_on?stringThe timestamp of when the rule was created.
id?stringThe unique identifier of the IP Access rule.
modeenumThe action to apply to a matched request.
modified_on?stringThe timestamp of when the rule was last modified.
notes?stringAn informative summary of the rule, typically used as a reminder or explanation.
scope?objectAll zones owned by the user will have the rule applied.
apiToken?stringCloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiKey?stringCloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email.
email?stringCloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey.
fn create()
Create a Rules
fn get(id: string)
Get a Rules
ArgumentTypeDescription
idstringThe ID of the Rules
fn update()
Update Rules attributes
fn delete(id: string)
Delete the Rules
ArgumentTypeDescription
idstringThe ID of the Rules
fn sync()
Sync Rules state from Cloudflare

Resources

state(infinite)— Rules resource state
@swamp/cloudflare/firewall/ua-rulesv2026.05.29.1ua_rules.ts

Global Arguments

ArgumentTypeDescription
zone_idstringCloudflare zone ID
configurationobject
description?stringAn informative summary of the rule. This value is sanitized and any tags will be removed.
id?stringThe unique identifier of the resource.
modeenumThe action to apply to a matched request.
paused?booleanWhen true, indicates that the rule is currently paused.
apiToken?stringCloudflare API token; overrides the CLOUDFLARE_API_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
apiKey?stringCloudflare API key for the legacy key+email auth path; overrides the CLOUDFLARE_API_KEY environment variable. Wire with a vault.get(...) expression. Requires email.
email?stringCloudflare account email for the legacy key+email auth path; overrides the CLOUDFLARE_EMAIL environment variable. Requires apiKey.
fn create()
Create a Ua Rules
fn get(id: string)
Get a Ua Rules
ArgumentTypeDescription
idstringThe ID of the Ua Rules
fn update()
Update Ua Rules attributes
fn delete(id: string)
Delete the Ua Rules
ArgumentTypeDescription
idstringThe ID of the Ua Rules
fn sync()
Sync Ua Rules state from Cloudflare

Resources

state(infinite)— Ua Rules resource state
04Previous Versions1
2026.05.22.1May 22, 2026
  • Added: rules
  • Added: lockdowns
  • Added: ua_rules
  • Added: overrides
  • Added: rate_limits
05Stats
A
100 / 100
Downloads
0
Archive size
20.1 KB
Verified by Swamp
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels