Skip to content
Start here

Hyperdrive

ModelsExpand Collapse
One of the following:
class HyperdriveInternetOrigin:
host: str

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

port: int

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

database: Optional[str]

Set the name of your origin database.

password: Optional[str]

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

scheme: Optional[Literal["postgres", "postgresql", "mysql"]]

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

One of the following:
"postgres"
"postgresql"
"mysql"
user: Optional[str]

Set the user of your origin database.

class HyperdriveOverAccessOrigin:
access_client_id: str

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

access_client_secret: str

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

host: str

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

database: Optional[str]

Set the name of your origin database.

password: Optional[str]

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

scheme: Optional[Literal["postgres", "postgresql", "mysql"]]

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

One of the following:
"postgres"
"postgresql"
"mysql"
user: Optional[str]

Set the user of your origin database.

class Hyperdrive:
id: str

Define configurations using a unique string identifier.

maxLength32
name: str

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

origin: Origin
One of the following:
class OriginPublicDatabase:
database: str

Set the name of your origin database.

host: str

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

password: str

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

port: int

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

scheme: Literal["postgres", "postgresql", "mysql"]

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

One of the following:
"postgres"
"postgresql"
"mysql"
user: str

Set the user of your origin database.

class OriginAccessProtectedDatabaseBehindCloudflareTunnel:
access_client_id: str

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

access_client_secret: str

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: str

Set the name of your origin database.

host: str

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

password: str

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

scheme: Literal["postgres", "postgresql", "mysql"]

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

One of the following:
"postgres"
"postgresql"
"mysql"
user: str

Set the user of your origin database.

caching: Optional[Caching]
One of the following:
class CachingHyperdriveHyperdriveCachingCommon:
disabled: Optional[bool]

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

class CachingHyperdriveHyperdriveCachingEnabled:
disabled: Optional[bool]

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

max_age: Optional[int]

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

stale_while_revalidate: Optional[int]

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

created_on: Optional[datetime]

Defines the creation time of the Hyperdrive configuration.

formatdate-time
modified_on: Optional[datetime]

Defines the last modified time of the Hyperdrive configuration.

formatdate-time
mtls: Optional[MTLS]
ca_certificate_id: Optional[str]

Define CA certificate ID obtained after uploading CA cert.

mtls_certificate_id: Optional[str]

Define mTLS certificate ID obtained after uploading client cert.

sslmode: Optional[str]

Set SSL mode to 'require', 'verify-ca', or 'verify-full' to verify the CA.

origin_connection_limit: Optional[int]

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. Contact Cloudflare if you need a higher limit.

maximum100
minimum5

HyperdriveConfigs

List Hyperdrives
hyperdrive.configs.list(ConfigListParams**kwargs) -> SyncSinglePage[Hyperdrive]
GET/accounts/{account_id}/hyperdrive/configs
Get Hyperdrive
hyperdrive.configs.get(strhyperdrive_id, ConfigGetParams**kwargs) -> Hyperdrive
GET/accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}
Create Hyperdrive
hyperdrive.configs.create(ConfigCreateParams**kwargs) -> Hyperdrive
POST/accounts/{account_id}/hyperdrive/configs
Update Hyperdrive
hyperdrive.configs.update(strhyperdrive_id, ConfigUpdateParams**kwargs) -> Hyperdrive
PUT/accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}
Patch Hyperdrive
hyperdrive.configs.edit(strhyperdrive_id, ConfigEditParams**kwargs) -> Hyperdrive
PATCH/accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}
Delete Hyperdrive
hyperdrive.configs.delete(strhyperdrive_id, ConfigDeleteParams**kwargs) -> object
DELETE/accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}