Skip to main content

certificates

Creates, updates, deletes, gets or lists a certificates resource.

Overview​

Namecertificates
TypeResource
Iddeno.domains.certificates

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringCertificate identifier
created_atstringISO 8601 timestamp of when the certificate was stored
kindstringautomatic for ACME-provisioned certificates, manual for user-uploaded ones (automatic, manual)
not_valid_afterstringISO 8601 end of validity window
not_valid_beforestringISO 8601 start of validity window
private_key_algorithmstringPrivate key algorithm (ec-p256, ec-p384, ec-p521, rsa-2048, rsa-3072, rsa-4096)
subject_alt_namesarrayAll hostnames covered by this certificate

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectdomainReturns 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.
uploadinsertdomain, certificate, private_keyUpload 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.
provisionexecdomainSchedules 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.

NameDatatypeDescription
domainstringThe domain ID or name (e.g. example.com). Domain IDs are UUIDs.

SELECT examples​

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 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
;

Lifecycle Methods​

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
;