configs
Creates, updates, deletes, gets or lists a configs resource.
Overview
| Name | configs |
| Type | Resource |
| Id | cloudflare.hyperdrive.configs |
Fields
The following fields are returned by SELECT queries:
- get
- list
Get Hyperdrive Response.
| Name | Datatype | Description |
|---|---|---|
errors | array | |
messages | array | |
result | object | |
success | boolean | Return the status of the API call success. (true) |
List Hyperdrives Response.
| Name | Datatype | Description |
|---|---|---|
id | string | Define configurations using a unique string identifier. (example: 023e105f4ecef8ad9ca31a8372d0c353) |
name | string | The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. (example: example-hyperdrive) |
caching | object | |
created_on | string (date-time) | Defines the creation time of the Hyperdrive configuration. (example: 2017-01-01T00:00:00Z) |
modified_on | string (date-time) | Defines the last modified time of the Hyperdrive configuration. (example: 2017-01-01T00:00:00Z) |
mtls | object | mTLS configuration for the origin connection. Cannot be used with VPC Service origins; TLS must be managed on the VPC Service. (title: mTLS) |
origin | object | (title: Public Database) |
origin_connection_limit | integer | 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. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, hyperdrive_id | Returns the specified Hyperdrive configuration. | |
list | select | account_id | Returns a list of Hyperdrives. | |
create | insert | account_id, name, origin | Creates and returns a new Hyperdrive configuration. | |
edit | update | account_id, hyperdrive_id | Patches and returns the specified Hyperdrive configuration. Custom caching settings are not kept if caching is disabled. | |
update | replace | account_id, hyperdrive_id, name, origin | Updates and returns the specified Hyperdrive configuration. | |
delete | delete | account_id, hyperdrive_id | Deletes the specified Hyperdrive. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
hyperdrive_id | string | The unique identifier of the Hyperdrive configuration. |
SELECT examples
- get
- list
Returns the specified Hyperdrive configuration.
SELECT
errors,
messages,
result,
success
FROM cloudflare.hyperdrive.configs
WHERE account_id = '{{ account_id }}' -- required
AND hyperdrive_id = '{{ hyperdrive_id }}' -- required
;
Returns a list of Hyperdrives.
SELECT
id,
name,
caching,
created_on,
modified_on,
mtls,
origin,
origin_connection_limit
FROM cloudflare.hyperdrive.configs
WHERE account_id = '{{ account_id }}' -- required
;
INSERT examples
- create
- Manifest
Creates and returns a new Hyperdrive configuration.
INSERT INTO cloudflare.hyperdrive.configs (
caching,
mtls,
name,
origin,
origin_connection_limit,
account_id
)
SELECT
'{{ caching }}',
'{{ mtls }}',
'{{ name }}' /* required */,
'{{ origin }}' /* required */,
{{ origin_connection_limit }},
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: configs
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the configs resource.
- name: caching
value:
disabled: {{ disabled }}
max_age: {{ max_age }}
stale_while_revalidate: {{ stale_while_revalidate }}
- name: mtls
description: |
mTLS configuration for the origin connection. Cannot be used with VPC Service origins; TLS must be managed on the VPC Service.
value:
ca_certificate_id: "{{ ca_certificate_id }}"
mtls_certificate_id: "{{ mtls_certificate_id }}"
sslmode: "{{ sslmode }}"
- name: name
value: "{{ name }}"
description: |
The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.
- name: origin
value:
database: "{{ database }}"
password: "{{ password }}"
scheme: "{{ scheme }}"
user: "{{ user }}"
host: "{{ host }}"
port: {{ port }}
access_client_id: "{{ access_client_id }}"
access_client_secret: "{{ access_client_secret }}"
service_id: "{{ service_id }}"
- name: origin_connection_limit
value: {{ origin_connection_limit }}
description: |
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.
UPDATE examples
- edit
Patches and returns the specified Hyperdrive configuration. Custom caching settings are not kept if caching is disabled.
UPDATE cloudflare.hyperdrive.configs
SET
caching = '{{ caching }}',
mtls = '{{ mtls }}',
name = '{{ name }}',
origin = '{{ origin }}',
origin_connection_limit = {{ origin_connection_limit }}
WHERE
account_id = '{{ account_id }}' --required
AND hyperdrive_id = '{{ hyperdrive_id }}' --required
RETURNING
errors,
messages,
result,
success;
REPLACE examples
- update
Updates and returns the specified Hyperdrive configuration.
REPLACE cloudflare.hyperdrive.configs
SET
caching = '{{ caching }}',
mtls = '{{ mtls }}',
name = '{{ name }}',
origin = '{{ origin }}',
origin_connection_limit = {{ origin_connection_limit }}
WHERE
account_id = '{{ account_id }}' --required
AND hyperdrive_id = '{{ hyperdrive_id }}' --required
AND name = '{{ name }}' --required
AND origin = '{{ origin }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- delete
Deletes the specified Hyperdrive.
DELETE FROM cloudflare.hyperdrive.configs
WHERE account_id = '{{ account_id }}' --required
AND hyperdrive_id = '{{ hyperdrive_id }}' --required
;