access_certificates
Creates, updates, deletes, gets or lists an access_certificates resource.
Overview
| Name | access_certificates |
| Type | Resource |
| Id | cloudflare.zero_trust.access_certificates |
Fields
The following fields are returned by SELECT queries:
- get
Get an mTLS certificate response
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the application that will use this certificate. |
name | string | The name of the certificate. (example: Allow devs) |
associated_hostnames | array | The hostnames of the applications that will use this certificate. |
created_at | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
expires_on | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
fingerprint | string | The MD5 fingerprint of the certificate. (example: MD5 Fingerprint=1E:80:0F:7A:FD:31:55:96:DE:D5:CB:E2:F0:91:F6:91) |
updated_at | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | certificate_id, account_id | Fetches a single mTLS certificate. | |
create | insert | account_id, name, certificate | Adds a new mTLS root certificate to Access. | |
delete | delete | certificate_id, account_id | Deletes an mTLS certificate. |
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. |
certificate_id | string | The certificate ID. |
SELECT examples
- get
Fetches a single mTLS certificate.
SELECT
id,
name,
associated_hostnames,
created_at,
expires_on,
fingerprint,
updated_at
FROM cloudflare.zero_trust.access_certificates
WHERE certificate_id = '{{ certificate_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;
INSERT examples
- create
- Manifest
Adds a new mTLS root certificate to Access.
INSERT INTO cloudflare.zero_trust.access_certificates (
associated_hostnames,
certificate,
name,
account_id
)
SELECT
'{{ associated_hostnames }}',
'{{ certificate }}' /* required */,
'{{ name }}' /* required */,
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: access_certificates
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the access_certificates resource.
- name: associated_hostnames
value:
- "{{ associated_hostnames }}"
description: |
The hostnames of the applications that will use this certificate.
- name: certificate
value: "{{ certificate }}"
description: |
The certificate content.
- name: name
value: "{{ name }}"
description: |
The name of the certificate.
DELETE examples
- delete
Deletes an mTLS certificate.
DELETE FROM cloudflare.zero_trust.access_certificates
WHERE certificate_id = '{{ certificate_id }}' --required
AND account_id = '{{ account_id }}' --required
;