Skip to main content

domain_dkims

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

Overview​

Namedomain_dkims
TypeResource
Idovh.email_pro.domain_dkims

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
task_pending_idintegerPending task for this DKIM (wire: taskPendingId)
selector_namestringSelector name (wire: selectorName)
cname_is_validbooleanDNS CNAME validation passed (wire: cnameIsValid)
customer_recordstringCustomer DNS record (wire: customerRecord)
headerstringHeader used for DKIM signature
last_updatestring (date-time)Last update date (wire: lastUpdate)
record_typestringRecord type of the customer record (CNAME) (wire: recordType)
statusstringDKIM status (deleting, disabling, enabling, inProduction, ready, todo, waitingRecord)
target_recordstringTarget of the customer record (wire: targetRecord)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdomain_name, selector_name, serviceReturns the status of the DKIM selector, the CNAME record to add to the DNS zone with its target and validation status, and the header used for the DKIM signature. (Alpha version)
listselectdomain_name, servicex_pagination_modeReturns the names of the DKIM selectors of the domain. Get one to read its DNS record and its status. (Alpha version)
createinsertdomain_name, service, selector_nameCreate a DKIM selector. Creates the DKIM selector selectorName on the domain and returns the task. Set configureDkim to configure its DNS record when the domain is hosted by OVHcloud, and autoEnableDKIM to enable it once configured.
deletedeletedomain_name, selector_name, serviceDelete a DKIM selector. Removes the DKIM selector and its key from the domain of the Email Pro service, and returns the task.
disableexecdomainName, selectorName, serviceDisable DKIM signing. Stops signing the emails of the domain with this DKIM selector, and returns the task. The selector is kept.
enableexecdomainName, selectorName, serviceEnable DKIM signing. Signs the emails of the domain with the DKIM selector, or switches to it from the selector in use, and returns the task.

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"}})
domainNamestringDomain name
domain_namestringDomain name (wire: domainName)
selectorNamestringselectorName
selector_namestringselectorName (wire: selectorName)
servicestringThe internal name of your pro organization
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Returns the status of the DKIM selector, the CNAME record to add to the DNS zone with its target and validation status, and the header used for the DKIM signature. (Alpha version)

SELECT
task_pending_id,
selector_name,
cname_is_valid,
customer_record,
header,
last_update,
record_type,
status,
target_record
FROM ovh.email_pro.domain_dkims
WHERE domain_name = '{{ domain_name }}' -- required
AND selector_name = '{{ selector_name }}' -- required
AND service = '{{ service }}' -- required
;

INSERT examples​

Create a DKIM selector. Creates the DKIM selector selectorName on the domain and returns the task. Set configureDkim to configure its DNS record when the domain is hosted by OVHcloud, and autoEnableDKIM to enable it once configured.

INSERT INTO ovh.email_pro.domain_dkims (
auto_enable_dkim,
configure_dkim,
selector_name,
domain_name,
service
)
SELECT
{{ auto_enable_dkim }},
{{ configure_dkim }},
'{{ selector_name }}' /* required */,
'{{ domain_name }}',
'{{ service }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;

DELETE examples​

Delete a DKIM selector. Removes the DKIM selector and its key from the domain of the Email Pro service, and returns the task.

DELETE FROM ovh.email_pro.domain_dkims
WHERE domain_name = '{{ domain_name }}' --required
AND selector_name = '{{ selector_name }}' --required
AND service = '{{ service }}' --required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Disable DKIM signing. Stops signing the emails of the domain with this DKIM selector, and returns the task. The selector is kept.

EXEC ovh.email_pro.domain_dkims.disable
@domainName='{{ domainName }}' --required,
@selectorName='{{ selectorName }}' --required,
@service='{{ service }}' --required
;