Skip to content
Start here

List Hyperdrives

client.Hyperdrive.Configs.List(ctx, params) (*V4PagePaginationArray[ConfigListResponse], error)
GET/accounts/{account_id}/hyperdrive/configs

Returns a list of Hyperdrives.

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
Accepted Permissions (at least one required)
Hyperdrive WriteHyperdrive Read
ParametersExpand Collapse
params ConfigListParams
AccountID param.Field[string]

Path param: Define configurations using a unique string identifier.

maxLength32
Page param.Field[int64]Optional

Query param: Page number of paginated results.

minimum1
PerPage param.Field[int64]Optional

Query param: Maximum number of results per page.

maximum100
minimum1
ReturnsExpand Collapse
type ConfigListResponse struct{…}
ID string

Define configurations using a unique string identifier.

maxLength32
Caching ConfigListResponseCaching
Disabled bool

Defines whether caching is disabled.

MaxAge int64Optional

Defines the maximum duration (in seconds) items persist in the cache.

maximum3600
minimum1
StaleWhileRevalidate int64Optional

Defines the number of seconds the cache may serve a stale response.

minimum0
Name string

The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.

maxLength2048
Origin ConfigListResponseOrigin

Combines database connection fields with exactly one supported network location.

One of the following:
type ConfigListResponseOriginPublicDatabase struct{…}
Database string

Set the name of your origin database.

maxLength2048
Host string

Defines the publicly reachable hostname or IP of your origin database. Private, loopback, and link-local IP addresses are not allowed.

Password string

Set the password needed to access your origin database. The API never returns this write-only value.

maxLength2048
Port int64

Defines the port of your origin database. Defaults to 5432 for PostgreSQL or 3306 for MySQL if not specified.

maximum65535
minimum1
Scheme ConfigListResponseOriginPublicDatabaseScheme

Specifies the URL scheme used to connect to your origin database.

One of the following:
const ConfigListResponseOriginPublicDatabaseSchemePostgres ConfigListResponseOriginPublicDatabaseScheme = "postgres"
const ConfigListResponseOriginPublicDatabaseSchemePostgresql ConfigListResponseOriginPublicDatabaseScheme = "postgresql"
const ConfigListResponseOriginPublicDatabaseSchemeMysql ConfigListResponseOriginPublicDatabaseScheme = "mysql"
User string

Set the user of your origin database.

maxLength2048
type ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel struct{…}
AccessClientID string

Defines the Client ID of the Access token to use when connecting to the origin database.

AccessClientSecret string

Defines the Client Secret of the Access Token to use when connecting to the origin database. The API never returns this write-only value.

Database string

Set the name of your origin database.

maxLength2048
Host string

Defines the host (hostname or IP) of your origin database.

Password string

Set the password needed to access your origin database. The API never returns this write-only value.

maxLength2048
Scheme ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme

Specifies the URL scheme used to connect to your origin database.

One of the following:
const ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgres ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgres"
const ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgresql ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgresql"
const ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemeMysql ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "mysql"
User string

Set the user of your origin database.

maxLength2048
type ConfigListResponseOriginDatabaseReachableThroughAWorkersVPC struct{…}
Database string

Set the name of your origin database.

maxLength2048
Password string

Set the password needed to access your origin database. The API never returns this write-only value.

maxLength2048
Scheme ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCScheme

Specifies the URL scheme used to connect to your origin database.

One of the following:
const ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCSchemePostgres ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "postgres"
const ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCSchemePostgresql ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "postgresql"
const ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCSchemeMysql ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "mysql"
ServiceID string

The identifier of the Workers VPC Service to connect through. Hyperdrive will egress through the specified VPC Service to reach the origin database.

User string

Set the user of your origin database.

maxLength2048
CreatedOn TimeOptional

Defines the creation time of the Hyperdrive configuration.

formatdate-time
Integration ConfigListResponseIntegrationOptional

Connects to a PlanetScale database using credentials managed by Cloudflare. The Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard.

DatabaseBranchName string

The name of the PlanetScale database branch.

maxLength2048
minLength1
DatabaseName string

The name of the PlanetScale database.

maxLength2048
minLength1
OrganizationName string

