Skip to content
Start here

Configs

List Hyperdrives
client.hyperdrive.configs.list(ConfigListParams { account_id, page, per_page } params, RequestOptionsoptions?): V4PagePaginationArray<ConfigListResponse { id, caching, name, 7 more } >
GET/accounts/{account_id}/hyperdrive/configs
Get Hyperdrive
client.hyperdrive.configs.get(stringhyperdriveID, ConfigGetParams { account_id } params, RequestOptionsoptions?): ConfigGetResponse { id, caching, name, 7 more }
GET/accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}
Create Hyperdrive
client.hyperdrive.configs.create(ConfigCreateParamsparams, RequestOptionsoptions?): ConfigCreateResponse { id, caching, name, 7 more }
POST/accounts/{account_id}/hyperdrive/configs
Replace Hyperdrive
client.hyperdrive.configs.update(stringhyperdriveID, ConfigUpdateParams { account_id, name, origin, 3 more } params, RequestOptionsoptions?): ConfigUpdateResponse { id, caching, name, 7 more }
PUT/accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}
Update Hyperdrive
client.hyperdrive.configs.edit(stringhyperdriveID, ConfigEditParams { account_id, caching, mtls, 3 more } params, RequestOptionsoptions?): ConfigEditResponse { id, caching, name, 7 more }
PATCH/accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}
Restart Hyperdrive
client.hyperdrive.configs.restart(stringhyperdriveID, ConfigRestartParams { account_id } params, RequestOptionsoptions?): ConfigRestartResponse { id, caching, name, 7 more }
POST/accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}/restart
Delete Hyperdrive
client.hyperdrive.configs.delete(stringhyperdriveID, ConfigDeleteParams { account_id } params, RequestOptionsoptions?): ConfigDeleteResponse | null
DELETE/accounts/{account_id}/hyperdrive/configs/{hyperdrive_id}
ModelsExpand Collapse
ConfigListResponse { id, caching, name, 7 more }
id: string

Define configurations using a unique string identifier.

maxLength32
caching: Caching { disabled, max_age, stale_while_revalidate }
disabled: boolean

Defines whether caching is disabled.

max_age?: number

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

maximum3600
minimum1
stale_while_revalidate?: number

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: PublicDatabase { database, host, password, 3 more } | AccessProtectedDatabaseBehindCloudflareTunnel { access_client_id, access_client_secret, database, 4 more } | DatabaseReachableThroughAWorkersVPC { database, password, scheme, 2 more }

Combines database connection fields with exactly one supported network location.

One of the following:
PublicDatabase { database, host, password, 3 more }
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: number

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

maximum65535
minimum1
scheme: "postgres" | "postgresql" | "mysql"

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

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

Set the user of your origin database.

maxLength2048
AccessProtectedDatabaseBehindCloudflareTunnel { access_client_id, access_client_secret, database, 4 more }
access_client_id: string

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

access_client_secret: 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: "postgres" | "postgresql" | "mysql"

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

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

Set the user of your origin database.

maxLength2048
DatabaseReachableThroughAWorkersVPC { database, password, scheme, 2 more }
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: "postgres" | "postgresql" | "mysql"

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

One of the following:
"postgres"
"postgresql"
"mysql"
service_id: 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
created_on?: string

Defines the creation time of the Hyperdrive configuration.

formatdate-time
integration?: Integration { database_branch_name, database_name, organization_name, 3 more }

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

database_branch_name: string

The name of the PlanetScale database branch.

maxLength2048
minLength1
database_name: string

The name of the PlanetScale database.

maxLength2048
minLength1
organization_name: string

The name of the PlanetScale organization.

maxLength2048
minLength1
provider: "planetscale"

The database integration provider used by this operation.

scheme: "postgres" | "postgresql" | "mysql"

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

One of the following:
"postgres"
"postgresql"
"mysql"
custom_database_name?: string

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

maxLength2048
modified_on?: string

Defines the last modified time of the Hyperdrive configuration.

formatdate-time
mtls?: MTLS { ca_certificate_id, mtls_certificate_id, sslmode }

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

ca_certificate_id?: string

Define CA certificate ID obtained after uploading CA cert.

