certificates
Creates, updates, deletes, gets or lists a certificates resource.
Overview
| Name | certificates |
| Type | Resource |
| Id | deno.domains.certificates |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Certificate identifier |
created_at | string | ISO 8601 timestamp of when the certificate was stored |
kind | string | automatic for ACME-provisioned certificates, manual for user-uploaded ones (automatic, manual) |
not_valid_after | string | ISO 8601 end of validity window |
not_valid_before | string | ISO 8601 start of validity window |
private_key_algorithm | string | Private key algorithm (ec-p256, ec-p384, ec-p521, rsa-2048, rsa-3072, rsa-4096) |
subject_alt_names | array | All hostnames covered by this certificate |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | domain | Returns the current certificate set plus the latest provisioning attempt's status. Clients poll this endpoint to observe progress of an in-flight provisioning request. Accepts the domain id or name. | |
upload | insert | domain, certificate, private_key | Upload a PEM-encoded certificate and private key. The server validates that the certificate covers the domain and that the key algorithm is RSA-2048 or EC P-256. Accepts the domain id or name. | |
provision | exec | domain | Schedules an ACME-based certificate to be provisioned for the domain. Returns immediately with 202 Accepted; poll GET /domains/{domain}/certificates for status. Accepts the domain id or name. |
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 |
|---|---|---|
domain | string | The domain ID or name (e.g. example.com). Domain IDs are UUIDs. |
SELECT examples
- list
Returns the current certificate set plus the latest provisioning attempt's status. Clients poll this endpoint to observe progress of an in-flight provisioning request. Accepts the domain id or name.
SELECT
id,
created_at,
kind,
not_valid_after,
not_valid_before,
private_key_algorithm,
subject_alt_names
FROM deno.domains.certificates
WHERE domain = '{{ domain }}' -- required
;
INSERT examples
- upload
- Manifest
Upload a PEM-encoded certificate and private key. The server validates that the certificate covers the domain and that the key algorithm is RSA-2048 or EC P-256. Accepts the domain id or name.
INSERT INTO deno.domains.certificates (
certificate,
private_key,
domain
)
SELECT
'{{ certificate }}' /* required */,
'{{ private_key }}' /* required */,
'{{ domain }}'
RETURNING
id,
organization_id,
certificates,
created_at,
dns_records,
domain,
is_validated,
kind,
provisioning_status,
updated_at,
verification_token
;
# Description fields are for documentation purposes
- name: certificates
props:
- name: domain
value: "{{ domain }}"
description: Required parameter for the certificates resource.
- name: certificate
value: "{{ certificate }}"
description: |
PEM-encoded certificate (full chain)
- name: private_key
value: "{{ private_key }}"
description: |
PEM-encoded private key matching the certificate
Lifecycle Methods
- provision
Schedules an ACME-based certificate to be provisioned for the domain. Returns immediately with 202 Accepted; poll GET /domains/{domain}/certificates for status. Accepts the domain id or name.
EXEC deno.domains.certificates.provision
@domain='{{ domain }}' --required
;