Skip to main content

Cloudflare/magic Transit

@webframp/cloudflare/magic-transitv2026.08.21.2· 1d agoMODELS
01README

Cloudflare Magic Transit — GRE tunnels, static routes, health checks, IPsec

02Release Notes

2026.08.21.2

Changed:

  • Errors raised when a Cloudflare API call fails now name the HTTP method and path that was attempted (e.g. Cloudflare API GET /accounts/.../dns_protection/rules failed with HTTP 400 ...) instead of a bare Cloudflare API error: .... Network-level failures (DNS, connection reset, timeout) are now also caught and wrapped with the same operation context instead of surfacing a raw fetch error.
  • listdnsprotectionrulesforaccount (and its sibling account/zone DNS-protection listing methods) now enforce the documented per_page bounds of 10-1000 at the schema level, instead of letting an out-of-range value fail deep inside the Cloudflare API call.

No breaking changes. Existing calls that already respected the documented per_page range are unaffected.

03Models1
cloudflare/magic_transit.tsv2026.07.27.1

Global Arguments

ArgumentTypeDescription
apiTokenstringCloudflare API token
accountIdstringCloudflare account ID
fn listdnsprotectionrulesforaccount(page?: number, per_page?: number, order?: string, direction?: string)
List all DNS Protection rules.
ArgumentTypeDescription
page?numberThe page number for pagination. Defaults to 1.
per_page?numberThe number of items per page. Must be between 10 and 1000. Defaults to 25.
order?stringThe field to order by. Defaults to 'prefix'.
direction?stringThe direction of ordering (ASC or DESC). Defaults to 'ASC'.
fn creatednsprotectionrule(burst_sensitivity: string, mode: string, name: string, profile_sensitivity: string, rate_sensitivity: string, scope: string)
Create DNS Protection rule.
ArgumentTypeDescription
burst_sensitivitystringThe burst sensitivity. Must be one of 'low', 'medium', 'high'.
modestringThe mode for DNS Protection. Must be one of 'enabled', 'disabled', 'monitoring'.
namestringThe name of the DNS Protection rule. Value is relative to the 'scope' setting...
profile_sensitivitystringThe profile sensitivity. Recommended setting is 'low'. Must be one of 'low', ...
rate_sensitivitystringThe rate sensitivity. Must be one of 'low', 'medium', 'high'.
scopestringThe scope for the DNS Protection rule. Must be one of 'global', 'region', or ...
fn deletednsprotectionrulesforaccount()
Delete all DNS Protection rules.
fn getdnsprotectionrule(rule_id: string)
Get DNS Protection rule.
ArgumentTypeDescription
rule_idstringThe UUID of the DNS Protection rule.
fn updatednsprotectionrule(rule_id: string, burst_sensitivity?: string, mode?: string, profile_sensitivity?: string, rate_sensitivity?: string)
Update DNS Protection rule.
ArgumentTypeDescription
rule_idstringThe UUID of the DNS Protection rule to update.
burst_sensitivity?stringThe new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.
mode?stringThe new mode for DNS Protection. Optional. Must be one of 'enabled', 'disable...
profile_sensitivity?stringThe new profile sensitivity. Optional. Recommended setting is 'low'. Must be ...
rate_sensitivity?stringThe new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.
fn deletednsprotectionrule(rule_id: string)
Delete DNS Protection rule.
ArgumentTypeDescription
rule_idstringThe UUID of the DNS Protection rule to delete.
fn listallowlistprefixesforaccount(page?: number, per_page?: number, order?: string, direction?: string)
List all allowlist prefixes.
ArgumentTypeDescription
page?numberThe page number for pagination. Defaults to 1.
per_page?numberThe number of items per page. Must be between 10 and 1000. Defaults to 25.
order?stringThe field to order by. Defaults to 'prefix'.
direction?stringThe direction of ordering (ASC or DESC). Defaults to 'ASC'.
fn createallowlistedprefix(comment: string, enabled: boolean, prefix: string)
Create allowlist prefix.
ArgumentTypeDescription
commentstringAn comment describing the allowlist prefix.
enabledbooleanWhether to enable the allowlist prefix into effect.
prefixstringThe allowlist prefix to add in CIDR format.
fn deleteallowlistprefixesforaccount()
Delete all allowlist prefixes.
fn getallowlistprefix(prefix_id: string)
Get allowlist prefix.
ArgumentTypeDescription
prefix_idstringThe UUID of the allowlist prefix.
fn updateallowlistprefix(prefix_id: string, comment?: string, enabled?: boolean)
Update allowlist prefix.
ArgumentTypeDescription
prefix_idstringThe UUID of the allowlist prefix to update.
comment?stringA comment describing the allowlist prefix. Optional.
enabled?booleanWhether to enable the allowlist prefix into effect. Optional.
fn deleteallowlistprefix(prefix_id: string)
Delete allowlist prefix.
ArgumentTypeDescription
prefix_idstringThe UUID of the allowlist prefix to delete.
fn listprefixesforaccount(page?: number, per_page?: number, order?: string, direction?: string)
List all prefixes.
ArgumentTypeDescription
page?numberThe page number for pagination. Defaults to 1.
per_page?numberThe number of items per page. Must be between 10 and 1000. Defaults to 25.
order?stringThe field to order by. Defaults to 'prefix'.
direction?stringThe direction of ordering (ASC or DESC). Defaults to 'ASC'.
fn createprefix(comment: string, excluded: boolean, prefix: string)
Create prefix.
ArgumentTypeDescription
commentstringA comment describing the prefix.
excludedbooleanWhether to exclude the prefix from protection.
prefixstringThe prefix to add in CIDR format.
fn deleteprefixesforaccount()
Delete all prefixes.
fn bulkcreateprefixes()
Create multiple prefixes.
fn getprefix(prefix_id: string)
Get prefix.
ArgumentTypeDescription
prefix_idstringThe UUID of the prefix.
fn updateprefix(prefix_id: string, comment?: string, excluded?: boolean)
Update prefix.
ArgumentTypeDescription
prefix_idstringThe UUID of the prefix to update.
comment?stringA new comment for the prefix. Optional.
excluded?booleanWhether to exclude the prefix from protection. Optional.
fn deleteprefix(prefix_id: string)
Delete prefix.
ArgumentTypeDescription
prefix_idstringThe UUID of the prefix to delete.
fn listsynprotectionfiltersforaccount(mode?: string, page?: number, per_page?: number, order?: string, direction?: string)
List all SYN Protection filters.
ArgumentTypeDescription
mode?stringThe mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'.
page?numberThe page number for pagination. Defaults to 1.
per_page?numberThe number of items per page. Must be between 10 and 1000. Defaults to 25.
order?stringThe field to order by. Defaults to 'prefix'.
direction?stringThe direction of ordering (ASC or DESC). Defaults to 'ASC'.
fn createsynprotectionfilter(expression: string, mode: string)
Create a SYN Protection filter.
ArgumentTypeDescription
expressionstringThe filter expression.
modestringThe filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.
fn deletesynprotectionfiltersforaccount()
Delete all SYN Protection filters.
fn getsynprotectionfilter(filter_id: string)
Get SYN Protection filter.
ArgumentTypeDescription
filter_idstringThe UUID of the filter to retrieve.
fn updatesynprotectionfilter(filter_id: string, expression?: string, mode?: string)
Update SYN Protection filter.
ArgumentTypeDescription
filter_idstringThe UUID of the filter to update.
expression?stringThe new filter expression. Optional.
mode?stringThe new mode for the filter. Optional. Must be one of 'enabled', 'disabled', ...
fn deletesynprotectionfilter(filter_id: string)
Delete SYN Protection filter.
ArgumentTypeDescription
filter_idstringThe UUID of the filter to delete.
fn listsynprotectionrulesforaccount(page?: number, per_page?: number, order?: string, direction?: string)
List all SYN Protection rules.
ArgumentTypeDescription
page?numberThe page number for pagination. Defaults to 1.
per_page?numberThe number of items per page. Must be between 10 and 1000. Defaults to 25.
order?stringThe field to order by. Defaults to 'prefix'.
direction?stringThe direction of ordering (ASC or DESC). Defaults to 'ASC'.
fn createsynprotectionrule(burst_sensitivity: string, mitigation_type?: string, mode: string, name: string, rate_sensitivity: string, scope: string)
Create SYN Protection rule.
ArgumentTypeDescription
burst_sensitivitystringThe burst sensitivity. Must be one of 'low', 'medium', 'high'.
mitigation_type?stringThe type of mitigation. Must be one of 'challenge' or 'retransmit'. Optional....
modestringThe mode for SYN Protection. Must be one of 'enabled', 'disabled', 'monitoring'.
namestringThe name of the SYN Protection rule. Value is relative to the 'scope' setting...
rate_sensitivitystringThe rate sensitivity. Must be one of 'low', 'medium', 'high'.
scopestringThe scope for the SYN Protection rule. Must be one of 'global', 'region', or ...
fn deletesynprotectionrulesforaccount()
Delete all SYN Protection rules.
fn getsynprotectionrule(rule_id: string)
Get SYN Protection rule.
ArgumentTypeDescription
rule_idstringThe UUID of the SYN Protection rule.
fn updatesynprotectionrule(rule_id: string, burst_sensitivity?: string, mitigation_type?: string, mode?: string, rate_sensitivity?: string)
Update SYN Protection rule.
ArgumentTypeDescription
rule_idstringThe UUID of the SYN Protection rule to update.
burst_sensitivity?stringThe new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.
mitigation_type?stringThe new mitigation type. Optional. Must be one of 'challenge' or 'retransmit'.
mode?stringThe new mode for SYN Protection. Optional. Must be one of 'enabled', 'disable...
rate_sensitivity?stringThe new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.
fn deletesynprotectionrule(rule_id: string)
Delete SYN Protection rule.
ArgumentTypeDescription
rule_idstringThe UUID of the SYN Protection rule to delete.
fn listtcpflowprotectionfiltersforaccount(mode?: string, page?: number, per_page?: number, order?: string, direction?: string)
List all TCP Flow Protection filters.
ArgumentTypeDescription
mode?stringThe mode of the filters to get. Optional. Valid values: 'enabled', 'disabled', 'monitoring'.
page?numberThe page number for pagination. Defaults to 1.
per_page?numberThe number of items per page. Must be between 10 and 1000. Defaults to 25.
order?stringThe field to order by. Defaults to 'prefix'.
direction?stringThe direction of ordering (ASC or DESC). Defaults to 'ASC'.
fn createtcpflowprotectionfilter(expression: string, mode: string)
Create a TCP Flow Protection filter.
ArgumentTypeDescription
expressionstringThe filter expression.
modestringThe filter's mode. Must be one of 'enabled', 'disabled', 'monitoring'.
fn deletetcpflowprotectionfiltersforaccount()
Delete all TCP Flow Protection filters.
fn gettcpflowprotectionfilter(filter_id: string)
Get TCP Flow Protection filter.
ArgumentTypeDescription
filter_idstringThe UUID of the filter to retrieve.
fn updatetcpflowprotectionfilter(filter_id: string, expression?: string, mode?: string)
Update TCP Flow Protection filter.
ArgumentTypeDescription
filter_idstringThe UUID of the filter to update.
expression?stringThe new filter expression. Optional.
mode?stringThe new mode for the filter. Optional. Must be one of 'enabled', 'disabled', ...
fn deletetcpflowprotectionfilter(filter_id: string)
Delete TCP Flow Protection filter.
ArgumentTypeDescription
filter_idstringThe UUID of the filter to delete.
fn listtcpflowprotectionrulesforaccount(page?: number, per_page?: number, order?: string, direction?: string)
List all TCP Flow Protection rules.
ArgumentTypeDescription
page?numberThe page number for pagination. Defaults to 1.
per_page?numberThe number of items per page. Must be between 10 and 1000. Defaults to 25.
order?stringThe field to order by. Defaults to 'prefix'.
direction?stringThe direction of ordering (ASC or DESC). Defaults to 'ASC'.
fn createtcpflowprotectionrule(burst_sensitivity: string, mode: string, name: string, rate_sensitivity: string, scope: string)
Create TCP Flow Protection rule.
ArgumentTypeDescription
burst_sensitivitystringThe burst sensitivity. Must be one of 'low', 'medium', 'high'.
modestringThe mode for the TCP Flow Protection. Must be one of 'enabled', 'disabled', '...
namestringThe name of the TCP Flow Protection rule. Value is relative to the 'scope' se...
rate_sensitivitystringThe rate sensitivity. Must be one of 'low', 'medium', 'high'.
scopestringThe scope for the TCP Flow Protection rule.
fn deletetcpflowprotectionrulesforaccount()
Delete all TCP Flow Protection rules.
fn gettcpflowprotectionrule(rule_id: string)
Get TCP Flow Protection rule.
ArgumentTypeDescription
rule_idstringThe UUID of the TCP Flow Protection rule.
fn updatetcpflowprotectionrule(rule_id: string, burst_sensitivity?: string, mode?: string, rate_sensitivity?: string)
Update TCP Flow Protection rule.
ArgumentTypeDescription
rule_idstringThe UUID of the TCP Flow Protection rule to update.
burst_sensitivity?stringThe new burst sensitivity. Optional. Must be one of 'low', 'medium', 'high'.
mode?stringThe new mode for TCP Flow Protection. Optional. Must be one of 'enabled', 'di...
rate_sensitivity?stringThe new rate sensitivity. Optional. Must be one of 'low', 'medium', 'high'.
fn deletetcpflowprotectionrule(rule_id: string)
Delete TCP Flow Protection rule.
ArgumentTypeDescription
rule_idstringThe UUID of the TCP Flow Protection rule to delete.
fn getprotectionstatus()
Get protection status.
fn updateprotectionstatus(enabled: boolean)
Update protection status.
ArgumentTypeDescription
enabledbooleanEnables or disables protection.
fn list_apps()
List Apps
fn create_magic_account_apps_add_app(hostnames?: unknown, ip_subnets?: unknown, name: unknown, source_subnets?: unknown, type: unknown)
Create a new App
ArgumentTypeDescription
hostnames?unknown
ip_subnets?unknown
nameunknown
source_subnets?unknown
typeunknown
fn update_app(account_app_id: string, hostnames?: unknown, ip_subnets?: unknown, name?: unknown, source_subnets?: unknown, type?: unknown)
Update an App
ArgumentTypeDescription
account_app_idstring
hostnames?unknown
ip_subnets?unknown
name?unknown
source_subnets?unknown
type?unknown
fn patch_app(account_app_id: string, hostnames?: unknown, ip_subnets?: unknown, name?: unknown, source_subnets?: unknown, type?: unknown)
Update an App
ArgumentTypeDescription
account_app_idstring
hostnames?unknown
ip_subnets?unknown
name?unknown
source_subnets?unknown
type?unknown
fn delete_app(account_app_id: string)
Delete Account App
ArgumentTypeDescription
account_app_idstring
fn list_filter_profiles()
List BGP Filter Profiles
fn create_filter_profile(description?: string, match_action: unknown, name: string, targets: array)
Create BGP Filter Profile
ArgumentTypeDescription
description?stringDescription of the filter profile
match_actionunknown
namestringFriendly name for the filter profile
targetsarrayList of CIDR prefixes. Each entry may carry an optional suffix that specifies...
fn get_filter_profile(profile_id: string)
Get BGP Filter Profile
ArgumentTypeDescription
profile_idstringCNI (connector network interconnect) profile identifier.
fn update_filter_profile(profile_id: string, description?: string, match_action?: unknown, name?: string, targets?: array)
Update BGP Filter Profile
ArgumentTypeDescription
profile_idstringCNI (connector network interconnect) profile identifier.
description?stringDescription of the filter profile
match_action?unknown
name?stringFriendly name for the filter profile
targets?arrayList of CIDR prefixes. Each entry may carry an optional suffix that specifies...
fn delete_filter_profile(profile_id: string)
Delete BGP Filter Profile
ArgumentTypeDescription
profile_idstringCNI (connector network interconnect) profile identifier.
fn get_settings()
Get BGP Settings
fn update_settings(cloudflare_asn?: number, redistribute?: unknown)
Update BGP Settings
ArgumentTypeDescription
cloudflare_asn?numberRoute advertisements from Cloudflare to ramps in this account will use this ASN.
redistribute?unknown
fn list_cf1_sites()
List CF1 Sites
fn create_cf1_sites()
Create CF1 Sites
fn get_cf1_site(cf1_site_id: string)
Get CF1 Site
ArgumentTypeDescription
cf1_site_idstring
fn update_cf1_site(cf1_site_id: string, description?: string, location?: unknown, name?: string)
Update CF1 Site
ArgumentTypeDescription
cf1_site_idstring
description?stringA human-provided description of the CF1 Site.
location?unknown
name?stringA human-provided name describing the CF1 Site that should be unique within th...
fn delete_cf1_site(cf1_site_id: string)
Delete CF1 Site
ArgumentTypeDescription
cf1_site_idstring
fn list_cf1_site_ramps(cf1_site_id: string)
List CF1 Site Ramps
ArgumentTypeDescription
cf1_site_idstring
fn create_cf1_site_ramps(cf1_site_id: string)
Create CF1 Site Ramps
ArgumentTypeDescription
cf1_site_idstring
fn get_cf1_site_ramp(cf1_site_id: string, ramp_id: string)
Get CF1 Site Ramp
ArgumentTypeDescription
cf1_site_idstring
ramp_idstring
fn delete_cf1_site_ramp(cf1_site_id: string, ramp_id: string)
Delete CF1 Site Ramp
ArgumentTypeDescription
cf1_site_idstring
ramp_idstring
fn list_interconnects()
List interconnects
fn update_multiple_interconnects()
Update multiple interconnects
fn list_interconnect_details(cf_interconnect_id: string)
List interconnect Details
ArgumentTypeDescription
cf_interconnect_idstring
fn update_interconnect(cf_interconnect_id: string, automatic_return_routing?: unknown, description?: unknown, gre?: unknown, health_check?: unknown, interface_address?: unknown, interface_address6?: unknown, mtu?: unknown, name?: unknown)
Update interconnect
ArgumentTypeDescription
cf_interconnect_idstring
automatic_return_routing?unknown
description?unknown
gre?unknown
health_check?unknown
interface_address?unknown
interface_address6?unknown
mtu?unknown
name?unknown
fn list()
List Catalog Syncs
fn create(description?: string, destination_type: unknown, name: string, policy?: string, update_mode: unknown)
Create Catalog Sync
ArgumentTypeDescription
description?string
destination_typeunknown
namestring
policy?string
update_modeunknown
fn get_catalog_syncs_read(sync_id: string)
Read Catalog Sync
ArgumentTypeDescription
sync_idstringPCAP collection sync identifier.
fn update(sync_id: string, description?: string, name?: string, policy?: string, update_mode?: unknown)
Update Catalog Sync
ArgumentTypeDescription
sync_idstringPCAP collection sync identifier.
description?string
name?string
policy?string
update_mode?unknown
fn patch(sync_id: string, description?: string, name?: string, policy?: string, update_mode?: unknown)
Patch Catalog Sync
ArgumentTypeDescription
sync_idstringPCAP collection sync identifier.
description?string
name?string
policy?string
update_mode?unknown
fn delete(sync_id: string, delete_destination?: boolean)
Delete Catalog Sync
ArgumentTypeDescription
sync_idstringPCAP collection sync identifier.
delete_destination?boolean
fn catalog_syncs_refresh(sync_id: string)
Run Catalog Sync
ArgumentTypeDescription
sync_idstringPCAP collection sync identifier.
fn get_onramps_mwan_addr_space_read()
Read Magic WAN Address Space
fn get_onramps_read(onramp_id: string, status?: boolean, vpcs?: boolean, post_apply_resources?: boolean, planned_resources?: boolean)
Read On-ramp
ArgumentTypeDescription
onramp_idstringOnramp identifier.
status?boolean
vpcs?boolean
post_apply_resources?boolean
planned_resources?boolean
fn onramps_apply(onramp_id: string)
Apply On-ramp
ArgumentTypeDescription
onramp_idstringOnramp identifier.
fn onramps_plan(onramp_id: string)
Plan On-ramp
ArgumentTypeDescription
onramp_idstringOnramp identifier.
fn providers_discover_all()
Run Discovery for All Integrations
fn get_providers_read(provider_id: string, status?: boolean)
Read Cloud Integration
ArgumentTypeDescription
provider_idstringNetwork interconnect provider identifier.
status?boolean
fn providers_discover(provider_id: string, v2?: boolean)
Run Discovery
ArgumentTypeDescription
provider_idstringNetwork interconnect provider identifier.
v2?boolean
fn get_providers_initial_setup(provider_id: string)
Get Cloud Integration Setup Config
ArgumentTypeDescription
provider_idstringNetwork interconnect provider identifier.
fn create_resources_catalog_policy_preview(policy: string)
Preview Rego Query
ArgumentTypeDescription
policystring
fn get_resources_catalog_read(resource_id: string, v2?: boolean)
Read Resource
ArgumentTypeDescription
resource_idstring
v2?boolean
fn get(connector_id: string)
Get Connector
ArgumentTypeDescription
connector_idstring
fn update_mconn_connectors_edit(connector_id: string, activated?: boolean, interrupt_window_days_of_week?: array, interrupt_window_duration_hours?: number, interrupt_window_embargo_dates?: array, interrupt_window_hour_of_day?: number, notes?: string, primary?: boolean, site_id?: string, timezone?: string, provision_license?: boolean)
Edit Connector
ArgumentTypeDescription
connector_idstring
activated?boolean
interrupt_window_days_of_week?arrayAllowed days of the week for upgrades. Default is all days.
interrupt_window_duration_hours?number
interrupt_window_embargo_dates?arrayList of dates (YYYY-MM-DD) when upgrades are blocked.
interrupt_window_hour_of_day?number
notes?string
primary?boolean
site_id?string
timezone?string
provision_license?booleanWhen true, regenerate license key for the connector.
fn list_gre_tunnels()
List GRE tunnels
fn create_gre_tunnels(automatic_return_routing?: unknown, bgp?: unknown, cloudflare_gre_endpoint: unknown, customer_gre_endpoint: unknown, description?: unknown, health_check?: unknown, interface_address: unknown, interface_address6?: unknown, mtu?: unknown, name: unknown, ttl?: unknown)
Create a GRE tunnel
ArgumentTypeDescription
automatic_return_routing?unknown
bgp?unknown
cloudflare_gre_endpointunknown
customer_gre_endpointunknown
description?unknown
health_check?unknown
interface_addressunknown
interface_address6?unknown
mtu?unknown
nameunknown
ttl?unknown
fn update_multiple_gre_tunnels()
Update multiple GRE tunnels
fn list_gre_tunnel_details(gre_tunnel_id: string)
List GRE Tunnel Details
ArgumentTypeDescription
gre_tunnel_idstringGRE tunnel identifier.
fn update_gre_tunnel(gre_tunnel_id: string, automatic_return_routing?: unknown, cloudflare_gre_endpoint: unknown, customer_gre_endpoint: unknown, description?: unknown, health_check?: unknown, interface_address: unknown, interface_address6?: unknown, mtu?: unknown, name: unknown, ttl?: unknown)
Update GRE Tunnel
ArgumentTypeDescription
gre_tunnel_idstringGRE tunnel identifier.
automatic_return_routing?unknown
cloudflare_gre_endpointunknown
customer_gre_endpointunknown
description?unknown
health_check?unknown
interface_addressunknown
interface_address6?unknown
mtu?unknown
nameunknown
ttl?unknown
fn delete_gre_tunnel(gre_tunnel_id: string)
Delete GRE Tunnel
ArgumentTypeDescription
gre_tunnel_idstringGRE tunnel identifier.
fn list_ipsec_tunnels()
List IPsec tunnels
fn create_ipsec_tunnels(automatic_return_routing?: unknown, bgp?: unknown, cloudflare_endpoint: unknown, custom_remote_identities?: unknown, customer_endpoint?: unknown, description?: unknown, health_check?: unknown, interface_address: unknown, interface_address6?: unknown, name: unknown, psk?: unknown, replay_protection?: unknown)
Create an IPsec tunnel
ArgumentTypeDescription
automatic_return_routing?unknown
bgp?unknown
cloudflare_endpointunknown
custom_remote_identities?unknown
customer_endpoint?unknown
description?unknown
health_check?unknown
interface_addressunknown
interface_address6?unknown
nameunknown
psk?unknown
replay_protection?unknown
fn update_multiple_ipsec_tunnels()
Update multiple IPsec tunnels
fn create_magic_ipsec_tunnels_set_pre_shared_keys_for_ipsec_tunnels(validate_only?: boolean, psks: array)
Set Pre-Shared Keys (PSK) for IPsec tunnels
ArgumentTypeDescription
validate_only?booleanIf `true`, only run validation without persisting changes.
psksarrayList of tunnel ID and PSK pairs.
fn list_ipsec_tunnel_details(ipsec_tunnel_id: string)
List IPsec tunnel details
ArgumentTypeDescription
ipsec_tunnel_idstringIPsec tunnel identifier.
fn update_ipsec_tunnel(ipsec_tunnel_id: string, automatic_return_routing?: unknown, bgp?: unknown, cloudflare_endpoint: unknown, custom_remote_identities?: unknown, customer_endpoint?: unknown, description?: unknown, health_check?: unknown, interface_address: unknown, interface_address6?: unknown, name: unknown, psk?: unknown, replay_protection?: unknown)
Update IPsec Tunnel
ArgumentTypeDescription
ipsec_tunnel_idstringIPsec tunnel identifier.
automatic_return_routing?unknown
bgp?unknown
cloudflare_endpointunknown
custom_remote_identities?unknown
customer_endpoint?unknown
description?unknown
health_check?unknown
interface_addressunknown
interface_address6?unknown
nameunknown
psk?unknown
replay_protection?unknown
fn delete_ipsec_tunnel(ipsec_tunnel_id: string)
Delete IPsec Tunnel
ArgumentTypeDescription
ipsec_tunnel_idstringIPsec tunnel identifier.
fn magic_ipsec_tunnels_generate_pre_shared_key_psk_for_ipsec_tunnels(ipsec_tunnel_id: string)
Generate Pre-Shared Key (PSK) for IPsec tunnels
ArgumentTypeDescription
ipsec_tunnel_idstringIPsec tunnel identifier.
fn list_redundancy_groups()
List Redundancy Groups
fn create_redundancy_group(description?: string, members?: array, name: string)
Create a Redundancy Group
ArgumentTypeDescription
description?stringOptional description
members?arrayTunnels to add to the group
namestringHuman-readable name for the redundancy group
fn get_redundancy_group(redundancy_group_id: string)
Get Redundancy Group Details
ArgumentTypeDescription
redundancy_group_idstringConnector redundancy group identifier.
fn update_redundancy_group(redundancy_group_id: string, description?: string, members?: array, name: string)
Update a Redundancy Group
ArgumentTypeDescription
redundancy_group_idstringConnector redundancy group identifier.
description?stringOptional description
members?arrayTunnels to add to the group
namestringHuman-readable name for the redundancy group
fn delete_redundancy_group(redundancy_group_id: string)
Delete a Redundancy Group
ArgumentTypeDescription
redundancy_group_idstringConnector redundancy group identifier.
fn list_routes()
List Routes
fn create_routes(description?: unknown, nexthop: unknown, prefix: unknown, priority: unknown, scope?: unknown, weight?: unknown)
Create a Route
ArgumentTypeDescription
description?unknown
nexthopunknown
prefixunknown
priorityunknown
scope?unknown
weight?unknown
fn update_many_routes(routes: array)
Update Many Routes
ArgumentTypeDescription
routesarray
fn delete_many_routes(routes: array)
Delete Many Routes
ArgumentTypeDescription
routesarray
fn get_magic_static_routes_route_details(route_id: string)
Route Details
ArgumentTypeDescription
route_idstringStatic route identifier.
fn update_route(route_id: string, description?: unknown, nexthop: unknown, prefix: unknown, priority: unknown, scope?: unknown, weight?: unknown)
Update Route
ArgumentTypeDescription
route_idstringStatic route identifier.
description?unknown
nexthopunknown
prefixunknown
priorityunknown
scope?unknown
weight?unknown
fn delete_route(route_id: string)
Delete Route
ArgumentTypeDescription
route_idstringStatic route identifier.
fn list_sites(connectorid?: string)
List Sites
ArgumentTypeDescription
connectorid?string
fn create_site(connector_id?: unknown, description?: string, ha_mode?: boolean, location?: unknown, name: unknown, secondary_connector_id?: unknown)
Create a new Site
ArgumentTypeDescription
connector_id?unknown
description?string
ha_mode?booleanSite high availability mode. If set to true, the site can have two connectors...
location?unknown
nameunknown
secondary_connector_id?unknown
fn get_magic_sites_site_details(site_id: string)
Site Details
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
fn update_site(site_id: string, connector_id?: unknown, description?: string, location?: unknown, name?: unknown, secondary_connector_id?: unknown)
Update Site
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
connector_id?unknown
description?string
location?unknown
name?unknown
secondary_connector_id?unknown
fn patch_site(site_id: string, connector_id?: unknown, description?: string, location?: unknown, name?: unknown, secondary_connector_id?: unknown)
Patch Site
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
connector_id?unknown
description?string
location?unknown
name?unknown
secondary_connector_id?unknown
fn delete_site(site_id: string)
Delete Site
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
fn list_acls(site_id: string)
List Site ACLs
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
fn create_acl(site_id: string, description?: string, forward_locally?: unknown, lan_1: unknown, lan_2: unknown, name: string, protocols?: array, unidirectional?: unknown)
Create a new Site ACL
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
description?stringDescription for the ACL.
forward_locally?unknown
lan_1unknown
lan_2unknown
namestringThe name of the ACL.
protocols?array
unidirectional?unknown
fn get_magic_site_acls_acl_details(site_id: string, acl_id: string)
Site ACL Details
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
acl_idstringACL identifier.
fn update_acl(site_id: string, acl_id: string, description?: string, forward_locally?: unknown, lan_1?: unknown, lan_2?: unknown, name?: string, protocols?: array, unidirectional?: unknown)
Update Site ACL
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
acl_idstringACL identifier.
description?stringDescription for the ACL.
forward_locally?unknown
lan_1?unknown
lan_2?unknown
name?stringThe name of the ACL.
protocols?array
unidirectional?unknown
fn patch_acl(site_id: string, acl_id: string, description?: string, forward_locally?: unknown, lan_1?: unknown, lan_2?: unknown, name?: string, protocols?: array, unidirectional?: unknown)
Patch Site ACL
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
acl_idstringACL identifier.
description?stringDescription for the ACL.
forward_locally?unknown
lan_1?unknown
lan_2?unknown
name?stringThe name of the ACL.
protocols?array
unidirectional?unknown
fn delete_acl(site_id: string, acl_id: string)
Delete Site ACL
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
acl_idstringACL identifier.
fn list_app_configs(site_id: string)
List App Configs
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
fn create_magic_site_app_configs_add_app_config(site_id: string, breakout?: unknown, preferred_wans?: unknown, priority?: unknown)
Create a new App Config
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
breakout?unknown
preferred_wans?unknown
priority?unknown
fn update_app_config(site_id: string, app_config_id: string, account_app_id?: unknown, breakout?: unknown, managed_app_id?: unknown, preferred_wans?: unknown, priority?: unknown)
Update an App Config
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
app_config_idstring
account_app_id?unknown
breakout?unknown
managed_app_id?unknown
preferred_wans?unknown
priority?unknown
fn patch_app_config(site_id: string, app_config_id: string, account_app_id?: unknown, breakout?: unknown, managed_app_id?: unknown, preferred_wans?: unknown, priority?: unknown)
Update an App Config
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
app_config_idstring
account_app_id?unknown
breakout?unknown
managed_app_id?unknown
preferred_wans?unknown
priority?unknown
fn delete_app_config(site_id: string, app_config_id: string)
Delete App Config
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
app_config_idstring
fn list_lans(site_id: string)
List Site LANs
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
fn create_lan(site_id: string, bond_id?: unknown, ha_link?: boolean, is_breakout?: boolean, is_prioritized?: boolean, name?: string, nat?: unknown, physport?: unknown, routed_subnets?: array, static_addressing?: unknown, vlan_tag?: unknown)
Create a new Site LAN
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
bond_id?unknown
ha_link?booleanmark true to use this LAN for HA probing. only works for site with HA turned ...
is_breakout?booleanmark true to use this LAN for source-based breakout traffic
is_prioritized?booleanmark true to use this LAN for source-based prioritized traffic
name?string
nat?unknown
physport?unknown
routed_subnets?array
static_addressing?unknown
vlan_tag?unknown
fn get_magic_site_lans_lan_details(site_id: string, lan_id: string)
Site LAN Details
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
lan_idstringLAN identifier.
fn update_lan(site_id: string, lan_id: string, bond_id?: unknown, is_breakout?: boolean, is_prioritized?: boolean, name?: string, nat?: unknown, physport?: unknown, routed_subnets?: array, static_addressing?: unknown, vlan_tag?: unknown)
Update Site LAN
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
lan_idstringLAN identifier.
bond_id?unknown
is_breakout?booleanmark true to use this LAN for source-based breakout traffic
is_prioritized?booleanmark true to use this LAN for source-based prioritized traffic
name?string
nat?unknown
physport?unknown
routed_subnets?array
static_addressing?unknown
vlan_tag?unknown
fn patch_lan(site_id: string, lan_id: string, bond_id?: unknown, is_breakout?: boolean, is_prioritized?: boolean, name?: string, nat?: unknown, physport?: unknown, routed_subnets?: array, static_addressing?: unknown, vlan_tag?: unknown)
Patch Site LAN
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
lan_idstringLAN identifier.
bond_id?unknown
is_breakout?booleanmark true to use this LAN for source-based breakout traffic
is_prioritized?booleanmark true to use this LAN for source-based prioritized traffic
name?string
nat?unknown
physport?unknown
routed_subnets?array
static_addressing?unknown
vlan_tag?unknown
fn delete_lan(site_id: string, lan_id: string)
Delete Site LAN
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
lan_idstringLAN identifier.
fn get_magic_site_netflow_config_details(site_id: string)
NetFlow Configuration Details
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
fn create_netflow_config(site_id: string, active_timeout?: number, collector_ip?: string, collector_port?: number, inactive_timeout?: number, sampling_rate?: number)
Create NetFlow Configuration
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
active_timeout?numberTimeout in seconds for active flows.
collector_ip?stringIPv4 address of the NetFlow collector.
collector_port?numberUDP port of the NetFlow collector.
inactive_timeout?numberTimeout in seconds for inactive flows.
sampling_rate?numberSampling rate for NetFlow records (1 = every packet).
fn update_netflow_config(site_id: string, active_timeout?: number, collector_ip?: string, collector_port?: number, inactive_timeout?: number, sampling_rate?: number)
Update NetFlow Configuration
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
active_timeout?numberTimeout in seconds for active flows.
collector_ip?stringIPv4 address of the NetFlow collector.
collector_port?numberUDP port of the NetFlow collector.
inactive_timeout?numberTimeout in seconds for inactive flows.
sampling_rate?numberSampling rate for NetFlow records (1 = every packet).
fn patch_netflow_config(site_id: string, active_timeout?: number, collector_ip?: string, collector_port?: number, inactive_timeout?: number, sampling_rate?: number)
Update NetFlow Configuration
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
active_timeout?numberTimeout in seconds for active flows.
collector_ip?stringIPv4 address of the NetFlow collector.
collector_port?numberUDP port of the NetFlow collector.
inactive_timeout?numberTimeout in seconds for inactive flows.
sampling_rate?numberSampling rate for NetFlow records (1 = every packet).
fn delete_netflow_config(site_id: string)
Delete NetFlow Configuration
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
fn list_wans(site_id: string)
List Site WANs
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
fn create_wan(site_id: string, name?: string, physport: unknown, priority?: number, static_addressing?: unknown, vlan_tag?: unknown)
Create a new Site WAN
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
name?string
physportunknown
priority?number
static_addressing?unknown
vlan_tag?unknown
fn get_magic_site_wans_wan_details(site_id: string, wan_id: string)
Site WAN Details
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
wan_idstringWAN identifier.
fn update_wan(site_id: string, wan_id: string, name?: string, physport?: unknown, priority?: number, static_addressing?: unknown, vlan_tag?: unknown)
Update Site WAN
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
wan_idstringWAN identifier.
name?string
physport?unknown
priority?number
static_addressing?unknown
vlan_tag?unknown
fn patch_wan(site_id: string, wan_id: string, name?: string, physport?: unknown, priority?: number, static_addressing?: unknown, vlan_tag?: unknown)
Patch Site WAN
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
wan_idstringWAN identifier.
name?string
physport?unknown
priority?number
static_addressing?unknown
vlan_tag?unknown
fn delete_wan(site_id: string, wan_id: string)
Delete Site WAN
ArgumentTypeDescription
site_idstringMagic WAN site identifier.
wan_idstringWAN identifier.
04Previous Versions3
2026.08.21.1

