Skip to main content

service_domain_dkims

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

Overview​

Nameservice_domain_dkims
TypeResource
Idovh.email_exchange.service_domain_dkims

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
task_pending_idintegerPending task for this DKIM (wire: taskPendingId)
selector_namestringselectorName (wire: selectorName)
cname_is_validbooleanIf true your dns cname configuration is valid (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 (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, exchange_service, organization_name, selector_nameGet a DKIM selector. Returns the status of the DKIM selector, the DNS record to create (name, type and target) and whether the CNAME record is valid.
listselectdomain_name, exchange_service, organization_namex_pagination_modeList DKIM selectors. Returns the names of the DKIM selectors of the domain. Get one to read its DNS record and its status.
createinsertdomain_name, exchange_service, organization_name, selector_nameCreate a DKIM selector. Creates a DKIM selector on the domain and returns the task. For a domain hosted by OVHcloud, configureDkim creates the DNS record and autoEnableDKIM enables the selector once configured.
deletedeletedomain_name, exchange_service, organization_name, selector_nameDelete a DKIM selector. Removes the DKIM selector and its key from the domain of the Exchange service, and returns the task.
disableexecdomainName, exchangeService, organizationName, selectorNameDisable DKIM signing. Stops signing the emails of the domain with this DKIM selector, and returns the task. The selector is kept.
enableexecdomainName, exchangeService, organizationName, selectorNameEnable DKIM signing. Enables DKIM signing with the selector, or switches the selector in use to this one, 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)
exchangeServicestringThe internal name of your exchange service
exchange_servicestringThe internal name of your exchange service (wire: exchangeService)
organizationNamestringThe internal name of your exchange organization
organization_namestringThe internal name of your exchange organization (wire: organizationName)
selectorNamestringselectorName
selector_namestringselectorName (wire: selectorName)
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​

Get a DKIM selector. Returns the status of the DKIM selector, the DNS record to create (name, type and target) and whether the CNAME record is valid.

SELECT
task_pending_id,
selector_name,
cname_is_valid,
customer_record,
header,
last_update,
record_type,
status,
target_record
FROM ovh.email_exchange.service_domain_dkims
WHERE domain_name = '{{ domain_name }}' -- required
AND exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND selector_name = '{{ selector_name }}' -- required
;

INSERT examples​

Create a DKIM selector. Creates a DKIM selector on the domain and returns the task. For a domain hosted by OVHcloud, configureDkim creates the DNS record and autoEnableDKIM enables the selector once configured.

INSERT INTO ovh.email_exchange.service_domain_dkims (
auto_enable_dkim,
configure_dkim,
selector_name,
domain_name,
exchange_service,
organization_name
)
SELECT
{{ auto_enable_dkim }},
{{ configure_dkim }},
'{{ selector_name }}' /* required */,
'{{ domain_name }}',
'{{ exchange_service }}',
'{{ organization_name }}'
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 Exchange service, and returns the task.

DELETE FROM ovh.email_exchange.service_domain_dkims
WHERE domain_name = '{{ domain_name }}' --required
AND exchange_service = '{{ exchange_service }}' --required
AND organization_name = '{{ organization_name }}' --required
AND selector_name = '{{ selector_name }}' --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_exchange.service_domain_dkims.disable
@domainName='{{ domainName }}' --required,
@exchangeService='{{ exchangeService }}' --required,
@organizationName='{{ organizationName }}' --required,
@selectorName='{{ selectorName }}' --required
;