Skip to content
Start here

List Workers VPC connectivity services

client.Connectivity.Directory.Services.List(ctx, params) (*V4PagePaginationArray[DirectoryServiceListResponse], error)
GET/accounts/{account_id}/connectivity/directory/services

List Workers VPC connectivity services

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
ParametersExpand Collapse
params DirectoryServiceListParams
AccountID param.Field[string]

Path param: Account identifier

maxLength32
Page param.Field[int64]Optional

Query param: Current page in the response

formatint32
minimum1
PerPage param.Field[int64]Optional

Query param: Max amount of entries returned per page

formatint32
maximum1000
minimum1
Type param.Field[DirectoryServiceListParamsType]Optional

Query param

const DirectoryServiceListParamsTypeTCP DirectoryServiceListParamsType = "tcp"
const DirectoryServiceListParamsTypeHTTP DirectoryServiceListParamsType = "http"
ReturnsExpand Collapse
type DirectoryServiceListResponse interface{…}
One of the following:
type DirectoryServiceListResponseInfraHTTPServiceConfig struct{…}
Host DirectoryServiceListResponseInfraHTTPServiceConfigHost
One of the following:
type DirectoryServiceListResponseInfraHTTPServiceConfigHostInfraIPv4Host struct{…}
IPV4 string
Network DirectoryServiceListResponseInfraHTTPServiceConfigHostInfraIPv4HostNetwork
TunnelID string
formatuuid
type DirectoryServiceListResponseInfraHTTPServiceConfigHostInfraIPv6Host struct{…}
IPV6 string
Network DirectoryServiceListResponseInfraHTTPServiceConfigHostInfraIPv6HostNetwork
TunnelID string
formatuuid
type DirectoryServiceListResponseInfraHTTPServiceConfigHostInfraDualStackHost struct{…}
IPV4 string
IPV6 string
Network DirectoryServiceListResponseInfraHTTPServiceConfigHostInfraDualStackHostNetwork
TunnelID string
formatuuid
type DirectoryServiceListResponseInfraHTTPServiceConfigHostInfraHostnameHost struct{…}
Hostname string
ResolverNetwork DirectoryServiceListResponseInfraHTTPServiceConfigHostInfraHostnameHostResolverNetwork
TunnelID string
formatuuid
ResolverIPs []stringOptional
Name string
Type DirectoryServiceListResponseInfraHTTPServiceConfigType
One of the following:
const DirectoryServiceListResponseInfraHTTPServiceConfigTypeTCP DirectoryServiceListResponseInfraHTTPServiceConfigType = "tcp"
const DirectoryServiceListResponseInfraHTTPServiceConfigTypeHTTP DirectoryServiceListResponseInfraHTTPServiceConfigType = "http"
CreatedAt TimeOptional
formatdate-time
HTTPPort int64Optional
formatint32
minimum1
HTTPSPort int64Optional
formatint32
minimum1
ServiceID stringOptional
formatuuid
TLSSettings DirectoryServiceListResponseInfraHTTPServiceConfigTLSSettingsOptional

TLS settings for a connectivity service.

If omitted, the default mode (verify_full) is used.

CERTVerificationMode string

TLS certificate verification mode for the connection to the origin.

  • "verify_full" — verify certificate chain and hostname (default)
  • "verify_ca" — verify certificate chain only, skip hostname check
  • "disabled" — do not verify the server certificate at all
