---
title: Hyperdrive
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Hyperdrive

##### ModelsExpand Collapse

<details>

<summary>

type Hyperdrive struct{…}

</summary>

ID string

Define configurations using a unique string identifier.

maxLength32

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

Name string

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

maxLength2048

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

Origin HyperdriveOrigin

Combines database connection fields with exactly one supported network location.

</summary>

One of the following:

<details>

<summary>

HyperdriveOriginPublicDatabase

</summary>

Database string

Set the name of your origin database.

maxLength2048

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%200%20%3E%20(property)%20database">Link to this property</a>

Host string

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

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%200%20%3E%20(property)%20host">Link to this property</a>

Password string

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

maxLength2048

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%200%20%3E%20(property)%20password">Link to this property</a>

Port int64

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

maximum65535

minimum1

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%200%20%3E%20(property)%20port">Link to this property</a>

<details>

<summary>

Scheme HyperdriveOriginPublicDatabaseScheme

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

</summary>

One of the following:

const HyperdriveOriginPublicDatabaseSchemePostgres HyperdriveOriginPublicDatabaseScheme = "postgres"

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%200%20%3E%20(property)%20scheme%20%3E%20(member)%200">Link to this property</a>

const HyperdriveOriginPublicDatabaseSchemePostgresql HyperdriveOriginPublicDatabaseScheme = "postgresql"

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%200%20%3E%20(property)%20scheme%20%3E%20(member)%201">Link to this property</a>

const HyperdriveOriginPublicDatabaseSchemeMysql HyperdriveOriginPublicDatabaseScheme = "mysql"

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%200%20%3E%20(property)%20scheme%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%200%20%3E%20(property)%20scheme">Link to this property</a>

User string

Set the user of your origin database.

maxLength2048

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%200%20%3E%20(property)%20user">Link to this property</a>

</details>

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnel

</summary>

AccessClientID string

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

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%201%20%3E%20(property)%20access_client_id">Link to this property</a>

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.

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%201%20%3E%20(property)%20access_client_secret">Link to this property</a>

Database string

Set the name of your origin database.

maxLength2048

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%201%20%3E%20(property)%20database">Link to this property</a>

Host string

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

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%201%20%3E%20(property)%20host">Link to this property</a>

Password string

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

maxLength2048

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%201%20%3E%20(property)%20password">Link to this property</a>

<details>

<summary>

Scheme HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme

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

</summary>

One of the following:

const HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgres HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgres"

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%201%20%3E%20(property)%20scheme%20%3E%20(member)%200">Link to this property</a>

const HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgresql HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgresql"

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%201%20%3E%20(property)%20scheme%20%3E%20(member)%201">Link to this property</a>

const HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemeMysql HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "mysql"

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%201%20%3E%20(property)%20scheme%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%201%20%3E%20(property)%20scheme">Link to this property</a>

User string

Set the user of your origin database.

maxLength2048

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%201%20%3E%20(property)%20user">Link to this property</a>

</details>

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%201">Link to this property</a>

<details>

<summary>

HyperdriveOriginDatabaseReachableThroughAWorkersVPC

</summary>

Database string

Set the name of your origin database.

maxLength2048

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%202%20%3E%20(property)%20database">Link to this property</a>

Password string

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

maxLength2048

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%202%20%3E%20(property)%20password">Link to this property</a>

<details>

<summary>

Scheme HyperdriveOriginDatabaseReachableThroughAWorkersVPCScheme

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

</summary>

One of the following:

const HyperdriveOriginDatabaseReachableThroughAWorkersVPCSchemePostgres HyperdriveOriginDatabaseReachableThroughAWorkersVPCScheme = "postgres"

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%202%20%3E%20(property)%20scheme%20%3E%20(member)%200">Link to this property</a>

const HyperdriveOriginDatabaseReachableThroughAWorkersVPCSchemePostgresql HyperdriveOriginDatabaseReachableThroughAWorkersVPCScheme = "postgresql"

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%202%20%3E%20(property)%20scheme%20%3E%20(member)%201">Link to this property</a>

const HyperdriveOriginDatabaseReachableThroughAWorkersVPCSchemeMysql HyperdriveOriginDatabaseReachableThroughAWorkersVPCScheme = "mysql"

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%202%20%3E%20(property)%20scheme%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%202%20%3E%20(property)%20scheme">Link to this property</a>

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.

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%202%20%3E%20(property)%20service_id">Link to this property</a>

User string

Set the user of your origin database.

maxLength2048

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%202%20%3E%20(property)%20user">Link to this property</a>

</details>

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(variant)%202">Link to this property</a>

</details>

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin">Link to this property</a>

<details>

<summary>

Caching HyperdriveCachingOptional

</summary>

One of the following:

<details>

<summary>

HyperdriveCachingHyperdriveHyperdriveCachingCommon

</summary>

Disabled boolOptional

Set to true to disable caching of SQL responses. Default is false.

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20caching%20%3E%20(variant)%200%20%3E%20(property)%20disabled">Link to this property</a>

</details>

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20caching%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

HyperdriveCachingHyperdriveHyperdriveCachingEnabled

</summary>

Disabled boolOptional