mtls_certificate_id?: string

Define mTLS certificate ID obtained after uploading client cert.

sslmode?: string

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.

origin_connection_limit?: number

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
restarted_on?: string | null

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
ConfigGetResponse { id, caching, name, 7 more }
id: string

Define configurations using a unique string identifier.

maxLength32
caching: Caching { disabled, max_age, stale_while_revalidate }
disabled: boolean

Defines whether caching is disabled.

max_age?: number

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

maximum3600
minimum1
stale_while_revalidate?: number

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: PublicDatabase { database, host, password, 3 more } | AccessProtectedDatabaseBehindCloudflareTunnel { access_client_id, access_client_secret, database, 4 more } | DatabaseReachableThroughAWorkersVPC { database, password, scheme, 2 more }

Combines database connection fields with exactly one supported network location.

One of the following:
PublicDatabase { database, host, password, 3 more }
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: number

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

maximum65535
minimum1
scheme: "postgres" | "postgresql" | "mysql"

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

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

Set the user of your origin database.

maxLength2048
AccessProtectedDatabaseBehindCloudflareTunnel { access_client_id, access_client_secret, database, 4 more }
access_client_id: string

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

access_client_secret: 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: "postgres" | "postgresql" | "mysql"

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

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

Set the user of your origin database.

maxLength2048
DatabaseReachableThroughAWorkersVPC { database, password, scheme, 2 more }
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: "postgres" | "postgresql" | "mysql"

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

One of the following:
"postgres"
"postgresql"
"mysql"
service_id: 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
created_on?: string

Defines the creation time of the Hyperdrive configuration.

formatdate-time
integration?: Integration { database_branch_name, database_name, organization_name, 3 more }

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

database_branch_name: string

The name of the PlanetScale database branch.

maxLength2048
minLength1
database_name: string

The name of the PlanetScale database.

maxLength2048
minLength1
organization_name: string

The name of the PlanetScale organization.

maxLength2048
minLength1
provider: "planetscale"

The database integration provider used by this operation.

scheme: "postgres" | "postgresql" | "mysql"

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

One of the following:
"postgres"
"postgresql"
"mysql"
custom_database_name?: string

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

maxLength2048
modified_on?: string

Defines the last modified time of the Hyperdrive configuration.

formatdate-time
mtls?: MTLS { ca_certificate_id, mtls_certificate_id, sslmode }

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

ca_certificate_id?: string

Define CA certificate ID obtained after uploading CA cert.

mtls_certificate_id?: string

Define mTLS certificate ID obtained after uploading client cert.

sslmode?: string

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.

origin_connection_limit?: number

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
restarted_on?: string | null

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
ConfigCreateResponse { id, caching, name, 7 more }
id: string

Define configurations using a unique string identifier.

maxLength32
caching: Caching { disabled, max_age, stale_while_revalidate }
disabled: boolean

Defines whether caching is disabled.

max_age?: number

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

maximum3600
minimum1
stale_while_revalidate?: number

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: PublicDatabase { database, host, password, 3 more } | AccessProtectedDatabaseBehindCloudflareTunnel { access_client_id, access_client_secret, database, 4 more } | DatabaseReachableThroughAWorkersVPC { database, password, scheme, 2 more }

Combines database connection fields with exactly one supported network location.

One of the following:
PublicDatabase { database, host, password, 3 more }
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: number

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

maximum65535
minimum1
scheme: "postgres" | "postgresql" | "mysql"

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

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

Set the user of your origin database.

maxLength2048
AccessProtectedDatabaseBehindCloudflareTunnel { access_client_id, access_client_secret, database, 4 more }
access_client_id: string

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

access_client_secret: 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: "postgres" | "postgresql" | "mysql"

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

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

Set the user of your origin database.

maxLength2048
DatabaseReachableThroughAWorkersVPC { database, password, scheme, 2 more }
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: "postgres" | "postgresql" | "mysql"

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

One of the following:
"postgres"
"postgresql"
"mysql"
service_id: 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
created_on?: string

Defines the creation time of the Hyperdrive configuration.

formatdate-time
integration?: Integration { database_branch_name, database_name, organization_name, 3 more }

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

database_branch_name: string

