tls
Creates, updates, deletes, gets or lists a tls resource.
Overview
| Name | tls |
| Type | Resource |
| Id | cloudflare.hostnames.tls |
Fields
The following fields are returned by SELECT queries:
- get
List per-hostname TLS settings response
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | This is the time the tls setting was originally created for this hostname. (example: 2023-07-10T20:01:50.219171Z) |
hostname | string | The hostname for which the tls settings are set. (example: app.example.com) |
status | string | Deployment status for the given tls setting. (example: pending_deployment) |
updated_at | string (date-time) | This is the time the tls setting was updated. (example: 2023-07-10T20:01:50.219171Z) |
value | array | The TLS setting value. The type depends on the setting_id used in the request path: - ciphers: an array of allowed cipher suite strings in BoringSSL format (e.g., ["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]) - min_tls_version: a string indicating the minimum TLS version — one of "1.0", "1.1", "1.2", or "1.3" (e.g., "1.2") - http2: a string indicating whether HTTP/2 is enabled — "on" or "off" (e.g., "on") (1.0, 1.1, 1.2, 1.3) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | zone_id, setting_id | List the requested TLS setting for the hostnames under this zone. | |
update | replace | zone_id, setting_id, hostname, value | Update the tls setting value for the hostname. | |
delete | delete | zone_id, setting_id, hostname | Delete the tls setting value for the hostname. |
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 |
|---|---|---|
hostname | string | |
setting_id | string | |
zone_id | string | The Cloudflare zone ID. |
SELECT examples
- get
List the requested TLS setting for the hostnames under this zone.
SELECT
created_at,
hostname,
status,
updated_at,
value
FROM cloudflare.hostnames.tls
WHERE zone_id = '{{ zone_id }}' -- required
AND setting_id = '{{ setting_id }}' -- required
;
REPLACE examples
- update
Update the tls setting value for the hostname.
REPLACE cloudflare.hostnames.tls
SET
value = '{{ value }}'
WHERE
zone_id = '{{ zone_id }}' --required
AND setting_id = '{{ setting_id }}' --required
AND hostname = '{{ hostname }}' --required
AND value = '{{ value }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- delete
Delete the tls setting value for the hostname.
DELETE FROM cloudflare.hostnames.tls
WHERE zone_id = '{{ zone_id }}' --required
AND setting_id = '{{ setting_id }}' --required
AND hostname = '{{ hostname }}' --required
;