domains
Creates, updates, deletes, gets or lists a domains resource.
Overview​
| Name | domains |
| Type | Resource |
| Id | ovh.email_mxplan.domains |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | Domain name |
task_pending_id | integer | Pending taks id (wire: taskPendingId) |
cname_to_check | string | Cname that will be checked to prove the domain ownership (wire: cnameToCheck) |
domain_aliases | array | List of aliases for this domain (wire: domainAliases) |
domain_validated | boolean | Domain validation status (wire: domainValidated) |
expected_mx | array | Expected MX record(s) on this domain (wire: expectedMX) |
is_alias_domain | boolean | Indicate if this domain is an alias for another domain (wire: isAliasDomain) |
mx_is_valid | boolean | If true your dns mx configuration is valid (wire: mxIsValid) |
mx_record | array | Domain MX record configured in DNS (wire: mxRecord) |
mx_relay | string | If specified, emails to not existing address will be redirected to that domain (wire: mxRelay) |
srv_is_valid | boolean | If true your dns srv record is valid (wire: srvIsValid) |
srv_record | array | Domain SRV record configured in DNS (wire: srvRecord) |
state | string | Domain state (creating, deleting, ok, reopening, suspended, suspending, unknown) |
type | string | Domain type (authoritative, nonAuthoritative) |
Domain
| Name | Datatype | Description |
|---|---|---|
name | string | Domain name |
task_pending_id | integer | Pending taks id (wire: taskPendingId) |
cname_to_check | string | Cname that will be checked to prove the domain ownership (wire: cnameToCheck) |
domain_aliases | array | List of aliases for this domain (wire: domainAliases) |
domain_validated | boolean | Domain validation status (wire: domainValidated) |
expected_mx | array | Expected MX record(s) on this domain (wire: expectedMX) |
is_alias_domain | boolean | Indicate if this domain is an alias for another domain (wire: isAliasDomain) |
mx_is_valid | boolean | If true your dns mx configuration is valid (wire: mxIsValid) |
mx_record | array | Domain MX record configured in DNS (wire: mxRecord) |
mx_relay | string | If specified, emails to not existing address will be redirected to that domain (wire: mxRelay) |
srv_is_valid | boolean | If true your dns srv record is valid (wire: srvIsValid) |
srv_record | array | Domain SRV record configured in DNS (wire: srvRecord) |
state | string | Domain state (creating, deleting, ok, reopening, suspended, suspending, unknown) |
type | string | Domain type (authoritative, nonAuthoritative) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | domain_name, service | 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. | |
list | select | service | state, x_pagination_mode | List domains. Returns the names of the domains attached to the service. Filter them by state, such as ok or suspended. |
update | update | domain_name, service | 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. |
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"}}) |
domain_name | string | Domain name (wire: domainName) |
service | string | The internal name of your mxplan organization |
state | string | Filter the value of state property (=) |
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
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
;
List domains. Returns the names of the domains attached to the service. Filter them by state, such as ok or suspended.
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 service = '{{ service }}' -- required
AND state = '{{ state }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
UPDATE examples​
- update
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;