Skip to main content

email_pros

Creates, updates, deletes, gets or lists an email_pros resource.

Overview​

Nameemail_pros
TypeResource
Idovh.xdsl.email_pros

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerAccount id
task_pending_idintegerPending tasks for this account (wire: taskPendingId)
display_namestringAccount display name (wire: displayName)
first_namestringAccount first name (wire: firstName)
last_namestringAccount last name (wire: lastName)
current_usageobjectMailbox usage (wire: currentUsage)
domainstringEmail domain
iamobjectIAM resource metadata
initialstringAccount initials
last_logoff_datestring (date-time)Last logoff (wire: lastLogoffDate)
last_logon_datestring (date-time)Last logon (wire: lastLogonDate)
loginstringAccount login
password_last_updatestring (date-time)Time of account's password last update (wire: passwordLastUpdate)
primary_email_addressstringDefault email for this mailbox (wire: primaryEmailAddress)
quotaobjectAccount maximum size
statestringAccount state (creating, deleting, ok, reopening, suspended, suspending, unknown)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectemailReturns the login, names, primary address, quota and usage, state and last logon and logoff dates of an Email Pro account.
listselectiam_tags, x_pagination_modeReturns the email addresses of the Email Pro accounts provided with the xDSL accesses.
updateupdateemailChanges the first name, last name, initials and display name of the Email Pro account.
deletedeleteemailDeletes the Email Pro account and its mailbox.
change_passwordexecemail, passwordSets a new password for the Email Pro account. Returns the task that performs the change.

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"}})
emailstringEmail
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​

Returns the login, names, primary address, quota and usage, state and last logon and logoff dates of an Email Pro account.

SELECT
id,
task_pending_id,
display_name,
first_name,
last_name,
current_usage,
domain,
iam,
initial,
last_logoff_date,
last_logon_date,
login,
password_last_update,
primary_email_address,
quota,
state
FROM ovh.xdsl.email_pros
WHERE email = '{{ email }}' -- required
;

UPDATE examples​

Changes the first name, last name, initials and display name of the Email Pro account.

UPDATE ovh.xdsl.email_pros
SET
display_name = '{{ display_name }}',
first_name = '{{ first_name }}',
initial = '{{ initial }}',
last_name = '{{ last_name }}'
WHERE
email = '{{ email }}' --required;

DELETE examples​

Deletes the Email Pro account and its mailbox.

DELETE FROM ovh.xdsl.email_pros
WHERE email = '{{ email }}' --required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Sets a new password for the Email Pro account. Returns the task that performs the change.

EXEC ovh.xdsl.email_pros.change_password
@email='{{ email }}' --required
@@json=
'{
"password": "{{ password }}"
}'
;