Set to true to disable caching of SQL responses. Default is false.

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20caching%20%3E%20(variant)%201%20%3E%20(property)%20disabled">Link to this property</a>

MaxAge int64Optional

Specify the maximum duration (in seconds) items should persist in the cache. Defaults to 60 seconds if not specified.

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20caching%20%3E%20(variant)%201%20%3E%20(property)%20max_age">Link to this property</a>

StaleWhileRevalidate int64Optional

Specify the number of seconds the cache may serve a stale response. Defaults to 15 seconds if not specified.

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20caching%20%3E%20(variant)%201%20%3E%20(property)%20stale_while_revalidate">Link to this property</a>

</details>

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20caching%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20caching">Link to this property</a>

CreatedOn TimeOptional

Defines the creation time of the Hyperdrive configuration.

formatdate-time

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

ModifiedOn TimeOptional

Defines the last modified time of the Hyperdrive configuration.

formatdate-time

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

<details>

<summary>

MTLS HyperdriveMTLSOptional

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

</summary>

CACertificateID stringOptional

Define CA certificate ID obtained after uploading CA cert.

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20mtls%20%3E%20(property)%20ca_certificate_id">Link to this property</a>

MTLSCertificateID stringOptional

Define mTLS certificate ID obtained after uploading client cert.

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20mtls%20%3E%20(property)%20mtls_certificate_id">Link to this property</a>

Sslmode stringOptional

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

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20mtls%20%3E%20(property)%20sslmode">Link to this property</a>

</details>

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20mtls">Link to this property</a>

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

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20origin_connection_limit">Link to this property</a>

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

<a href="#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)%20%3E%20(property)%20restarted_on">Link to this property</a>

</details>

[Link to this property](<#(resource)%20hyperdrive%20%3E%20(model)%20hyperdrive%20%3E%20(schema)>)

#### HyperdriveConfigs

##### [List Hyperdrives](https://developers.cloudflare.com/api/go/resources/hyperdrive/subresources/configs/methods/list)

client.Hyperdrive.Configs.List(ctx, params) (\*V4PagePaginationArray\[[ConfigListResponse](<https://developers.cloudflare.com/api/go/resources/hyperdrive#(resource)%20hyperdrive.configs%20%3E%20(model)%20ConfigListResponse%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/hyperdrive/configs

##### [Get Hyperdrive](https://developers.cloudflare.com/api/go/resources/hyperdrive/subresources/configs/methods/get)

client.Hyperdrive.Configs.Get(ctx, hyperdriveID, query) (\*[ConfigGetResponse](<https://developers.cloudflare.com/api/go/resources/hyperdrive#(resource)%20hyperdrive.configs%20%3E%20(model)%20ConfigGetResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/hyperdrive/configs/{hyperdrive\_id}

##### [Create Hyperdrive](https://developers.cloudflare.com/api/go/resources/hyperdrive/subresources/configs/methods/create)

client.Hyperdrive.Configs.New(ctx, params) (\*[ConfigNewResponse](<https://developers.cloudflare.com/api/go/resources/hyperdrive#(resource)%20hyperdrive.configs%20%3E%20(model)%20ConfigNewResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/hyperdrive/configs

##### [Replace Hyperdrive](https://developers.cloudflare.com/api/go/resources/hyperdrive/subresources/configs/methods/update)

client.Hyperdrive.Configs.Update(ctx, hyperdriveID, params) (\*[ConfigUpdateResponse](<https://developers.cloudflare.com/api/go/resources/hyperdrive#(resource)%20hyperdrive.configs%20%3E%20(model)%20ConfigUpdateResponse%20%3E%20(schema)>), error)

PUT/accounts/{account\_id}/hyperdrive/configs/{hyperdrive\_id}

##### [Update Hyperdrive](https://developers.cloudflare.com/api/go/resources/hyperdrive/subresources/configs/methods/edit)

client.Hyperdrive.Configs.Edit(ctx, hyperdriveID, params) (\*[ConfigEditResponse](<https://developers.cloudflare.com/api/go/resources/hyperdrive#(resource)%20hyperdrive.configs%20%3E%20(model)%20ConfigEditResponse%20%3E%20(schema)>), error)

PATCH/accounts/{account\_id}/hyperdrive/configs/{hyperdrive\_id}

##### [Restart Hyperdrive](https://developers.cloudflare.com/api/go/resources/hyperdrive/subresources/configs/methods/restart)

client.Hyperdrive.Configs.Restart(ctx, hyperdriveID, body) (\*[ConfigRestartResponse](<https://developers.cloudflare.com/api/go/resources/hyperdrive#(resource)%20hyperdrive.configs%20%3E%20(model)%20ConfigRestartResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/hyperdrive/configs/{hyperdrive\_id}/restart

##### [Delete Hyperdrive](https://developers.cloudflare.com/api/go/resources/hyperdrive/subresources/configs/methods/delete)

client.Hyperdrive.Configs.Delete(ctx, hyperdriveID, body) (\*[ConfigDeleteResponse](<https://developers.cloudflare.com/api/go/resources/hyperdrive#(resource)%20hyperdrive.configs%20%3E%20(model)%20ConfigDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/hyperdrive/configs/{hyperdrive\_id}