The name of the PlanetScale database branch.

maxLength2048
minLength1
database_name: string

The name of the PlanetScale database.

maxLength2048
minLength1
organization_name: string

The name of the PlanetScale organization.

maxLength2048
minLength1
provider: "planetscale"

The database integration provider used by this operation.

scheme: "postgres" | "postgresql" | "mysql"

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

One of the following:
"postgres"
"postgresql"
"mysql"
custom_database_name?: string

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

maxLength2048
modified_on?: string

Defines the last modified time of the Hyperdrive configuration.

formatdate-time
mtls?: MTLS { ca_certificate_id, mtls_certificate_id, sslmode }

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

ca_certificate_id?: string

Define CA certificate ID obtained after uploading CA cert.

mtls_certificate_id?: string

Define mTLS certificate ID obtained after uploading client cert.

sslmode?: string

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.

origin_connection_limit?: number

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
restarted_on?: string | null

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
ConfigUpdateResponse { id, caching, name, 7 more }
id: string

Define configurations using a unique string identifier.

maxLength32
caching: Caching { disabled, max_age, stale_while_revalidate }
disabled: boolean

Defines whether caching is disabled.

max_age?: number

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

maximum3600
minimum1
stale_while_revalidate?: number

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: PublicDatabase { database, host, password, 3 more } | AccessProtectedDatabaseBehindCloudflareTunnel { access_client_id, access_client_secret, database, 4 more } | DatabaseReachableThroughAWorkersVPC { database, password, scheme, 2 more }

Combines database connection fields with exactly one supported network location.

One of the following:
PublicDatabase { database, host, password, 3 more }
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: number

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

maximum65535
minimum1
scheme: "postgres" | "postgresql" | "mysql"

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

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

Set the user of your origin database.

maxLength2048
AccessProtectedDatabaseBehindCloudflareTunnel { access_client_id, access_client_secret, database, 4 more }
access_client_id: string

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

access_client_secret: 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: "postgres" | "postgresql" | "mysql"

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

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

Set the user of your origin database.

maxLength2048
DatabaseReachableThroughAWorkersVPC { database, password, scheme, 2 more }
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: "postgres" | "postgresql" | "mysql"

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

One of the following:
"postgres"
"postgresql"
"mysql"
service_id: 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
created_on?: string

Defines the creation time of the Hyperdrive configuration.

formatdate-time
integration?: Integration { database_branch_name, database_name, organization_name, 3 more }

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

database_branch_name: string

The name of the PlanetScale database branch.

maxLength2048
minLength1
database_name: string

The name of the PlanetScale database.

maxLength2048
minLength1
organization_name: string

The name of the PlanetScale organization.

maxLength2048
minLength1
provider: "planetscale"

The database integration provider used by this operation.

scheme: "postgres" | "postgresql" | "mysql"

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

One of the following:
"postgres"
"postgresql"
"mysql"
custom_database_name?: string

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

maxLength2048
modified_on?: string

Defines the last modified time of the Hyperdrive configuration.

formatdate-time
mtls?: MTLS { ca_certificate_id, mtls_certificate_id, sslmode }

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

ca_certificate_id?: string

Define CA certificate ID obtained after uploading CA cert.

mtls_certificate_id?: string

Define mTLS certificate ID obtained after uploading client cert.

sslmode?: string

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.

origin_connection_limit?: number

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
restarted_on?: string | null

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
ConfigEditResponse { id, caching, name, 7 more }
id: string

Define configurations using a unique string identifier.

maxLength32
caching: Caching { disabled, max_age, stale_while_revalidate }
disabled: boolean

Defines whether caching is disabled.

max_age?: number

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

maximum3600
minimum1
stale_while_revalidate?: number

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: PublicDatabase { database, host, password, 3 more } | AccessProtectedDatabaseBehindCloudflareTunnel { access_client_id, access_client_secret, database, 4 more } | DatabaseReachableThroughAWorkersVPC { database, password, scheme, 2 more }

Combines database connection fields with exactly one supported network location.

One of the following:
PublicDatabase { database, host, password, 3 more }
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: number

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

maximum65535
minimum1
scheme: "postgres" | "postgresql" | "mysql"

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

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