UpdatedAt TimeOptional
formatdate-time
type DirectoryServiceListResponseInfraTCPServiceConfig struct{…}
Host DirectoryServiceListResponseInfraTCPServiceConfigHost
One of the following:
type DirectoryServiceListResponseInfraTCPServiceConfigHostInfraIPv4Host struct{…}
IPV4 string
Network DirectoryServiceListResponseInfraTCPServiceConfigHostInfraIPv4HostNetwork
TunnelID string
formatuuid
type DirectoryServiceListResponseInfraTCPServiceConfigHostInfraIPv6Host struct{…}
IPV6 string
Network DirectoryServiceListResponseInfraTCPServiceConfigHostInfraIPv6HostNetwork
TunnelID string
formatuuid
type DirectoryServiceListResponseInfraTCPServiceConfigHostInfraDualStackHost struct{…}
IPV4 string
IPV6 string
Network DirectoryServiceListResponseInfraTCPServiceConfigHostInfraDualStackHostNetwork
TunnelID string
formatuuid
type DirectoryServiceListResponseInfraTCPServiceConfigHostInfraHostnameHost struct{…}
Hostname string
ResolverNetwork DirectoryServiceListResponseInfraTCPServiceConfigHostInfraHostnameHostResolverNetwork
TunnelID string
formatuuid
ResolverIPs []stringOptional
Name string
Type DirectoryServiceListResponseInfraTCPServiceConfigType
One of the following:
const DirectoryServiceListResponseInfraTCPServiceConfigTypeTCP DirectoryServiceListResponseInfraTCPServiceConfigType = "tcp"
const DirectoryServiceListResponseInfraTCPServiceConfigTypeHTTP DirectoryServiceListResponseInfraTCPServiceConfigType = "http"
AppProtocol DirectoryServiceListResponseInfraTCPServiceConfigAppProtocolOptional
One of the following:
const DirectoryServiceListResponseInfraTCPServiceConfigAppProtocolPostgresql DirectoryServiceListResponseInfraTCPServiceConfigAppProtocol = "postgresql"
const DirectoryServiceListResponseInfraTCPServiceConfigAppProtocolMysql DirectoryServiceListResponseInfraTCPServiceConfigAppProtocol = "mysql"
CreatedAt TimeOptional
formatdate-time
ServiceID stringOptional
formatuuid
TCPPort int64Optional
formatint32
minimum1
TLSSettings DirectoryServiceListResponseInfraTCPServiceConfigTLSSettingsOptional

TLS settings for a connectivity service.

If omitted, the default mode (verify_full) is used.

CERTVerificationMode string

TLS certificate verification mode for the connection to the origin.

  • "verify_full" — verify certificate chain and hostname (default)
  • "verify_ca" — verify certificate chain only, skip hostname check
  • "disabled" — do not verify the server certificate at all
UpdatedAt TimeOptional
formatdate-time

List Workers VPC connectivity services

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/cloudflare-go"
  "github.com/stainless-sdks/cloudflare-go/connectivity"
  "github.com/stainless-sdks/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.Connectivity.Directory.Services.List(context.TODO(), connectivity.DirectoryServiceListParams{
    AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "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": [
    {
      "host": {
        "ipv4": "10.0.0.1",
        "network": {
          "tunnel_id": "0191dce4-9ab4-7fce-b660-8e5dec5172da"
        }
      },
      "name": "web-app",
      "type": "http",
      "created_at": "2024-01-15T09:30:00Z",
      "http_port": 8080,
      "https_port": 8443,
      "service_id": "550e8400-e29b-41d4-a716-446655440000",
      "tls_settings": {
        "cert_verification_mode": "verify_full"
      },
      "updated_at": "2024-01-15T10:45:00Z"
    }
  ],
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000,
    "total_pages": 100
  }
}
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": [
    {
      "host": {
        "ipv4": "10.0.0.1",
        "network": {
          "tunnel_id": "0191dce4-9ab4-7fce-b660-8e5dec5172da"
        }
      },
      "name": "web-app",
      "type": "http",
      "created_at": "2024-01-15T09:30:00Z",
      "http_port": 8080,
      "https_port": 8443,
      "service_id": "550e8400-e29b-41d4-a716-446655440000",
      "tls_settings": {
        "cert_verification_mode": "verify_full"
      },
      "updated_at": "2024-01-15T10:45:00Z"
    }
  ],
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000,
    "total_pages": 100
  }
}