account_diagnostics
Creates, updates, deletes, gets or lists an account_diagnostics resource.
Overview​
| Name | account_diagnostics |
| Type | Resource |
| Id | ovh.email_mxplan.account_diagnostics |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
can_receive_email | boolean | Determines if ingoing message has been received (wire: canReceiveEmail) |
can_send_email | boolean | Determines if outgoing message has been delivered (wire: canSendEmail) |
connective_webmail | boolean | Determines if possible to authenticate with credentials (wire: connectiveWebmail) |
is_locked | boolean | Determines if account is locked (wire: isLocked) |
is_mx_valid | boolean | Determines if MX record for account's domain is properly set (wire: isMxValid) |
is_spammer | boolean | Determines if account is flagged as spammer (wire: isSpammer) |
is_srv_valid | boolean | Determines if SRV (autodiscovery) record for account's domain is properly set (wire: isSrvValid) |
is_suspended | boolean | Determines if account is suspended (wire: isSuspended) |
last_check | string (date-time) | Last performed diagnostics date (wire: lastCheck) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | email, service | Get the account diagnosis. Returns the results of the last diagnosis of the email account: account locked, suspended or flagged as spammer, login with its credentials, MX and SRV records, and sending and receiving of emails. | |
create | insert | email, service, password | Run an account diagnosis. Starts a diagnosis of the email account, which requires the account password, 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"}}) |
email | string | Default email for this mailbox |
service | string | The internal name of your mxplan organization |
SELECT examples​
- get
Get the account diagnosis. Returns the results of the last diagnosis of the email account: account locked, suspended or flagged as spammer, login with its credentials, MX and SRV records, and sending and receiving of emails.
SELECT
can_receive_email,
can_send_email,
connective_webmail,
is_locked,
is_mx_valid,
is_spammer,
is_srv_valid,
is_suspended,
last_check
FROM ovh.email_mxplan.account_diagnostics
WHERE email = '{{ email }}' -- required
AND service = '{{ service }}' -- required
;
INSERT examples​
- create
- Manifest
Run an account diagnosis. Starts a diagnosis of the email account, which requires the account password, and returns the task.
INSERT INTO ovh.email_mxplan.account_diagnostics (
password,
email,
service
)
SELECT
'{{ password }}' /* required */,
'{{ email }}',
'{{ service }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;
# Description fields are for documentation purposes
- name: account_diagnostics
props:
- name: email
value: "{{ email }}"
description: Required parameter for the account_diagnostics resource.
- name: service
value: "{{ service }}"
description: Required parameter for the account_diagnostics resource.
- name: password
value: "{{ password }}"
description: |
Account password