The name of the PlanetScale organization.

maxLength2048
minLength1
Provider ConfigListResponseIntegrationProvider

The database integration provider used by this operation.

Scheme ConfigListResponseIntegrationScheme

Specifies the URL scheme used to connect to your origin database.

One of the following:
const ConfigListResponseIntegrationSchemePostgres ConfigListResponseIntegrationScheme = "postgres"
const ConfigListResponseIntegrationSchemePostgresql ConfigListResponseIntegrationScheme = "postgresql"
const ConfigListResponseIntegrationSchemeMysql ConfigListResponseIntegrationScheme = "mysql"
CustomDatabaseName stringOptional

The database name to use when connecting. Defaults to postgres for PostgreSQL and mysql for MySQL.

maxLength2048
ModifiedOn TimeOptional

Defines the last modified time of the Hyperdrive configuration.

formatdate-time
MTLS ConfigListResponseMTLSOptional

mTLS configuration for the origin connection. Cannot be used with VPC Service origins; TLS must be managed on the VPC Service.

CACertificateID stringOptional

Define CA certificate ID obtained after uploading CA cert.

MTLSCertificateID stringOptional

Define mTLS certificate ID obtained after uploading client cert.

Sslmode stringOptional

PostgreSQL accepts require, verify-ca, and verify-full. MySQL accepts REQUIRED, VERIFY_CA, and VERIFY_IDENTITY. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.

OriginConnectionLimit int64Optional

The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.

Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not specified, defaults to 20 for free tier and 60 for paid tier. Certain Cloudflare-managed origins may be permitted a higher limit. Contact Cloudflare if you need a higher limit.

minimum5
RestartedOn TimeOptional

Defines the last time the Hyperdrive connection pool was explicitly restarted via the restart endpoint. Omitted if the pool has never been explicitly restarted.

formatdate-time

List Hyperdrives

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/hyperdrive"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.Hyperdrive.Configs.List(context.TODO(), hyperdrive.ConfigListParams{
    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"
      }
    }
  ],
  "result": [
    {
      "id": "023e105f4ecef8ad9ca31a8372d0c353",
      "caching": {
        "disabled": true,
        "max_age": 1,
        "stale_while_revalidate": 0
      },
      "name": "example-hyperdrive",
      "origin": {
        "database": "postgres",
        "host": "database.example.com",
        "port": 5432,
        "scheme": "postgres",
        "user": "postgres"
      },
      "created_on": "2017-01-01T00:00:00Z",
      "integration": {
        "database_branch_name": "x",
        "database_name": "x",
        "organization_name": "x",
        "provider": "planetscale",
        "scheme": "postgres",
        "custom_database_name": "custom_database_name"
      },
      "modified_on": "2017-01-01T00:00:00Z",
      "mtls": {
        "ca_certificate_id": "00000000-0000-0000-0000-0000000000",
        "mtls_certificate_id": "00000000-0000-0000-0000-0000000000",
        "sslmode": "verify-full"
      },
      "origin_connection_limit": 60,
      "restarted_on": "2017-01-01T00:00:00Z"
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}
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"
      }
    }
  ],
  "result": [
    {
      "id": "023e105f4ecef8ad9ca31a8372d0c353",
      "caching": {
        "disabled": true,
        "max_age": 1,
        "stale_while_revalidate": 0
      },
      "name": "example-hyperdrive",
      "origin": {
        "database": "postgres",
        "host": "database.example.com",
        "port": 5432,
        "scheme": "postgres",
        "user": "postgres"
      },
      "created_on": "2017-01-01T00:00:00Z",
      "integration": {
        "database_branch_name": "x",
        "database_name": "x",
        "organization_name": "x",
        "provider": "planetscale",
        "scheme": "postgres",
        "custom_database_name": "custom_database_name"
      },
      "modified_on": "2017-01-01T00:00:00Z",
      "mtls": {
        "ca_certificate_id": "00000000-0000-0000-0000-0000000000",
        "mtls_certificate_id": "00000000-0000-0000-0000-0000000000",
        "sslmode": "verify-full"
      },
      "origin_connection_limit": 60,
      "restarted_on": "2017-01-01T00:00:00Z"
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}