domains
Creates, updates, deletes, gets or lists a domains resource.
Overview​
| Name | domains |
| Type | Resource |
| Id | ovh.email_domain.domains |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
migrated_mx_plan_service_name | string | Name of new MXPlan service (wire: migratedMXPlanServiceName) |
allowed_account_size | array | List of allowed sizes for this domain in bytes (wire: allowedAccountSize) |
creation_date | string (date-time) | Creation date of domain (wire: creationDate) |
domain | string | Name of domain |
filerz | integer | Filerz of domain |
iam | object | IAM resource metadata |
is_mx_valid | string | Result of MX check if current MX fit to OVH recommendations (checkFail, invalid, none, unknown, valid) (wire: isMXValid) |
is_spf_valid | string | Result of SPF check if current SPF fit to OVH recommendations (checkFail, invalid, none, unknown, valid) (wire: isSPFValid) |
link_to | string | Name of servicelinked with this domain (wire: linkTo) |
offer | string | Offer of email service |
status | string | Domain Status (close, ok, readOnly, unknown) |
Domain service
| Name | Datatype | Description |
|---|---|---|
migrated_mx_plan_service_name | string | Name of new MXPlan service (wire: migratedMXPlanServiceName) |
allowed_account_size | array | List of allowed sizes for this domain in bytes (wire: allowedAccountSize) |
creation_date | string (date-time) | Creation date of domain (wire: creationDate) |
domain | string | Name of domain |
filerz | integer | Filerz of domain |
iam | object | IAM resource metadata |
is_mx_valid | string | Result of MX check if current MX fit to OVH recommendations (checkFail, invalid, none, unknown, valid) (wire: isMXValid) |
is_spf_valid | string | Result of SPF check if current SPF fit to OVH recommendations (checkFail, invalid, none, unknown, valid) (wire: isSPFValid) |
link_to | string | Name of servicelinked with this domain (wire: linkTo) |
offer | string | Offer of email service |
status | string | Domain Status (close, ok, readOnly, unknown) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | domain | 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. | |
list | select | iam_tags, x_pagination_mode | List MX Plan domains. Returns the domains of the account with an MX Plan email service. Filter them by IAM tags with iamTags. | |
change_contact | exec | domain | Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service. | |
change_dns_mx_filter | exec | domain, mxFilter | Change 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_termination | exec | domain, token | Confirm service termination. Terminates the email service with the termination token. A reason and a comment can be given. | |
migrate_delegation_v3to_v6 | exec | domain | Migrate V3 delegations. Converts the delegations of the domain made with the former delegation system (V3) to the current one (V6). | |
terminate | exec | domain | Request 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.
| 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 | string | Name of your domain name |
iam_tags | object | Filter resources on IAM tags (wire: iamTags) |
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 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
;
List MX Plan domains. Returns the domains of the account with an MX Plan email service. Filter them by IAM tags with iamTags.
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 iam_tags = '{{ iam_tags }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- change_contact
- change_dns_mx_filter
- confirm_termination
- migrate_delegation_v3to_v6
- terminate
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 }}"
}'
;
Change 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.
EXEC ovh.email_domain.domains.change_dns_mx_filter
@domain='{{ domain }}' --required
@@json=
'{
"customTarget": "{{ customTarget }}",
"mxFilter": "{{ mxFilter }}",
"subDomain": "{{ subDomain }}"
}'
;
Confirm service termination. Terminates the email service with the termination token. A reason and a comment can be given.
EXEC ovh.email_domain.domains.confirm_termination
@domain='{{ domain }}' --required
@@json=
'{
"commentary": "{{ commentary }}",
"reason": "{{ reason }}",
"token": "{{ token }}"
}'
;
Migrate V3 delegations. Converts the delegations of the domain made with the former delegation system (V3) to the current one (V6).
EXEC ovh.email_domain.domains.migrate_delegation_v3to_v6
@domain='{{ domain }}' --required
;
Request service termination. Starts the termination of the email service, to confirm with the confirmTermination call.
EXEC ovh.email_domain.domains.terminate
@domain='{{ domain }}' --required
;