Get configuration
client.ZeroTrust.Tunnels.Cloudflared.Configurations.Get(ctx, tunnelID, query) (*TunnelCloudflaredConfigurationGetResponse, error)
GET/accounts/{account_id}/cfd_tunnel/{tunnel_id}/configurations
Gets the configuration for a remotely-managed tunnel
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Get configuration
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/cloudflare-go"
"github.com/stainless-sdks/cloudflare-go/option"
"github.com/stainless-sdks/cloudflare-go/zero_trust"
)
func main() {
client := cloudflare.NewClient(
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
)
configuration, err := client.ZeroTrust.Tunnels.Cloudflared.Configurations.Get(
context.TODO(),
"f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
zero_trust.TunnelCloudflaredConfigurationGetParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", configuration.AccountID)
}
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"account_id": "023e105f4ecef8ad9ca31a8372d0c353",
"config": {
"ingress": [
{
"hostname": "tunnel.example.com",
"service": "https://localhost:8001",
"originRequest": {
"access": {
"audTag": [
"string"
],
"teamName": "zero-trust-organization-name",
"required": false
},
"caPool": "caPool",
"connectTimeout": 10,
"disableChunkedEncoding": true,
"http2Origin": true,
"httpHostHeader": "httpHostHeader",
"keepAliveConnections": 100,
"keepAliveTimeout": 90,
"matchSNItoHost": false,
"noHappyEyeballs": false,
"noTLSVerify": false,
"originServerName": "originServerName",
"proxyType": "proxyType",
"tcpKeepAlive": 30,
"tlsTimeout": 10
},
"path": "subpath"
}
],
"originRequest": {
"access": {
"audTag": [
"string"
],
"teamName": "zero-trust-organization-name",
"required": false
},
"caPool": "caPool",
"connectTimeout": 10,
"disableChunkedEncoding": true,
"http2Origin": true,
"httpHostHeader": "httpHostHeader",
"keepAliveConnections": 100,
"keepAliveTimeout": 90,
"matchSNItoHost": false,
"noHappyEyeballs": false,
"noTLSVerify": false,
"originServerName": "originServerName",
"proxyType": "proxyType",
"tcpKeepAlive": 30,
"tlsTimeout": 10
},
"warp-routing": {
"enabled": true
}
},
"created_at": "2014-01-01T05:20:00.12345Z",
"source": "cloudflare",
"tunnel_id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
"version": 0
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"account_id": "023e105f4ecef8ad9ca31a8372d0c353",
"config": {
"ingress": [
{
"hostname": "tunnel.example.com",
"service": "https://localhost:8001",
"originRequest": {
"access": {
"audTag": [
"string"
],
"teamName": "zero-trust-organization-name",
"required": false
},
"caPool": "caPool",
"connectTimeout": 10,
"disableChunkedEncoding": true,
"http2Origin": true,
"httpHostHeader": "httpHostHeader",
"keepAliveConnections": 100,
"keepAliveTimeout": 90,
"matchSNItoHost": false,
"noHappyEyeballs": false,
"noTLSVerify": false,
"originServerName": "originServerName",
"proxyType": "proxyType",
"tcpKeepAlive": 30,
"tlsTimeout": 10
},
"path": "subpath"
}
],
"originRequest": {
"access": {
"audTag": [
"string"
],
"teamName": "zero-trust-organization-name",
"required": false
},
"caPool": "caPool",
"connectTimeout": 10,
"disableChunkedEncoding": true,
"http2Origin": true,
"httpHostHeader": "httpHostHeader",
"keepAliveConnections": 100,
"keepAliveTimeout": 90,
"matchSNItoHost": false,
"noHappyEyeballs": false,
"noTLSVerify": false,
"originServerName": "originServerName",
"proxyType": "proxyType",
"tcpKeepAlive": 30,
"tlsTimeout": 10
},
"warp-routing": {
"enabled": true
}
},
"created_at": "2014-01-01T05:20:00.12345Z",
"source": "cloudflare",
"tunnel_id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
"version": 0
}
}