Cloudflare/magic
@swamp/cloudflare/magicv2026.05.22.1
01README
Cloudflare magic infrastructure models
02Release Notes
- Added: rules
- Added: allowlist
- Added: prefixes
- Added: filters
- Added: rules_syn_protection
- Added: filters_tcp_flow_protection
- Added: rules_tcp_flow_protection
- Added: catalog-syncs
- Added: onramps
- Added: providers
- Added: connectors
- Added: gre_tunnels
- Added: ipsec_tunnels
- Added: redundancy_groups
- Added: routes
- Added: sites
03Models
@swamp/cloudflare/magic/allowlistv2026.05.22.1allowlist.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| comment | string | An comment describing the allowlist prefix. |
| enabled | boolean | Whether to enable the allowlist prefix into effect. |
| prefix | string | The allowlist prefix to add in CIDR format. |
fn create()
Create a Allowlist
fn get(id: string)
Get a Allowlist
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Allowlist |
fn update()
Update Allowlist attributes
fn delete(id: string)
Delete the Allowlist
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Allowlist |
fn sync()
Sync Allowlist state from Cloudflare
Resources
state(infinite)— Allowlist resource state
@swamp/cloudflare/magic/catalog-syncsv2026.05.22.1catalog-syncs.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| description? | string | |
| name | string | |
| policy? | string | |
| update_mode | enum | |
| destination_type | enum |
fn create()
Create a Catalog-syncs
fn get(id: string)
Get a Catalog-syncs
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Catalog-syncs |
fn update()
Update Catalog-syncs attributes
fn delete(id: string)
Delete the Catalog-syncs
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Catalog-syncs |
fn sync()
Sync Catalog-syncs state from Cloudflare
Resources
state(infinite)— Catalog-syncs resource state
@swamp/cloudflare/magic/connectorsv2026.05.22.1connectors.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| activated? | boolean | |
| interrupt_window_days_of_week? | array | Allowed days of the week for upgrades. Default is all days. |
| interrupt_window_duration_hours? | number | |
| interrupt_window_embargo_dates? | array | List of dates (YYYY-MM-DD) when upgrades are blocked. |
| interrupt_window_hour_of_day? | number | |
| notes? | string | |
| timezone? | string | |
| provision_license? | boolean | When true, regenerate license key for the connector. |
| device | object | Exactly one of id, serial_number, or provision_license must be provided. |
fn create()
Create a Connectors
fn get(id: string)
Get a Connectors
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Connectors |
fn update()
Update Connectors attributes
fn delete(id: string)
Delete the Connectors
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Connectors |
fn sync()
Sync Connectors state from Cloudflare
Resources
state(infinite)— Connectors resource state
@swamp/cloudflare/magic/filtersv2026.05.22.1filters.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| expression | string | The filter expression. |
| mode | string | The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'. |
fn create()
Create a Filters
fn get(id: string)
Get a Filters
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Filters |
fn update()
Update Filters attributes
fn delete(id: string)
Delete the Filters
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Filters |
fn sync()
Sync Filters state from Cloudflare
Resources
state(infinite)— Filters resource state
@swamp/cloudflare/magic/filters-tcp_flow_protectionv2026.05.22.1filters_tcp_flow_protection.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| expression | string | The filter expression. |
| mode | string | The filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'. |
fn create()
Create a Filters
fn get(id: string)
Get a Filters
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Filters |
fn update()
Update Filters attributes
fn delete(id: string)
Delete the Filters
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Filters |
fn sync()
Sync Filters state from Cloudflare
Resources
state(infinite)— Filters resource state
@swamp/cloudflare/magic/gre-tunnelsv2026.05.22.1gre_tunnels.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| automatic_return_routing? | boolean | True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. |
| cloudflare_gre_endpoint | string | The IP address assigned to the Cloudflare side of the GRE tunnel. |
| customer_gre_endpoint | string | The IP address assigned to the customer side of the GRE tunnel. |
| description? | string | An optional description of the GRE tunnel. |
| health_check? | object | |
| interface_address | string | A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. |
| interface_address6? | string | A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 |
| mtu? | number | Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576. |
| name | string | The name of the tunnel. The name cannot contain spaces or special characters, must be 15 characters or less, and cannot share a name with another GRE tunnel. |
| ttl? | number | Time To Live (TTL) in number of hops of the GRE tunnel. |
| bgp? | object |
fn create()
Create a Gre Tunnels
fn get(id: string)
Get a Gre Tunnels
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Gre Tunnels |
fn update()
Update Gre Tunnels attributes
fn delete(id: string)
Delete the Gre Tunnels
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Gre Tunnels |
fn sync()
Sync Gre Tunnels state from Cloudflare
Resources
state(infinite)— Gre Tunnels resource state
@swamp/cloudflare/magic/ipsec-tunnelsv2026.05.22.1ipsec_tunnels.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| automatic_return_routing? | boolean | True if automatic stateful return routing should be enabled for a tunnel, false otherwise. Requires the `coupler_integration` account flag to be enabled; requests setting this to `true` without that flag will be rejected. |
| bgp? | object | |
| cloudflare_endpoint | string | The IP address assigned to the Cloudflare side of the IPsec tunnel. |
| custom_remote_identities? | object | |
| customer_endpoint? | string | The IP address assigned to the customer side of the IPsec tunnel. Not required, but must be set for proactive traceroutes to work. |
| description? | string | An optional description forthe IPsec tunnel. |
| health_check? | object | |
| interface_address | string | A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side of the tunnel. Select the subnet from the following private IP space: 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255. |
| interface_address6? | string | A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127 |
| name | string | The name of the IPsec tunnel. The name cannot share a name with other tunnels. |
| psk? | string | A randomly generated or provided string for use in the IPsec tunnel. |
| replay_protection? | boolean | If `true`, then IPsec replay protection will be supported in the Cloudflare-to-customer direction. |
fn create()
Create a Ipsec Tunnels
fn get(id: string)
Get a Ipsec Tunnels
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Ipsec Tunnels |
fn update()
Update Ipsec Tunnels attributes
fn delete(id: string)
Delete the Ipsec Tunnels
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Ipsec Tunnels |
fn sync()
Sync Ipsec Tunnels state from Cloudflare
Resources
state(infinite)— Ipsec Tunnels resource state
@swamp/cloudflare/magic/onrampsv2026.05.22.1onramps.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| attached_hubs? | array | |
| attached_vpcs? | array | |
| description? | string | |
| install_routes_in_cloud | boolean | |
| install_routes_in_magic_wan | boolean | |
| manage_hub_to_hub_attachments? | boolean | |
| manage_vpc_to_hub_attachments? | boolean | |
| name | string | |
| vpc? | string | |
| adopted_hub_id? | string | |
| cloud_asn? | number | Sets the cloud-side ASN. If unset or zero, the cloud's default ASN takes effect. |
| cloud_type | enum | |
| dynamic_routing | boolean | Enables BGP routing. When enabling this feature, set both install_routes_in_cloud and install_routes_in_magic_wan to false. |
| hub_provider_id? | string | |
| region? | string | |
| type | enum |
fn create()
Create a Onramps
fn get(id: string)
Get a Onramps
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Onramps |
fn update()
Update Onramps attributes
fn delete(id: string)
Delete the Onramps
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Onramps |
fn sync()
Sync Onramps state from Cloudflare
Resources
state(infinite)— Onramps resource state
@swamp/cloudflare/magic/prefixesv2026.05.22.1prefixes.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| comment | string | A comment describing the prefix. |
| excluded | boolean | Whether to exclude the prefix from protection. |
| prefix | string | The prefix to add in CIDR format. |
fn create()
Create a Prefixes
fn get(id: string)
Get a Prefixes
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Prefixes |
fn update()
Update Prefixes attributes
fn delete(id: string)
Delete the Prefixes
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Prefixes |
fn sync()
Sync Prefixes state from Cloudflare
Resources
state(infinite)— Prefixes resource state
@swamp/cloudflare/magic/providersv2026.05.22.1providers.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| aws_arn? | string | |
| azure_subscription_id? | string | |
| azure_tenant_id? | string | |
| description? | string | |
| friendly_name | string | |
| gcp_project_id? | string | |
| gcp_service_account_email? | string | |
| cloud_type | enum |
fn create()
Create a Providers
fn get(id: string)
Get a Providers
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Providers |
fn update()
Update Providers attributes
fn delete(id: string)
Delete the Providers
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Providers |
fn sync()
Sync Providers state from Cloudflare
Resources
state(infinite)— Providers resource state
@swamp/cloudflare/magic/redundancy-groupsv2026.05.22.1redundancy_groups.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| description? | string | Optional description |
| members? | array | Tunnels to add to the group |
| name | string | Human-readable name for the redundancy group |
fn create()
Create a Redundancy Groups
fn get(id: string)
Get a Redundancy Groups
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Redundancy Groups |
fn update()
Update Redundancy Groups attributes
fn delete(id: string)
Delete the Redundancy Groups
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Redundancy Groups |
fn sync()
Sync Redundancy Groups state from Cloudflare
Resources
state(infinite)— Redundancy Groups resource state
@swamp/cloudflare/magic/routesv2026.05.22.1routes.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| description? | string | An optional human provided description of the static route. |
| nexthop | string | The next-hop IP Address for the static route. |
| prefix | string | IP Prefix in Classless Inter-Domain Routing format. |
| priority | number | Priority of the static route. |
| scope? | object | Used only for ECMP routes. |
| weight? | number | Optional weight of the ECMP scope - if provided. |
fn create()
Create a Routes
fn get(id: string)
Get a Routes
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Routes |
fn update()
Update Routes attributes
fn delete(id: string)
Delete the Routes
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Routes |
fn sync()
Sync Routes state from Cloudflare
Resources
state(infinite)— Routes resource state
@swamp/cloudflare/magic/rulesv2026.05.22.1rules.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| burst_sensitivity | string | The burst sensitivity. Must be one of 'low', 'medium', 'high'. |
| mode | string | The mode for DNS Protection. Must be one of 'enabled', 'disabled', 'monitoring'. |
| profile_sensitivity | string | The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'. |
| rate_sensitivity | string | The rate sensitivity. Must be one of 'low', 'medium', 'high'. |
| name | string | The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'. |
| scope | string | The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'. |
fn create()
Create a Rules
fn get(id: string)
Get a Rules
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Rules |
fn update()
Update Rules attributes
fn delete(id: string)
Delete the Rules
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Rules |
fn sync()
Sync Rules state from Cloudflare
Resources
state(infinite)— Rules resource state
@swamp/cloudflare/magic/rules-syn_protectionv2026.05.22.1rules_syn_protection.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| burst_sensitivity | string | The burst sensitivity. Must be one of 'low', 'medium', 'high'. |
| mitigation_type? | string | The type of mitigation. Must be one of 'challenge' or 'retransmit'. Optional. Defaults to 'challenge'. |
| mode | string | The mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'. |
| rate_sensitivity | string | The rate sensitivity. Must be one of 'low', 'medium', 'high'. |
| name | string | The name of the SYN Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'. |
| scope | string | The scope for the SYN Protection rule. Must be one of 'global', 'region', or 'datacenter'. |
fn create()
Create a Rules
fn get(id: string)
Get a Rules
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Rules |
fn update()
Update Rules attributes
fn delete(id: string)
Delete the Rules
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Rules |
fn sync()
Sync Rules state from Cloudflare
Resources
state(infinite)— Rules resource state
@swamp/cloudflare/magic/rules-tcp_flow_protectionv2026.05.22.1rules_tcp_flow_protection.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| burst_sensitivity | string | The burst sensitivity. Must be one of 'low', 'medium', 'high'. |
| mode | string | The mode for the TCP Flow Protection. Must be one of 'enabled', 'disabled', 'monitoring'. |
| rate_sensitivity | string | The rate sensitivity. Must be one of 'low', 'medium', 'high'. |
| name | string | The name of the TCP Flow Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'. |
| scope | string | The scope for the TCP Flow Protection rule. |
fn create()
Create a Rules
fn get(id: string)
Get a Rules
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Rules |
fn update()
Update Rules attributes
fn delete(id: string)
Delete the Rules
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Rules |
fn sync()
Sync Rules state from Cloudflare
Resources
state(infinite)— Rules resource state
@swamp/cloudflare/magic/sitesv2026.05.22.1sites.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| account_id | string | Cloudflare account ID |
| connector_id? | string | Magic Connector identifier tag. |
| description? | string | |
| location? | object | Location of site in latitude and longitude. |
| name | string | The name of the site. |
| secondary_connector_id? | string | Magic Connector identifier tag. Used when high availability mode is on. |
| ha_mode? | boolean | Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode. |
fn create()
Create a Sites
fn get(id: string)
Get a Sites
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Sites |
fn update()
Update Sites attributes
fn delete(id: string)
Delete the Sites
| Argument | Type | Description |
|---|---|---|
| id | string | The ID of the Sites |
fn sync()
Sync Sites state from Cloudflare
Resources
state(infinite)— Sites resource state
04Stats
A
100 / 100
Downloads
0
Archive size
38.5 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
05Platforms
06Labels