Skip to content
Start here

Tunnels

List All Tunnels
client.ZeroTrust.Tunnels.List(ctx, params) (*V4PagePaginationArray[TunnelListResponse], error)
GET/accounts/{account_id}/tunnels
ModelsExpand Collapse
type Connection struct{…}
ColoName stringoptional

The Cloudflare data center used for this connection.

IsPendingReconnect booloptional

Cloudflare continues to track connections for several minutes after they disconnect. This is an optimization to improve latency and reliability of reconnecting. If true, the connection has disconnected but is still being tracked. If false, the connection is actively serving traffic.

UUID stringoptional

UUID of the Cloudflare Tunnel connection.

formatuuid
maxLength36

TunnelsCloudflared

List Cloudflare Tunnels
client.ZeroTrust.Tunnels.Cloudflared.List(ctx, params) (*V4PagePaginationArray[CloudflareTunnel], error)
GET/accounts/{account_id}/cfd_tunnel
Get a Cloudflare Tunnel
client.ZeroTrust.Tunnels.Cloudflared.Get(ctx, tunnelID, query) (*CloudflareTunnel, error)
GET/accounts/{account_id}/cfd_tunnel/{tunnel_id}
Create a Cloudflare Tunnel
client.ZeroTrust.Tunnels.Cloudflared.New(ctx, params) (*CloudflareTunnel, error)
POST/accounts/{account_id}/cfd_tunnel
Update a Cloudflare Tunnel
client.ZeroTrust.Tunnels.Cloudflared.Edit(ctx, tunnelID, params) (*CloudflareTunnel, error)
PATCH/accounts/{account_id}/cfd_tunnel/{tunnel_id}
Delete a Cloudflare Tunnel
client.ZeroTrust.Tunnels.Cloudflared.Delete(ctx, tunnelID, body) (*CloudflareTunnel, error)
DELETE/accounts/{account_id}/cfd_tunnel/{tunnel_id}

TunnelsCloudflaredConfigurations

Get configuration
client.ZeroTrust.Tunnels.Cloudflared.Configurations.Get(ctx, tunnelID, query) (*TunnelCloudflaredConfigurationGetResponse, error)
GET/accounts/{account_id}/cfd_tunnel/{tunnel_id}/configurations
Put configuration
client.ZeroTrust.Tunnels.Cloudflared.Configurations.Update(ctx, tunnelID, params) (*TunnelCloudflaredConfigurationUpdateResponse, error)
PUT/accounts/{account_id}/cfd_tunnel/{tunnel_id}/configurations

TunnelsCloudflaredConnections

List Cloudflare Tunnel connections
client.ZeroTrust.Tunnels.Cloudflared.Connections.Get(ctx, tunnelID, query) (*SinglePage[Client], error)
GET/accounts/{account_id}/cfd_tunnel/{tunnel_id}/connections
Clean up Cloudflare Tunnel connections
client.ZeroTrust.Tunnels.Cloudflared.Connections.Delete(ctx, tunnelID, params) (*TunnelCloudflaredConnectionDeleteResponse, error)
DELETE/accounts/{account_id}/cfd_tunnel/{tunnel_id}/connections
ModelsExpand Collapse
type Client struct{…}

A client (typically cloudflared) that maintains connections to a Cloudflare data center.

ID stringoptional

UUID of the Cloudflare Tunnel connection.

formatuuid
maxLength36
Arch stringoptional

The cloudflared OS architecture used to establish this connection.

ConfigVersion int64optional

The version of the remote tunnel configuration. Used internally to sync cloudflared with the Zero Trust dashboard.

Conns []ClientConnoptional

The Cloudflare Tunnel connections between your origin and Cloudflare's edge.

ID stringoptional

UUID of the Cloudflare Tunnel connection.

formatuuid
maxLength36
ClientID stringoptional

UUID of the Cloudflare Tunnel connector.

formatuuid
maxLength36
ClientVersion stringoptional

The cloudflared version used to establish this connection.

ColoName stringoptional

The Cloudflare data center used for this connection.

IsPendingReconnect booloptional

