domain_dkims
Creates, updates, deletes, gets or lists a domain_dkims resource.
Overview​
| Name | domain_dkims |
| Type | Resource |
| Id | ovh.email_pro.domain_dkims |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
task_pending_id | integer | Pending task for this DKIM (wire: taskPendingId) |
selector_name | string | Selector name (wire: selectorName) |
cname_is_valid | boolean | DNS CNAME validation passed (wire: cnameIsValid) |
customer_record | string | Customer DNS record (wire: customerRecord) |
header | string | Header used for DKIM signature |
last_update | string (date-time) | Last update date (wire: lastUpdate) |
record_type | string | Record type of the customer record (CNAME) (wire: recordType) |
status | string | DKIM status (deleting, disabling, enabling, inProduction, ready, todo, waitingRecord) |
target_record | string | Target of the customer record (wire: targetRecord) |
DKIM for a domain
| Name | Datatype | Description |
|---|---|---|
task_pending_id | integer | Pending task for this DKIM (wire: taskPendingId) |
selector_name | string | Selector name (wire: selectorName) |
cname_is_valid | boolean | DNS CNAME validation passed (wire: cnameIsValid) |
customer_record | string | Customer DNS record (wire: customerRecord) |
header | string | Header used for DKIM signature |
last_update | string (date-time) | Last update date (wire: lastUpdate) |
record_type | string | Record type of the customer record (CNAME) (wire: recordType) |
status | string | DKIM status (deleting, disabling, enabling, inProduction, ready, todo, waitingRecord) |
target_record | string | Target of the customer record (wire: targetRecord) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | domain_name, selector_name, service | 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) | |
list | select | domain_name, service | x_pagination_mode | Returns the names of the DKIM selectors of the domain. Get one to read its DNS record and its status. (Alpha version) |
create | insert | domain_name, service, selector_name | 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. | |
delete | delete | domain_name, selector_name, service | Delete a DKIM selector. Removes the DKIM selector and its key from the domain of the Email Pro service, and returns the task. | |
disable | exec | domainName, selectorName, service | Disable DKIM signing. Stops signing the emails of the domain with this DKIM selector, and returns the task. The selector is kept. | |
enable | exec | domainName, selectorName, service | Enable 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.
| 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"}}) |
domainName | string | Domain name |
domain_name | string | Domain name (wire: domainName) |
selectorName | string | selectorName |
selector_name | string | selectorName (wire: selectorName) |
service | string | The internal name of your pro organization |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
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
;
Returns the names of the DKIM selectors of the domain. Get one to read its DNS record and its status. (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 service = '{{ service }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: domain_dkims
props:
- name: domain_name
value: "{{ domain_name }}"
description: Required parameter for the domain_dkims resource.
- name: service
value: "{{ service }}"
description: Required parameter for the domain_dkims resource.
- name: auto_enable_dkim
value: {{ auto_enable_dkim }}
description: |
Enable DKIM automatically after DKIM configuration
- name: configure_dkim
value: {{ configure_dkim }}
description: |
If you host domain in OVH we can configure dkim dns record automatically
- name: selector_name
value: "{{ selector_name }}"
description: |
selector name for DKIM
DELETE examples​
- delete
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
- enable
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
;
Enable 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.
EXEC ovh.email_pro.domain_dkims.enable
@domainName='{{ domainName }}' --required,
@selectorName='{{ selectorName }}' --required,
@service='{{ service }}' --required
;