hostnames
Creates, updates, deletes, gets or lists a hostnames resource.
Overview
| Name | hostnames |
| Type | Resource |
| Id | cloudflare.origin_tls_client_auth.hostnames |
Fields
The following fields are returned by SELECT queries:
- get
- list
Get the Hostname Status for Client Authentication response
| Name | Datatype | Description |
|---|---|---|
cert_id | string | Identifier. (example: 023e105f4ecef8ad9ca31a8372d0c353) |
cert_status | string | Status of the certificate or the association. (initializing, pending_deployment, pending_deletion, active, deleted, deployment_timed_out, deletion_timed_out) (example: active) |
cert_updated_at | string (date-time) | The time when the certificate was updated. (example: 2100-01-01T05:20:00Z) |
cert_uploaded_on | string (date-time) | The time when the certificate was uploaded. (example: 2019-10-28T18:11:23.37411Z) |
certificate | string | The hostname certificate. (example: -----BEGIN CERTIFICATE----- MIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX aWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB CgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1 CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB KwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5 0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI dZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2 izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4 9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI GKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF MAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2 2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP Mlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG SvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq 2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw YbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY= -----END CERTIFICATE----- ) |
created_at | string (date-time) | The time when the certificate was created. (example: 2100-01-01T05:20:00Z) |
enabled | boolean | Indicates whether hostname-level authenticated origin pulls is enabled. A null value voids the association. |
expires_on | string (date-time) | The date when the certificate expires. (example: 2100-01-01T05:20:00Z) |
hostname | string | The hostname on the origin for which the client certificate uploaded will be used. (example: app.example.com) |
issuer | string | The certificate authority that issued the certificate. (example: GlobalSign) |
serial_number | string | The serial number on the uploaded certificate. (example: 6743787633689793699141714808227354901) |
signature | string | The type of hash used for the certificate. (example: SHA256WithRSA) |
status | string | Status of the certificate or the association. (initializing, pending_deployment, pending_deletion, active, deleted, deployment_timed_out, deletion_timed_out) (example: active) |
updated_at | string (date-time) | The time when the certificate was updated. (example: 2100-01-01T05:20:00Z) |
List Hostname Associations response
| Name | Datatype | Description |
|---|---|---|
cert_id | string | Certificate identifier tag. (example: 2458ce5a-0c35-4c7f-82c7-8e9487d3ff60) |
created_at | string (date-time) | The time when the certificate was created. (example: 2100-01-01T05:20:00Z) |
enabled | boolean | Indicates whether hostname-level authenticated origin pulls is enabled. A null value voids the association. |
hostname | string | The hostname on the origin for which the client certificate uploaded will be used. (example: app.example.com) |
status | string | Status of the certificate or the association. (initializing, pending_deployment, pending_deletion, active, deleted, deployment_timed_out, deletion_timed_out) (example: active) |
updated_at | string (date-time) | The time when the certificate was updated. (example: 2100-01-01T05:20:00Z) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | hostname, zone_id | Retrieves the client certificate authentication status for a specific hostname, showing whether authenticated origin pulls are enabled. | |
list | select | zone_id | page, per_page, status | List certificate ID - hostname associations for the given zone. Shows which hostnames are associated to which certificates for authenticated origin pulls. |
per_hostname_authenticated_origin_pull_enable_or_disable_a_hostname_for_client_authentication | replace | zone_id, config | Associate a hostname to a certificate and enable, disable or invalidate the association. If disabled, client certificate will not be sent to the hostname even if activated at the zone level. 100 maximum associations on a single certificate are allowed. Note: Use a null value for parameter enabled to invalidate the association. |
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 | |
zone_id | string | The Cloudflare zone ID. |
page | number | |
per_page | number | |
status | string |
SELECT examples
- get
- list
Retrieves the client certificate authentication status for a specific hostname, showing whether authenticated origin pulls are enabled.
SELECT
cert_id,
cert_status,
cert_updated_at,
cert_uploaded_on,
certificate,
created_at,
enabled,
expires_on,
hostname,
issuer,
serial_number,
signature,
status,
updated_at
FROM cloudflare.origin_tls_client_auth.hostnames
WHERE hostname = '{{ hostname }}' -- required
AND zone_id = '{{ zone_id }}' -- required
;
List certificate ID - hostname associations for the given zone. Shows which hostnames are associated to which certificates for authenticated origin pulls.
SELECT
cert_id,
created_at,
enabled,
hostname,
status,
updated_at
FROM cloudflare.origin_tls_client_auth.hostnames
WHERE zone_id = '{{ zone_id }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
AND status = '{{ status }}'
;
REPLACE examples
- per_hostname_authenticated_origin_pull_enable_or_disable_a_hostname_for_client_authentication
Associate a hostname to a certificate and enable, disable or invalidate the association. If disabled, client certificate will not be sent to the hostname even if activated at the zone level. 100 maximum associations on a single certificate are allowed. Note: Use a null value for parameter enabled to invalidate the association.
REPLACE cloudflare.origin_tls_client_auth.hostnames
SET
config = '{{ config }}'
WHERE
zone_id = '{{ zone_id }}' --required
AND config = '{{ config }}' --required
RETURNING
errors,
messages,
result,
result_info,
success;