Cloudflare continues to track connections for several minutes after they disconnect. This is an optimization to improve latency and reliability of reconnecting. If true, the connection has disconnected but is still being tracked. If false, the connection is actively serving traffic.

OpenedAt Timeoptional

Timestamp of when the connection was established.

formatdate-time
OriginIP stringoptional

The public IP address of the host running cloudflared.

UUID stringoptional

UUID of the Cloudflare Tunnel connection.

formatuuid
maxLength36
Features []stringoptional

Features enabled for the Cloudflare Tunnel.

RunAt Timeoptional

Timestamp of when the tunnel connection was started.

formatdate-time
Version stringoptional

The cloudflared version used to establish this connection.

TunnelsCloudflaredToken

Get a Cloudflare Tunnel token
client.ZeroTrust.Tunnels.Cloudflared.Token.Get(ctx, tunnelID, query) (*string, error)
GET/accounts/{account_id}/cfd_tunnel/{tunnel_id}/token

TunnelsCloudflaredConnectors

Get Cloudflare Tunnel connector
client.ZeroTrust.Tunnels.Cloudflared.Connectors.Get(ctx, tunnelID, connectorID, query) (*Client, error)
GET/accounts/{account_id}/cfd_tunnel/{tunnel_id}/connectors/{connector_id}

TunnelsCloudflaredManagement

Get a Cloudflare Tunnel management token
client.ZeroTrust.Tunnels.Cloudflared.Management.New(ctx, tunnelID, params) (*string, error)
POST/accounts/{account_id}/cfd_tunnel/{tunnel_id}/management

TunnelsWARP Connector

List Warp Connector Tunnels
client.ZeroTrust.Tunnels.WARPConnector.List(ctx, params) (*V4PagePaginationArray[TunnelWARPConnectorListResponse], error)
GET/accounts/{account_id}/warp_connector
Get a Warp Connector Tunnel
client.ZeroTrust.Tunnels.WARPConnector.Get(ctx, tunnelID, query) (*TunnelWARPConnectorGetResponse, error)
GET/accounts/{account_id}/warp_connector/{tunnel_id}
Create a Warp Connector Tunnel
client.ZeroTrust.Tunnels.WARPConnector.New(ctx, params) (*TunnelWARPConnectorNewResponse, error)
POST/accounts/{account_id}/warp_connector
Update a Warp Connector Tunnel
client.ZeroTrust.Tunnels.WARPConnector.Edit(ctx, tunnelID, params) (*TunnelWARPConnectorEditResponse, error)
PATCH/accounts/{account_id}/warp_connector/{tunnel_id}
Delete a Warp Connector Tunnel
client.ZeroTrust.Tunnels.WARPConnector.Delete(ctx, tunnelID, body) (*TunnelWARPConnectorDeleteResponse, error)
DELETE/accounts/{account_id}/warp_connector/{tunnel_id}

TunnelsWARP ConnectorToken

Get a Warp Connector Tunnel token
client.ZeroTrust.Tunnels.WARPConnector.Token.Get(ctx, tunnelID, query) (*string, error)
GET/accounts/{account_id}/warp_connector/{tunnel_id}/token

TunnelsWARP ConnectorConnections

List WARP Connector Tunnel connections
client.ZeroTrust.Tunnels.WARPConnector.Connections.Get(ctx, tunnelID, query) (*SinglePage[TunnelWARPConnectorConnectionGetResponse], error)
GET/accounts/{account_id}/warp_connector/{tunnel_id}/connections

TunnelsWARP ConnectorConnectors

Get WARP Connector Tunnel connector
client.ZeroTrust.Tunnels.WARPConnector.Connectors.Get(ctx, tunnelID, connectorID, query) (*TunnelWARPConnectorConnectorGetResponse, error)
GET/accounts/{account_id}/warp_connector/{tunnel_id}/connectors/{connector_id}

TunnelsWARP ConnectorFailover

Trigger a manual failover for a WARP Connector Tunnel
client.ZeroTrust.Tunnels.WARPConnector.Failover.Update(ctx, tunnelID, params) (*TunnelWARPConnectorFailoverUpdateResponse, error)
PUT/accounts/{account_id}/warp_connector/{tunnel_id}/failover