Skip to main content

ssls

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

Overview​

Namessls
TypeResource
Idovh.hosting_web.ssls

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
task_idintegerThe task ID working on this Hosted SSL (wire: taskId)
is_reportablebooleanIf the hostedssl is currently bound to a report (wire: isReportable)
providerstringProvider of the Hosted SSL (COMODO, CUSTOM, LETSENCRYPT, SECTIGO)
regenerablebooleanRegenerable flag
statusstringStatus of the Hosted SSL (created, creating, deleting, importing, regenerating)
typestringType of the Hosted SSL (CUSTOM, DV, EV)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_nameReturns the provider, type and status of the SSL certificate of the hosting.
createinsertservice_nameCreates the free Let's Encrypt SSL certificate of the hosting. To import a custom certificate instead, send the certificate, its private key and its chain.
deletedeleteservice_nameDeletes the SSL certificate of the hosting.
regenerateexecserviceNameRegenerates the SSL certificate of the hosting.

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"}})
serviceNamestringService name
service_namestringService name (wire: serviceName)

SELECT examples​

Returns the provider, type and status of the SSL certificate of the hosting.

SELECT
task_id,
is_reportable,
provider,
regenerable,
status,
type
FROM ovh.hosting_web.ssls
WHERE service_name = '{{ service_name }}' -- required
;

INSERT examples​

Creates the free Let's Encrypt SSL certificate of the hosting. To import a custom certificate instead, send the certificate, its private key and its chain.

INSERT INTO ovh.hosting_web.ssls (
certificate,
chain,
key,
service_name
)
SELECT
'{{ certificate }}',
'{{ chain }}',
'{{ key }}',
'{{ service_name }}'
RETURNING
task_id,
is_reportable,
provider,
regenerable,
status,
type
;

DELETE examples​

Deletes the SSL certificate of the hosting.

DELETE FROM ovh.hosting_web.ssls
WHERE service_name = '{{ service_name }}' --required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Regenerates the SSL certificate of the hosting.

EXEC ovh.hosting_web.ssls.regenerate
@serviceName='{{ serviceName }}' --required
;