Skip to main content

domains

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

Overview​

Namedomains
TypeResource
Idovh.email_mxplan.domains

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringDomain name
task_pending_idintegerPending taks id (wire: taskPendingId)
cname_to_checkstringCname that will be checked to prove the domain ownership (wire: cnameToCheck)
domain_aliasesarrayList of aliases for this domain (wire: domainAliases)
domain_validatedbooleanDomain validation status (wire: domainValidated)
expected_mxarrayExpected MX record(s) on this domain (wire: expectedMX)
is_alias_domainbooleanIndicate if this domain is an alias for another domain (wire: isAliasDomain)
mx_is_validbooleanIf true your dns mx configuration is valid (wire: mxIsValid)
mx_recordarrayDomain MX record configured in DNS (wire: mxRecord)
mx_relaystringIf specified, emails to not existing address will be redirected to that domain (wire: mxRelay)
srv_is_validbooleanIf true your dns srv record is valid (wire: srvIsValid)
srv_recordarrayDomain SRV record configured in DNS (wire: srvRecord)
statestringDomain state (creating, deleting, ok, reopening, suspended, suspending, unknown)
typestringDomain type (authoritative, nonAuthoritative)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdomain_name, serviceGet a domain. Returns the type and state of the domain, its MX and SRV records with their validation status, the expected MX records, its MX relay and its aliases.
listselectservicestate, x_pagination_modeList domains. Returns the names of the domains attached to the service. Filter them by state, such as ok or suspended.
updateupdatedomain_name, serviceUpdate a domain. Updates the type of the domain, authoritative or nonAuthoritative, and its mxRelay, the domain that receives the emails sent to addresses that do not exist.

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"}})
domain_namestringDomain name (wire: domainName)
servicestringThe internal name of your mxplan organization
statestringFilter the value of state property (=)
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 domain. Returns the type and state of the domain, its MX and SRV records with their validation status, the expected MX records, its MX relay and its aliases.

SELECT
name,
task_pending_id,
cname_to_check,
domain_aliases,
domain_validated,
expected_mx,
is_alias_domain,
mx_is_valid,
mx_record,
mx_relay,
srv_is_valid,
srv_record,
state,
type
FROM ovh.email_mxplan.domains
WHERE domain_name = '{{ domain_name }}' -- required
AND service = '{{ service }}' -- required
;

UPDATE examples​

Update a domain. Updates the type of the domain, authoritative or nonAuthoritative, and its mxRelay, the domain that receives the emails sent to addresses that do not exist.

UPDATE ovh.email_mxplan.domains
SET
mx_relay = '{{ mx_relay }}',
type = '{{ type }}'
WHERE
domain_name = '{{ domain_name }}' --required
AND service = '{{ service }}' --required;