Skip to main content

service_account_diagnostics

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

Overview​

Nameservice_account_diagnostics
TypeResource
Idovh.email_exchange.service_account_diagnostics

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
can_receive_emailbooleanDetermines if ingoing message has been received (wire: canReceiveEmail)
can_send_emailbooleanDetermines if outgoing message has been delivered (wire: canSendEmail)
connective_owabooleanDetermines if possible to authenticate with credentials (wire: connectiveOWA)
is_lockedbooleanDetermines if account is locked (wire: isLocked)
is_mx_validbooleanDetermines if MX record for account's domain is properly set (wire: isMxValid)
is_spammerbooleanDetermines if account is flagged as spammer (wire: isSpammer)
is_srv_validbooleanDetermines if SRV (autodiscovery) record for account's domain is properly set (wire: isSrvValid)
is_suspendedbooleanDetermines if account is suspended (wire: isSuspended)
last_checkstring (date-time)Last performed diagnostics date (wire: lastCheck)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectexchange_service, organization_name, primary_email_addressGet the account diagnosis. Returns the results of the last diagnosis of the email account: sending, receiving, webmail login, lock, suspension, spam flag, and MX and SRV records.
createinsertexchange_service, organization_name, primary_email_address, passwordRun an account diagnosis. Starts a diagnosis of the email account, which needs its 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.

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"}})
exchange_servicestringThe internal name of your exchange service (wire: exchangeService)
organization_namestringThe internal name of your exchange organization (wire: organizationName)
primary_email_addressstringDefault email for this mailbox (wire: primaryEmailAddress)

SELECT examples​

Get the account diagnosis. Returns the results of the last diagnosis of the email account: sending, receiving, webmail login, lock, suspension, spam flag, and MX and SRV records.

SELECT
can_receive_email,
can_send_email,
connective_owa,
is_locked,
is_mx_valid,
is_spammer,
is_srv_valid,
is_suspended,
last_check
FROM ovh.email_exchange.service_account_diagnostics
WHERE exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND primary_email_address = '{{ primary_email_address }}' -- required
;

INSERT examples​

Run an account diagnosis. Starts a diagnosis of the email account, which needs its password, and returns the task.

INSERT INTO ovh.email_exchange.service_account_diagnostics (
password,
exchange_service,
organization_name,
primary_email_address
)
SELECT
'{{ password }}' /* required */,
'{{ exchange_service }}',
'{{ organization_name }}',
'{{ primary_email_address }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;