ssls
Creates, updates, deletes, gets or lists a ssls resource.
Overview​
| Name | ssls |
| Type | Resource |
| Id | ovh.cdn_dedicated.ssls |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | |
certificate_provider | string | Provider of the certificate installed on CDN (wire: certificateProvider) |
certificate_valid_from | string (date-time) | (wire: certificateValidFrom) |
certificate_valid_to | string (date-time) | (wire: certificateValidTo) |
cn | string | |
status | string | All states a CDN SSL can be in (checking, creating, error, off, on, removing, updating, uploading) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name | Get the SSL certificate | |
create | insert | service_name, name | Create an SSL certificate | |
delete | delete | service_name | Delete the SSL certificate | |
update | exec | serviceName, certificate, key | Update the SSL 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 |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
serviceName | string | The internal name of your CDN offer |
service_name | string | The internal name of your CDN offer (wire: serviceName) |
SELECT examples​
- get
Get the SSL certificate
SELECT
name,
certificate_provider,
certificate_valid_from,
certificate_valid_to,
cn,
status
FROM ovh.cdn_dedicated.ssls
WHERE service_name = '{{ service_name }}' -- required
;
INSERT examples​
- create
- Manifest
Create an SSL certificate
INSERT INTO ovh.cdn_dedicated.ssls (
certificate,
chain,
key,
name,
service_name
)
SELECT
'{{ certificate }}',
'{{ chain }}',
'{{ key }}',
'{{ name }}' /* required */,
'{{ service_name }}'
RETURNING
name,
certificate_provider,
certificate_valid_from,
certificate_valid_to,
cn,
status
;
# Description fields are for documentation purposes
- name: ssls
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the ssls resource.
- name: certificate
value: "{{ certificate }}"
description: |
certificate (empty for lets encrypt generation)
- name: chain
value: "{{ chain }}"
description: |
certificate chain (empty for lets encrypt generation)
- name: key
value: "{{ key }}"
description: |
certificate key (empty for lets encrypt generation)
- name: name
value: "{{ name }}"
description: |
ssl name to add on CDN
DELETE examples​
- delete
Delete the SSL certificate
DELETE FROM ovh.cdn_dedicated.ssls
WHERE service_name = '{{ service_name }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- update
Update the SSL certificate
EXEC ovh.cdn_dedicated.ssls.update
@serviceName='{{ serviceName }}' --required
@@json=
'{
"certificate": "{{ certificate }}",
"chain": "{{ chain }}",
"key": "{{ key }}"
}'
;