2026.08.21.1

Changed: Added .describe() and .min(1) to the identifier arguments used across most methods — site_id, sync_id, wan_id, lan_id, ipsec_tunnel_id, acl_id, route_id, redundancy_group_id, provider_id, profile_id, onramp_id, and gre_tunnel_id. No behavioral changes.

2026.07.27.1

Fixed: Regenerated from scripts/cloudflare-codegen after two generator bugs were repaired (webframp/swamp-extensions#284).

  1. Methods referencing an undeclared path parameter did not compile. The generator derived a method's arguments schema and execute signature from the OpenAPI parameters list, but built the request URL from the path template. Where the Cloudflare spec omits a declaration for a {placeholder} — which it does in several places — the result was a method with arguments: z.object({}) and an unused _args parameter whose body still interpolated args.<name>. Those methods failed type checking and were uncallable even if they had compiled, because the argument was never declared. Path-template placeholders are now unioned into the declared parameters, so the schema, the signature, and the body agree.

  2. Generated tests could request a URL the mock server did not serve. Test arguments merged the request-body fixture over the path-parameter values, so a body property sharing a name with a path parameter (commonly id) substituted its own example value into the URL. The request then missed the mock and failed with Cloudflare API error: Not found. Path parameters now take precedence, matching what the generated model already does by excluding path-parameter names from the request body.

Upgrade note: No API surface change and no method was added or removed. If this extension type-checked and tested cleanly before, its behavior is unchanged and only the version moved. Extensions that previously failed deno check or deno task test now pass.

2026.07.27.1

2026.07.27.1

Fixed: Regenerated from scripts/cloudflare-codegen after two generator bugs were repaired (webframp/swamp-extensions#284).

  1. Methods referencing an undeclared path parameter did not compile. The generator derived a method's arguments schema and execute signature from the OpenAPI parameters list, but built the request URL from the path template. Where the Cloudflare spec omits a declaration for a {placeholder} — which it does in several places — the result was a method with arguments: z.object({}) and an unused _args parameter whose body still interpolated args.<name>. Those methods failed type checking and were uncallable even if they had compiled, because the argument was never declared. Path-template placeholders are now unioned into the declared parameters, so the schema, the signature, and the body agree.

  2. Generated tests could request a URL the mock server did not serve. Test arguments merged the request-body fixture over the path-parameter values, so a body property sharing a name with a path parameter (commonly id) substituted its own example value into the URL. The request then missed the mock and failed with Cloudflare API error: Not found. Path parameters now take precedence, matching what the generated model already does by excluding path-parameter names from the request body.

Upgrade note: No API surface change and no method was added or removed. If this extension type-checked and tested cleanly before, its behavior is unchanged and only the version moved. Extensions that previously failed deno check or deno task test now pass.

2026.07.19.1

2026.07.19.1

Added: Initial code-generated release of @webframp/cloudflare/magic-transit with 149 methods covering the Cloudflare magic transit API surface.

05Stats
A
100 / 100
Downloads
0
Archive size
49.5 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/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