certificates
Creates, updates, deletes, gets or lists a certificates
resource.
Overview
Name | certificates |
Type | Resource |
Id | digitalocean.certificates.certificates |
Fields
Name | Datatype | Description |
---|---|---|
id | string | A unique ID that can be used to identify and reference a certificate. |
name | string | A unique human-readable name referring to a certificate. |
created_at | string | A time value given in ISO8601 combined date and time format that represents when the certificate was created. |
dns_names | array | An array of fully qualified domain names (FQDNs) for which the certificate was issued. |
not_after | string | A time value given in ISO8601 combined date and time format that represents the certificate's expiration date. |
sha1_fingerprint | string | A unique identifier generated from the SHA-1 fingerprint of the certificate. |
state | string | A string representing the current state of the certificate. It may be pending , verified , or error . |
type | string | A string representing the type of the certificate. The value will be custom for a user-uploaded certificate or lets_encrypt for one automatically generated with Let's Encrypt. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
certificates_get | SELECT | certificate_id | To show information about an existing certificate, send a GET request to /v2/certificates/$CERTIFICATE_ID . |
certificates_list | SELECT |
| To list all of the certificates available on your account, send a GET request to /v2/certificates . |
certificates_create | INSERT |
| To upload new SSL certificate which you have previously generated, send a POST request to /v2/certificates . When uploading a user-generated certificate, the private_key , leaf_certificate , and optionally the certificate_chain attributes should be provided. The type must be set to custom . When using Let's Encrypt to create a certificate, the dns_names attribute must be provided, and the type must be set to lets_encrypt . |
certificates_delete | DELETE | certificate_id | To delete a specific certificate, send a DELETE request to /v2/certificates/$CERTIFICATE_ID . |
SELECT
examples
To list all of the certificates available on your account, send a GET request to /v2/certificates
.
SELECT
id,
name,
created_at,
dns_names,
not_after,
sha1_fingerprint,
state,
type
FROM digitalocean.certificates.certificates
;
INSERT
example
Use the following StackQL query and manifest file to create a new certificates
resource.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO digitalocean.certificates.certificates (
data__name,
data__type,
data__dns_names
)
SELECT
'{{ name }}',
'{{ type }}',
'{{ dns_names }}'
;
/*+ create */
INSERT INTO digitalocean.certificates.certificates (
data__dns_names
)
SELECT
'{{ dns_names }}'
;
- name: certificates
props:
- name: name
value: string
- name: type
value: string
- name: dns_names
value: array
DELETE
example
Deletes the specified certificates
resource.
/*+ delete */
DELETE FROM digitalocean.certificates.certificates
WHERE certificate_id = '{{ certificate_id }}';