Skip to main content

warp_connector

Creates, updates, deletes, gets or lists a warp_connector resource.

Overview

Namewarp_connector
TypeResource
Idcloudflare.zero_trust.warp_connector

Fields

The following fields are returned by SELECT queries:

Get a Warp Connector Tunnel response

NameDatatypeDescription
idstring (uuid)UUID of the tunnel. (example: f70ff985-a4ef-4643-bbbc-4a0ed4fc8415)
namestringA user-friendly name for a tunnel. (example: blog)
account_tagstringCloudflare account ID (example: 699d98642c564d2e855e9661899b7252)
connectionsarrayThe Cloudflare Tunnel connections between your origin and Cloudflare's edge. (x-stainless-deprecation-message: This field will start returning an empty array. To fetch the connections of a given tunnel, please use the dedicated endpoint /accounts/{account_id}/{tunnel_type}/{tunnel_id}/connections)
conns_active_atstring (date-time)Timestamp of when the tunnel established at least one connection to Cloudflare's edge. If null, the tunnel is inactive. (example: 2009-11-10T23:00:00Z)
conns_inactive_atstring (date-time)Timestamp of when the tunnel became inactive (no connections to Cloudflare's edge). If null, the tunnel is active. (example: 2009-11-10T23:00:00Z)
created_atstring (date-time)Timestamp of when the resource was created. (example: 2021-01-25T18:22:34.317854Z)
deleted_atstring (date-time)Timestamp of when the resource was deleted. If null, the resource has not been deleted. (example: 2009-11-10T23:00:00.000000Z)
metadataobjectMetadata associated with the tunnel.
statusstringThe status of the tunnel. Valid values are inactive (tunnel has never been run), degraded (tunnel is active and able to serve traffic but in an unhealthy state), healthy (tunnel is active and able to serve traffic), or down (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). (inactive, degraded, healthy, down) (example: healthy)
tun_typestringThe type of tunnel. (cfd_tunnel, warp_connector, warp, magic, ip_sec, gre, cni) (example: cfd_tunnel)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, tunnel_idFetches a single Warp Connector Tunnel.
listselectaccount_idname, is_deleted, existed_at, uuid, was_active_at, was_inactive_at, include_prefix, exclude_prefix, status, per_page, pageLists and filters Warp Connector Tunnels in an account.
createinsertaccount_id, nameCreates a new Warp Connector Tunnel in an account.
editupdateaccount_id, tunnel_idUpdates an existing Warp Connector Tunnel.
deletedeleteaccount_id, tunnel_idDeletes a Warp Connector Tunnel from an account.
update_failoverexecaccount_id, tunnel_id, client_idTriggers a manual failover for a specific WARP Connector Tunnel, setting the specified client as the active connector. The tunnel must be configured for high availability (HA) and the client must be linked to the tunnel.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
tunnel_idstringThe Cloudflare Tunnel ID.
exclude_prefixstring
existed_atstring (url-encoded-date-time)
include_prefixstring
is_deletedboolean
namestring
pagenumber
per_pagenumber
statusstring
uuidstring (uuid)
was_active_atstring (date-time)
was_inactive_atstring (date-time)

SELECT examples

Fetches a single Warp Connector Tunnel.

SELECT
id,
name,
account_tag,
connections,
conns_active_at,
conns_inactive_at,
created_at,
deleted_at,
metadata,
status,
tun_type
FROM cloudflare.zero_trust.warp_connector
WHERE account_id = '{{ account_id }}' -- required
AND tunnel_id = '{{ tunnel_id }}' -- required
;

INSERT examples

Creates a new Warp Connector Tunnel in an account.

INSERT INTO cloudflare.zero_trust.warp_connector (
ha,
name,
account_id
)
SELECT
{{ ha }},
'{{ name }}' /* required */,
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;

UPDATE examples

Updates an existing Warp Connector Tunnel.

UPDATE cloudflare.zero_trust.warp_connector
SET
name = '{{ name }}',
tunnel_secret = '{{ tunnel_secret }}'
WHERE
account_id = '{{ account_id }}' --required
AND tunnel_id = '{{ tunnel_id }}' --required
RETURNING
errors,
messages,
result,
success;

DELETE examples

Deletes a Warp Connector Tunnel from an account.

DELETE FROM cloudflare.zero_trust.warp_connector
WHERE account_id = '{{ account_id }}' --required
AND tunnel_id = '{{ tunnel_id }}' --required
;

Lifecycle Methods

Triggers a manual failover for a specific WARP Connector Tunnel, setting the specified client as the active connector. The tunnel must be configured for high availability (HA) and the client must be linked to the tunnel.

EXEC cloudflare.zero_trust.warp_connector.update_failover
@account_id='{{ account_id }}' --required,
@tunnel_id='{{ tunnel_id }}' --required
@@json=
'{
"client_id": "{{ client_id }}"
}'
;