Skip to main content

domains

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

Overview​

Namedomains
TypeResource
Idovh.email_domain.domains

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
migrated_mx_plan_service_namestringName of new MXPlan service (wire: migratedMXPlanServiceName)
allowed_account_sizearrayList of allowed sizes for this domain in bytes (wire: allowedAccountSize)
creation_datestring (date-time)Creation date of domain (wire: creationDate)
domainstringName of domain
filerzintegerFilerz of domain
iamobjectIAM resource metadata
is_mx_validstringResult of MX check if current MX fit to OVH recommendations (checkFail, invalid, none, unknown, valid) (wire: isMXValid)
is_spf_validstringResult of SPF check if current SPF fit to OVH recommendations (checkFail, invalid, none, unknown, valid) (wire: isSPFValid)
link_tostringName of servicelinked with this domain (wire: linkTo)
offerstringOffer of email service
statusstringDomain Status (close, ok, readOnly, unknown)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdomainGet the email domain. Returns the status, offer, creation date, linked service and allowed account sizes of the email domain, with the results of its MX and SPF checks.
listselectiam_tags, x_pagination_modeList MX Plan domains. Returns the domains of the account with an MX Plan email service. Filter them by IAM tags with iamTags.
change_contactexecdomainChange service contacts. Starts a procedure to change the admin, tech or billing contact of the service.
change_dns_mx_filterexecdomain, mxFilterChange MX filter. Changes the MX DNS records of the domain, or of subDomain, to apply the mxFilter filter. With CUSTOM, customTarget gives the target server.
confirm_terminationexecdomain, tokenConfirm service termination. Terminates the email service with the termination token. A reason and a comment can be given.
migrate_delegation_v3to_v6execdomainMigrate V3 delegations. Converts the delegations of the domain made with the former delegation system (V3) to the current one (V6).
terminateexecdomainRequest service termination. Starts the termination of the email service, to confirm with the confirmTermination call.

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"}})
domainstringName of your domain name
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
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 the email domain. Returns the status, offer, creation date, linked service and allowed account sizes of the email domain, with the results of its MX and SPF checks.

SELECT
migrated_mx_plan_service_name,
allowed_account_size,
creation_date,
domain,
filerz,
iam,
is_mx_valid,
is_spf_valid,
link_to,
offer,
status
FROM ovh.email_domain.domains
WHERE domain = '{{ domain }}' -- required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service.

EXEC ovh.email_domain.domains.change_contact
@domain='{{ domain }}' --required
@@json=
'{
"contactAdmin": "{{ contactAdmin }}",
"contactBilling": "{{ contactBilling }}",
"contactTech": "{{ contactTech }}"
}'
;