Skip to content
Start here

Cloudflared

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}

CloudflaredConfigurations

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

CloudflaredConnections

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.

CloudflaredToken

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

CloudflaredConnectors

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}

CloudflaredManagement

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