Skip to main content

ssls

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

Overview​

Namessls
TypeResource
Idovh.cdn_dedicated.ssls

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestring
certificate_providerstringProvider of the certificate installed on CDN (wire: certificateProvider)
certificate_valid_fromstring (date-time) (wire: certificateValidFrom)
certificate_valid_tostring (date-time) (wire: certificateValidTo)
cnstring
statusstringAll states a CDN SSL can be in (checking, creating, error, off, on, removing, updating, uploading)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_nameGet the SSL certificate
createinsertservice_name, nameCreate an SSL certificate
deletedeleteservice_nameDelete the SSL certificate
updateexecserviceName, certificate, keyUpdate 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.

NameDatatypeDescription
api_hoststringThe 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"}})
serviceNamestringThe internal name of your CDN offer
service_namestringThe internal name of your CDN offer (wire: serviceName)

SELECT examples​

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

DELETE examples​

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 the SSL certificate

EXEC ovh.cdn_dedicated.ssls.update
@serviceName='{{ serviceName }}' --required
@@json=
'{
"certificate": "{{ certificate }}",
"chain": "{{ chain }}",
"key": "{{ key }}"
}'
;