Set the user of your origin database.

maxLength2048
AccessProtectedDatabaseBehindCloudflareTunnel { access_client_id, access_client_secret, database, 4 more }
access_client_id: string

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

access_client_secret: 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: "postgres" | "postgresql" | "mysql"

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

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

Set the user of your origin database.

maxLength2048
DatabaseReachableThroughAWorkersVPC { database, password, scheme, 2 more }
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: "postgres" | "postgresql" | "mysql"

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

One of the following:
"postgres"
"postgresql"
"mysql"
service_id: 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
created_on?: string

Defines the creation time of the Hyperdrive configuration.

formatdate-time
integration?: Integration { database_branch_name, database_name, organization_name, 3 more }

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

database_branch_name: string

The name of the PlanetScale database branch.

maxLength2048
minLength1
database_name: string

The name of the PlanetScale database.

maxLength2048
minLength1
organization_name: string

The name of the PlanetScale organization.

maxLength2048
minLength1
provider: "planetscale"

The database integration provider used by this operation.

scheme: "postgres" | "postgresql" | "mysql"

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

One of the following:
"postgres"
"postgresql"
"mysql"
custom_database_name?: string

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

maxLength2048
modified_on?: string

Defines the last modified time of the Hyperdrive configuration.

formatdate-time
mtls?: MTLS { ca_certificate_id, mtls_certificate_id, sslmode }

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

ca_certificate_id?: string

Define CA certificate ID obtained after uploading CA cert.

mtls_certificate_id?: string

Define mTLS certificate ID obtained after uploading client cert.

sslmode?: string

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.

origin_connection_limit?: number

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
restarted_on?: string | null

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
ConfigRestartResponse { id, caching, name, 7 more }
id: string

Define configurations using a unique string identifier.

maxLength32
caching: Caching { disabled, max_age, stale_while_revalidate }
disabled: boolean

Defines whether caching is disabled.

max_age?: number

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

maximum3600
minimum1
stale_while_revalidate?: number

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: PublicDatabase { database, host, password, 3 more } | AccessProtectedDatabaseBehindCloudflareTunnel { access_client_id, access_client_secret, database, 4 more } | DatabaseReachableThroughAWorkersVPC { database, password, scheme, 2 more }

Combines database connection fields with exactly one supported network location.

One of the following:
PublicDatabase { database, host, password, 3 more }
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: number

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

maximum65535
minimum1
scheme: "postgres" | "postgresql" | "mysql"

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

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

Set the user of your origin database.

maxLength2048
AccessProtectedDatabaseBehindCloudflareTunnel { access_client_id, access_client_secret, database, 4 more }
access_client_id: string

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

access_client_secret: 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: "postgres" | "postgresql" | "mysql"

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

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

Set the user of your origin database.

maxLength2048
DatabaseReachableThroughAWorkersVPC { database, password, scheme, 2 more }
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: "postgres" | "postgresql" | "mysql"

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

One of the following:
"postgres"
"postgresql"
"mysql"
service_id: 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
created_on?: string

Defines the creation time of the Hyperdrive configuration.

formatdate-time
integration?: Integration { database_branch_name, database_name, organization_name, 3 more }

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

database_branch_name: string

The name of the PlanetScale database branch.

maxLength2048
minLength1
database_name: string

The name of the PlanetScale database.

maxLength2048
minLength1
organization_name: string

The name of the PlanetScale organization.

maxLength2048
minLength1
provider: "planetscale"

The database integration provider used by this operation.

scheme: "postgres" | "postgresql" | "mysql"

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

One of the following:
"postgres"
"postgresql"
"mysql"
custom_database_name?: string

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

maxLength2048
modified_on?: string

Defines the last modified time of the Hyperdrive configuration.

formatdate-time
mtls?: MTLS { ca_certificate_id, mtls_certificate_id, sslmode }

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

ca_certificate_id?: string

Define CA certificate ID obtained after uploading CA cert.

mtls_certificate_id?: string

Define mTLS certificate ID obtained after uploading client cert.

sslmode?: string

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.

origin_connection_limit?: number

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
restarted_on?: string | null

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
ConfigDeleteResponse = unknown